'; if (is_array($databases['multi'])) { for ($i=0; $i0) $toolboxstring.=', '; $toolboxstring.=$databases['multi'][$i]; if ($multi_praefixe[$i]>'') $toolboxstring.=' (\''.$multi_praefixe[$i].'\')'; } } } //*** Abfrage ob Dump nach Tabellenaufruf *** if (isset($_POST['dump_tbl'])) { $check_dirs=TestWorkDir(); if (!$check_dirs===true) die($check_dirs); $databases['db_actual_tableselected']=substr($_POST['tbl_array'],0,strlen($_POST['tbl_array'])-1); WriteParams(); $dump['fileoperations']=0; echo ''; exit(); } //*** Abfrage ob Dump *** if (isset($_POST['dump'])) { if (isset($_POST['tblfrage'])&&$_POST['tblfrage']==1) { //Tabellenabfrage $tblfrage_refer="dump"; include ("inc/tabellenabfrage.php"); exit(); } else { @$check_dir=TestWorkDir(); if (!$check_dir===true) die($check_dir); $databases['db_actual_tableselected']=""; WriteParams(); $dump['fileoperations']=0; echo ''; exit(); } } //*** Abfrage ob Restore nach Tabellenaufruf *** if (isset($_POST['restore_tbl'])) { $databases['db_actual_tableselected']=substr($_POST['tbl_array'],0,strlen($_POST['tbl_array'])-1); WriteParams(); echo ''; exit(); } //*** Abfrage ob Restore *** if (isset($_POST['restore'])) { if (isset($_POST['file'])) { if (isset($_POST['tblfrage'])&&$_POST['tblfrage']==1) { //Tabellenabfrage $tblfrage_refer="restore"; $filename=urldecode($_POST['file'][0]); include ("inc/tabellenabfrage.php"); exit(); } else { $file=$_POST['file'][0]; $statusline=read_statusline_from_file($file); if (isset($_POST['sel_dump_encoding_restore'])) { $encodingstring=$config['mysql_possible_character_sets'][$_POST['sel_dump_encoding_restore']]; $encoding=explode(' ',$encodingstring); $dump_encoding=$encoding[0]; } else { if (!isset($statusline['charset'])||trim($statusline['charset'])=='?') { echo headline($lang['L_FM_RESTORE'].': '.$file); // if we can't detect encoding ask user echo '
'.$lang['L_CHOOSE_CHARSET'].'

'; echo '
'; echo ''; echo '
'.$lang['L_FM_CHOOSE_ENCODING'].':'; echo '
'; echo $lang['L_MYSQL_CONNECTION_ENCODING'].':'.$config['mysql_standard_character_set'].'

'; echo ''; echo '
'; exit(); } else $dump_encoding=$statusline['charset']; } $databases['db_actual_tableselected']=""; WriteParams(); echo ''; exit(); } } else $msg.='

'.$lang['L_FM_NOFILE'].'

'; } //*** Abfrage ob Delete *** $del=array(); if (isset($_POST['delete'])) { if (isset($_POST['file'])) { $delfiles=Array(); for ($i=0; $i'; } if (isset($_POST['deleteauto'])) { $delete_result=AutoDelete(); if ($delete_result>'') $msg.='

'.$delete_result.'

'; } if (isset($_POST['deleteall'])||isset($_POST['deleteallfilter'])) { if (isset($_POST['deleteall'])) { $del=DeleteFilesM($fpath,"*.sql"); $del=array_merge($del,DeleteFilesM($fpath,"*.gz")); } else $del=DeleteFilesM($fpath,$databases['db_actual']."*"); } // print file-delete-messages if (is_array($del)&&sizeof($del)>0) { foreach ($del as $filename=>$success) { if ($success) { $msg.=''; $msg.=$lang['L_FM_DELETE1'].' \''.$filename.'\' '.$lang['L_FM_DELETE2']; WriteLog("deleted '$filename'."); $msg.='
'; } else { $msg.=''; $msg.=$lang['L_FM_DELETE1'].' \''.$filename.'\' '.$lang['L_FM_DELETE3']; WriteLog("deleted '$filename'."); $msg.='
'; } } } // Upload if (isset($_POST['upload'])) { $error=false; if (!isset($_FILES['upfile']['name'])) echo ''.$lang['L_FM_UPLOADFILEREQUEST'].'

'; else { if (!file_exists($fpath.$_FILES['upfile']['name'])) { // Extension ermitteln -strrpos fängt hinten an und ermittelt somit den letzten Punkt $endung=strrchr($_FILES['upfile']['name'],"."); $erlaubt=ARRAY( ".gz", ".sql"); if (!in_array($endung,$erlaubt)) { $msg.="".$lang['L_FM_UPLOADNOTALLOWED1']."
"; $msg.=$lang['L_FM_UPLOADNOTALLOWED2']."
"; } else { if (!$error) { if (move_uploaded_file($_FILES['upfile']['tmp_name'],$fpath.$_FILES['upfile']['name'])) @chmod($fpath.$upfile_name,0777); else $error.="".$lang['L_FM_UPLOADMOVEERROR']."
"; } if ($error) $msg.=$error."".$lang['L_FM_UPLOADFAILED']."
"; } } else $msg.="".$lang['L_FM_UPLOADFILEEXISTS']."
"; } } //Seitenteile vordefinieren $href='filemanagement.php?action='.$action.'&kind='.$kind; $tbl_abfrage=''; if ($config['multi_dump']==0) $tbl_abfrage=''.$lang['L_FM_SELECTTABLES'].''; $dk=(isset($_POST['dumpKommentar'])) ? htmlentities($_POST['dumpKommentar']) : ''; $tbl_abfrage.=''.$lang['L_FM_COMMENT'].':'; $autodel='

'.$lang['L_AUTODELETE'].": "; $autodel.=($config['auto_delete']==0) ? $lang['L_NOT_ACTIVATED'] : $lang['L_ACTIVATED'].' ('.$config['max_backup_files'].' '.$lang['L_MAX_BACKUP_FILES_EACH2'].')'; $autodel.='

'; //Fallunterscheidung switch ($action) { case 'dump': $dbName = $databases['Name'][$databases['db_selected_index']]; if ($config['multi_dump']==0 && in_array($dbName, $dontBackupDatabases)) { echo headline($lang['L_FM_DUMP_HEADER'].' ("'.$lang['L_CONFIG_HEADLINE'].': '.$config['config_file'].'")'); echo ''.sprintf($lang['L_BACKUP_NOT_POSSIBLE'], $dbName).''; break; } if ($config['multi_dump']==0) DBDetailInfo($databases['db_selected_index']); $cext=($config['cron_extender']==0) ? "pl" : "cgi"; $actualUrl=substr($_SERVER['SCRIPT_NAME'],0,strrpos($_SERVER['SCRIPT_NAME'],"/")+1); if (substr($actualUrl,-1)!="/") $actualUrl.="/"; if (substr($actualUrl,0,1)!="/") $actualUrl="/$actualUrl"; $refdir=(substr($config['cron_execution_path'],0,1)=="/") ? "" : $actualUrl; $scriptdir=$config['cron_execution_path'].'crondump.'.$cext; $sfile=$config['cron_execution_path']."perltest.$cext"; $simplefile=$config['cron_execution_path']."simpletest.$cext"; $scriptentry=Realpfad("./").$config['paths']['config']; $cronabsolute=(substr($config['cron_execution_path'],0,1)=="/") ? $_SERVER['DOCUMENT_ROOT'].$scriptdir : Realpfad("./").$scriptdir; $confabsolute=$config['config_file']; $scriptref=getServerProtocol().$_SERVER['SERVER_NAME'].$refdir.$config['cron_execution_path'].'crondump.'.$cext."?config=".$confabsolute; $cronref="perl ".$cronabsolute." -config=".$confabsolute." -html_output=0"; //Ausgabe echo headline($lang['L_FM_DUMP_HEADER'].' ("'.$lang['L_CONFIG_HEADLINE'].': '.$config['config_file'].'")'); if (!is_writable($config['paths']['backup'])) die(''.sprintf($lang['L_WRONG_RIGHTS'],'work/backup','777').''); echo ($msg>'') ? $msg.'
' : ''; echo $autodel; //Auswahl echo '
     
'; echo '
'; //Dumpsettings echo '
'.$lang['L_DUMP'].' (PHP)
'; echo '
'; echo '
'; echo '
'; echo $tbl_abfrage; echo ''; echo ''; echo ''; echo '
'.$lang['L_MYSQL_CONNECTION_ENCODING'].':'.$config['mysql_standard_character_set'].'
'; echo '

'; echo '
'.$lang['L_FM_DUMPSETTINGS'].' (PHP)
'; echo ''; echo ''; if ($config['multi_dump']==0&&$databases['praefix'][$databases['db_selected_index']]>'') { echo ''; } echo ''; echo ''; if ($config['multi_part']==1) { echo ''; } if ($config['send_mail']==1) { $t=$config['email_recipient'].(($config['send_mail_dump']==1) ? $lang['L_WITHATTACH'] : $lang['L_WITHOUTATTACH']); } echo ''; for ($x=0; $x<3; $x++) { if (isset($config['ftp_transfer'][$x])&&$config['ftp_transfer'][$x]>0) { echo table_output($lang['L_FTP_TRANSFER'],sprintf(str_replace('
',' ',$lang['L_FTP_SEND_TO']),$config['ftp_server'][$x],$config['ftp_dir'][$x]),1,2); } } //echo ''; echo '
'.$lang['L_DB'].':'; if ($config['multi_dump']==1) { echo 'Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')'; echo ''.$toolboxstring.''; } else { echo $databases['db_actual'].'  ('.$databases['Detailinfo']['tables']." Tables, ".$databases['Detailinfo']['records']." Records, ".byte_output($databases['Detailinfo']['size']).')'; } echo '
'.$lang['L_PRAEFIX'].':'; echo $databases['praefix'][$databases['db_selected_index']]; echo '
'.$lang['L_GZIP'].':'.(($config['compression']==1) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']); echo '
'.$lang['L_MULTI_PART'].':'.(($config['multi_part']==1) ? $lang['L_YES'] : $lang['L_NO']); echo '
'.$lang['L_MULTI_PART_GROESSE'].':'.byte_output($config['multipart_groesse']).'
'.$lang['L_SEND_MAIL_FORM'].':'.(($config['send_mail']==1) ? $t : $lang['L_NOT_ACTIVATED']); echo '
'; echo '

'; echo '
'; break; case 'restore': echo headline(sprintf($lang['L_FM_RESTORE_HEADER'],$databases['db_actual'])); echo ($msg>'') ? $msg : ''; echo $autodel; echo '
'; echo '
'; echo ''; echo ''; echo FileList(); echo ''; echo '
'; break; case 'files': $sysfedit=(isset($_POST['sysfedit'])) ? 1 : 0; $sysfedit=(isset($_GET['sysfedit'])) ? $_GET['sysfedit'] : $sysfedit; echo headline($lang['L_FILE_MANAGE']); echo ($msg>'') ? $msg.'
' : ''; echo $autodel; echo '
'; echo ''; echo ''; echo ''; echo ''; echo FileList().'
'; echo '
'.$lang['L_FM_FILEUPLOAD'].'
'; echo '
'; echo ''; echo ''; echo '
'.$lang['L_MAX_UPLOAD_SIZE'].': '.$config['upload_max_filesize'].''; echo '
'.$lang['L_MAX_UPLOAD_SIZE_INFO']; echo '
'; echo '
Tools
'; echo ''; echo '
'; break; case "convert": // Konverter echo headline($lang['L_CONVERTER']); echo '

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'.$lang['L_CONVERT_TITLE'].'
'.$lang['L_CONVERT_FILE'].''.FilelisteCombo($config['paths']['backup'],$selectfile).'
'.$lang['L_CONVERT_FILENAME'].':
 '.$lang['L_COMPRESSED'].'

'; if (isset($_POST['startconvert'])) { //$destfile.=($compressed==1) ? ".sql.gz" : ".sql"; echo $lang['L_CONVERTING']." $selectfile ==> $destfile
"; if ($selectfile!=""&&file_exists($config['paths']['backup'].$selectfile)&&strlen($destfile)>2) { Converter($selectfile,$destfile,$compressed); } else echo $lang['L_CONVERT_WRONG_PARAMETERS']; } } echo MSDFooter(); ob_end_flush();