1 && substr($config['ftp_dir'][$i],-1)!="/")) $config['ftp_dir'][$i].="/";
}
}
$oldtheme=$config['theme'];
$oldscposition=$config['interface_server_caption_position'];
$checkFTP=Array("
","
","
");
if(isset($_POST['testFTP0'])) {
$checkFTP[0]='
'.$lang['testconnection'].' FTP-Connection 1
'.TesteFTP($_POST['ftp_server0'],$_POST['ftp_port0'],$_POST['ftp_user0'],$_POST['ftp_pass0'],$_POST['ftp_dir0']).'
';
$ftptested=0;
}
if(isset($_POST['testFTP1'])) {
$checkFTP[1]=''.$lang['testconnection'].' FTP-Connection 2
'.TesteFTP($_POST['ftp_server1'],$_POST['ftp_port1'],$_POST['ftp_user1'],$_POST['ftp_pass1'],$_POST['ftp_dir1']).'
';
$ftptested=1;
}
if(isset($_POST['testFTP2'])) {
$checkFTP[2]=''.$lang['testconnection'].' FTP-Connection 3
'.TesteFTP($_POST['ftp_server2'],$_POST['ftp_port2'],$_POST['ftp_user2'],$_POST['ftp_pass2'],$_POST['ftp_dir2']).'
';
$ftptested=2;
}
if($ftptested>-1) {
$ftp_server[$ftptested]=$_POST['ftp_server'.$ftptested];
$ftp_port[$ftptested]=$_POST['ftp_port'.$ftptested];
$ftp_user[$ftptested]=$_POST['ftp_user'.$ftptested];
$ftp_pass[$ftptested]=$_POST['ftp_pass'.$ftptested];
$ftp_dir[$ftptested]=stripslashes($_POST['ftp_dir'.$ftptested]);
if($ftp_dir[$ftptested]=="" || (strlen($ftp_dir[$ftptested])>1 && substr($ftp_dir[$ftptested],-1)!="/")) $ftp_dir[$ftptested].="/";
}
if (isset($_POST['load']))
{
$msg=SetDefault(true);
$msg=nl2br($msg)."
". $lang['load_success']."
";
echo '';
}
if (isset($_POST['save']))
{
//Parameter auslesen
$config['multi_dump']=(isset($_POST['MultiDBDump'])) ? $_POST['MultiDBDump'] : 0;
$databases['db_actual_cronpraefix']=$_POST['dbcronpraefix'];
$config['compression']=$_POST['compression'];
$config['language']=$_POST['language'];
$config['interface_server_caption']=$_POST['server_caption'];
$config['interface_server_caption_position']=$_POST['server_caption_position'];
$config['interface_sqlboxsize']=$_POST['sqlboxsize'];
$config['theme']=$_POST['theme'];
$config['interface_table_compact']=(isset($_POST['interface_table_compact'])) ? $_POST['interface_table_compact'] : 1;
$config['email_recipient']=$_POST['email0'];
$config['email_sender']=$_POST['email1'];
$config['send_mail']=$_POST['send_mail'];
$config['send_mail_dump']=$_POST['send_mail_dump'];
$config['email_maxsize1']=$_POST['email_maxsize1']; if($config['email_maxsize1']=="") $config['email_maxsize1']=0;
$config['email_maxsize2']=$_POST['email_maxsize2'];
$config['email_maxsize']=$config['email_maxsize1']*(($config['email_maxsize2']==1) ? 1024 : 1024*1024);
$config['backup_complete_inserts']=(isset($_POST['backup_complete_inserts'])) ? 1 : 0;
$config['backup_extended_inserts']=(isset($_POST['backup_extended_inserts'])) ? 1 : 0;
$config['backup_delayed_inserts']=(isset($_POST['backup_delayed_inserts'])) ? 1 : 0;
$config['backup_ignore_inserts']=(isset($_POST['backup_ignore_inserts'])) ? 1 : 0;
$config['backup_lock_tables']=(isset($_POST['backup_lock_tables'])) ? 1 : 0;
$config['backup_downgrade']=(isset($_POST['backup_downgrade'])) ? 1 : 0;
$config['memory_limit']=$_POST['memory_limit']; if($config['memory_limit']=="") $config['memory_limit']=0;
$config['minspeed']=$_POST['minspeed']; if($config['minspeed']<50) $config['minspeed']=50;
$config['maxspeed']=$_POST['maxspeed'];
$config['stop_with_error']=$_POST['stop_with_error'];
$config['multi_part']=$_POST['multi_part'];
$config['multipartgroesse1']=$_POST['multipartgroesse1'];
$config['multipartgroesse2']=$_POST['multipartgroesse2'];
if($config['multipartgroesse1']<100 && $config['multipartgroesse2']==1)$config['multipartgroesse1']=100;
$oldlogcompression=$config['logcompression'];
$config['logcompression']=(isset($_POST['logcompression']) && $_POST['logcompression']==1) ? 1 : 0;
$config['log_maxsize1']=$_POST['log_maxsize1']; if($config['log_maxsize1']=="") $config['log_maxsize1']=0;
$config['log_maxsize2']=$_POST['log_maxsize2'];
$config['log_maxsize']=$config['log_maxsize1']*(($config['log_maxsize2']==1) ? 1024 : 1024*1024);
$config['auto_delete']=$_POST['auto_delete'];
$config['del_files_after_days']=$_POST['del_files_after_days'];
$config['max_backup_files']=$_POST['max_backup_files'];
$config['max_backup_files_each']=$_POST['max_backup_files_each'];
$config['empty_db_before_restore']=$_POST['empty_db_before_restore'];
$config['optimize_tables_beforedump']=$_POST['optimize_tables'];
$config['cron_samedb']=$_POST['cron_samedb'];
$config['cron_extender']=$_POST['cron_extender'];
// cron_select_savepath/
if(isset($_POST['cron_savepath_new']) && !empty($_POST['cron_savepath_new']))
$config['cron_configurationfile']=$_POST['cron_savepath_new'].".conf";
else
$config['cron_configurationfile']=$_POST['cron_select_savepath'].".conf";
$config['cron_execution_path']=$_POST['cron_execution_path'];
if($config['cron_execution_path']=="")$config['cron_execution_path']="msd_cron/";
if(strlen($config['cron_execution_path'])>1 && substr($config['cron_execution_path'],-1)!="/") $config['cron_execution_path'].="/";
$config['cron_mail']=$_POST['cron_mail'];
$config['cron_mail_dump']=$_POST['cron_mail_dump'];
$config['cron_use_sendmail']=$_POST['cron_use_sendmail'];
$config['cron_sendmail']=$_POST['cron_sendmail'];
$config['cron_smtp']=$_POST['cron_smpt'];
$config['cron_printout']=$_POST['cron_printout'];
$config['cron_completelog']=$_POST['cron_completelog'];
$config['cron_ftp']=$_POST['cron_ftp'];
$config['cron_compression']=$_POST['cron_compression'];
$config['cron_comletelog']=$_POST['cron_completelog'];
$databases['multi']=Array();
$databases['multi_praefix']=Array();
$databases['multi_commandbeforedump']=Array();
$databases['multi_commandafterdump']=Array();
for($i=0;$i0)?implode(";",$databases['multi']) : "";
$databases['multisetting_praefix']=(count($databases['multi'])>0)?implode(";",$databases['multi_praefix']) : "";
$databases['multisetting_commandbeforedump']=(count($databases['multi'])>0)?implode(";",$databases['multi_commandbeforedump']) : "";
$databases['multisetting_commandafterdump']=(count($databases['multi'])>0)?implode(";",$databases['multi_commandafterdump']) : "";
$databases['db_actual_cronindex']=$_POST['cron_dbindex'];
if($config['cron_samedb']==0){
$databases['db_actual_cronindex']=$databases['db_selected_index'];
} elseif($databases['db_actual_cronindex']=="-2") {
$cron_save_all_dbs=1;
$datenbanken=count($databases['Name']);
$cron_db_array=str_replace(";","|",$databases['multisetting']);
$cron_dbpraefix_array=str_replace(";","|",$databases['multisetting_praefix']);
$cron_db_cbd_array=str_replace(";","|",$databases['multisetting_commandbeforedump']);
$cron_db_cad_array=str_replace(";","|",$databases['multisetting_commandafterdump']);
} elseif ($databases['db_actual_cronindex']=="-3") {
$cron_save_all_dbs=1;
$cron_db_array=implode("|",$databases['Name']);
$cron_dbpraefix_array=implode("|",$databases['praefix']);
$cron_db_cbd_array=implode("|",$databases['command_before_dump']);
$cron_db_cad_array=implode("|",$databases['command_after_dump']);
}
$config['ftp_transfer']=$_POST['ftp_transfer'];
$config['ftp_connectionindex']=$_POST['ftp_transferconn'];
$config['ftp_timeout']=$_POST['ftp_timeout'];
$config['ftp_useSSL']=isset($_POST['ftp_useSSL']) ? $_POST['ftp_useSSL'] : 0;
$config['ftp_mode']=isset($_POST['ftp_mode']) ? 1 : 0;
for($i=0;$i<3;$i++) {
$checkFTP[$i]="";
$config['ftp_server'][$i]=$_POST['ftp_server'.$i];
$config['ftp_port'][$i]=$_POST['ftp_port'.$i];
$config['ftp_user'][$i]=$_POST['ftp_user'.$i];
$config['ftp_pass'][$i]=$_POST['ftp_pass'.$i];
$config['ftp_dir'][$i]=stripslashes($_POST['ftp_dir'.$i]);
if($config['ftp_port'][$i]+0==0) $config['ftp_port'][$i]=21;
if($config['ftp_dir'][$i]=="" || (strlen($config['ftp_dir'][$i])>1 && substr($config['ftp_dir'][$i],-1)!="/")) $config['ftp_dir'][$i].="/";
}
$config['bb_width']=$_POST['bb_width'];
$config['bb_textcolor']=$_POST['bb_textcolor'];
$config['sql_limit']=$_POST['sql_limit'];
if($config['dbhost']!=$_POST['dbhost'] ||
$config['dbuser']!=$_POST['dbuser'] ||
$config['dbpass']!=$_POST['dbpass'] ||
$config['dbport']!=$_POST['dbport'] ||
$config['dbsocket']!=$_POST['dbsocket']) {
//neue Verbindungsparameter
//alte Parameter sichern
$old['dbhost']=$config['dbhost'];
$old['dbuser']=$config['dbuser'];
$old['dbpass']=$config['dbpass'];
$old['dbport']=$config['dbport'];
$old['dbsocket']=$config['dbsocket'];
//neu setzen
$config['dbhost']=$_POST['dbhost'];
$config['dbuser']=$_POST['dbuser'];
$config['dbpass']=$_POST['dbpass'];
$config['dbport']=$_POST['dbport'];
$config['dbsocket']=$_POST['dbsocket'];
if(MSD_mysql_connect()) {
SetDefault();
$msg.= '';
} else {
//alte Werte holen
$config['dbhost']=$old['dbhost'];
$config['dbuser']=$old['dbuser'];
$config['dbpass']=$old['dbpass'];
$config['dbport']=$old['dbport'];
$config['dbsocket']=$old['dbsocket'];
$msg.=''.$lang['wrong_connectionpars'].'
';
}
} else {
// und wegschreiben
if (WriteParams(0,$config,$databases)==true)
{
//neue Sprache? Dann Menü links auch aktualisieren
if( $_POST['lang_old']!=$config['language']
|| $_POST['scaption_old']!=$config['interface_server_caption']
|| $oldtheme!=$config['theme']
|| $oldscposition!=$config['interface_server_caption_position'])
{
$msg.= '';
}
//Parameter laden
include($config['files']['parameter']);
if ($config['logcompression']!=$oldlogcompression) SwitchLogfileFormat();
$msg.= ''.$lang['save_success'].'
';
} else $msg.= ''.$lang['save_error'].'
';
}
}
echo MSDHeader();
ReadSQL();
?>
'.$nl;
$aus['formstart'].='';
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].='
'.$nl;
$aus['formstart'].=''.$nl;
$aus['formstart'].=''.$nl;
$aus['formstart'].='
'.$msg.$nl;
// Zugangsdaten
$aus['db']='
';
// sonstige Einstellungen
$aus['global1']='
';
//Interface -->
$aus['global3']='
';
//automatisches Löschen-->
$aus['global2']='
';
//Email-->
$aus['transfer1']='
';
//FTP-->
$aus['transfer2']='
';
//Crondump
$aus['cron']='
';
$aus['cron'].=''.Help($lang['help_cronextender'],"").$lang['cron_extender'].': | ';
$aus['cron'].='.pl';
$aus['cron'].='.cgi';
$aus['cron'].=' |
'.Help($lang['help_cronsavepath'],"").$lang['cron_savepath'].': | ';
$aus['cron'].=' | ';
$aus['cron'].='
'.Help($lang['help_cronexecpath'],"").$lang['cron_execpath'].': | ';
$aus['cron'].=' | ';
$aus['cron'].='
'.Help($lang['help_cronprintout'],"").$lang['cron_printout'].': | ';
$aus['cron'].=''.$lang['yes'];
$aus['cron'].=''.$lang['no'].' |
';
$aus['cron'].=''.Help($lang['help_croncompletelog'],"").$lang['cron_completelog'].': | ';
$aus['cron'].=''.$lang['yes'];
$aus['cron'].=''.$lang['no'].' |
';
$aus['cron'].=''.Help($lang['help_cronsamedb'],"conf13").$lang['cron_samedb'].': | ';
$aus['cron'].=''.$lang['yes'];
$aus['cron'].=''.$lang['no'];
$aus['cron'].=' |
'.Help($lang['help_crondbindex'],"conf14").$lang['cron_crondbindex'].': | ';
$aus['cron'].=' |
';
$aus['cron'].=''.Help($lang['help_cronzip'],"").$lang['gzip'].': | ';
$aus['cron'].=''.$lang['activated'];
$aus['cron'].=''.$lang['not_activated'];
$aus['cron'].=' |
'.Help($lang['help_cronmail'],"").$lang['send_mail_form'].': | ';
$aus['cron'].=''.$lang['yes'];
$aus['cron'].=''.$lang['no'];
$aus['cron'].=' |
'.Help($lang['help_cronmail_dump'],"").$lang['send_mail_dump'].': | ';
$aus['cron'].=''.$lang['yes'];
$aus['cron'].=''.$lang['no'];
$aus['cron'].=' |
';
$aus['cron'].=''.Help($lang['help_cronftp'],"").$lang['cron_ftp'].': | ';
$aus['cron'].=''.$lang['yes'];
$aus['cron'].=''.$lang['no'];
$aus['cron'].=' |
';
//Formular-Buttons -->
$aus['formende']='
';
// AUSGABE
echo $aus['formstart'];
echo $aus['db'];
echo $aus['global1'];
echo $aus['global2'];
echo $aus['global3'];
echo $aus['transfer1'];
echo $aus['transfer2'];
echo $aus['cron'];
echo $aus['formende'];
echo '';
echo MSDFooter();
?>