parent.MySQL_Dumper_content.location.href="frameset.php?action=dump&comment='.urlencode($dk).'";'; else 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 { @TestWorkDir(); $databases['db_actual_tableselected']=""; WriteParams(1,$config,$databases); $dk=(isset($_POST['dumpKommentar'])) ? $_POST['dumpKommentar'] : ""; $dump['fileoperations']=0; if ($frames==1) echo ''; else 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); if($frames==1) echo ''; else 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 (DeleteFilesM($fpath,$_POST['file'][0])) { $msg.= '

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

'; WriteLog("deleted '".$_POST['file'][0]."'."); } else { $msg.= '

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

'; } } } 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]'."); } } $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]'."); } } } ////////////////////////////////// // 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; $a1= br(3).'
'.br(); $a1.= '
'.br().''.br().''.br(); $td='
'; $ul= '

'.$lang['fm_fileupload'].'

'.br(); $ul.= ''.br(); $ul.= ''.br(); $ul.= ''.br().''.br(); $ul.= ''.br().''.br().'
'.br().''.br(); $ul.= '
'.br(); $ul.= '
'.br(); $ul.= ''.br(); $tbl_abfrage=' '; if($config['multi_dump']==0) $tbl_abfrage.=''.$lang['fm_selecttables']; $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": //Perlscript 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; 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; echo $a1.''; echo $tbl_abfrage; echo ''; echo '
'; echo '
'.$lang['fm_dumpsettings'].'
'; echo ''; echo ''; echo ''; echo ''; echo ''; 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']).")").'
'.$lang['praefix'].':'.(($config['multi_dump']==1) ? '-' : $databases['praefix'][$databases['db_selected_index']]).'
'.$lang['gzip'].':'.(($config['compression']==1) ? $lang['activated'] : $lang['not_activated']).'
'.$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=="") ? $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 ' '; echo ' '; echo '
'.$lang['send_mail_form'].':'.(($config['send_mail']==1) ? $t : $lang['not_activated']); 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 '

'; //crondumpsettings echo '
'.$lang['fm_dumpsettings_cron'].' '.Help("","perl").'
'; echo ''.$lang['perloutput1'].': '.$scriptentry.'
'; echo $lang['perloutput2'].': '.$scriptref.'
'; echo $lang['perloutput3'].': '.$cronref.'
'; echo '
'; if($databases['db_actual_cronindex']==-3) { $cron_dbname=$lang['multidumpall']; $cron_dbpraefix = ""; } elseif($databases['db_actual_cronindex']==-2) { $cron_dbname='Multidump ('.count($databases['multi']).' '.$lang['dbs'].')'; $cron_dbpraefix = ""; } else { if($config['cron_samedb']==0) { $cron_dbname=$databases['db_actual']; $cron_dbpraefix = $databases['praefix'][$databases['db_selected_index']]; }else { $cron_dbname=$databases['Name'][$databases['db_actual_cronindex']]; $cron_dbpraefix = $databases['db_actual_cronpraefix']; } } echo ""; echo " "; echo " "; echo "'; echo ''; echo "
".$lang['db'].":$cron_dbname
".$lang['praefix'].":$cron_dbpraefix
".$lang['gzip'].":".(($config['cron_compression']==1)?$lang['activated']:$lang['not_activated'])."
".$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['cron_printout'].':'.(($config['cron_printout']==1)?$lang['activated']:$lang['not_activated']).'
"; if($config['cron_mail']==1) { $t=$config['email_recipient'].(($config['cron_mail_dump']==1) ? $lang['withattach'] : $lang['withoutattach']); } echo " "; echo ""; echo ''; echo "
".$lang['send_mail_form'].":".(($config['cron_mail']==1)?$t:$lang['not_activated']); echo "
".$lang['ftp_transfer'].":".(($config['cron_ftp']==1)?$lang['activated']:$lang['not_activated']); if($config['cron_ftp']==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 '  '; echo '

"; //echo '
'.$lang['phpcrondesc'].'
'; break; case "restore": echo headline($lang['fm_restore_header'].$databases['db_actual'].$lang['fm_restore_header2']); echo (isset($msg) && $msg!="")?"$msg
":""; echo $autodel; echo $a1.$td.''; //echo ''.$tbl_abfrage.''; echo '
'; echo FileList().''; 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 $a1.''; echo $td.br().''.br(); echo $td.br().''.br(); echo $td.br().''.br(); echo $td.br().''.br(); if(isset($svice) && $svice==1) echo $td.br().''.br(); echo ''.br().''.br().'
'.br(); if($sysfedit==0) echo FileList().''.br().$ul.'
'.br().'
'.br(); else { echo ''.br().'
'.br(); $dir=0;$fname=""; if(isset($_GET['dir'])) $dir=$_GET['dir']; if(isset($_GET['filename'])) $fname=$_GET['filename']; if(isset($_POST['fedit_save'])) { $savetext=($config['magic_quotes_gpc']==1) ? stripslashes($_POST['editor']) : $_POST['editor']; $savefile=$dirs[$_POST['dir']].$_POST['edit_filename']; echo '
Save: '.$savefile.' - Länge '.strlen($savetext).'
'; if(!is_writable($savefile)) echo "Kann nicht speichern !"; else { if ($fp=fopen($savefile, "wb")) { fwrite($fp,$savetext); fclose($fp); } } } echo SYS_editor($dir,$fname); } echo ''.$lang["converter"].''; break; case "convert": // Konverter echo headline($lang["converter"]); 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)>7) { Converter($selectfile,$destfile,$compressed); } else echo $lang["convert_wrong_parameters"]; } } echo '

'.br(3); echo MSDFooter(); ?>