parent.MySQL_Dumper_content.location.href="dump.php?comment='.urlencode($dk).'";'; exit; } //-------------------------------------------------------- //*** Abfrage ob Dump *** //-------------------------------------------------------- if (isset($_POST['dump'])) { $dk=(isset($_POST['dumpKommentar'])) ? ((get_magic_quotes_gpc()) ? stripslashes($_POST['dumpKommentar']) : $_POST['dumpKommentar']) : ""; if(isset($_POST['tblfrage']) && $_POST['tblfrage']==1) { //Tabellenabfrage $tblfrage_refer="dump"; include ("inc/tabellenabfrage.php"); exit; } else { @TestWorkDir(); $databases['db_actual_tableselected']=""; WriteParams(1,$config,$databases); $dump['fileoperations']=0; echo ''; } } //-------------------------------------------------------- //*** 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(1,$config,$databases); echo ''; exit; } //-------------------------------------------------------- //*** Abfrage ob Restore *** //-------------------------------------------------------- if (isset($_POST['restore'])) { if (isset($_POST['file'])) { if(file_exists($config['paths']['log']."restore.tmp")) @unlink($config['paths']['log']."restore.tmp"); if(isset($_POST['tblfrage']) && $_POST['tblfrage']==1) { //Tabellenabfrage $tblfrage_refer="restore"; $filename=urldecode($_POST['file'][0]); include ("inc/tabellenabfrage.php"); exit; } else { $databases['db_actual_tableselected']=""; WriteParams(1,$config,$databases); echo ''; } } else $msg.= '

'.$lang['fm_nofile'].'

'.br(); } //-------------------------------------------------------- //*** Abfrage ob Delete *** //-------------------------------------------------------- if (isset($_POST['delete']) ) { $msg=""; if (isset($_POST['file'])) { $file=$_POST['file']; //hier muss die Abfrage checkbox/radiobox rein if($_POST['multi']==1) { $delfiles=Array(); $msg.= '

'; for($i=0;$i'; } else { for ($j=0; $j'; WriteLog("deleted '$del[$j]'."); } } } $msg.='

'; } else { if($_POST['multipart'][0]==0) { $delfiles[]=$_POST['file'][0]; } else { $delfiles[]=substr($_POST['file'][0],0,strpos($_POST['file'][0],"_part_"))."*.*"; } $del=DeleteFilesM($fpath,$delfiles[0]); if($del==0){ $msg.= '

'.$lang['fm_delete1'].$fpath.$_POST['file'][0].$lang['fm_delete3'].'

'; } else { for ($j=0; $j'; WriteLog("deleted '$del[$j]'."); } } } } else $msg.= '

'.$lang['fm_nofile'].'

'.br(); } if (isset($_POST['deleteauto']) ) $msg.='

'.AutoDelete().'

'; if (isset($_POST['deleteall']) ) { //hier kommt alldelete rein $del=DeleteFilesM($fpath,"*.sql"); if($del==0){ //$msg.="Fehler beim löschen!"; }else{ for ($i=0; $i'; WriteLog("deleted '$del[$i]'."); } $msg.='

'; } $del=DeleteFilesM($fpath,"*.gz"); } if (isset($_POST['deleteallfilter']) ) { //hier kommt alldelete rein $del=DeleteFilesM($fpath,$databases['db_actual']."*"); if($del==0){ //$msg.="Fehler beim löschen!"; }else{ for ($i=0; $i'; WriteLog("deleted '$del[$i]'."); } $msg.='

'; } } ////////////////////////////////// // Upload /////////////////////////////////// if (isset($_POST['upload'])) { $error=false; if (!isset($_FILES['upfile']['name'])) echo ''.$lang['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['fm_uploadnotallowed1']."
"; $msg.= $lang['fm_uploadnotallowed2']."
"; } else { if (!$error) { if (move_uploaded_file($_FILES['upfile']['tmp_name'],$fpath.$_FILES['upfile']['name'])) @chmod($fpath.$upfile_name,0755); else $error.="".$lang['fm_uploadmoveerror']."
"; } if ($error) $msg.= $error."".$lang['fm_uploadfailed']."
"; } } else $msg.= "".$lang['fm_uploadfileexists']."
"; } } //Seitenteile vordefinieren $href='filemanagement.php?action='.$action.'&kind='.$kind; $tbl_abfrage=' '; if($config['multi_dump']==0) $tbl_abfrage.=''.$lang['fm_selecttables']; $dk= (isset($_POST['dumpKommentar'])) ? htmlentities($_POST['dumpKommentar']):''; $tbl_abfrage.='   '.$lang['fm_comment'].':  '.br(); $autodel='

'.$lang['autodelete'].": "; $abue=($config['max_backup_files_each']==1)? $lang['max_backup_files_each2'] :$lang['max_backup_files_each1']; $abue2=($config['del_files_after_days']>0) ? $lang['age_of_files']."=".$config['del_files_after_days'].", " : ""; $autodel.=($config['auto_delete']==0) ? $lang['not_activated'] : $lang['activated']." (".$abue2.$lang['number_of_files_form']."=".$config['max_backup_files']." -> ".$abue.")"; $autodel.='

'.br().br(); //Fallunterscheidung switch ($action) { case "dump": //Variablen 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['cron_configurationfile']; $scriptref="http://".$_SERVER['SERVER_NAME'].$refdir.$config['cron_execution_path'].'crondump.'.$cext."?config=".$confabsolute; $cronref="perl ".$cronabsolute." config=".$confabsolute; //Ausgabe echo headline($lang['fm_dump_header']); if(!is_writable($config['paths']['backup'])) die('ERROR !
Backupdir is not writable
'); echo (isset($msg) && $msg!="")?"$msg
":""; echo $autodel; //Auswahl echo '
     
'; echo '
'; //Dumpsettings echo '
'.$lang['dump'].' (PHP)
'; echo br(3).'
'.br(); echo ''; echo $tbl_abfrage; echo '
'; echo '
'.$lang['fm_dumpsettings'].' (PHP)
'; echo ''.$lang['db'].': '. (($config['multi_dump']==1) ? 'Multidump ('.count($databases['multi']).' '.$lang['dbs'].')' : $databases['db_actual'].'  ('.$databases['Detailinfo']['tables']." Tables, ".$databases['Detailinfo']['records']." Records, ".byte_output($databases['Detailinfo']['size']).")").''; echo '   '.$lang['praefix'].': '.(($config['multi_dump']==1) ? '-' : $databases['praefix'][$databases['db_selected_index']]).''; echo '
'.$lang['gzip'].': '.(($config['compression']==1) ? $lang['activated'] : $lang['not_activated']).''; echo '   '.$lang['multi_part'].': '.(($config['multi_part']==1) ? $lang['yes'] : $lang['no']).''; if($config['multi_part']==1) { echo '   '.$lang['multi_part_groesse'].': '.byte_output($config['multipart_groesse']); } echo '
'.$lang['backup_format'].': '; $t=''; if($config['backup_complete_inserts']==1) $t.=$lang['inserts_complete']." / "; if($config['backup_extended_inserts']==1) $t.=$lang['inserts_extended']." / "; if($config['backup_ignore_inserts']==1) $t.=$lang['inserts_ignore']." / "; if($config['backup_delayed_inserts']==1) $t.=$lang['inserts_delayed']." / "; if($config['backup_lock_tables']==1 && $config['backup_delayed_inserts']==0) $t.=$lang['lock_tables']." / "; $t=($t=="") ? $lang['normal'] : substr($t,0,strlen($t)-3); if($config['backup_downgrade']==1) $t.='   '.htmlspecialchars($lang['downgrade']); echo $t.'
'; if($config['send_mail']==1) { $t=$config['email_recipient'].(($config['send_mail_dump']==1) ? $lang['withattach'] : $lang['withoutattach']); } echo ''.$lang['send_mail_form'].': '.(($config['send_mail']==1) ? $t : $lang['not_activated']); echo ''; echo '
'.$lang['ftp_transfer'].': '.(($config['ftp_transfer']==1) ? $lang['activated'] : $lang['not_activated']); if($config['ftp_transfer']==1) { echo 'Host: '.$config['ftp_server'][$config['ftp_connectionindex']].' Port '.$config['ftp_port'][$config['ftp_connectionindex']].' User: '.$config['ftp_user'][$config['ftp_connectionindex']].' Dir: '.$config['ftp_dir'][$config['ftp_connectionindex']]; } echo '

'; echo '
'; break; case "restore": echo headline($lang['fm_restore_header'].$databases['db_actual'].$lang['fm_restore_header2']); echo (isset($msg) && $msg!="")?"$msg":""; echo $autodel; echo br(3).'
'.br(); echo '
'.br(); echo ''; echo FileList(); echo '
'.br(); break; case "files": $sysfedit=(isset($_POST['sysfedit'])) ? 1 : 0; $sysfedit=(isset($_GET['sysfedit'])) ? $_GET['sysfedit'] : $sysfedit; echo headline($lang['file_manage']); echo (isset($msg) && $msg!="") ? $msg.'
' : ''; echo $autodel; echo ''.br(); echo br(3).'
'.br(); echo br().''.br(); echo br().''.br(); echo br().''.br(); echo br().''.br(); echo FileList().'
'.br(); echo '
'.$lang['fm_fileupload'].'
'.br(); echo '
'.br(); echo ''.br(); echo ''.br(); echo '
'.$lang['max_upload_size'].': '.$config['upload_max_filesize'].''; echo '
'.$lang['max_upload_size_info']; echo '
'.br(); echo '
Tools
'; echo ''; echo '
'; break; case "convert": // Konverter echo headline($lang['converter']); echo '

'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo '
'.$lang['convert_title'].'
'.$lang['convert_file'].''.FilelisteCombo($config['paths']['backup'],$selectfile).'
'.$lang['convert_filename'].':
'.$lang['compressed'].'

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