'.$lang['logfilenotwritable'].' ('.$logfile.')
'; } else { $fp = @fopen($logfile, "ab"); if($fp) { @fwrite ($fp,$log); @fclose ($fp); } else echo ''.$lang['logfilenotwritable'].' ('.$logfile.')
'; } } function WritePageParams($aktion) { global $config,$restore,$dump,$nl; $pars="$nl"; if($aktion=="dump") { $datei="dump.tmp"; foreach($dump as $var => $val){ if(is_array($val)) { foreach($val as $var2 => $val2){ if ($config['magic_quotes_gpc']==0) { $pars.='$dump[\''.$var.'\']['.((is_int($var2)) ? $var2 : "'".$var2."'").'\'] = "'.addslashes($val2)."\";$nl"; } else { $pars.='$dump[\''.$var.'\']['.((is_int($var2)) ? $var2 : "'".$var2."'").'\'] = "'.$val2."\";$nl"; } } } else { if ($config['magic_quotes_gpc']==0) { $pars.='$dump[\''.$var.'\'] = "'.addslashes($val)."\";$nl"; } else { $pars.='$dump[\''.$var.'\'] = "'.$val."\";$nl"; } } } } elseif($aktion=="restore") { $datei="restore.tmp"; foreach($restore as $var => $val){ if(is_array($val)) { foreach($val as $var2 => $val2){ if ($config['magic_quotes_gpc']==0) { $pars.='$restore[\''.$var.'\']['.((is_int($var2)) ? $var2 : "'".$var2."'").'\'] = "'.addslashes($val2)."\";$nl"; } else { $pars.='$restore[\''.$var.'\']['.((is_int($var2)) ? $var2 : "'".$var2."'").'] = "'.$val2."\";$nl"; } } } else { if ($config['magic_quotes_gpc']==0) { $pars.='$restore[\''.$var.'\'] = "'.addslashes($val)."\";$nl"; } else { $pars.='$restore[\''.$var.'\'] = "'.$val."\";$nl"; } } } } $pars.="$nl?>"; $fp = @fopen($config['paths']['log'].$datei, "w"); if($fp) { @fwrite ($fp,$pars."\n"); @fclose ($fp); } } function ErrorLog($dest,$db,$sql,$error,$art=1) { //$art=0 -> Fehlermeldung //$art=1 -> Hinweis global $config; if(strlen($sql)>100) $sql=substr($sql,0,100)." ... (snip)"; //Error-Zeile generieren $errormsg=date('d.m.Y H:i:s').': '; $errormsg.=($dest=='RESTORE') ? ' Restore of db `'.$db.'`|:|' : ' Dump of db `'.$db.'`|:|'; if ($art==0) { $errormsg.='Error-Message: '.$error.'|:|'; } else { $errormsg.='Notice: '.$error.'|:|'; } $errormsg.='SQL: '.$sql."\n"; //Datei öffnen und schreiben if($config['logcompression']==1) { $fp = @gzopen($config['paths']['log'].'error.log.gz', 'ab'); if($fp) { @gzwrite ($fp,($errormsg)); @gzclose ($fp); } } else { $fp = @fopen($config['paths']['log'].'error.log', 'ab'); if($fp) { @fwrite ($fp,($errormsg)); @fclose ($fp); } } } function DirectoryWarnings($path="") { global $config; $warn=""; if($path=="" || $path=="config") if(!is_writable($config['paths']['config'])) $warn.='Configpath is not writable!".$ll."
";
$r.= $delfile[3]."
";
WriteLog("autodeleted ($function) '$delfile[3]'.");
unlink($config['paths']['backup'].$delfile[3]);
$r.= "