parent.main.location.href="dump.php";'; } //-------------------------------------------------------- //*** Abfrage ob Restore *** //-------------------------------------------------------- if (isset($_POST["restore"])) { if (isset($_POST["file"])) { echo ''; } else $msg.= "

".$l["fm_nofile"]."

\n"; } //-------------------------------------------------------- //*** Abfrage ob Delete *** //-------------------------------------------------------- if (isset($_POST["delete"]) ) { if (isset($_POST["file"])) { $file=$_POST["file"]; if (@unlink($backup_path.$file)) { $msg.= "

".$l["fm_delete1"].$file.$l["fm_delete2"]."

"; WriteLog("deleted '$file'."); }else { $msg.= "

".$l["fm_delete1"]. $file .$l["fm_delete3"]."

"; } } else $msg.= "

".$l["fm_nofile"]."

\n"; } if (isset($_POST["deleteauto"]) ) { //hier kommt autodelete rein $msg.=AutoDelete(); } if (isset($_POST["deleteall"]) ) { //hier kommt alldelete rein $del=DeleteFiles($backup_path,"*.sql"); if($del==0){ //$msg.="Fehler beim löschen!"; }else{ for ($i=0; $i"; WriteLog("deleted '$del[$i]'."); } } $del=DeleteFiles($backup_path,"*.gz"); if($del==0){ //$msg.="Fehler beim löschen!"; }else{ for ($i=0; $i"; WriteLog("deleted '$del[$i]'."); } } } if (isset($_POST["deleteallfilter"]) ) { //hier kommt alldelete rein $del=DeleteFiles($backup_path,"$dbname*"); if($del==0){ //$msg.="Fehler beim löschen!"; }else{ for ($i=0; $i"; WriteLog("deleted '$del[$i]'."); } } } ////////////////////////////////// // Upload /////////////////////////////////// if (isset($_POST["upload"])) { $error=false; if (!isset($_FILES["upfile"]["name"])) echo "".$l["fm_uploadfilerequest"]."

"; else { if (!file_exists($backup_path.$_FILES["upfile"]["name"])) { // Extension ermitteln -strrpos fängt hinten an und ermittelt somit den letzten Punkt $pos=strrpos($_FILES["upfile"]["name"],"."); $endung=strtolower(substr($_FILES["upfile"]["name"],$pos,(strlen($_FILES["upfile"]["name"])-$pos))); $erlaubt=ARRAY(".gz",".sql"); if (!in_array($endung,$erlaubt)) { $msg.= "".$l["fm_uploadnotallowed1"]; $msg.= $l["fm_uploadnotallowed2"].""; } else { if (!$error) { if (move_uploaded_file($_FILES["upfile"]["tmp_name"],$backup_path.$_FILES["upfile"]["name"])) chmod($backup_path.$upfile_name,0755); else $error.="".$l["fm_uploadmoveerror"]."
"; } if ($error) $msg.= $error."".$l["fm_uploadfailed"]."
"; } } else $msg.= "".$l["fm_uploadfileexists"]."
"; } } // -> und ab hier die normale Seite // // ?> '; $a1.= '
'; $td='
'; $ul= "

".$l["fm_upload"]."

"; $ul.= ""; $ul.= "\n"; $ul.= "\n"; $ul.= "
\n"; $ul.= "
\n"; $ul.= "\n"; $ul.= "
\n"; //Fallunterscheidung $action=$_GET["action"]; if($action=="")$action="files"; switch ($action) { case "dump": echo "

".$l["dump"]."

".$msg."
"; echo $a1.$td.' '; echo ''; echo '
'.$l["fm_dumpsettings"].'
'; echo '

Cronjob

'.$l["cron_adress"].'
'; echo '

'.$l["cron_desc"].'


'; echo '
'; echo '
'.$td.'
'.$l["cronperldesc"].' \'http://'.$_SERVER["SERVER_NAME"].$rootdir.'/'.$config_path.'crondump.pl\'

'; break; case "restore": echo "

".$l["restore"]."

".$msg."
"; echo $a1.$td.''; echo ''; echo FileList().''; break; case "files": echo "

".$l["file_manage"]."


".$msg."
"; echo ''.$l["autodelete"].": "; echo ($auto_delete==0) ? $l["not_activated"] : $l["activated"]." (".$l["age_of_files"]."=$del_files_after_days ".$l["number_of_files_form"]."=$max_backup_files)
"; echo $a1; echo $td.''; echo $td.''; echo $td.''; echo $td.''; echo ''; echo FileList().''.$ul; break; } echo "

\n"; include("inc/footer.php"); function FileList() { global $backup_path,$l; //-------------------------------------------------------- //*** Ausgabe der Dateien *** //-------------------------------------------------------- $dh = opendir($backup_path); $fl=""; while (false !== ($filename = readdir($dh))) { if ($filename != "." && $filename != "..") $files[] = $filename; } $fl.='

'.$l["fm_files"].'

'.$l["choose_file"].'

'; @rsort($files); for ($i=0; $i  '.$files[$i].' '; } if (!is_array($files)) $fl.=''."\n"; //-------------------------------------------------------- //*** Ausgabe der Gesamtgröße aller Backupfiles *** //-------------------------------------------------------- $space = diskfreespace("../"); $fl.= "\n"; $fl.= "\n"; $fl.= "\n"; $fl.= "\n"; //-------------------------------------------------------- //*** Ausgabe des freien Speicher auf dem Rechner *** //-------------------------------------------------------- $fl.= ''; $fl.= ''; $fl.= "\n"; $fl.= "\n"; $fl.= "
'.$l["fm_filename"].' '.$l["fm_filesize"].'
'.round($size/1024).' kByte
'.$l["fm_nofilesfound"].'
".$l["fm_sizesum"].": ".round($gesamt/1024)." kByte
'.$l["fm_freespace"].': ".round(($space/(1024*1024*1024)),2)." GByte
\n"; return $fl; } ?>