From ab3487195fd4dc3e33b481cef0b1c513f7ace31f Mon Sep 17 00:00:00 2001 From: DSB Date: Fri, 10 Jun 2011 22:58:43 +0000 Subject: [PATCH] --- config.php | 132 ++++++ config_overview.php | 531 ++++++++++++++++++++++ control.php | 24 + doc/changelog.txt | 18 + doc/install_deutsch.txt | 24 + doc/install_english.txt | 22 + doc/license_deutsch.txt | 105 +++++ doc/license_english.txt | 88 ++++ doc/readme.txt | 15 + dump.php | 429 ++++++++++++++++++ filemanagement.php | 675 ++++++++++++++++++++++++++++ frameset.php | 18 + images/ardown.gif | Bin 0 -> 859 bytes images/arrowdown.gif | Bin 0 -> 65 bytes images/arrowleft.gif | Bin 0 -> 878 bytes images/arrowup.gif | Bin 0 -> 64 bytes images/arup.gif | Bin 0 -> 857 bytes images/blank.gif | Bin 0 -> 43 bytes images/close.gif | Bin 0 -> 880 bytes images/delete.gif | Bin 0 -> 861 bytes images/edit.gif | Bin 0 -> 901 bytes images/fbd.gif | Bin 0 -> 502 bytes images/fbr.gif | Bin 0 -> 471 bytes images/fbs.gif | Bin 0 -> 484 bytes images/fulltext.gif | Bin 0 -> 1295 bytes images/germany.gif | Bin 0 -> 158 bytes images/gz.gif | Bin 0 -> 1468 bytes images/help16.gif | Bin 0 -> 147 bytes images/help32.gif | Bin 0 -> 252 bytes images/key.gif | Bin 0 -> 489 bytes images/logo.gif | Bin 0 -> 4613 bytes images/nokey.gif | Bin 0 -> 1299 bytes images/notok.gif | Bin 0 -> 900 bytes images/ok.gif | Bin 0 -> 905 bytes images/openfile.gif | Bin 0 -> 941 bytes images/primary.gif | Bin 0 -> 1302 bytes images/rename.gif | Bin 0 -> 296 bytes images/unique.gif | Bin 0 -> 1302 bytes images/usa.gif | Bin 0 -> 206 bytes inc/footer.php | 14 + inc/functions.php | 323 ++++++++++++++ inc/functions_dump.php | 442 ++++++++++++++++++ inc/functions_global.php | 684 ++++++++++++++++++++++++++++ inc/functions_restore.php | 262 +++++++++++ inc/functions_sql.php | 788 ++++++++++++++++++++++++++++++++ inc/header.php | 23 + inc/mysql.php | 83 ++++ inc/runtime.php | 65 +++ inc/tabellenabfrage.php | 71 +++ index.php | 29 ++ install.php | 812 +++++++++++++++++++++++++++++++++ language/help_de.php | 134 ++++++ language/help_en.php | 137 ++++++ language/lang_de.php | 683 ++++++++++++++++++++++++++++ language/lang_en.php | 681 ++++++++++++++++++++++++++++ log.php | 79 ++++ main.php | 610 +++++++++++++++++++++++++ menu.php | 130 ++++++ msd_cron/crondump.pl | 696 +++++++++++++++++++++++++++++ msd_cron/perltest.pl | 92 ++++ msd_cron/simpletest.pl | 16 + restore.php | 304 +++++++++++++ script.js | 163 +++++++ sql.php | 916 ++++++++++++++++++++++++++++++++++++++ styles.css | 407 +++++++++++++++++ 65 files changed, 10725 insertions(+) create mode 100644 config.php create mode 100644 config_overview.php create mode 100644 control.php create mode 100644 doc/changelog.txt create mode 100644 doc/install_deutsch.txt create mode 100644 doc/install_english.txt create mode 100644 doc/license_deutsch.txt create mode 100644 doc/license_english.txt create mode 100644 doc/readme.txt create mode 100644 dump.php create mode 100644 filemanagement.php create mode 100644 frameset.php create mode 100644 images/ardown.gif create mode 100644 images/arrowdown.gif create mode 100644 images/arrowleft.gif create mode 100644 images/arrowup.gif create mode 100644 images/arup.gif create mode 100644 images/blank.gif create mode 100644 images/close.gif create mode 100644 images/delete.gif create mode 100644 images/edit.gif create mode 100644 images/fbd.gif create mode 100644 images/fbr.gif create mode 100644 images/fbs.gif create mode 100644 images/fulltext.gif create mode 100644 images/germany.gif create mode 100644 images/gz.gif create mode 100644 images/help16.gif create mode 100644 images/help32.gif create mode 100644 images/key.gif create mode 100644 images/logo.gif create mode 100644 images/nokey.gif create mode 100644 images/notok.gif create mode 100644 images/ok.gif create mode 100644 images/openfile.gif create mode 100644 images/primary.gif create mode 100644 images/rename.gif create mode 100644 images/unique.gif create mode 100644 images/usa.gif create mode 100644 inc/footer.php create mode 100644 inc/functions.php create mode 100644 inc/functions_dump.php create mode 100644 inc/functions_global.php create mode 100644 inc/functions_restore.php create mode 100644 inc/functions_sql.php create mode 100644 inc/header.php create mode 100644 inc/mysql.php create mode 100644 inc/runtime.php create mode 100644 inc/tabellenabfrage.php create mode 100644 index.php create mode 100644 install.php create mode 100644 language/help_de.php create mode 100644 language/help_en.php create mode 100644 language/lang_de.php create mode 100644 language/lang_en.php create mode 100644 log.php create mode 100644 main.php create mode 100644 menu.php create mode 100644 msd_cron/crondump.pl create mode 100644 msd_cron/perltest.pl create mode 100644 msd_cron/simpletest.pl create mode 100644 restore.php create mode 100644 script.js create mode 100644 sql.php create mode 100644 styles.css diff --git a/config.php b/config.php new file mode 100644 index 0000000..2c1daa2 --- /dev/null +++ b/config.php @@ -0,0 +1,132 @@ +1000 +$config["processlist_refresh"]=2000; + +//No more warning of missing .htaccess set to 1 +$config["no_htaccess"]=0; + +$config["empty_db_before_restore"]=0; +$config["optimize_tables_beforedump"]=0; + + +// For sending a mail after backup set send_mail to 1, otherless set to 0 +$config["send_mail"]=0; +// Attach the backup 0=no 1=yes +$config["send_mail_dump"]=0; +// set the recieve adress for the mail +$config["email_recipient"]="admin@mysqldumper.de"; +// set the sender adress (the script) +$config["email_sender"]="mein_board@weltweit.de"; + +//max. Size of Email-Attach, here 3 MB +$config["email_maxsize1"]=3; +$config["email_maxsize2"]=2; + + +// For FTP-Transfer of Backupfiles set ftp_transfer to 1 +$config["ftp_transfer"]=0; + +// FTP Server Configuration for Transfer +$config["ftp_connectionindex"]=0; +$config["ftp_server"][0]=""; // Adress of FTP-Server +$config["ftp_port"][0]="21"; // Port +$config["ftp_user"][0]=""; // Username +$config["ftp_pass"][0]=""; // Password +$config["ftp_dir"][0]=""; // Upload-Directory + +$config["ftp_server"][1]=""; // Adress of FTP-Server +$config["ftp_port"][1]="21"; // Port +$config["ftp_user"][1]=""; // Username +$config["ftp_pass"][1]=""; // Password +$config["ftp_dir"][1]=""; // Upload-Directory + +$config["ftp_server"][2]=""; // Adress of FTP-Server +$config["ftp_port"][2]="21"; // Port +$config["ftp_user"][2]=""; // Username +$config["ftp_pass"][2]=""; // Password +$config["ftp_dir"][2]=""; // Upload-Directory + +$config["ftp_timeout"]=30; +$config["ftp_useSSL"]=0; + +//Multipart 0=off 1=on +$config["multi_part"]=0; +$config["multipartgroesse1"]=1; +$config["multipartgroesse2"]=2; +$config["multipart_groesse"]=0; + +//Auto-Delete 0=off 1=on +$config["auto_delete"]=0; +$config["del_files_after_days"]=0; +$config["max_backup_files"]=3; +$config["max_backup_files_each"]=0; + + +//configuration file +$config["cron_configurationfile"]="mysqldumper.conf"; +//path to perl, for windows use e.g. C:perlbinperl.exe +$config["cron_perlpath"]="/usr/bin/perl"; +//mailer use sendmail(1) or SMTP(0) +$config["cron_use_sendmail"]=1; +//path to sendmail +$config["cron_sendmail"]="/usr/lib/sendmail"; +//adress of smtp-server +$config["cron_smtp"]="localhost"; +//smtp-port +$config["cron_smtp_port"]=25; +$config["cron_samedb"]=0; +$config["cron_timelimit"]=360; +$config["cron_extender"]=0; +$config["cron_mail"]=0; +$config["cron_mail_dump"]=0; +$config["cron_ftp"]=0; +$config["cron_compression"]=1; +$config["cron_printout"]=1; +$config["multi_dump"]=0; + +?> + + + diff --git a/config_overview.php b/config_overview.php new file mode 100644 index 0000000..67b797a --- /dev/null +++ b/config_overview.php @@ -0,0 +1,531 @@ +'.$lang['test'].' FTP-Connection 1

'.TesteFTP($_POST["ftp_server0"],$_POST["ftp_port0"],$_POST["ftp_user0"],$_POST["ftp_pass0"],$_POST["ftp_dir0"]).''; + if($command<6) $command=4; + $ftptested=0; +} +if(isset($_POST["testFTP1"])) { + $checkFTP[1]='
'.$lang['test'].' FTP-Connection 2

'.TesteFTP($_POST["ftp_server1"],$_POST["ftp_port1"],$_POST["ftp_user1"],$_POST["ftp_pass1"],$_POST["ftp_dir1"]).'
'; + if($command<6)$command=4; + $ftptested=1; +} +if(isset($_POST["testFTP2"])) { + $checkFTP[2]='
'.$lang['test'].' FTP-Connection 3

'.TesteFTP($_POST["ftp_server2"],$_POST["ftp_port2"],$_POST["ftp_user2"],$_POST["ftp_pass2"],$_POST["ftp_dir2"]).'
'; + if($command<6)$command=4; + $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(); + $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_captioncolor"]=$_POST["server_captioncolor"]; + $config["interface_sqlboxsize"]=$_POST["sqlboxsize"]; + + $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["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["multi_part"]=$_POST["multi_part"]; + $config["multipartgroesse1"]=$_POST["multipartgroesse1"]; + $config["multipartgroesse2"]=$_POST["multipartgroesse2"]; + if($config["multipartgroesse1"]<100 && $config["multipartgroesse2"]==1)$config["multipartgroesse1"]=100; + + + $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_ftp"]=$_POST["cron_ftp"]; + $config["cron_compression"]=$_POST["cron_compression"]; + + $config["interface_browser_ie"]=$_POST["frames"]; + + $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; + + 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"]; + + // und wegschreiben + if (WriteParams(0,$config,$databases)==true) + { + //neue Sprache? Dann Menü links auch aktualisieren + if($_POST["lang_old"]!=$config["language"]) + { + echo ''; + } + //Parameter laden + include($config["files"]["parameter"]); + + $msg.= $lang["save_success"]; + } else $msg.= $lang["save_error"]; +} + +if(!isset($config["email_maxsize1"]))$config["email_maxsize1"]=0; +if(!isset($config["email_maxsize2"]))$config["email_maxsize2"]=1; +if(!isset($databases["multisetting"])) $databases["multisetting"]=""; +$databases["multi"]=explode(";",$databases["multisetting"]); + +//$command_bd=explode("|",$config["command_beforedump"]); +//$command_ad=explode("|",$config["command_afterdump"]); + + +echo headline(); + +$aus=Array("formstart" =>""); +//Ausgabe-Teile +$aus["formstart"].=''; +$aus["formstart"].='

'.$lang["config_headline"].'

'.$msg.'
'; +$aus["formstart"].='
'; +$aus["formstart"].='
'; +$aus["formstart"].='

'; +$aus["formstart"].=''; +$aus["formstart"].=''; +// Zugangsdaten + +$aus["db"]=''; + +if(count($databases["Name"])==1) { + $aus["db"].=''; + $aus["db"].=''; + $aus["db"].= ''; + $aus["db"].= ''; + //if($command<6) $aus["db"].=''; +} else { +$aus["db"].=''; +$aus["db"].=''; +} + +// + + +// sonstige Einstellungen +$aus["global1"]=''; +$aus["global1"].=''; +$aus["global1"].=''; +$aus["global1"].=''; +$aus["global1"].=''; +$aus["global1"].=''; +$aus["global1"].=''; +//Multipart-Backup --> +$aus["global1"].=''; +$aus["global1"].=''; + +$aus["global1"].=''; +$aus["global1"].=''; + +//Interface --> +$aus["global3"]=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].=''; + +//automatisches Löschen--> +$aus["global2"]=''; +$aus["global2"].=''; +$aus["global2"].=''; +$aus["global2"].=''; +$aus["global2"].=''; +$aus["global2"].=''; + + +//Email--> +$aus["transfer1"]=''; +$aus["transfer1"].=''; +$aus["transfer1"].=''; +$aus["transfer1"].=''; +$aus["transfer1"].=''; +$aus["transfer1"].=''; +$aus["transfer1"].=''; + +//FTP--> +$aus["transfer2"]=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; + +$aus["transfer2"].=''; +$aus["transfer2"].=''; + +$aus["transfer2"].=''; +$aus["transfer2"].=''; + +//1 +$aus["transfer2"].=''; +//2 +$aus["transfer2"].=''; +//3 +$aus["transfer2"].=''; + + + +//Crondump +$aus["cron"]=''; +//$aus["cron"].=''; +//$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; + +$aus["cron"].=''; + +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; +$aus["cron"].=''; + +$aus["cron"].=''; +$aus["cron"].=''; + + + + +//Formular-Buttons --> +$aus["formende"]='

'; +$aus["formstart"].='
'; +$aus["formstart"].='
'; +$aus["formstart"].='
'; +$aus["formstart"].='
'; +$aus["formstart"].='
'; +$aus["formstart"].='
'; +$aus["formstart"].='

'; +$aus["formstart"].='

'; + +$aus["formstart"].='

'.$lang["config_databases"].'
'.Help($lang["help_db"],"conf1").$lang["list_db"].''; + $aus["db"].=''.$databases["db_actual"].''.(($config["dbonly"]!="") ? '

dbonly='.$config["dbonly"].'' : '').'
'.Help($lang["help_praefix"],"conf2").$lang["praefix"].'
'.Help($lang["help_commands"],"").'Command before Dump'.ComboCommandDump(0,$databases["db_selected_index"]).'
'.Help($lang["help_commands"],"").'Command after Dump'.ComboCommandDump(1,$databases["db_selected_index"]).'






'.Help($lang["help_db"],"conf1").$lang["list_db"].''.$lang['activate_multidump'].'
'; +$aus["db"].=''; +$aus["db"].=''; + +//erst die aktuelle DB +$aus["db"].= ''; +$aus["db"].= ''; +$aus["db"].= ''; +$aus["db"].= ''; + +$dbacombo=$dbbcombo="";$j=0; +for($i=0;$i'.$databases["Name"][$i].''; + //$dbacombo.=''; + if($i!=$databases["db_selected_index"]) { + $j++; + + $aus["db"].= ''; + $aus["db"].= ''; + $aus["db"].= ''; + } +} + +$aus["db"].='
'.$lang['db'].' Multidump
('.$lang["all"].' '.$lang["none"].')
'.Help($lang["help_praefix"],"conf2").$lang["praefix"].''.Help($lang["help_commands"],"",11).'Command before Dump'.Help($lang["help_commands"],"",11).'Command after Dump
'.$databases["db_actual"].' '.ComboCommandDump(0,$databases["db_selected_index"]).''.ComboCommandDump(1,$databases["db_selected_index"]).'
'.$databases["Name"][$i].' '.ComboCommandDump(0,$i).''.ComboCommandDump(1,$i).'
'.Help($lang["help_praefix"],"conf2").$lang["praefix"].' 
'.$lang["config_dumprestore"].'
'.Help($lang["help_zip"],"conf3").$lang["gzip"].': '.$lang["activated"]; +$aus["global1"].=''.$lang["not_activated"].'
'.Help($lang["help_memorylimit"],"").$lang["memory_limit"].':  Bytes
'.Help($lang["help_speed"],"").$lang["speed"].':  '.$lang["to"].' 
'.Help($lang["help_multipart"],"").$lang["multi_part"].': '; +$aus["global1"].=''.$lang["yes"]; +$aus["global1"].=''.$lang["no"]; +$aus["global1"].='
'.Help($lang["help_multipartgroesse"],"").$lang["multi_part_groesse"].':  
'; +$aus["global1"].='  '; +$aus["global1"].=''; +$aus["global1"].='
'.Help($lang["help_empty_db_before_restore"],"conf4").$lang["empty_db_before_restore"].': '; +$aus["global1"].=''.$lang["yes"]; +$aus["global1"].=''.$lang["no"]; +$aus["global1"].='
'.Help($lang["help_optimize"],"").$lang['optimize'].': '.$lang["activated"]; +$aus["global1"].=''.$lang["not_activated"].'
'.$lang["config_interface"].'
'.Help($lang["help_lang"],"conf11").$lang["language"].': 
'.Help($lang["help_browser"],"").'Browser:Internet Explorer
'.$lang['otherbrowser'].'
'.Help($lang["help_servercaption"],"").$lang['servercaption'].':'.$lang['activated'].'   '; +$aus["global3"].='
Mini-SQL
'.Help("","").$lang['sqlboxheight'].':  pixel
'.Help("","").$lang['sqllimit'].':  
'.Help("","").$lang['bbparams'].': '; +$aus["global3"].=''; +$aus["global3"].=''; +$aus["global3"].='
Breite: pixel
'.$lang['bbtextcolor'].': 
'; + +$aus["global3"].='
'.$lang["config_autodelete"].'
'.Help($lang["help_ad1"],"conf8").$lang["autodelete"].': '.$lang["activated"]; +$aus["global2"].=''.$lang["not_activated"]; +$aus["global2"].='
'.Help($lang["help_ad2"],"conf9").$lang["age_of_files"].': 
'.Help($lang["help_ad3"],"conf10").$lang["number_of_files_form"].': 
'; +$aus["global2"].=''.$lang["max_backup_files_each1"].'
'; +$aus["global2"].=''.$lang["max_backup_files_each2"]; +$aus["global2"].='
'.$lang["config_email"].'
'.Help($lang["help_mail1"],"conf5").$lang["send_mail_form"].': '.$lang["yes"]; +$aus["transfer1"].=''.$lang["no"]; +$aus["transfer1"].='
'.Help($lang["help_mail2"],"conf6").$lang["email_adress"].': 
'.Help($lang["help_mail3"],"conf7").$lang["email_subject"].': 
'.Help($lang["help_mail5"],"").$lang["send_mail_dump"].': '; +$aus["transfer1"].=''.$lang["yes"]; +$aus["transfer1"].=''.$lang["no"]; +$aus["transfer1"].='
'.Help($lang["help_mail4"],"").$lang["email_maxsize"].': '; +$aus["transfer1"].='  '; +$aus["transfer1"].='
'.Help($lang["help_cronmailprg"],"").$lang["cron_mailprg"].': '; +$aus["transfer1"].='
sendmail
SMPT
 SMTP-Port: '.$config["cron_smtp_port"].'
'.$lang["config_ftp"].'
'.Help($lang["help_ftptransfer"],"conf13").$lang["ftp_transfer"].': '.$lang["activated"]; +$aus["transfer2"].=' '.$lang["not_activated"].'
'.Help($lang['useconnection'].":","").$lang['useconnection'].': '; +$aus["transfer2"].=' FTP 1  '; +$aus["transfer2"].=' FTP 2  '; +$aus["transfer2"].=' FTP 3
'.Help($lang["help_ftptimeout"],"").$lang["ftp_timeout"].':  sec
'.Help($lang["help_ftpssl"],"").$lang["ftp_ssl"].': '.$lang['ftp_useSSL'].'
FTP-Connection 1

'.$checkFTP[0].'
'; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].='
'.Help($lang["help_ftpserver"],"conf14",12).$lang["ftp_server"].': 
'.Help($lang["help_ftpport"],"conf15",12).$lang["ftp_port"].': 
'.Help($lang["help_ftpuser"],"conf16",12).$lang["ftp_user"].' 
'.Help($lang["help_ftppass"],"conf17",12).$lang["ftp_pass"].': 
'.Help($lang["help_ftpdir"],"conf18",12).$lang["ftp_dir"].': 
FTP-Connection 2

'.$checkFTP[1].'
'; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].='
'.Help($lang["help_ftpserver"],"conf14",12).$lang["ftp_server"].': 
'.Help($lang["help_ftpport"],"conf15",12).$lang["ftp_port"].': 
'.Help($lang["help_ftpuser"],"conf16",12).$lang["ftp_user"].' 
'.Help($lang["help_ftppass"],"conf17",12).$lang["ftp_pass"].': 
'.Help($lang["help_ftpdir"],"conf18",12).$lang["ftp_dir"].': 
FTP-Connection 3

'.$checkFTP[2].'
'; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].=''; +$aus["transfer2"].='
'.Help($lang["help_ftpserver"],"conf14",12).$lang["ftp_server"].': 
'.Help($lang["help_ftpport"],"conf15",12).$lang["ftp_port"].': 
'.Help($lang["help_ftpuser"],"conf16",12).$lang["ftp_user"].' 
'.Help($lang["help_ftppass"],"conf17",12).$lang["ftp_pass"].': 
'.Help($lang["help_ftpdir"],"conf18",12).$lang["ftp_dir"].': 
'.$lang["config_cronperl"].'
'.Help($lang["help_cronperlpath"],"").$lang["cron_perlpath"].': 
'.Help($lang["help_cronextender"],"").$lang["cron_extender"].': .pl'; +$aus["cron"].='.cgi'; +$aus["cron"].='
'.Help($lang["help_cronsavepath"],"").$lang["cron_savepath"].': '; +$aus["cron"].='
'.$lang['existing'].':
'.$lang['new'].': .conf
'.Help($lang["help_cronexecpath"],"").$lang["cron_execpath"].': 
'.Help($lang["help_cronprintout"],"").$lang["cron_printout"].': '.$lang["yes"]; +$aus["cron"].=''.$lang["no"]; +$aus["cron"].='
'.Help($lang["help_cronsamedb"],"conf13").$lang["cron_samedb"].': '.$lang["yes"]; +$aus["cron"].=''.$lang["no"]; +$aus["cron"].='
'.Help($lang["help_crondbindex"],"conf14").$lang["cron_crondbindex"].': 

'.Help($lang["help_cronzip"],"").$lang["gzip"].': '.$lang["activated"]; +$aus["cron"].=''.$lang["not_activated"]; +$aus["cron"].='
'.Help($lang["help_cronmail"],"").$lang["send_mail_form"].': '.$lang["yes"]; +$aus["cron"].=''.$lang["no"]; +$aus["cron"].='
'.Help($lang["help_cronmail_dump"],"").$lang["send_mail_dump"].': '.$lang["yes"]; +$aus["cron"].=''.$lang["no"]; +$aus["cron"].='
'.Help($lang["help_cronftp"],"").$lang["cron_ftp"].': '.$lang["yes"]; +$aus["cron"].=''.$lang["no"]; +$aus["cron"].='
'; + + + +// AUSGABE +$display='none'; +//$display='block'; +//print_r($_POST); +//echo '
'; +echo $aus["formstart"]; +$invisible=""; +switch ($command) { +case 0: + echo $aus["db"]; + $invisible='
'.$aus["global1"].$aus["global2"].$aus["global3"].$aus["transfer1"].$aus["transfer2"].$aus["cron"].'
'; + break; +case 1: + echo $aus["global1"]; + $invisible='
'.$aus["db"].$aus["global2"].$aus["global3"].$aus["transfer1"].$aus["transfer2"].$aus["cron"].'
'; + break; +case 2: + echo $aus["global2"]; + $invisible='
'.$aus["global1"].$aus["global3"].$aus["db"].$aus["transfer1"].$aus["transfer2"].$aus["cron"].'
'; + break; +case 3: + echo $aus["transfer1"]; + $invisible='
'.$aus["global1"].$aus["global2"].$aus["global3"].$aus["db"].$aus["transfer2"].$aus["cron"].'
'; + break; +case 4: + echo $aus["transfer2"]; + $invisible='
'.$aus["global1"].$aus["global2"].$aus["global3"].$aus["transfer1"].$aus["db"].$aus["cron"].'
'; + break; +case 5: + echo $aus["cron"]; + $invisible='
'.$aus["global1"].$aus["global2"].$aus["global3"].$aus["transfer1"].$aus["transfer2"].$aus["db"].'
'; + break; +case 6: + echo $aus["db"].$aus["global1"].$aus["global2"].$aus["global3"].$aus["transfer1"].$aus["transfer2"].$aus["cron"]; + break; +case 7: + echo $aus["global3"]; + $invisible='
'.$aus["global1"].$aus["global2"].$aus["transfer1"].$aus["transfer2"].$aus["db"].$aus["cron"].'
'; + break; +} +echo $aus["formende"].$invisible.'
'; + +include("inc/footer.php"); + + + + +?> \ No newline at end of file diff --git a/control.php b/control.php new file mode 100644 index 0000000..18b5560 --- /dev/null +++ b/control.php @@ -0,0 +1,24 @@ +MySQLDumper'; +?> + +pars   vars   '; +$f=''; + +echo $h.$t; +echo ''; +if(isset($_GET["showpars"])) { + $au=file(Realpath("./")."/work/config/parameter.php"); + $sp='
Parameter
'.print_r($au,true).'
'; + echo ''; +} +echo $f; + +?> diff --git a/doc/changelog.txt b/doc/changelog.txt new file mode 100644 index 0000000..de74010 --- /dev/null +++ b/doc/changelog.txt @@ -0,0 +1,18 @@ +Changelog für MySqlDump: + +Version 1.0 +- Dumps von phpMyAdmin und ähnlichen Programmen können nun eingespielt werden +- Detailansicht der einzelnen Tabellen +- SQL-Abfragegenerator (Datensatzlistensortierung auf-/absteigend, eigene Abfragen) + + +Version 0.9.3c + +- Cronjob als Perlscript, um dem Timeout ein Schäppchen zu schlagen +- Cronjob kann standardmäßig eine bestimmte Datenbank sichern (unabhängig - von anderen Eistellungen) +- englische Sprachdatei überarbeitet +- kleinerer Bugs beseitigt +- es werden nur Datenbanken angezeigt, die auch bearbeitet werden können +- einfachere Installation durch neue Verzeichnisstruktur (bei Update bitte alte Backups ins neue Backup-Verzeichnis kopieren) +- bessere Performance + diff --git a/doc/install_deutsch.txt b/doc/install_deutsch.txt new file mode 100644 index 0000000..30fccd5 --- /dev/null +++ b/doc/install_deutsch.txt @@ -0,0 +1,24 @@ +Installation: + +- lade alle Dateien auf Deinen Webspace hoch +- gebe der Datei config.php die Rechte 777 +- Starte das Script im Browser (http://www.deineDomain.de/mysqldumper/) +- Folge der Installation +- in Schritt 2 (Konfiguration) änder Daten (Host, Name, Passwort) der zu verwaltenden Datenbanken und speicher + (alle anderen Einstellungen kannst Du später online verändern) + +- im Falle von safe_mode=1 müssen die Ordner manuell erstellt werden. + erzeuge im Scriptdir die Ordner + + - work + - work/backup + - work/config + - work/structure + - work/log + + und gebe allen Ordnern die Rechte 777 + +- Fertig ! + + + diff --git a/doc/install_english.txt b/doc/install_english.txt new file mode 100644 index 0000000..7699db5 --- /dev/null +++ b/doc/install_english.txt @@ -0,0 +1,22 @@ +Installation: + +- upload all files to your webspace +- make on file "config.php" chmod 777 +- start the script in your browser (http://www.deineDomain.de/mysqldumper/) +- Follow the Installationscript +- in step 2 (Configuration) change Data (Host, Name, Password) of your databaseconnection and save + (all other parameters you can change online) + +- in case of safe_mode=1 you must create the folders manually. + create following folders in the Scriptdir: + + - work + - work/backup + - work/config + - work/structure + - work/log + + and make chmod 777 on all folders + +- Ready ! + diff --git a/doc/license_deutsch.txt b/doc/license_deutsch.txt new file mode 100644 index 0000000..64ff14f --- /dev/null +++ b/doc/license_deutsch.txt @@ -0,0 +1,105 @@ +GNU General Public License +Deutsche Übersetzung der Version 2, Juni 1991 + +Copyright © 1989, 1991 Free Software Foundation, Inc. + +59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + + +Diese Übersetzung ist kein rechtskräftiger Ersatz für die englischsprachige Originalversion! + + +Vorwort +Die meisten Softwarelizenzen sind daraufhin entworfen worden, Ihnen die Freiheit zu nehmen, die Software weiterzugeben und zu verändern. Im Gegensatz dazu soll Ihnen die GNU General Public License , die Allgemeine Öffentliche GNU-Lizenz, ebendiese Freiheit garantieren. Sie soll sicherstellen, daß die Software für alle Benutzer frei ist. Diese Lizenz gilt für den Großteil der von der Free Software Foundation herausgegebenen Software und für alle anderen Programme, deren Autoren ihr Datenwerk dieser Lizenz unterstellt haben. Auch Sie können diese Möglichkeit der Lizenzierung für Ihre Programme anwenden. (Ein anderer Teil der Software der Free Software Foundation unterliegt stattdessen der GNU Library General Public License , der Allgemeinen Öffentlichen GNU-Lizenz für Bibliotheken.) [Mittlerweile wurde die GNU Library Public License von der GNU Lesser Public License abgelöst - Anmerkung des Übersetzers.] + +Die Bezeichnung ,,freie`` Software bezieht sich auf Freiheit, nicht auf den Preis. Unsere Lizenzen sollen Ihnen die Freiheit garantieren, Kopien freier Software zu verbreiten (und etwas für diesen Service zu berechnen, wenn Sie möchten), die Möglichkeit, die Software im Quelltext zu erhalten oder den Quelltext auf Wunsch zu bekommen. Die Lizenzen sollen garantieren, daß Sie die Software ändern oder Teile davon in neuen freien Programmen verwenden dürfen - und daß Sie wissen, daß Sie dies alles tun dürfen. + +Um Ihre Rechte zu schützen, müssen wir Einschränkungen machen, die es jedem verbieten, Ihnen diese Rechte zu verweigern oder Sie aufzufordern, auf diese Rechte zu verzichten. Aus diesen Einschränkungen folgen bestimmte Verantwortlichkeiten für Sie, wenn Sie Kopien der Software verbreiten oder sie verändern. + +Beispielsweise müssen Sie den Empfängern alle Rechte gewähren, die Sie selbst haben, wenn Sie - kostenlos oder gegen Bezahlung - Kopien eines solchen Programms verbreiten. Sie müssen sicherstellen, daß auch die Empfänger den Quelltext erhalten bzw. erhalten können. Und Sie müssen ihnen diese Bedingungen zeigen, damit sie ihre Rechte kennen. + +Wir schützen Ihre Rechte in zwei Schritten: (1) Wir stellen die Software unter ein Urheberrecht (Copyright), und (2) wir bieten Ihnen diese Lizenz an, die Ihnen das Recht gibt, die Software zu vervielfältigen, zu verbreiten und/oder zu verändern. + +Um die Autoren und uns zu schützen, wollen wir darüberhinaus sicherstellen, daß jeder erfährt, daß für diese freie Software keinerlei Garantie besteht. Wenn die Software von jemand anderem modifiziert und weitergegeben wird, möchten wir, daß die Empfänger wissen, daß sie nicht das Original erhalten haben, damit irgendwelche von anderen verursachte Probleme nicht den Ruf des ursprünglichen Autors schädigen. + +Schließlich und endlich ist jedes freie Programm permanent durch Software-Patente bedroht. Wir möchten die Gefahr ausschließen, daß Distributoren eines freien Programms individuell Patente lizensieren - mit dem Ergebnis, daß das Programm proprietär würde. Um dies zu verhindern, haben wir klargestellt, daß jedes Patent entweder für freie Benutzung durch jedermann lizenziert werden muß oder überhaupt nicht lizenziert werden darf. + +Es folgen die genauen Bedingungen für die Vervielfältigung, Verbreitung und Bearbeitung: + + +Allgemeine Öffentliche GNU-Lizenz +Bedingungen für die Vervielfältigung, +Verbreitung und Bearbeitung +§0. Diese Lizenz gilt für jedes Programm und jedes andere Datenwerk, in dem ein entsprechender Vermerk des Copyright-Inhabers darauf hinweist, daß das Datenwerk unter den Bestimmungen dieser General Public License verbreitet werden darf. Im folgenden wird jedes derartige Programm oder Datenwerk als ,,das Programm`` bezeichnet; die Formulierung ,,auf dem Programm basierendes Datenwerk`` bezeichnet das Programm sowie jegliche Bearbeitung des Programms im urheberrechtlichen Sinne, also ein Datenwerk, welches das Programm, auch auszugsweise, sei es unverändert oder verändert und/oder in eine andere Sprache übersetzt, enthält. (Im folgenden wird die Übersetzung ohne Einschränkung als ,,Bearbeitung`` eingestuft.) Jeder Lizenznehmer wird im folgenden als ,,Sie`` angesprochen. + +Andere Handlungen als Vervielfältigung, Verbreitung und Bearbeitung werden von dieser Lizenz nicht berührt; sie fallen nicht in ihren Anwendungsbereich. Der Vorgang der Ausführung des Programms wird nicht eingeschränkt, und die Ausgaben des Programms unterliegen dieser Lizenz nur, wenn der Inhalt ein auf dem Programm basierendes Datenwerk darstellt (unabhängig davon, daß die Ausgabe durch die Ausführung des Programmes erfolgte). Ob dies zutrifft, hängt von den Funktionen des Programms ab. + +§1. Sie dürfen auf beliebigen Medien unveränderte Kopien des Quelltextes des Programms, wie sie ihn erhalten haben, anfertigen und verbreiten. Voraussetzung hierfür ist, daß Sie mit jeder Kopie einen entsprechenden Copyright-Vermerk sowie einen Haftungsausschluß veröffentlichen, alle Vermerke, die sich auf diese Lizenz und das Fehlen einer Garantie beziehen, unverändert lassen und desweiteren allen anderen Empfängern des Programms zusammen mit dem Programm eine Kopie dieser Lizenz zukommen lassen. + +Sie dürfen für den eigentlichen Kopiervorgang eine Gebühr verlangen. Wenn Sie es wünschen, dürfen Sie auch gegen Entgeld eine Garantie für das Programm anbieten. + +§2. Sie dürfen Ihre Kopie(n) des Programms oder eines Teils davon verändern, wodurch ein auf dem Programm basierendes Datenwerk entsteht; Sie dürfen derartige Bearbeitungen unter den Bestimmungen von Paragraph 1 vervielfältigen und verbreiten, vorausgesetzt, daß zusätzlich alle im folgenden genannten Bedingungen erfüllt werden: + + +1. +Sie müssen die veränderten Dateien mit einem auffälligen Vermerk versehen, der auf die von Ihnen vorgenommene Modifizierung und das Datum jeder Änderung hinweist. + +2. +Sie müssen dafür sorgen, daß jede von Ihnen verbreitete oder veröffentlichte Arbeit, die ganz oder teilweise von dem Programm oder Teilen davon abgeleitet ist, Dritten gegenüber als Ganzes unter den Bedingungen dieser Lizenz ohne Lizenzgebühren zur Verfügung gestellt wird. + +3. +Wenn das veränderte Programm normalerweise bei der Ausführung interaktiv Kommandos einliest, müssen Sie dafür sorgen, daß es, wenn es auf dem üblichsten Wege für solche interaktive Nutzung gestartet wird, eine Meldung ausgibt oder ausdruckt, die einen geeigneten Copyright-Vermerk enthält sowie einen Hinweis, daß es keine Gewährleistung gibt (oder anderenfalls, daß Sie Garantie leisten), und daß die Benutzer das Programm unter diesen Bedingungen weiter verbreiten dürfen. Auch muß der Benutzer darauf hingewiesen werden, wie er eine Kopie dieser Lizenz ansehen kann. (Ausnahme: Wenn das Programm selbst interaktiv arbeitet, aber normalerweise keine derartige Meldung ausgibt, muß Ihr auf dem Programm basierendes Datenwerk auch keine solche Meldung ausgeben). + +Diese Anforderungen gelten für das bearbeitete Datenwerk als Ganzes. Wenn identifizierbare Teile des Datenwerkes nicht von dem Programm abgeleitet sind und vernünftigerweise als unabhängige und eigenständige Datenwerke für sich selbst zu betrachten sind, dann gelten diese Lizenz und ihre Bedingungen nicht für die betroffenen Teile, wenn Sie diese als eigenständige Datenwerke weitergeben. Wenn Sie jedoch dieselben Abschnitte als Teil eines Ganzen weitergeben, das ein auf dem Programm basierendes Datenwerk darstellt, dann muß die Weitergabe des Ganzen nach den Bedingungen dieser Lizenz erfolgen, deren Bedingungen für weitere Lizenznehmer somit auf das gesamte Ganze ausgedehnt werden - und somit auf jeden einzelnen Teil, unabhängig vom jeweiligen Autor. + +Somit ist es nicht die Absicht dieses Abschnittes, Rechte für Datenwerke in Anspruch zu nehmen oder Ihnen die Rechte für Datenwerke streitig zu machen, die komplett von Ihnen geschrieben wurden; vielmehr ist es die Absicht, die Rechte zur Kontrolle der Verbreitung von Datenwerken, die auf dem Programm basieren oder unter seiner auszugsweisen Verwendung zusammengestellt worden sind, auszuüben. + +Ferner bringt auch das einfache Zusammenlegen eines anderen Datenwerkes, das nicht auf dem Programm basiert, mit dem Programm oder einem auf dem Programm basierenden Datenwerk auf ein- und demselben Speicher- oder Vertriebsmedium dieses andere Datenwerk nicht in den Anwendungsbereich dieser Lizenz. + +§3. Sie dürfen das Programm (oder ein darauf basierendes Datenwerk gemäß Paragraph 2) als Objectcode oder in ausführbarer Form unter den Bedingungen der Paragraphen 1 und 2 kopieren und weitergeben - vorausgesetzt, daß Sie außerdem eine der folgenden Leistungen erbringen: + + +1. +Liefern Sie das Programm zusammen mit dem vollständigen zugehörigen maschinenlesbaren Quelltext auf einem für den Datenaustausch üblichen Medium aus, wobei die Verteilung unter den Bedingungen der Paragraphen 1 und 2 erfolgen muß. Oder: + +2. +Liefern Sie das Programm zusammen mit einem mindestens drei Jahre lang gültigen schriftlichen Angebot aus, jedem Dritten eine vollständige maschinenlesbare Kopie des Quelltextes zur Verfügung zu stellen - zu nicht höheren Kosten als denen, die durch den physikalischen Kopiervorgang anfallen -, wobei der Quelltext unter den Bedingungen der Paragraphen 1 und 2 auf einem für den Datenaustausch üblichen Medium weitergegeben wird. Oder: + +3. +Liefern Sie das Programm zusammen mit dem schriftlichen Angebot der Zurverfügungstellung des Quelltextes aus, das Sie selbst erhalten haben. (Diese Alternative ist nur für nicht-kommerzielle Verbreitung zulässig und nur, wenn Sie das Programm als Objectcode oder in ausführbarer Form mit einem entsprechenden Angebot gemäß Absatz b erhalten haben.) + +Unter dem Quelltext eines Datenwerkes wird diejenige Form des Datenwerkes verstanden, die für Bearbeitungen vorzugsweise verwendet wird. Für ein ausführbares Programm bedeutet ,,der komplette Quelltext``: Der Quelltext aller im Programm enthaltenen Module einschließlich aller zugehörigen Modulschnittstellen-Definitionsdateien sowie der zur Compilation und Installation verwendeten Skripte. Als besondere Ausnahme jedoch braucht der verteilte Quelltext nichts von dem zu enthalten, was üblicherweise (entweder als Quelltext oder in binärer Form) zusammen mit den Hauptkomponenten des Betriebssystems (Kernel, Compiler usw.) geliefert wird, unter dem das Programm läuft - es sei denn, diese Komponente selbst gehört zum ausführbaren Programm. + +Wenn die Verbreitung eines ausführbaren Programms oder von Objectcode dadurch erfolgt, daß der Kopierzugriff auf eine dafür vorgesehene Stelle gewährt wird, so gilt die Gewährung eines gleichwertigen Zugriffs auf den Quelltext als Verbreitung des Quelltextes, auch wenn Dritte nicht dazu gezwungen sind, den Quelltext zusammen mit dem Objectcode zu kopieren. + +§4. Sie dürfen das Programm nicht vervielfältigen, verändern, weiter lizenzieren oder verbreiten, sofern es nicht durch diese Lizenz ausdrücklich gestattet ist. Jeder anderweitige Versuch der Vervielfältigung, Modifizierung, Weiterlizenzierung und Verbreitung ist nichtig und beendet automatisch Ihre Rechte unter dieser Lizenz. Jedoch werden die Lizenzen Dritter, die von Ihnen Kopien oder Rechte unter dieser Lizenz erhalten haben, nicht beendet, solange diese die Lizenz voll anerkennen und befolgen. + +§5. Sie sind nicht verpflichtet, diese Lizenz anzunehmen, da Sie sie nicht unterzeichnet haben. Jedoch gibt Ihnen nichts anderes die Erlaubnis, das Programm oder von ihm abgeleitete Datenwerke zu verändern oder zu verbreiten. Diese Handlungen sind gesetzlich verboten, wenn Sie diese Lizenz nicht anerkennen. Indem Sie das Programm (oder ein darauf basierendes Datenwerk) verändern oder verbreiten, erklären Sie Ihr Einverständnis mit dieser Lizenz und mit allen ihren Bedingungen bezüglich der Vervielfältigung, Verbreitung und Veränderung des Programms oder eines darauf basierenden Datenwerks. + +§6. Jedesmal, wenn Sie das Programm (oder ein auf dem Programm basierendes Datenwerk) weitergeben, erhält der Empfänger automatisch vom ursprünglichen Lizenzgeber die Lizenz, das Programm entsprechend den hier festgelegten Bestimmungen zu vervielfältigen, zu verbreiten und zu verändern. Sie dürfen keine weiteren Einschränkungen der Durchsetzung der hierin zugestandenen Rechte des Empfängers vornehmen. Sie sind nicht dafür verantwortlich, die Einhaltung dieser Lizenz durch Dritte durchzusetzen. + +§7. Sollten Ihnen infolge eines Gerichtsurteils, des Vorwurfs einer Patentverletzung oder aus einem anderen Grunde (nicht auf Patentfragen begrenzt) Bedingungen (durch Gerichtsbeschluß, Vergleich oder anderweitig) auferlegt werden, die den Bedingungen dieser Lizenz widersprechen, so befreien Sie diese Umstände nicht von den Bestimmungen dieser Lizenz. Wenn es Ihnen nicht möglich ist, das Programm unter gleichzeitiger Beachtung der Bedingungen in dieser Lizenz und Ihrer anderweitigen Verpflichtungen zu verbreiten, dann dürfen Sie als Folge das Programm überhaupt nicht verbreiten. Wenn zum Beispiel ein Patent nicht die gebührenfreie Weiterverbreitung des Programms durch diejenigen erlaubt, die das Programm direkt oder indirekt von Ihnen erhalten haben, dann besteht der einzige Weg, sowohl das Patentrecht als auch diese Lizenz zu befolgen, darin, ganz auf die Verbreitung des Programms zu verzichten. + +Sollte sich ein Teil dieses Paragraphen als ungültig oder unter bestimmten Umständen nicht durchsetzbar erweisen, so soll dieser Paragraph seinem Sinne nach angewandt werden; im übrigen soll dieser Paragraph als Ganzes gelten. + +Zweck dieses Paragraphen ist nicht, Sie dazu zu bringen, irgendwelche Patente oder andere Eigentumsansprüche zu verletzen oder die Gültigkeit solcher Ansprüche zu bestreiten; dieser Paragraph hat einzig den Zweck, die Integrität des Verbreitungssystems der freien Software zu schützen, das durch die Praxis öffentlicher Lizenzen verwirklicht wird. Viele Leute haben großzügige Beiträge zu dem großen Angebot der mit diesem System verbreiteten Software im Vertrauen auf die konsistente Anwendung dieses Systems geleistet; es liegt am Autor/Geber, zu entscheiden, ob er die Software mittels irgendeines anderen Systems verbreiten will; ein Lizenznehmer hat auf diese Entscheidung keinen Einfluß. + +Dieser Paragraph ist dazu gedacht, deutlich klarzustellen, was als Konsequenz aus dem Rest dieser Lizenz betrachtet wird. + +§8. Wenn die Verbreitung und/oder die Benutzung des Programms in bestimmten Staaten entweder durch Patente oder durch urheberrechtlich geschützte Schnittstellen eingeschränkt ist, kann der Urheberrechtsinhaber, der das Programm unter diese Lizenz gestellt hat, eine explizite geographische Begrenzung der Verbreitung angeben, in der diese Staaten ausgeschlossen werden, so daß die Verbreitung nur innerhalb und zwischen den Staaten erlaubt ist, die nicht ausgeschlossen sind. In einem solchen Fall beinhaltet diese Lizenz die Beschränkung, als wäre sie in diesem Text niedergeschrieben. + +§9. Die Free Software Foundation kann von Zeit zu Zeit überarbeitete und/oder neue Versionen der General Public License veröffentlichen. Solche neuen Versionen werden vom Grundprinzip her der gegenwärtigen entsprechen, können aber im Detail abweichen, um neuen Problemen und Anforderungen gerecht zu werden. + +Jede Version dieser Lizenz hat eine eindeutige Versionsnummer. Wenn in einem Programm angegeben wird, daß es dieser Lizenz in einer bestimmten Versionsnummer oder ,,jeder späteren Version`` (``any later version'') unterliegt, so haben Sie die Wahl, entweder den Bestimmungen der genannten Version zu folgen oder denen jeder beliebigen späteren Version, die von der Free Software Foundation veröffentlicht wurde. Wenn das Programm keine Versionsnummer angibt, können Sie eine beliebige Version wählen, die je von der Free Software Foundation veröffentlicht wurde. + +§10. Wenn Sie den Wunsch haben, Teile des Programms in anderen freien Programmen zu verwenden, deren Bedingungen für die Verbreitung anders sind, schreiben Sie an den Autor, um ihn um die Erlaubnis zu bitten. Für Software, die unter dem Copyright der Free Software Foundation steht, schreiben Sie an die Free Software Foundation ; wir machen zu diesem Zweck gelegentlich Ausnahmen. Unsere Entscheidung wird von den beiden Zielen geleitet werden, zum einen den freien Status aller von unserer freien Software abgeleiteten Datenwerke zu erhalten und zum anderen das gemeinschaftliche Nutzen und Wiederverwenden von Software im allgemeinen zu fördern. + + +Keine Gewährleistung + +§11. Da das Programm ohne jegliche Kosten lizenziert wird, besteht keinerlei Gewährleistung für das Programm, soweit dies gesetzlich zulässig ist. Sofern nicht anderweitig schriftlich bestätigt, stellen die Copyright-Inhaber und/oder Dritte das Programm so zur Verfügung, ,,wie es ist``, ohne irgendeine Gewährleistung, weder ausdrücklich noch implizit, einschließlich - aber nicht begrenzt auf - Marktreife oder Verwendbarkeit für einen bestimmten Zweck. Das volle Risiko bezüglich Qualität und Leistungsfähigkeit des Programms liegt bei Ihnen. Sollte sich das Programm als fehlerhaft herausstellen, liegen die Kosten für notwendigen Service, Reparatur oder Korrektur bei Ihnen. + +§12. In keinem Fall, außer wenn durch geltendes Recht gefordert oder schriftlich zugesichert, ist irgendein Copyright-Inhaber oder irgendein Dritter, der das Programm wie oben erlaubt modifiziert oder verbreitet hat, Ihnen gegenüber für irgendwelche Schäden haftbar, einschließlich jeglicher allgemeiner oder spezieller Schäden, Schäden durch Seiteneffekte (Nebenwirkungen) oder Folgeschäden, die aus der Benutzung des Programms oder der Unbenutzbarkeit des Programms folgen (einschließlich - aber nicht beschränkt auf - Datenverluste, fehlerhafte Verarbeitung von Daten, Verluste, die von Ihnen oder anderen getragen werden müssen, oder dem Unvermögen des Programms, mit irgendeinem anderen Programm zusammenzuarbeiten), selbst wenn ein Copyright-Inhaber oder Dritter über die Möglichkeit solcher Schäden unterrichtet worden war. + + +Ende der Bedingungen diff --git a/doc/license_english.txt b/doc/license_english.txt new file mode 100644 index 0000000..13db015 --- /dev/null +++ b/doc/license_english.txt @@ -0,0 +1,88 @@ +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + +a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + +b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + +c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + +a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + +b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + +c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + +END OF TERMS AND CONDITIONS diff --git a/doc/readme.txt b/doc/readme.txt new file mode 100644 index 0000000..1d6f010 --- /dev/null +++ b/doc/readme.txt @@ -0,0 +1,15 @@ +MySqlDump Copyright (C)2004 Daniel Schlichtholz (admin@daniel-schlichtholz.de) + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 675 Mass +Ave, Cambridge, MA 02139, USA. diff --git a/dump.php b/dump.php new file mode 100644 index 0000000..759d88c --- /dev/null +++ b/dump.php @@ -0,0 +1,429 @@ +'.$meta.'MySqlDump'.headline(); + + +$relativ_path=($config["interface_browser_ie"]) ? "../../" : "./"; + + +//$_GET-Parameter lesen +$dump["kommentar"]=(isset($_GET['comment'])) ? urldecode($_GET['comment']): ""; +$dump["backupdatei"]=(isset($_GET['backupdatei'])) ? $_GET['backupdatei'] :""; +$dump["backupdatei_structure"]= (isset($_GET['backupdateistructure'])) ? $_GET['backupdateistructure'] : ""; +$cancel=(isset($_GET["cancel"])) ? 1 : 0; +$dump["part"]=(isset($_GET["part"])) ? $_GET["part"] : 1; +$dump["part_offset"]=(isset($_GET["part_offset"])) ? $_GET["part_offset"] : 0; +$dump["verbraucht"]=(isset($_GET["verbraucht"])) ? $_GET["verbraucht"] : 0; +$out=(file_exists($config["paths"]["log"]."out.tmp")) ? implode("\n",file($config["paths"]["log"]."out.tmp")) : ""; +$dump["errors"]= (isset($_GET['err'])) ? $_GET['err'] : 0; +$dump["table_offset"]=(isset($_GET["table_offset"])) ? $_GET["table_offset"] : -1; +$dump["zeilen_offset"]= (isset($_GET['zeilen_offset'])) ? $_GET['zeilen_offset']:0; +$dump["filename_stamp"]= (isset($_GET['filename_stamp'])) ? $_GET['filename_stamp'] : ""; +$dump["anzahl_zeilen"]= (isset($_GET["anzahl_zeilen"])) ? $_GET["anzahl_zeilen"] : (($config["minspeed"]>0) ? $config["minspeed"] : 50); + + +$mp2=array("Bytes","Kilobytes","Megabytes","Gigabytes"); +$cancelurl='dump.php?cancel=1&part='.$dump["part"].'&backupdatei='.urlencode($dump["backupdatei"]).'&backupdateistructure='.urlencode($dump["backupdatei_structure"]); +$aus2=$page_parameter=$debugausgabe=$a=""; +$dump["tabellen_gesamt"]=0; + + +if($cancel==1) { + //Abbruch durch Benutzer + //Wildcard erzeugen + $wildcard=substr($dump["backupdatei"],0,strlen($databases["db_actual"])+17); + $wildcard2=$dump["backupdatei_structure"]; + echo "$pageheader

Abruch durch Benutzer

Der Backupvorgang wurde unterbrochen.

"; + echo "Folgende angefangene Backupdateien wurden gelöscht:

"; + echo $wildcard."*
".$wildcard2; + echo ''; + exit; +} + + +FillMultiDBArrays(); + +if($databases["db_actual_tableselected"]!="" && $config["multi_dump"]==0) { + $dump["tblArray"]=explode("|",$databases["db_actual_tableselected"]); + $tbl_sel=true; + $msgTbl=" - mit ".count($dump["tblArray"])." selektierten Tabellen"; +} + +//Zeitzähler aktivieren +$dump["max_zeit"]=intval($config["max_execution_time"]*$config["time_buffer"]); +$dump["startzeit"]=time(); + +if (isset($_GET['xtime'])) +{ + $xtime=$_GET['xtime']; +} else { + $xtime=time(); +} +$dump["countdata"]= (!empty($_GET['countdata'])) ? $_GET['countdata'] : 0; +$dump["aufruf"]= (!empty($_GET['aufruf'])) ? $_GET['aufruf'] : 0; + +MSD_mysql_connect(); + +$flipped = array_flip($databases["Name"]); +$dump["tables"]=Array(); + + +for($ii=0;$ii0) + { + for ($i=0;$i<$num_tables;$i++) + { + $erg=mysql_fetch_row($tabellen); + if($config["optimize_tables_beforedump"]==1 && $dump["table_offset"]==-1) { + //Tabelle optimieren + mysql_query("OPTIMIZE `$erg[0]`"); + } + if (isset($tbl_sel)) + { + if (in_array($erg[0],$dump["tblArray"])) $dump["tables"][]=$databases["Name"][$dump["dbindex"]].".".$erg[0]; + } + elseif ($databases["praefix"][$dump["dbindex"]]>"" && !isset($tbl_sel)) + { + echo "$erg[0] - ".$databases["praefix"][$dump["dbindex"]]."
"; + if (substr($erg[0],0,strlen($databases["praefix"][$dump["dbindex"]]))==$databases["praefix"][$dump["dbindex"]]) $dump["tables"][]=$databases["Name"][$dump["dbindex"]].".".$erg[0];; + } + else $dump["tables"][]=$databases["Name"][$dump["dbindex"]].".".$erg[0]; + } + } + else $aus_error[]= '

'.$lang["error"].": ".$lang["dump_notables"].$databases["Name"][$dump["dbindex"]].$lang['dump_notables2'].'

'; +} + +$num_tables=count($dump["tables"]); +if($config["optimize_tables_beforedump"]==1 && $dump["table_offset"]==-1) $out.=''.$num_tables.' Tabellen wurden optimiert.
'; + +$dump["data"]=""; +$dump["structure"]=""; +$dump["dbindex"]=(isset($_GET["dbi"])) ? $_GET["dbi"] :$flipped[$databases["multi"][0]]; + + + +//Ausgaben-Header bauen +$aus_header[]= '
'; +$aus_header[]= '

Backup: '.(($config["multi_dump"]==1) ? "Multidump (".count($databases["multi"])." ".$lang["dbs"].")" : $lang["db"].': '.$databases["Name"][$dump["dbindex"]].(($databases["praefix"][$dump["dbindex"]]!="") ?' ('.$lang["withpraefix"].' '.$databases["praefix"][$dump["dbindex"]].')' : '')).'

'; +if(isset($aus_error) && count($aus_error)>0) $aus_header=array_merge($aus_header,$aus_error); + + +if(count($dump["tables"])==0) { + //keine Tabellen gefunden + $aus[]='

'.$lang['dump_notables'].$databases["Name"][$dump["dbindex"]].$lang['dump_notables2'].'

'; + if($config["multi_dump"]==1) { + + } +} else { + + if ($dump["table_offset"]==-1) { + // File anlegen, da Erstaufruf + new_file(); + $dump["table_offset"]=0; // jetzt kanns losgehen + flush(); + } + + // SQl-Befehle ermitteln + $dump["restzeilen"]=$dump["anzahl_zeilen"]; + WHILE ( ($dump["table_offset"] < $num_tables) && ($dump["restzeilen"]>0) ) + { + $table = substr($dump["tables"][$dump["table_offset"]],strpos($dump["tables"][$dump["table_offset"]],".")+1); + $adbname=substr($dump["tables"][$dump["table_offset"]],0,strpos($dump["tables"][$dump["table_offset"]],".")); + if($databases["Name"][$dump["dbindex"]]!=$adbname) { + //neue Datenbank + WriteLog("Dump '".$dump["backupdatei"]."' finished."); + ExecuteCommand("a"); + if($config["multi_part"]==1) { + $out.=$lang['finished'].'
'; + $dateistamm=substr($dump["backupdatei"],0,strrpos($dump["backupdatei"],"part_"))."part_"; + $dateiendung=($config["compression"]==1)?".sql.gz":".sql"; + for ($i=1;$i<($dump["part"]-$dump["part_offset"]);$i++) { + $mpdatei=$dateistamm.$i.$dateiendung; + $sz=byte_output(@filesize($config["paths"]["backup"].$mpdatei)); + $out.= $lang["file"].' '.$mpdatei.' ('.$sz.') '.$lang["dump_successful"].'
'; + } + $out.='

'; + } else { + $out.=$lang['finished'].': '.$dump["backupdatei"].' ('.byte_output(filesize($config["paths"]["backup"].$dump["backupdatei"])).")
"; + } + if ($config["send_mail"]==1) DoEmail(); + if($config["ftp_transfer"]==1) DoFTP(); + if(isset($flipped[$adbname])) $dump["dbindex"]=$flipped[$adbname]; + $dump["part_offset"]=$dump["part"]-1; + + new_file(); + } + $aktuelle_tabelle=$dump["table_offset"]; + //echo "$adbname - $table
"; + if ($dump["zeilen_offset"]==0) + { + if($config["minspeed"]>0) { + $dump["anzahl_zeilen"]=$config["minspeed"]; + $dump["restzeilen"]=$config["minspeed"]; + } + $dump["data"] .= get_def($adbname,$table); + $dump["structure"].=get_def($adbname,$table); + } + WriteToDumpFile(); + + get_content($adbname,$table); + $dump["restzeilen"]--; + + if($config["memory_limit"]>0 && strlen($dump["data"])>$config["memory_limit"]) { + WriteToDumpFile(); + } + + } + + ///////////////////////////////// + // Anzeige - Fortschritt + ///////////////////////////////// + + if($config["multi_dump"]==1) { + $aus[]= '
'; + for($i=0;$i '; + else + $aus[]= ''.$databases["multi"][$i].' '; + if(strlen($a)>60) {$aus[]='
';$a="";} + } + $aus[]= '
'; + } + if($config["multi_part"]==1) $aus[]= '
Multipart-Backup: '.$config["multipartgroesse1"].' '.$mp2[$config["multipartgroesse2"]].'
'; + + $aus[]= '

'.$lang["dump_headline"].'

'; + + if($dump["kommentar"]) $aus[]= $lang['comment'].': '.$dump["kommentar"].'
'; + if($config["multi_dump"]==1) $aus[]= $lang["db"].': '.$databases["Name"][$dump["dbindex"]].''.(($databases["praefix"][$dump["dbindex"]]!="") ?' ('.$lang["withpraefix"].' '.$databases["praefix"][$dump["dbindex"]].')' : '').'
'; + if(isset($tbl_sel)) $aus[]= $msgTbl.'

'; + + + + if($config["multi_part"]==1) + { + $aus[]= 'Multipart-Backup File '.($dump["part"]-$dump["part_offset"]-1).'
'; + $aus2=", ".($dump["part"]-1)." files"; + } + $aus[]= $lang["dump_filename"]."".$dump["backupdatei"].""; + $aus[]= '
'.$lang['filesize'].': '.byte_output($dump["filesize"]).'

'.$lang["gzip_compression"].' '; + $aus[]= ($config["compression"]==1) ? $lang["activated"] : $lang["not_activated"]; + $aus[]= '.
'; + + $aus[]='

'; + + $table = @substr($dump["tables"][$dump["table_offset"]],strpos($dump["tables"][$dump["table_offset"]],".")+1); + $adbname=@substr($dump["tables"][$dump["table_offset"]],0,strpos($dump["tables"][$dump["table_offset"]],".")); + + $sql="SELECT COUNT(*) AS anzahl FROM `$table`"; + $res=mysql_query($sql); + if ($res) + { + $row=mysql_fetch_object($res); + $gesamt=intval($row->anzahl); + + if ($gesamt>0) + { + $fortschritt=round(((100*$dump["zeilen_offset"])/$gesamt),0); + if ($dump["anzahl_zeilen"]>=$gesamt) $fortschritt=100; + } + else $fortschritt=100; + + $aus[]= $lang["saving_table"].''.($dump["table_offset"]+1).' '.$lang["of"].' '.sizeof($dump["tables"]).'
' + .$lang["actual_table"].': '.$table.'

' + .$lang["progress_table"].':
'; + + + $aus[]= '' + .'' + .'' + .''; + + if ($dump["anzahl_zeilen"]+$dump["zeilen_offset"]>=$gesamt) + { + $eintrag=$dump["zeilen_offset"]+1; + $zeilen_gesamt=$gesamt; + if ($zeilen_gesamt==0) $eintrag=0; + } + else + { + $zeilen_gesamt=$dump["zeilen_offset"]+$dump["anzahl_zeilen"]; + $eintrag=$dump["zeilen_offset"]+1; + } + + $aus[]= '' + .'
 '.($fortschritt).'%
'.$lang["entry"].' '.number_format($eintrag,0,",",".").' '.$lang["upto"].' ' + .number_format(($zeilen_gesamt),0,",",".").' '.$lang["of"].' ' + .number_format($gesamt,0,",",".").'
'; + + $dump["tabellen_gesamt"]=(isset($dump["tables"])) ? count($dump["tables"]) : 0; + $noch_zu_speichern=$dump["tabellen_gesamt"]-$dump["table_offset"]; + $prozent= ($dump["tabellen_gesamt"]>0) ? round(((100*$noch_zu_speichern)/$dump["tabellen_gesamt"]),0) : 100; + if ($noch_zu_speichern==0) $prozent=100; + + $aus[]= '
'.$lang["progress_over_all"].':' + .'' + .'' + .'' + .'
'.(100-$prozent).'%
'; + + //Speed-Anzeige + $fw=($config["maxspeed"]==$config["minspeed"]) ? 300 : round(($dump["anzahl_zeilen"]-$config["minspeed"])/($config["maxspeed"]-$config["minspeed"])*300,0); + if($fw>300)$fw=300; + $aus[]= '
'; + $aus[]= '
'; + $aus[]= 'Speed
'.$dump["anzahl_zeilen"].'
'; + $aus[]= ''; + $aus[]= '
'; + $aus[]= '
'; + $aus[]= ''; + $aus[]= ''; + $aus[]= '
'.$config["minspeed"].''.$config["maxspeed"].'
'; + + //Status-Text + $aus[]= '

'.zeit_format(time()-$xtime).', '.$dump["aufruf"].' pages'.$aus2; + $aus[]= ($dump["errors"]>0) ? ', '.$dump["errors"].' errors' : ''; + $aus[]= '

'; + $aus[]= '
'.$out.'
'; + + } + ////////////////////////////////////// + // Ende Anzeige + ////////////////////////////////////// + + WriteToDumpFile(); + + flush(); + if(!isset($summe_eintraege)) $summe_eintraege=0; + + if ($dump["table_offset"]<=$dump["tabellen_gesamt"]) + { + $dauer=time()-($xtime+$dump["verbraucht"]); + $dump["verbraucht"]+=$dauer; + $summe_eintraege+=$dump["anzahl_zeilen"]; + + //Zeitanpassung + if($config["direct_connection"]==1) { + //echo "

Zeitanpassung

dauer=$dauer max_zeit=$dump["max_zeit"] minspeed=$config["minspeed"] $config["maxspeed"]=$config["maxspeed"]"; + if ($dauer<$dump["max_zeit"]) $dump["anzahl_zeilen"]=$dump["anzahl_zeilen"]*$config["tuning_add"]; + else $dump["anzahl_zeilen"]=$dump["anzahl_zeilen"]*$config["tuning_sub"]; + $dump["anzahl_zeilen"]=round($dump["anzahl_zeilen"],0); + if($config["minspeed"]>0) {if ($dump["anzahl_zeilen"]<$config["minspeed"]) $dump["anzahl_zeilen"]=$config["minspeed"];} + if($config["maxspeed"]>0) {if($dump["anzahl_zeilen"]>$config["maxspeed"]) $dump["anzahl_zeilen"]=$config["maxspeed"];} + } + $dump["aufruf"]++; + // Selbstaufruf starten + $page_parameter='table_offset='.$dump["table_offset"].'&zeilen_offset='.$dump["zeilen_offset"]; + $page_parameter.='&countdata='.$dump["countdata"].'&part='.$dump["part"].'&part_offset='.$dump["part_offset"]; + $page_parameter.='&backupdatei='.urlencode($dump["backupdatei"]).'&backupdateistructure='.urlencode($dump["backupdatei_structure"]); + $page_parameter.='&xtime='.$xtime.'&aufruf='.$dump["aufruf"].'&filename_stamp='.$dump["filename_stamp"]; + $page_parameter.='&anzahl_zeilen='.$dump["anzahl_zeilen"].'&verbraucht='.$dump["verbraucht"].'&comment='.urlencode($dump["kommentar"]).'&dbi='.$dump["dbindex"].'&err='.$dump["errors"]; + //WritePageParams($page_parameter); + } + else + { + //Backup fertig + // Zeitmessung wird beendet + ExecuteCommand("a"); + if($config["multi_part"]==1) { + $out.=$lang['finished'].'
'; + $dateistamm=substr($dump["backupdatei"],0,strrpos($dump["backupdatei"],"part_"))."part_"; + $dateiendung=($config["compression"]==1)?".sql.gz":".sql"; + for ($i=1;$i<($dump["part"]-$dump["part_offset"]);$i++) { + $mpdatei=$dateistamm.$i.$dateiendung; + $sz=byte_output(@filesize($config["paths"]["backup"].$mpdatei)); + $out.= $lang["file"].' '.$mpdatei.' ('.$sz.') '.$lang["dump_successful"].'
'; + } + $out.='
'; + } else { + $out.=$lang['finished'].': '.$dump["backupdatei"].' ('.byte_output(filesize($config["paths"]["backup"].$dump["backupdatei"])).")
"; + } + $backup_ready=1; + $xtime=time()-$xtime; + $aus=Array(); + $aus[]= "
"; + if($config["multi_dump"]==1) { + WriteLog("Dump '".$dump["backupdatei"]."' finished."); + WriteLog("Multidump: ".count($databases["multi"])." Datenbases in ".zeit_format($xtime)."."); + } else { + WriteLog("Dump '".$dump["backupdatei"]."' finished in ".zeit_format($xtime)."."); + } + + if ($config["send_mail"]==1) DoEmail(); + if($config["ftp_transfer"]==1) DoFTP(); + + @unlink($config["paths"]["log"]."out.tmp"); + + $aus[]= $lang["done"]."

"; + if($dump["errors"]>0) $aus[]='

Es sind '.$dump["errors"].' Fehler aufgetreten: ansehen

'; + + if($config["multi_dump"]==1) { + $aus[]= $lang['multidump1'].count($databases["multi"]).$lang['multidump2']."
"; + } + $aus[]= '
'.$lang["dump_endergebnis1"].''.$num_tables.''.$lang["dump_endergebnis2"] + .''.number_format($dump["countdata"],0,",",".").''.$lang["dump_endergebnis3"].'

'.$out.'

' + .'

'.zeit_format($xtime).', '.$dump["aufruf"].' pages'.$aus2.'

' //.$dump["fileoperations"].' Schreibzugriffe' + .str_repeat(" ",60).'
'; + $aus[]= "

"; + } +} + + +//===================================================================== +//================= Anzeige =========================================== +//===================================================================== + +//Seite basteln + +$aus=array_merge($aus_header,$aus); +//DEBUGGER +//$debugausgabe='
Aufruf:'.$dump["aufruf"].'   Datensätze: '.$dump["countdata"].'   Dateigrösse: '.$dump["filesize"].'

'.$page_parameter.'

'; +$manuell=0; + +if($config["interface_browser_ie"]) { + + $js_aufruf_automatisch=($page_parameter=="") ? ">" : "onload=\"restart_dump()\">"; + $js_aufruf_manuell=($page_parameter=="") ? ">" : '>

'; + + + $s="\n"; + $pageheader=''.$meta.'MySqlDump'.$s.' + parent.msd_ausgabe.location.href="./work/log/out.html";'; + +} else { + $pagefooter=''; + $js_aufruf_automatisch=''; + $js_aufruf_manuell=''; + $selbstaufruf=($page_parameter=="") ? "" : (($manuell==1) ? $js_aufruf_manuell : $js_aufruf_automatisch); + $complete_page=$pageheader.implode("\n",$aus).$debugausgabe.$selbstaufruf.$pagefooter; + // und raus + WriteTempOut($out); + echo $complete_page; + flush(); +} + + +?> \ No newline at end of file diff --git a/filemanagement.php b/filemanagement.php new file mode 100644 index 0000000..9075a21 --- /dev/null +++ b/filemanagement.php @@ -0,0 +1,675 @@ +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 { + $databases["db_actual_tableselected"]=""; + WriteParams(1,$config,$databases); + @unlink($config["paths"]["log"]."out.tmp"); + $dk=(isset($_POST["dumpKommentar"])) ? $_POST["dumpKommentar"] : ""; + $dump["fileoperations"]=0; + if ($config["interface_browser_ie"]) + 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($config["interface_browser_ie"]) + 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"]) ) +{ + + //hier kommt autodelete rein + $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"]."
"; + } +} + +if(isset($_POST[""])) { + + +} +/* + + + +*/ + +//Seitenteile vordefinieren +$href='filemanagement.php?action='.$action.'&kind='.$kind; +$a1= br(3).'
'.br(); +$a1.= '
'.br().''.br().''.br(); + +$td='
'.br(); + +$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"; + $refdir=(substr($config["cron_execution_path"],0,1)=="/") ? "" : substr($_SERVER["PATH_INFO"],0,strrpos($_SERVER["PATH_INFO"],"/")+1); + $scriptdir=$config["cron_execution_path"].'crondump.'.$cext; + $sfile=$config["cron_execution_path"]."perltest.$cext"; + $simplefile=$config["cron_execution_path"]."simpletest.$cext"; + + $cronabsolute=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 '

'.$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.$td.''; + echo $tbl_abfrage; + + echo ''; + + + echo '
'; + + echo '
'.$lang["fm_dumpsettings"].'
'; + + 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 '
'; + + 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"].'
'; + echo 'Aufruf im Browser: '.$scriptref.'
'; + echo 'Aufruf in der Shell: '.$cronref.'
'; + 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 ''; + 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 '
'.$lang["phpcrondesc"].'
'; + break; + + case "restore": + echo '

'.$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 "

".$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); + } + break; +} + +echo '

'.br(3); +include("inc/footer.php"); + +function FileList($multi=0) +{ + global $config,$kind,$fpath,$lang,$databases,$href,$dbactiv,$action,$expand; + + $files=Array(); + if($kind==0){ + //Backup-Dateien + $Theader=$lang["fm_files1"].' '.$lang['of'].' '.$dbactiv; + $Wheader=$lang["fm_files2"]; + $akind=1; + } else { + //Struktur-Dateien + $Theader=$lang["fm_files2"]; + $Wheader=$lang["fm_files1"]; + $akind=0; + } + $Sum_Files=0; + $dh = opendir($fpath); + $fl=""; + while (false !== ($filename = readdir($dh))) + { + if ($filename != "." && $filename != ".." && !is_dir($fpath.$filename)) { + $files[] = $filename; + $Sum_Files++; + } + } + $fl.='
'.br().$lang["fm_choose_file"].br(); + $fl.=' '.br().'

'; + + $fl.=''.br(); + $fl.=''.br().''.br().''.br().''.br(); + + //Tableheader + $fl.=''.br().''.br().' + '.br().' + '.br().' + '.br().' + + '.br().' + '.br().' + '.br().' + '.br().''.br(); + + //@rsort($files); + $checkindex=$arrayindex=$gesamt=0; + $db_summary_anzahl=Array(); + if(count($files)>0) { + for ($i=0; $i$db_summary_last[$dbn])$db_summary_last[$dbn]=$but; + + } else { + //multipart nur einmal + $done=0; + for($j=0;$j<$arrayindex;$j++) { + if(isset($db_backups[$j])) { + if($db_backups[$j]["date"]==$but) { + $db_backups[$j]["multipart"]++; + $db_backups[$j]["size"]+=$size; + $db_summary_size[$dbn]+=$size; + $done=1; + break; + } + } + } + if($done==0) { + //Eintrag war noch nicht vorhanden + $db_backups[$arrayindex]["name"]=$files[$i]; + $db_backups[$arrayindex]["db"]=$dbn; + $db_backups[$arrayindex]["size"]=$size; + $db_backups[$arrayindex]["date"]=$but; + $db_backups[$arrayindex]["tabellen"]=$tabellenanzahl; + $db_backups[$arrayindex]["eintraege"]=$eintraege; + $db_backups[$arrayindex]["multipart"]=1; + $db_backups[$arrayindex]["kommentar"]=$kommentar; + $db_backups[$arrayindex]["script"]=$sline[4]."(".$sline[5].")"; + + if(!isset($db_summary_last[$dbn])) $db_summary_last[$dbn]=$but; + $db_summary_anzahl[$dbn]=(isset($db_summary_anzahl[$dbn])) ? $db_summary_anzahl[$dbn]+1 : 1; + $db_summary_size[$dbn]=(isset($db_summary_size[$dbn])) ? $db_summary_size[$dbn]+$size : $size; + if( $but>$db_summary_last[$dbn])$db_summary_last[$dbn]=$but; + + } + } + // Gesamtgröße aller Backupfiles + $arrayindex++; + $gesamt = $gesamt + $size; + } + } + //Schleife fertig - jetzt Ausgabe + + // Hier werden die Dateinamen ausgegeben + if($arrayindex>0) { + for($i=$arrayindex;$i>=0;$i--) { + if(isset($db_backups[$i]["db"]) && $db_backups[$i]["db"]==$dbactiv) { + $multi=($db_summary_anzahl[$dbactiv]>1 && $action=="files") ? 1 : 0; + $fl.=''; + if($db_backups[$i]["multipart"]>0) {$dbn=NextPart($db_backups[$i]["name"],1);}else{$dbn=$db_backups[$i]["name"];} + $fl.=''.br(); + $fl.=''.br() : ' '.$db_backups[$i]["db"].''.br(); + + $fl.=''; + $fl.=''; + $fl.=''; + + + $fl.=''.br(); + $fl.=''.br().''.br(); + $fl.=''.br(); + $fl.=''.br(); + + if($expand==$i) { + $fl.=''.br(); + $fl.=''; + } + } + } + } + + $fl.=''.br().''.br().''.br(); + //Tableheader + $fl.=''.br().''.br().' + '.br().' + '.br().' + '.br().' + '.br().''.br(3); + //die anderen Backups + if(count($db_summary_anzahl)>0) { + while(list($key, $val) = each($db_summary_anzahl)) + { + $keyaus=($key=="") ? "[unknown]" : $key; + $fl.=''.br().''.br(); + $fl.=''.br(); + $fl.=''.br(); + $fl.=''.br(); + $fl.=''.br(); //.''.br(); + $fl.=''.br(3); + + } + } + if (!is_array($files)) $fl.=''.br(); + + //-------------------------------------------------------- + //*** Ausgabe der Gesamtgröße aller Backupfiles *** + //-------------------------------------------------------- + $space = MD_FreeDiskSpace(); + $fl.= ''.br(); + $fl.= ''.br(); + $fl.= ''.br(); + $fl.= ''.br(); + + + //-------------------------------------------------------- + //*** Ausgabe des freien Speicher auf dem Rechner *** + //-------------------------------------------------------- + $fl.= ''.br(); + $fl.= ''.br(); + $fl.= ''.br(); + $fl.= ''.br(); + $fl.= '
'.$Theader.''.$Wheader.'
'.$lang['db'].'gzScript'.$lang['comment'].''.$lang["fm_filedate"].'Multipart'.$lang["fm_tables"].' / '.$lang["fm_records"].''.$lang["fm_filesize"].'
'.br(); + if($multi==0){ + $fl.=''; + } else { + $fl.=''; + } + $fl.=($db_backups[$i]["multipart"]==0) ? ' '.$db_backups[$i]["db"].''.((substr($dbn,-3)==".gz") ? ''.$lang['compressed'].'' : " ").''.$db_backups[$i]["script"].''.(($db_backups[$i]["kommentar"]!="") ? ''.$db_backups[$i][' : " ").''.$db_backups[$i]["date"].''; + $fl.=($db_backups[$i]["multipart"]==0) ? $lang["no"] : ''.$db_backups[$i]["multipart"].' Files'; // + $fl.=''; + $fl.=($db_backups[$i]["eintraege"]!=-1) ? $db_backups[$i]["tabellen"].' / '.number_format($db_backups[$i]["eintraege"],0,",",".") :$lang["fm_oldbackup"]; + $fl.=''.byte_output($db_backups[$i]["size"]).'
All Parts:'.PartListe($db_backups[$i]["name"],$db_backups[$i]["multipart"]).'
   '.$lang['fm_all_bu'].'
'.$lang["db"].''.$lang['fm_anz_bu'].''.$lang['fm_last_bu'].''.$lang['fm_totalsize'].' 
'.$keyaus.''.$val.'     '.((isset($db_summary_last[$key])) ? $db_summary_last[$key] : "").''.byte_output($db_summary_size[$key]).'   
'.$lang["fm_nofilesfound"].'
'.$lang["fm_sizesum"].'('.$Sum_Files.' files): '.byte_output($gesamt).'
'.$lang["fm_freespace"].': '.$space.'
'.br(); + + /* + echo '
';
+	print_r($db_backups);
+	echo '

'; + */ + + return $fl; +} + +function PartListe($f,$nr) +{ + global $config; + $dateistamm=substr($f,0,strrpos($f,"part_"))."part_"; + $dateiendung=(substr(strtolower($f),-2)=="gz")?".sql.gz":".sql"; + $s=""; + for($i=1;$i<=$nr;$i++) { + if($i>1) $s.="
"; + $s.=''.$dateistamm.$i.$dateiendung.'    '.byte_output(@filesize($config["paths"]["backup"].$dateistamm.$i.$dateiendung)); + } + return $s; +} +?> + diff --git a/frameset.php b/frameset.php new file mode 100644 index 0000000..94f6346 --- /dev/null +++ b/frameset.php @@ -0,0 +1,18 @@ + + + + + +MySQLDumper + + + " scrolling="auto" noresize frameborder="0"> + + +<body> +You need to get a newer browser! +</body> + + + \ No newline at end of file diff --git a/images/ardown.gif b/images/ardown.gif new file mode 100644 index 0000000000000000000000000000000000000000..825c9e80204868c4813fdbbb9a7f3e3eed3fb2b5 GIT binary patch literal 859 zcmV-h1El;%Nk%v~VGIBb0QUg^|Ns90005Mfl!SzY|NopqLPE~YoSb6-&YS@M&H(>X zQvUz|oB#lvoMX;00LI3~|NqYaoX-FM{}U4v6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW00000EC2ui01N;P00#&-009UbNU$IP0}Kop9Eeci!h;DPLUg#W lp+N%*En*zVfWbrn9T_HUXi;Rthy@XLq?mG}#DxI?06Vnhv#J09 literal 0 HcmV?d00001 diff --git a/images/arrowdown.gif b/images/arrowdown.gif new file mode 100644 index 0000000000000000000000000000000000000000..32d7ceb398e28330cc2c87cdf1ec8e0c73585366 GIT binary patch literal 65 zcmZ?wbhEHb6krfwXkY+=|Ns9h{$ycfU|?j>0r5dH3``O|{VPwuS2@!(; literal 0 HcmV?d00001 diff --git a/images/arrowleft.gif b/images/arrowleft.gif new file mode 100644 index 0000000000000000000000000000000000000000..560043d1693cad7535eb07b168bada343b23b9df GIT binary patch literal 878 zcmZvbKWGzi6vw~y4`h&9q=E@8DDn#^4(0|GYziW@znse6ZpbfDllClTM&Vj0g0) z^xBk)qCwORY6+?#Dhk3uk$TK{NMFD0H%q=MQB4=aPqKNgQ+5^AQVtVIC)sd$?~v>nn5)|C4^8YI(b+`V9-q9 zhOiYZCl8A-21$Z2gi>(Qo^i~fPwlZU*~{EIVVLG9=D=syV_Q-QHgLi)O&v4#>3j4f zrJ%@mH*^}{Wd*C*`TN&$HJI;$XL_w)9X=2hlU-+N|!B%>?jr{lgYus!T$dK z-rnBs?(X*Xb`(XOPA3S0_4V~;v$?vu>bmaA%8G5cxnW^ju zZe)_(#B$*QrV4ZN^X1mU+Y8qp^=_WO_v+kyY2o|E`){vjFFu|t#P0o<^VPB`Os+0% mJb&2v`Dx9S@2=Iq%>I71HF$IDY4qaK+OMx4&YnJnyZ-^^rL;Bx literal 0 HcmV?d00001 diff --git a/images/arrowup.gif b/images/arrowup.gif new file mode 100644 index 0000000000000000000000000000000000000000..e9eba1fbab6eeb15b5fd53003be4c2b8002aaa5e GIT binary patch literal 64 zcmZ?wbhEHb6krfwXkY+=|Ns9h{$ycfU|?j>0r5dH3{2uZ{VPwu<(KYYjL6u0dd|o7 OHA=42o>hu4SOWm~%o3Xb literal 0 HcmV?d00001 diff --git a/images/arup.gif b/images/arup.gif new file mode 100644 index 0000000000000000000000000000000000000000..701b71411077d650d4a0823bf7101b6730623e00 GIT binary patch literal 857 zcmV-f1E%~(Nk%v~VGIBb0QUg^|Ns90005Mfl!SzY|NopqLPE~YoSb6-&YS@M&H(>X zQvUz|oB#lvoMX;00LI3~|NqYaoX-FM{}U4v6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW00000EC2ui01N;P00#&*009UbNU$IP0|*TYG{B&t0fP)9GI%&J jqQ!{=8y>`{apA*=2PqN+sc@r6h!{(fRJgLF!GHieR0Fh; literal 0 HcmV?d00001 diff --git a/images/blank.gif b/images/blank.gif new file mode 100644 index 0000000000000000000000000000000000000000..076c7538e60cdfc58adf59c9f231302eaf5ab4a7 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7d~kE{qJ;0Lp3yIRF3v literal 0 HcmV?d00001 diff --git a/images/close.gif b/images/close.gif new file mode 100644 index 0000000000000000000000000000000000000000..57b3cc384fbea398d5bb3ee325423ca9a817d758 GIT binary patch literal 880 zcmV-$1CRViNk%v~VGIBb0QUg^|Ns90005Mfl!SzY|NopqLPE~YoSb6-&YS@M&H(>X zQvUz|oB#lvoMX;00LI3~|NqYaoX-FM{}U4v6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW00000EC2ui01N;P00#(703Qe(NN^y4g9sA}1R$W{!G;0=EEG^6 zBEyOjA26gCAV9^43l9cJkRSlUkN`%OJgHG6Ns|XBa`fnMBF2j#H9~w?vt>es1%o~a G2mm{uV7bKr literal 0 HcmV?d00001 diff --git a/images/delete.gif b/images/delete.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb6f5499d4a9a002db3bb76cfc8a4776aa3f58bc GIT binary patch literal 861 zcmV-j1ETy#Nk%v~VG95a0QUp{000221_u8C0QrT5|Ns951qB8M1_uWR2nYxX2?+`c z3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW00031EC2ui01E&O00#&<00RgdNU)&6g9rlvSXgkO!-oO^K$%Dp n3V?_YAx7i{fDr(W1V45Z8Iq$%kOM`YyqMA?$&?vc1_S^*je?w` literal 0 HcmV?d00001 diff --git a/images/edit.gif b/images/edit.gif new file mode 100644 index 0000000000000000000000000000000000000000..103a92c2f3db992649d1b6c075a8261c771871a0 GIT binary patch literal 901 zcmV;01A6>NNk%v~VGIBb0QUd@|Ns90005Mfl!SzY|NopqLPE~YoSb6-&YS@M&H(>X zQvUz|oB#lvoMX;00LI3~|NqYaoX-FM{}U4v6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW00000EC2ui01N;P00#(S009UbI1m8>f(Q{bFi5GPLrMq&AUJS< z(!Yxr5fDfaAOInY7&Rt1;1K}Ge+d4K^hn5L#*HKim9*GEWz2swAv7>X@*e@5EiDG< b`IEp*qeXoJHEE!!)21bbNS!*hWIzBrWHrSA literal 0 HcmV?d00001 diff --git a/images/fbd.gif b/images/fbd.gif new file mode 100644 index 0000000000000000000000000000000000000000..c57f75e1a139ecb86135bef9dcf933aaf0c450fb GIT binary patch literal 502 zcmZ?wbhEHb)L;-`xXQr5uxJLuqM3p#7iex?opk!B>;4^8S1-8j-_d>NdeznQNvDqp ztXxoi^+Mw5qgtC+yYAnvxn*_IsUy`_&v)Osk#y>4;^`xro7Z&Rx$d@qd)2k`f-4pz zo;s?zWsTszqQ3R zwI%GV>>aFK{9WyBZLAVKto-bg`#aes+9wOLaEZFh0F3FyV*51%LDATD>==svD&WWaG1(v@`Tmo35(fP zHrrL4W>;BlR&v^`K6|jo&^E8(g zvobNU^z^Vy6cn5w)yE>)-#cqcACut3UKVZ%Hg0BKZf-W_HLID|uG+xM#=CLF2DUY9 z5?j`CiEtg_}3p59l|dTG_o_uGTbRhI49T4^F|`boc|X373pOo1J>4MLtWk)C!5RREtB48! literal 0 HcmV?d00001 diff --git a/images/fbs.gif b/images/fbs.gif new file mode 100644 index 0000000000000000000000000000000000000000..c8cd9dc771639b5836cccad7c301c815b60a30be GIT binary patch literal 484 zcmZ?wbhEHb)L;-`xXQqAhJoQ}TH5Wvzz@~c|7XrTV{H7hxA$3E+9iAYOAhvz>>Ymg z_I#+S{@K&}p}Oj4PtWbZpxZ%#cLD=%2L-*auD;~paM{8Bvc3I}p57n5y+3+--d9!s z=av5w8Do?8)m3+b0vTun6o0aS4b}mXAU`p%{dZ_6@X(R!Ke43fq=?wO z3oA;z<~A+iVp%k4t%_c!i`c?|mV>vtt|_^doDp}a*6DCz5pGoJ-_QN8UO-8xtX@z^ zsI;O%pn-{T0y{h7hk5n#rOb+aa*G%7tX{HX z1wR`bFE{VrJ=|=&xn&L?IJoo^>o;!Ry2dNP&3*64NhvnT{ktz7 zmfC;*@G)-5qq|pa-o`Aw_}e1s?OXmXSsr2;ag{50xi`Cc?W-*Xlb!r#NI7OKNuQ|9 z*em4w;c^H6!fpvgkA@Eidz$#7PN^ttcJr3d)zt4P+qRbOxRi#sPbr%z;5V6X-N DfN`z* literal 0 HcmV?d00001 diff --git a/images/fulltext.gif b/images/fulltext.gif new file mode 100644 index 0000000000000000000000000000000000000000..bedce14a0c07307d5ed2065f3bac1e287c6cf4e3 GIT binary patch literal 1295 zcmZ?wbh9u|lx0w4_%6Wk@87@IXXj3uwe|e+q`#l%Zm2h&G;wlfN^C=Q*|KFzeqYGH zaN+#(XHRzR+Vy>@!~g&P|FOC-jDpb+7%m~8_>+Z^fq|bv2jn48o^a>*&mhksb0VSf zAS(}>R?LnKKzUYa6$ya{i45#~A_@Wt4;b87S$R}KZX`H1v+;1LWf(X#HuWgPT4^*0 z9%O12D0==S)s$ zyvXuTZ-$pgXc9x= z&aY8vsZ*bddYLA%gvXeOGAwp#NnDYbFTYVWc%nvTS!fi;91{i~z5vtN(F(4b7vii+ zS(o`4-c*aNWGOAZ7II^1`hxs4JBDY>jz70FMEOX%N_&`ZoX)_YttxQ8Rd?SPapud6 msX?C2d?60`p^9BZ1&Va2-cqWAv~EHFsZmg+xoJMUzU)%*)DGCkHtt>3()?DX5J{SOR$z4T_E Wf3c-2o9%~XoRIG^9j;^TR< z+wbx9>i7Roqt`8z)rh&`q_(!a+SLF6i6WcYai+HmSEOad_A-CPEP}{kqO>MxyO_G> zw#nH|d$Uca;WxYT>F@QFy|hiU>Gt^fpQ*gX-QGf!%bc#Qg{;y{kd4LR-P`m0Wu4R1 z=jfxysov!5g|x7%!Q1Bh{`dL( zQ^M)-^!Zr3?!wgOWv0_;p0fY|g>$Q`RDQRVs*@{QYWUuM7x_;pX%t8kUB!uQ80!{QdoVu&&eL^2F)* zvDegpr`z`Y{coeuv*Y+;sOrt(?-ifm>ErIg+}~-G$4GOptIpDo#OSET#G$s(roGqK z=I@xYyxr{Uw$JG=cE5h9&-3~6%h&L}-rSbX^NgUst=8~&q|b4q*}K{9oUF5Xpwelg z(0!`gVy>ao*X7gP=8(zhOPbV&r^!r!!Ej)-rpx4H*Z;1}<(FNo3q|Nf-C+Jvpz(%b3L-s@J8%NZG$UysMB%Erav z^ZEbyX0G0V!Q}t`^@qaf+2HHn;_tD+h!zV)P}XZ zio3aRq^E*A^8LW00930EC2ui03ZM$000R80RIUbNU)&6g9sBUTzGInIB-6E81W&< zh!Gih7#=KQXhWJ{JETZ?V<8q4Sw->`S(zuJ!Y9mJjM0GM&mRX45ZwA;>zj-Mm{6Q@ z@r2-r7f6wcp+KQZm3dIBWXOmu73`S`FT(+<2OOC<+xHqhcK{Yi5IPV_jyFd^f*igX&$RMy;>bt|X zM?{6dJX!$3$uVUZ)JP4vtoK|PG|V9oIV@-r3Kl*Xct(EuNx-0g|2%=sArD|vgh3@- zs9@Q)BVI01+;V-TRgj{{xujyW^bDTWvk zl%OXPd?pdk2ty$Ah7)VlqQM_Fw4qQmfY5P=Abdo6#1WMY0mULaoU@A!N?>4$q6y(a zhaoKN!%71lh#*1`LEHjB7Y7uXVvQ26Op%&GdH92m1{V-;lLG-v0Kg=S;K0H(Sis3p z6h{IGCU>BHpZ!Mn4U(;bsF<*vn4^N+<&Z9D_td#y%Q&0E0L&RB(g6PkeImKk_uA Wh!COZV1S|==wpYyD5s2aKma=kKSqE6 literal 0 HcmV?d00001 diff --git a/images/help16.gif b/images/help16.gif new file mode 100644 index 0000000000000000000000000000000000000000..c1f81c4179760f801ca99376cdfcad294665d303 GIT binary patch literal 147 zcmZ?wbh9u|6krfw*v!uW1Px%^0Hzv%yao_BaNxjyp!k1=|6mG816e?z_>+Z^fq{`h z2Pg?NL4bjo#lhf&<*KCIT)+~2uL+= literal 0 HcmV?d00001 diff --git a/images/help32.gif b/images/help32.gif new file mode 100644 index 0000000000000000000000000000000000000000..18ac603da3bb4a2f49855125e229f66bf2a5dcbd GIT binary patch literal 252 zcmZ?wbh9u|RA5kG*v!uW1Px%^0Hzv%yao_BaNxjyp!k1=|6mG816e?z_>+Z^fq{`h z2Pg?NL4kppWu?Ih&*wWNuAhDDz%S8u;_BS%99`N$^KO4QQ{uZzU+1Lv`~TgNdhJyV z{reWKJnU>$$n0>@Q`dE-+bUt@rzZ8{3<=W5n07XP6nuO3*QrM4NwUS?*9rZUy3bbj zxwt+qsii4CzsagJyR%EAy}Y;2x~#lra)0sk8H^LSOXkd-I=^7yqUzZ*<}F>edeW-a njmr!r!`4r(%3rf^XTr)Edv|T`IyiB&$ie-~HXarhWUvMRsq<}L literal 0 HcmV?d00001 diff --git a/images/key.gif b/images/key.gif new file mode 100644 index 0000000000000000000000000000000000000000..16106dfda66fa0aced485280f81f7ff1c927e89b GIT binary patch literal 489 zcmV0MilWAmKfO~ePrlkAO zZ_v=s=jPz>$A^8LW000jFEC2ui0384!000F4@X5)RU2N*j zmIOdjP-qsO8!1l2s52A+0APo}aSc!pB^Y`YXnP6@1bqiw1q~Ywg)s>Oc>n=T3VjBR z4hjW;8YpTe0}6UfJ$(WP1(}HmUr}`>SUNmS2R8>gnxK$T7`6gvj;;X&s$IK33@Awn z2nY_!jyuZ*2MMzh&(8)nDvDe?)@=o{V9(qP01T(9iprpE>Kjjkh4Gs7Oz0>g#XwO( z1iwTD5_M^EFN&3EHU@lRLc~`WV1YginYO@04sBJIbo^r&=)u5_9Z!rwv0y+OP{2B{ zurULH7*Qq-=x8$lK}iZ)!X3c*V2Qj(Ej&C4hkz)&0z4E9APU5Sfd$i`w9Eyn8;1`l zv1ql#L@HGc3=#kkk>G$=L9dwf{3!@S5Vso`6xc(c=Uay-cX22XZw%cBPhu<(oVODZ fI5H(w5ECr#z{6mZ7#sD~tkAZQ~lb_24+ zK@bNBZw*UO0pkY6zCpC8*qQ<=j+U?A^B>$l-1l`oAz`b0e3R6`GT<`~c=6)JSThom zlYdUO)*<)A>({T(9nV5hw5zL2qtSf*`n6=UTmIh7)Blx^jg5IpOXuh32L}g>i;GtY z1Nawyj&^HuVlMcpZWoKv4zkS-=+az6 zxgS1!NKQ^BY-5k6*vF++DnH-#(`$wr}3NX{@chuy@(JODXRspYF-rR(qubL6Gg+x9?UIy*nTO zXXk;Kvh$m&FFktnXiII|r{^6HPl)8`!TCQYCMPGq&%Mh!*B-MbyyQmz#o;GS{lnF# zj!Zr6xmA_EDJdZ-A@1qZr^oa67z~EAw6xAg&-Hr!+qZAi!?=B?H?D~i7Z>Jxd%6X? zn}3|R^|ET!cv(){-*>mg^i$-|YwC>OL?AhU81_o~Z^X=2m z#f24TPQ?GP=`XdgWtc<@w3WktpC&`?!HY4+|+g*@-CPoI(P>07sE zXj)nlgLr+tz2%1!u3x`?yS3y{>rI(Vw(~!>fB*gW_wV2DsRZNW&u3?6FPuL=Jw08$ z!~MyVC-?5%Yyb6TXJ==8%BJzLCtJ4f`1a|8OMswz?0tAuc%yMA^xeYt*xoP z_U~_BPMj!N9UI@$^vm0!rk>h;Sy@@Rxd+gL2SQdyJuLh2%eU`;{PD-*$B&WhoV1c^ zQRI)GzkXX-Sm1uaf&hR6T!4S~|4snJ1%N`d3e~8)Wke&Vjf0w+-U8SzyfU=4w!g^S zGh=+P_3XgUoWLViVVCP}pKw^)yz%zs`nzZNDR(Nv+8Tx{e6rq+ht2d;@|U)!wU@w3 zg*^%MiQpvPa$6eG1xz}6I>6KoJGifs=T5uI1xUh}?02;z)3Mk>gby1lUwu*>^;lVV z&$MuTf83bed3}+FjgL)-2lPMDu2m|XBl%|bO9y>UeZ@>a#D*7UTr7VMhgo=rQcvGM zzPK=mv!NyCZBN0ml>jtrz9@B?WE%^LTDgO`UUhK65feKwo>S+3_@Bs_H59_Jxa!Ic zH_)S5qO60VKR77m#aqdq4ve4`gA~6KE2PIW9jS}h z;i=DGLr#3a=q@K=zExp1H^&LA!8)Gh&`-((d)a1_;zE{vno&MG(IGmLzMMPZ3NGuK z2{&=#NzT~?s1F>uKx(($Bz%y{O$76?7YFR9ucmvv(45ynmVK3mJgj1Ljlq*Os2MR? z9UvNJ2J2??9J!%!fYV-|4Fi@t#qPo^(#WiEMSXE*h^XIinc@#6*-1TeIu{-h>=>}F z$JwP+yv!8c*&*V&`_Ku22tv(I~W+#4|e#C)zgD$ZbQ_#wXK8>^JgpcgDMoe$z=Y zH<;9uCMdQGDOfx%gsw$yhJJHEJtYEoeI3ry(Wl2|L5ciV3Z$4^KTEVDY8i|xYTU9W zZGgvLD37SdnQBnK-w+@&wL88TF2G#T6C;xXDN}<&w!Eg`TPBC52o+*-#meCJNz4{l z2<_6LZa&>`wvW(0ms1>}?4bm!%=_`RG@;iN{b6Vw*(bB$_a-4}C%1?7rv}8T0gG%T z5gcu$L>LBHcf`FmUP3u#n}C*~mkZ{Sir4kIlbdy~#_?;Y%u%7m;m~eDX?HQCM7c;) zGNCdCV;wCaGdNgoyrpe+g}^)ZIasuB$1c*am}w$9hob+D%yLI z$EneN(VzgZ&Xt+E>V+(#JKg$`04M`~n(q<*EC}ErVWUFmvKC{S`qGjlx#h=_koOta z9^KDJiMf(|(a=i_r~~kPm=Yh*1KdIi$U(c0MwlnFALc~UNtf}fCQvfEr@-+aHHXV9 zA{v#V@Oz!iA?ArIUDEF!-inVQ3WT|VbZH*k%}CNv}!Mx}B1fhh&#&AK0L-gld^N>?$It$A!3kDgJAX7Lcz zdPoav5V{jjQ(ScjG96Usv7e~P!blE571L|J1b!IA>oKxU9APENsUp;r9$oV? zP8W!;M1vgPbr=2~4YAKFd)QVts3x{p5`2xBBcpfVv6m;Qr%6Yzxrlr5mv4RW*FMPL<2ymh+ zD~fC;&Vh*8BUt7AvG9;7j3uJLk=Ee5!$6#qzB`j}9TFSY5XHMQXrKN9888QdI5>)n z7_@*f@UDJ=0}P|V$RsO7++&wKH)0zZXgztb5BL$ik=AsFjGsrLBp7V1l2C&}b1xS{yeNa3@Ygn_iF*8yCboNyxzIt}^xx39MylC_Wjah9SL-VM79b z9-$?@7cvvu2bRriX*=d^RaH4s6CVk>oT_K;_6ZSYZ%j{(OtH|wiPA`S8KW*nzb!(Q z#C+tAtv?8L2kI6zp+~0Bn7uWNAztMPq8YZuS1J}Wny-P|P5PLwFj^VJLD`bOUQLu1 zu$+MY*OyUama1XxxZY8KnkvR6E+i8()KXR?aLMJ8V9_8fxV<{@7}RNp!>bP*(ou|2 z!X1R_rp6W^q%-h=EFEQ7N6kSASsbzrA9#~VVvJI<1P;S50nAjkjSBMQfGk~h1cKRv za;&d$_HeS#G>~@K6HmReI*Be9p`3Ct>Fl-K-ZpBqSmvWYctXAOrFYDSw#CyLdV?4$ zRiy?RD6bJrw0_xf4P@_)brvw*>T_D){11qiy_P;?pkkB+V*$8T54i~#4<&?)I!an7 z7^GFCDGBvD4Ap>UDGT~k_KiKH)4yAZbQmW|T2q^}HxTD7z_=_BWg-Lp^m3BN8>?!S zkSN0LM9JIMQlk0FU)1C*f-GE2xC=Ww>D+Ml*Qo*OkS@WW12`KfHzf>jK90c0tV4Ev zAdpoE0BN>;*g$T7L+7KAPKQrH_J`>Gf60QJ1k_G7K1Gd>(kj-f$%kQQk5{;QF*!rM z)Ludk6v0{!DCLtxYSK;>ef6x@IXe*NfeY3uy%F~amCV}Hb&)6OlUjK%s_;Q~j9(M> zPKe3}5feqCueRb5^%g&l(>j38myrEY=mNj!rU2L2zJxCzN9B;C)l17zx0^afx~Gr? zP_+PUv4j|`hh~98vRazI81h`uVZyZv|Jw@YB)yLV{Rs=V$1HOYQ%j^Ytr)UVV?7;( zvd@P>+jtKhhWE(-lbXB}rvG9>--=*9>8#2HnA8r=S99rJAWB=nIjL7Z;GS^P{N#Yj zAtBKeATv?u#Z|giPtD_FC-f(S`Iu)KP$wbV3mBfaQ%(8UKm>c2k9(+s^a#CQW87x| z6YQKFwP$=aV1pX60b*8&%MA{g#bU?R|%Q`KX3juJ9o3^{4b z35MDg2JqGLa`Y;Guz=$Q(}N_8khSFx_0X1BN)Up%%O??Si6kFsegPZ@P)Pu0nzPl} z7+N?7tv3SWbhIfHa#Ta>G}{6VbiXgY=hAX;Y6h26!&d=BPA$YFynw-Kcp4ijq0AL&i)cd8iCg;jm*kato zB-Q3ZFZkfRFKu;-l!cQ0_hTlIB5#3`WPZqBMd?q1<0MVF`@sIF^V7(2dWrWGK%f4% zP#UO_gZYB<%5y#fCG>tQrePGhJj8BPr=P2` zaC|-kAH4xiqVBi$d3D@w;PS0_`U-zty^~%&q`@?3)qL?W%ET3F-j$bQ2_#+Bx@j0d zs-tz7D-c7LK)#VYQ@yM@0g>8^A13hMcj1;ldyzc?kS*>CTT_A z8r;r{T+TCoQ;903nQ>n)m^pXQnFK;Ppd?d^%8dY^y~&vwY6<4BFSb>55{0$<8#;ge c)~U7Z>hbUDi|@L1plh(A>rMm=f`I@30gw+~xBvhE literal 0 HcmV?d00001 diff --git a/images/nokey.gif b/images/nokey.gif new file mode 100644 index 0000000000000000000000000000000000000000..0a3caa67bf23998c087d03ca603c93af3fa9c96d GIT binary patch literal 1299 zcmZ?wbh9u|lx0w4_|DJp@87@IXXj3uwe|e+q`#l%Zm2h&G;wlfN^C=Q*|KFzeqYGH zaN+#(XHRzR+Vy>@!~g&Pe^@ayjDpb+7%m~8_>+Z^fq|bv2jn48o^a>*&!Ff~;qZa6 znUzD_K;y)QM8`&61_p~84hk%tj4~Dh4Gs;B%zQdh5hperY+~b;kny>Y(7?nh#=WN` zz(Ki*l~1xOW)x4{!Uq{Q+lU))^JvKMWp9|?b*0N(zh$fIYI~QgNe8bmTSyvxNceYs zbwaaFs1*PF$)A%~>j(yIopmXpVZm+oYpFF0_W%FqFDbwf$S05{>!{(#>KOWw*Mor} zne#&o<8R)U1b-fego(`zCd(NZWgA5GB|+=}g#xfWvE-U8rH=;fQ8r z7ZG5{F_9GuiAa=e5Mnl4b~Mb#C=oqu zG{WSEHLHkf8 zNC&P3b_`n)>jA4CrOl$?4B`TG9x4YZ;ATK$7)1;MdLC_?LL^_tfCdyG0XLbzbQrZ5 z)ag}eONt^f6QiJ!SI9{S7a5u!qc#IWuSvT>5fWjHnuf1Xl5kvDG-N~uq(|DMNSR{9 z8d^a~NEdEDEY=YF&?P7b(t_I$iv`4a=p2-Q%)sr3wV$jX7Ey?i*T^XdiHzG1i>Sr$ zHA)JOgyr_bBH|cYLn%lJH|gm`YzH(Rn>HJ%TmKnm*ooK*Soc`9DFuu8&oDz1F$x%X z^laLKBHfX_hIMFKjOq-k^d#*f#ms&z^k~|Q41*@U2JLXyu)SExvh^X`i-nz?oo=_g zy}iA)wY9#!zOu3shT-DkVy#xIR4TsjFDxvSN~PJ^S;ujvrlu^*%4V|@6B8pNBgcOa z4x~qLCYAIihKA=bFnrYhytMXs_~5A<4YzWsGCFkO&G=Y*W5b^6wUdne_c&DUq=yBiN){k-}v|LFOr!k6Xm)nm{8PHS`f`p5CA L^Y*SaiHrXLMq|OY literal 0 HcmV?d00001 diff --git a/images/ok.gif b/images/ok.gif new file mode 100644 index 0000000000000000000000000000000000000000..4abfb291446a31abe2271ffbdf46f27167a327c1 GIT binary patch literal 905 zcmZvbL1+_E5QhI&!GKr<>mk)cZFyDHOBO^yQoPu{tcZ(}#)F8iAjm>NUPZ_$Ahd$A zffe>3QmPb@jY{{>lD*Xmi4_be&r8`;0zHRZL_GZN_SQBtkAE%$Z$AE+>B7{di}yz{ zia)DJqLO4PY26X5ClRl||K6=sDg=={rgcXWCI5AomX_JoY=_h?8xHG|fnb2xLsW)u zLz%D)u%p=wS#w!+s3c2*MZ^U}dH6Xf0V@k?%`l|v(s3vyg-E`Pfe7#c1z5=hy2G$Z zw??N*sVGWBF-9Rm-bYSBSjbX$8Mf(aIt|J?ML+~Gya;6LnvgeeprMT zqa4BZVJa9_KP)1S5k>HQC4t2()D9bx_0+9>hG}*}HeJ>nRwb2S3HuDw)FDHc zu0uys3W{_`b{p2AZZfRVtc3^m;bojPT(W7ux2WZC+V?Z!f{*W2FS z-rCw~wOSh+8*6K8K@co1E_$9fKR;hCmuF{ZZQGuinK4asa&pozjERYfk&%(1p`lZM z4-TY9a6XmvCJtpDVjy!;t}K0dmN|Cz&bO7fUl)#!n{Q-z@6(IpNAAYA&vmZ2C-Q^H z8snSZ@D2OphhGn_y*hohF;}?x@cQ#J)2+Eouk&N!!qdUx=Hs!S@2097!>_$Zx0c7A Qe12)J2ES{E4-De+e>dF1@Bjb+ literal 0 HcmV?d00001 diff --git a/images/openfile.gif b/images/openfile.gif new file mode 100644 index 0000000000000000000000000000000000000000..898764012b6c2d30d5877c96799bda200d6eb5bc GIT binary patch literal 941 zcmZ?wbh9u|6krfw_|C`x1poj42a|LD|6lt1=d|x1I{$y4^5IG4|Ia=DKhHV0C;I>E zmjBONuJ5pabkP6*p{P(+@mKO2+KOXh}ddvUc-$AyHg3%Bd1R126PetE)tF5<6ec>cvM?*WxWnmqh`m#@dD0b!kQWCTm?!aBcrMHgp2{O8{SOWmJ+Ir&v literal 0 HcmV?d00001 diff --git a/images/primary.gif b/images/primary.gif new file mode 100644 index 0000000000000000000000000000000000000000..c80e3cba7cae499582f1a715674872d9655e2ff2 GIT binary patch literal 1302 zcmZ?wbh9u|lx0w4_|DJp@87@IXXj3uwe|e+q`#l%Zm2h&G;wlfN^C=Q*|KFzeqYGH zaN+#(XHRzR+Vy>@!~g&Pe~Gy;jDpb+7%m~8_>+Z^fq|bv2jn48o^a>*&mhksb0VSf zAS(}>R?LnKKzUYa6$ya{i45#~A_@Wt4;b87S$R}KZX`H1v+;1LWf(X#HuWgPT4^*0 z9%O12D0+2f=Ya!FEVhC@B0Cx$d9yORyh=H-<>et(CMg+Xq%xnTY9tjH=nR<-# z^->x(H8!$v>=UZ!+{n=TJvP&7HTqsoaKb&57%*o*(Vqr$UU}%lav3m&dCF> z7&o$T&rlPnXsl>_8ffHDaBpSd8g1UVx3eZVHk{*$biE(KA|x@Dk#WP<2xs*`*PD^5 zsvZmsX`BqPjNEWP|9aNOmpmKejn zha)_?lh;)&GIn8!vRnQ^*I-5?t&|xq+yyUgyJw#)QStJRY!zct=Vh489DLR6a<22u zrI-C9JX=#8@1}+v$h{h9E*qZq(ln%Lzi7kk3QNYTmzgq4!$fkj?y02tJ!RYw#PoII umq*@>h9B-R+s_OMO5zcHARXGb%X5OWVBoG9OCDx=1%w4>rpG%lSOWlx@#Zf8 literal 0 HcmV?d00001 diff --git a/images/rename.gif b/images/rename.gif new file mode 100644 index 0000000000000000000000000000000000000000..c55d78ea2b89edc9f733cf32e552503f251186c4 GIT binary patch literal 296 zcmZ?wbh9u|RA5kG*v!uW1Px%^0Hzv%yao_BaNxjyp!k1=|6mG816e?z_>+Z^fq{`h z2Pg?NL4kpp<*LC6&((V^UY|APIPj@7hGR~O`l6NF`*hRh75H4vkGN6t8Zw4OUp zj)$d!zpACC)-S58*}cFv->xI7vB%#-J&mK)x2s$zIbpi@tlG&<^YdL6soTv?;qOkW zikZP~GQqjCVflQIwDfH|+E;OG+-nk&f8fx>1db`k>raO7pV=3Fbe_D2%Y?1_ug9Ek fQsh=x{bJF^XD{Ebe)H~QK;)-H!|y*N1sSXX1rL76 literal 0 HcmV?d00001 diff --git a/images/unique.gif b/images/unique.gif new file mode 100644 index 0000000000000000000000000000000000000000..1d5c870e1598b811c36c73a92c097331571cd700 GIT binary patch literal 1302 zcmZ?wbh9u|lx0w4_%6Wk@87@IXXj3uwe|e+q`#l%Zm2h&G;wlfN^C=Q*|KFzeqYGH zaN+#(XHRzR+Vy>@!+#(Uw_+FtqaiR{LO}5+3nK#qKZ6d)L!dn2&hei?oYS-9$Ui68~?ez;lnG& zjV#;?)C?*bf4o{OsbKN{i{^#Rs@mzUmF5T1+rrPfUu|IaN_Ak!alLlIGxTNaeI^be zhK5KckMM>jX3v%j&aAE-v%Fbyo&-kkN_`<6rfYlTS_0FRumi4ovgQ*U_xOq>#<1_< z2#@aObrp+@U09;*mVeMSn9)e9Wk#C})Ax%}MzSa6Gr||P9`Iy7@Pr|B``IbC>-lGd zT=I`84Hflry(kjQsJidFgJ0~-ow7{_H%88leJpt;IBLG=(MUJeJ5SQ$7}iW-s8!kf t<5B_-57$9|b$@{W%FvYK=D zd9Ni^XY-VIe~@GStJtrecf)qy!tx)%8kJRXtp#=UjSV3k%0<;8&H5@+rq*^$nyKBJ UHfz?L#CbCpELo~3$iQF?0K71AF#rGn literal 0 HcmV?d00001 diff --git a/inc/footer.php b/inc/footer.php new file mode 100644 index 0000000..7a9e923 --- /dev/null +++ b/inc/footer.php @@ -0,0 +1,14 @@ +

+Autoren: + +Daniel Schlichtholz & Steffen Kamper - Infoboard: +" target="_new"> +

'; +$svice=(isset($_GET["svice"])) ? $_GET["svice"] : 0; +$config_array=(isset($config)) ? "CONFIG
".print_r($config,true)."
": ""; +$database_array=(isset($database)) ? "DATABASE
".print_r($database,true)."
": ""; +$dump_array=(isset($dump)) ? "DUMP
".print_r($dump,true)."
": ""; +$restore_array=(isset($restore)) ? "RESTORE
".print_r($restore,true)."
" : ""; +if($svice==1) echo '
'.$config_array.'
'.$database_array.'
'.$dump_array.'
'.$restore_array.'
'; +echo ''; +?> diff --git a/inc/functions.php b/inc/functions.php new file mode 100644 index 0000000..c4fb99f --- /dev/null +++ b/inc/functions.php @@ -0,0 +1,323 @@ +
'; + } else { + return ''.$ToolTip.''; + } +} + +function DeleteFilesM($dir, $pattern = "*.*") +{ + $deleted = false; + $pattern = str_replace(array("\*","\?"), array(".*","."), preg_quote($pattern)); + if (substr($dir,-1) != "/") $dir.= "/"; + if (is_dir($dir)) + { $d = opendir($dir); + while ($file = readdir($d)) + { if (is_file($dir.$file) && ereg("^".$pattern."$", $file)) + { + if (unlink($dir.$file)) $deleted[] = $file; + } + } + closedir($d); + return $deleted; + } + else return 0; +} + +function SetDefault($load_default=false) +{ + global $config,$databases,$nl,$out,$lang; + + + + //Arrays löschen + $i=0; + $old_db=$databases["db_actual"]; + unset($databases); + $databases["Name"]=Array(); + + + $old_lang=$config["language"]; + @unlink($config["files"]["parameter"]); + if($load_default==false){ + include("./config.php"); + $config["language"]=$old_lang; + } + + //DB-Liste holen + MSD_mysql_connect(); + $databases["db_selected_index"]=-1; + if($config["dbonly"]!="") { + $databases["db_actual"]=$config["dbonly"]; + $databases["Name"][0]=$config["dbonly"]; + $databases["db_selected_index"]=0; + $databases["praefix"][0]=""; + $databases["command_before_dump"][0] = ""; + $databases["command_after_dump"][0] = ""; + } else { + + $res = mysql_query("SHOW DATABASES ;",$config["dbconnection"]); + $numrows=mysql_numrows($res); + for($i=0;$i<$numrows;$i++) { + $row = mysql_fetch_row($res); + $found_db=$row[0]; + //echo "found `$found_db`
"; + if($found_db==$old_db) $databases["db_selected_index"]=$i; + $databases["Name"][$i]=$found_db; + $databases["praefix"][$i]=""; + $databases["command_before_dump"][$i] = ""; + $databases["command_after_dump"][$i] = ""; + + $out.=$lang["saving_db_form"]." ".$found_db." ".$lang["added"]."$nl"; + + + } + + } + if($databases["db_selected_index"]==-1) { + $databases["db_selected_index"]=0; + $databases["db_actual"]=$databases["Name"][$databases["db_selected_index"]]; + } else $databases["db_actual"]=$databases["Name"][$databases["db_selected_index"]]; + $databases["db_actual_cronpraefix"]=""; + $databases["db_actual_cronindex"]=$databases["db_selected_index"]; + + + + + WriteParams(1,$config,$databases); + if($load_default==false) WriteLog("default settings loaded."); + + return $out; +} + +function WriteParams($as=0,$config,$databases) +{ + $nl="\n"; + FillMultiDBArrays(); + //Parameter zusammensetzen + $config["multipart_groesse"]=$config["multipartgroesse1"]*(($config["multipartgroesse2"]==1) ? 1024 : 1024*1024); + $param=$pars_all=' $val){ + if(is_array($val)) { + foreach($val as $var2 => $val2){ + if ($config["magic_quotes_gpc"]==0 || $as==1) { + $pars_all.='$config["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"".addslashes($val2)."\";$nl"; + } else { + $pars_all.='$config["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"$val2\";$nl"; + } + } + } else { + if ($config["magic_quotes_gpc"]==0 || $as==1) { + if($var != "dbconnection" && $var != "version") $pars_all.='$config["'."$var\"] = \"".addslashes($val)."\";$nl"; + } else { + if($var != "dbconnection" && $var != "version") $pars_all.='$config["'."$var\"] = \"$val\";$nl"; + } + } + } + foreach($databases as $var => $val){ + if(is_array($val)) { + foreach($val as $var2 => $val2){ + if ($config["magic_quotes_gpc"]==0 || $as==1) { + $pars_all.='$databases["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"".addslashes($val2)."\";$nl"; + } else { + $pars_all.='$databases["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"$val2\";$nl"; + } + } + } else { + if ($config["magic_quotes_gpc"]==0 || $as==1) { + $pars_all.='$databases["'."$var\"] = \"".addslashes($val)."\";$nl"; + } else { + $pars_all.='$databases["'."$var\"] = \"$val\";$nl"; + } + } + } + + + + $param.='?>'; $pars_all.='?>'; + + //Datei öffnen und schreiben + $ret=true; + + if ($fp=fopen($config["files"]["parameter"], "wb")) + { + if (!fwrite($fp,$pars_all)) $ret=false; + if (!fclose($fp)) $ret=false; + } + else $ret=false; + + $ret=WriteCronScript($config,$databases); + + return $ret; +} + +function WriteCronScript($config,$databases) +{ + global $nl, $cron_save_all_dbs, + $cron_db_array,$cron_dbpraefix_array,$cron_db_cbd_array,$cron_db_cad_array; + + if(!isset($databases["praefix"][$databases["db_selected_index"]])) $databases["praefix"][$databases["db_selected_index"]]=""; + if(!isset($databases["db_actual_cronindex"])) $databases["db_actual_cronindex"]=$databases["db_selected_index"]; + if(!isset($config["email_maxsize"])) $config["email_maxsize"]=$config["email_maxsize1"]*(($config["email_maxsize2"]==1) ? 1024 : 1024*1024); + + if($config["cron_samedb"]==0) { + $cron_dbname=$databases["db_actual"]; + $cron_dbpraefix = $databases["praefix"][$databases["db_selected_index"]]; + }else { + if($databases["db_actual_cronindex"]>=0) { + $cron_dbname=$databases["Name"][$databases["db_actual_cronindex"]]; + $cron_dbpraefix = $databases["db_actual_cronpraefix"]; + + } else { + $cron_dbname=$databases["db_actual"]; + $cron_dbpraefix = $databases["praefix"][$databases["db_selected_index"]]; + } + } + if($cron_save_all_dbs>0) { + $csadb='$cron_save_all_dbs=1;'.$nl; + $csadb.='$cron_db_array=qw('.$cron_db_array.');'.$nl; + $csadb.='$cron_dbpraefix_array=qw('.$cron_dbpraefix_array.');'.$nl; + $csadb.='$dbpraefix="";'.$nl; + $csadb.='$command_beforedump_array="'.$cron_db_cbd_array.'";'.$nl; + $csadb.='$command_afterdump_array="'.$cron_db_cad_array.'";'.$nl; + } else { + $csadb='$cron_save_all_dbs=0;'.$nl; + $csadb.='$cron_db_array="";'.$nl; + $csadb.='$cron_dbpraefix_array="";'.$nl; + $csadb.='$dbpraefix="'.$cron_dbpraefix.'";'.$nl; + $csadb.='$command_beforedump_array="'.$databases["command_before_dump"][$databases["db_selected_index"]].'";'.$nl; + $csadb.='$command_afterdump_array="'.$databases["command_after_dump"][$databases["db_selected_index"]].'";'.$nl; + } + + + $r=str_replace("\\\\","/",$config["paths"]["root"]); + $p1=$r.$config["paths"]["backup"]; + $p2=$r.$config["files"]["perllog"]; + $p3=$r.$config["files"]["perllogcomplete"]; + $pcp=str_replace("\\\\","/",$config["cron_perlpath"]); + + + + $cronscript="#Vars - written at ".date("Y-m-d").$nl; + $cronscript.='$dbhost="'.$config["dbhost"].'";'.$nl; + $cronscript.='$dbname="'.$cron_dbname.'";'.$nl; + $cronscript.='$dbuser="'.$config["dbuser"].'";'.$nl; + $cronscript.='$dbpass="'.$config["dbpass"].'";'.$nl; + $cronscript.=$csadb; + $cronscript.='$compression='.$config["cron_compression"].';'.$nl; + $cronscript.='$backup_path=qw('.$p1.');'.$nl; + $cronscript.='$logdatei=qw('.$p2.');'.$nl; + $cronscript.='$completelogdatei=qw('.$p3.');'.$nl; + $cronscript.='$nl="\n";'.$nl; + $cronscript.='$cron_printout='.$config["cron_printout"].';'.$nl; + $cronscript.='$cronmail='.$config["cron_mail"].';'.$nl; + $cronscript.='$cronmail_dump='.$config["cron_mail_dump"].';'.$nl; + $cronscript.='$cronmailto=qw('.$config["email_recipient"].');'.$nl; + $cronscript.='$cronmailfrom=qw('.$config["email_sender"].');'.$nl; + $cronscript.='$cronftp='.$config["cron_ftp"].';'.$nl; + $cronscript.='$ftp_server="'.$config["ftp_server"][$config["ftp_connectionindex"]].'";'.$nl; + $cronscript.='$ftp_port='.$config["ftp_port"][$config["ftp_connectionindex"]].';'.$nl; + $cronscript.='$ftp_user="'.$config["ftp_user"][$config["ftp_connectionindex"]].'";'.$nl; + $cronscript.='$ftp_pass="'.$config["ftp_pass"][$config["ftp_connectionindex"]].'";'.$nl; + $cronscript.='$ftp_dir="'.$config["ftp_dir"][$config["ftp_connectionindex"]].'";'.$nl; + $cronscript.='$mp='.$config["multi_part"].';'.$nl; + $cronscript.='$multipart_groesse='.$config["multipart_groesse"].';'.$nl; + $cronscript.='$email_maxsize='.$config["email_maxsize"].';'.$nl; + $cronscript.='$auto_delete='.$config["auto_delete"].';'.$nl; + $cronscript.='$cron_del_files_after_days='.$config["del_files_after_days"].';'.$nl; + $cronscript.='$max_backup_files='.$config["max_backup_files"].';'.$nl; + $cronscript.='$max_backup_files_each='.$config["max_backup_files_each"].';'.$nl; + $cronscript.='$perlspeed='.$config["perlspeed"].';'.$nl; + $cronscript.='$optimize_tables_beforedump='.$config["optimize_tables_beforedump"].';'.$nl; + $cronscript.='1;'; + + //Datei öffnen und schreiben + $ret=true; + + + + $ext=($config["cron_extender"]==0) ? "pl" : "cgi"; + + $sfile=$config["paths"]["config"].$config["cron_configurationfile"]; + if ($fp=fopen($sfile, "wb")) + { + if (!fwrite($fp,$cronscript)) $ret=false; + if (!fclose($fp)) $ret=false; + //chmod("$sfile",0755); + } + else $ret=false; + + if(!file_exists($config["paths"]["config"]."mysqldumper.conf")) { + $sfile=$config["paths"]["config"]."mysqldumper.conf"; + if ($fp=fopen($sfile, "wb")) + { + if (!fwrite($fp,$cronscript)) $ret=false; + if (!fclose($fp)) $ret=false; + //chmod("$sfile",0755); + } + else $ret=false; + } + return $ret; + +} + + +function DeleteLog() +{ + global $config; + //Datei öffnen und schreiben + $log=date("d.m.Y h:i:s").": Log created.\n"; + $fp = @fopen($config["files"]["log"], "wb"); + @fwrite ($fp,$log); + @fclose ($fp); + @chmod($config["files"]["log"],0755); +} + +function SYS_editor($dir=0,$fname="") +{ + global $dirs; + $f=$text="";$i=0; + $ref='filemanagement.php?action=files&svice=1&sysfedit=1'; + + if($dir>0 && $fname=="") { + $dirname=$dirs[$dir]; + $dh = opendir($dirname); + while (false !== ($filename = readdir($dh))) + { + if ($filename != "." && $filename != ".." && !is_dir($dirname.$filename)) + $f.=''.$filename.'   '; + $i++;if(($i % 4)==1) $f.='
'; + } + } elseif($dir>0 && $fname!="") { + $dirname=$dirs[$dir]; + $text=implode("",file($dirname.$fname)); + } + + + $r='
'.((!empty($f)) ? '' : ''); + if($fname!="") $r.=''; + $r.=''; + $r.='
Files in  '; + $r.='./   '; + $r.='inc   '; + $r.='msd_cron   '; + $r.='language   '; + $r.='config   '; + $r.='
'.$f.'
File `'.$fname.'`
'; + + $r.='
'; + + return $r; +} +?> \ No newline at end of file diff --git a/inc/functions_dump.php b/inc/functions_dump.php new file mode 100644 index 0000000..207a1e1 --- /dev/null +++ b/inc/functions_dump.php @@ -0,0 +1,442 @@ +".$lang['startdump']."`".$databases["Name"][$dump["dbindex"]]."`".(($databases["praefix"][$dump["dbindex"]]!="") ?' ('.$lang["withpraefix"].' '.$databases["praefix"][$dump["dbindex"]].')' : '')."... "; + ExecuteCommand("b"); + if($dump["part"]==1) { + $dump["table_offset"]=0; + $dump["countdata"]=0; + } + // Seitenerstaufruf -> Backupdatei anlegen + + $dump["data"]=$statuszeile.'# Dump created on '.$cur_time.$nl.$nl; + $dump["structure"]="# Status:0:0::".$databases["Name"][$dump["dbindex"]]; + $dump["structure"].=":php:".$config["version"].$nl; + $dump["structure"].="# Dump by MySQLDump ".$config["version"]." (".$config["homepage"].")".$nl; + $dump["structure"].='# Dump created on '.$cur_time.$nl."# This file is only the structure of the database without data \r\n"; + + } + else + { + if($config["multi_part"]!=0) { + WriteLog("Continue Multipart-Dump with File ".($dump["part"]-$dump["part_offset"])." (last file was $last_groesse Bytes)"); + $dump["data"]=$statuszeile.'# This is part '.($dump["part"]-$dump["part_offset"]).' of the backup.'.$nl.$nl.$dump["data"]; + + } + + } + WriteToDumpFile(); + $dump["part"]++; +} + +function GetStatusLine($kind="php") +{ + global $databases,$config, $dump; + + $t_array=explode("|",$databases["db_actual_tableselected"]); + $t=0; + $r=0; + $mp="";$t_zeile=""; + MSD_mysql_connect(); + $res=mysql_query("SHOW TABLE STATUS FROM `".$databases["Name"][$dump["dbindex"]]."`"); + $numrows=mysql_num_rows($res); + for($i=0;$i<$numrows;$i++) { + $erg=mysql_fetch_array($res); + if($databases["db_actual_tableselected"]=="" || ($databases["db_actual_tableselected"]!="" && (in_array($erg[0],$t_array)))) { + $t++;$r+=$erg["Rows"]; + $t_zeile.="# TABLE|".$erg["Name"]."|".$erg["Rows"]."|".($erg["Data_length"]+$erg["Index_length"])."|".$erg["Update_time"]."\n"; + } + } + if($config["multi_part"]==1) $mp="MP_".($dump["part"]-$dump["part_offset"]); + return "# Status:$t:$r:$mp:".$databases["Name"][$dump["dbindex"]].":$kind:".$config["version"].":".$dump["kommentar"].":EXTINFO\n".$t_zeile; +} + +// Liest die Eigenschaften der Tabelle aus der DB und baut die CREATE-Anweisung zusammen +function get_def($db, $table) +{ + global $config,$nl; + + $def = "DROP TABLE IF EXISTS `$table`;".$nl; + mysql_select_db($db); + $result = mysql_query("SHOW CREATE TABLE `$table`",$config["dbconnection"]); + $row=mysql_fetch_row($result); + $def .=$row[1].";".$nl; + return $def; +} + + +// Liest die Daten aus der DB aus und baut die INSERT-Anweisung zusammen +function get_content($db, $table) +{ + global $config,$nl,$dump; + + $content=""; + + $query="SELECT * FROM `$table` LIMIT ".$dump["zeilen_offset"].",".($dump["restzeilen"]+1); + mysql_select_db($db); + $result = mysql_query($query,$config["dbconnection"]); + $ergebnisse=mysql_num_rows($result); + //$dump["countdata"]+=$ergebnisse; + if ($ergebnisse>$dump["restzeilen"]) + { + $dump["zeilen_offset"]+=$dump["restzeilen"]; + $ergebnisse--; + //$dump["countdata"]--; + $dump["restzeilen"]=0; + } + else + { + $dump["table_offset"]++; + $dump["zeilen_offset"]=0; + $dump["restzeilen"]=$dump["restzeilen"]-$ergebnisse; + } + for ($x=0;$x<$ergebnisse;$x++) + { + $row=mysql_fetch_row($result); + { + + $insert = "INSERT INTO `$table` VALUES ("; + $num_felder=mysql_num_fields($result); + for($j=0; $j<$num_felder;$j++) + { + if(!isset($row[$j])) $insert .= "NULL,"; + else if($row[$j] != "") $insert .= "'".mysql_escape_string($row[$j])."',"; + else $insert .= "'',"; + } + $insert = ereg_replace(",$","",$insert); + $insert .= ");"; + $dump["data"] .= $insert.$nl; + $dump["countdata"]++; + if(strlen($content)>$config["memory_limit"] || ($config["multi_part"]==1 && strlen($content)>$config["multipart_groesse"]) ) { + WriteToDumpFile(); + } + } + } + mysql_free_result($result); +} + +function WriteToDumpFile() +{ + global $config,$dump; + + $df=$config["paths"]["backup"].$dump["backupdatei"]; + $sf=$config["paths"]["structure"].$dump["backupdatei_structure"]; + + if ($config["compression"]==1) + { + if($dump["data"]!="") { + $fp = gzopen ($df,"ab"); + gzwrite ($fp,$dump["data"]); gzclose ($fp); + } + if($dump["structure"]!="") { + $fp = gzopen ($sf,"ab"); + gzwrite ($fp,$dump["structure"]); gzclose ($fp); + } + } + else + { + if($dump["data"]!="") { + $fp = fopen ($df,"ab"); + fwrite ($fp,$dump["data"]);fclose ($fp); + } + if($dump["structure"]!="") { + $fp = fopen ($sf,"ab"); + fwrite ($fp,$dump["structure"]); fclose ($fp); + } + } + $dump["data"]=$dump["structure"]=""; + if(!isset($dump["fileoperations"])) $dump["fileoperations"]=0; + $dump["fileoperations"]++; + + $dump["filesize"]=filesize($df); + if ($config["multi_part"]==1 && $dump["filesize"]>$config["multipart_groesse"]) + new_file($dump["filesize"]); // Wenn maximale Dateigroesse erreicht -> neues File starten +} + + + + + +function ExecuteCommand($when) +{ + global $config,$databases,$dump,$out,$lang; + + + if($when=="b") { // before dump + $cd=$databases["command_before_dump"][$dump["dbindex"]]; + $cap="before Dump"; $lf="
"; + } else { + $cd=$databases["command_after_dump"][$dump["dbindex"]]; + $cap="after Dump"; $lf=""; + } + + if($cd!="") { + //jetzt ausführen + if(substr(strtolower($cd),0,7)!="system:") { + @mysql_select_db($databases["Name"][$dump["dbindex"]]); + if(strpos($cd,";")) { + $cad=explode(";",$cd); + for($i=0;$iERROR executing Query '.$cap.'
'; + } else { + WriteLog("executing Query $cap ($cd) was successful"); + $out.=$lf.'executing Query '.$cap.' was successful
'; + } + } elseif(substr(strtolower($cd),0,7)=="system:") { + //$result=@system(substr($cd,7),$returnval); + $cap=substr($cd,7); + $result=1; + if(!$result) { + WriteLog("Error while executing System Command $cap"); + $dump["errors"]++; + $out.=$lf.'ERROR executing System Command '.$cap.'
'; + } else { + WriteLog("executing System Command $cap was successful. [$returnval]"); + $out.=$lf.'executing System Command '.$cap.' was successful
'; + } + } + } + +} + +function DoEmail() +{ + global $config,$dump,$databases,$email,$lang,$out,$REMOTE_ADDR; + + $header=""; + if($config["cron_use_sendmail"]==1) { + //sendmail + if(ini_get("sendmail_path")!=$config["cron_sendmail"]) @ini_set("SMTP",$config["cron_sendmail"]); + if(ini_get("sendmail_from")!=$config["email_sender"]) @ini_set("SMTP",$config["email_sender"]); + } else { + //SMTP + } + if(ini_get("SMTP")!=$config["cron_smtp"]) @ini_set("SMTP",$config["cron_smtp"]); + if(ini_get("smtp_port")!=25) @ini_set("smtp_port",25); + + + if($config["multi_part"]==0) { + $file = $dump["backupdatei"]; + $file_name=(strpos("/",$file)) ? substr($file,strrpos("/",$file)) : $file; + $file_type = filetype($config["paths"]["backup"].$file); + $file_size = filesize($config["paths"]["backup"].$file); + if(($config["email_maxsize"]>0 && $file_size>$config["email_maxsize"]) || $config["send_mail_dump"]==0) { + //anhang zu gross + $subject = "Backup '".$databases["Name"][$dump["dbindex"]]."' - ".date("d\.m\.Y H:i",time()); + $header.= "FROM:".$config["email_sender"]."\n"; + $header .= "X-Mailer: PHP/" . phpversion(). "\n"; + $header .= "X-Sender-IP: $REMOTE_ADDR\n"; + $header .= "Content-Type: text/html"; + if($config["send_mail_dump"]!=0) { + $msg_body = $lang["emailbody_tb1"].byte_output($config["email_maxsize"]). $lang["emailbody_tb2"]; + } else { + $msg_body = $lang["emailbody_na"]; + } + $msg_body.="`".$databases["Name"][$dump["dbindex"]]."` ".$lang["emailbody_tb3"]; + $msg_body.="$file (".byte_output(filesize($config["paths"]["backup"].$file)).")
"; + $msg_body=str_replace("\\n\\r","
",$msg_body); + $email_log="Email sent to '".$config["email_recipient"]."'"; + $email_out=$lang["email_was_send"]."`".$config["email_recipient"]."`
"; + } else { + //alles ok, anhang generieren + $msg_body = $lang["emailbody_n1"].'`'.$databases["Name"][$dump["dbindex"]].'` ('.byte_output(filesize($config["paths"]["backup"].$file)).') '.$lang["emailbody_n2"]; + $subject = "Backup '".$databases["Name"][$dump["dbindex"]]."' - ".date("d\.m\.Y",time()); + $fp = fopen($config["paths"]["backup"].$file, "r"); + $contents = fread($fp, $file_size); + $encoded_file = chunk_split(base64_encode($contents)); + fclose($fp); + $header.= "FROM:".$config["email_sender"]."\n"; + $header.= "MIME-version: 1.0\n"; + $header.= "Content-type: multipart/mixed; "; + $header.= "boundary=\"Message-Boundary\"\n"; + $header.= "Content-transfer-encoding: 7BIT\n"; + $header.= "X-attachments: $file_name"; + $body_top = "--Message-Boundary\n"; + //$body_top.= "Content-type: text/plain; charset=US-ASCII\n"; + $body_top.= "Content-type: text/html\n"; + $body_top.= "Content-transfer-encoding: 7BIT\n"; + $body_top.= "Content-description: Mail message body\n\n"; + $msg_body = $body_top . $msg_body; + $msg_body.= "\n\n--Message-Boundary\n"; + $msg_body.= "Content-type: $file_type; name=\"$file\"\n"; + $msg_body.= "Content-Transfer-Encoding: BASE64\n"; + $msg_body.= "Content-disposition: attachment; filename=\"$file\"\n\n"; + $msg_body.= "$encoded_file\n"; + $msg_body.= "--Message-Boundary--\n"; + $email_log="Email was sent to '".$config["email_recipient"]."' with '".$dump["backupdatei"]."'."; + $email_out=$lang["email_was_send"]."`".$config["email_recipient"]."`".$lang['with']."`".$dump["backupdatei"]."`.
"; + } + } else { + //Multipart + $mp_sub="Backup '".$databases["Name"][$dump["dbindex"]]."' - ".date("d\.m\.Y",time()); + $msg_body = (($config["send_mail_dump"]==1) ? $lang["emailbody_mp1an"] : $lang["emailbody_mp1"]).$databases["Name"][$dump["dbindex"]].$lang['emailbody_mp1a']; + $subject = $mp_sub; + $header.= "FROM:".$config["email_sender"]."\n"; + $header .= "X-Mailer: PHP/" . phpversion(). "\n"; + $header .= "X-Sender-IP: $REMOTE_ADDR\n"; + $header .= "Content-Type: text/html"; + $body_top = ""; + $msg_body = $body_top . $msg_body; + //$msg_body.=$lang["emailbody2"]; + $dateistamm=substr($dump["backupdatei"],0,strrpos($dump["backupdatei"],"part_"))."part_"; + $dateiendung=($config["compression"]==1)?".sql.gz":".sql"; + $mpdatei=Array(); + for ($i=1;$i<($dump["part"]-$dump["part_offset"]);$i++) { + $mpdatei[$i-1]=$dateistamm.$i.$dateiendung; + $sz=byte_output(@filesize($config["paths"]["backup"].$mpdatei[$i-1])); + $msg_body.=$mpdatei[$i-1]." (".$sz.")
"; + } + $msg_body .=$lang["emailbody_mp2"]; + $email_log="Email was sent to '".$config["email_recipient"]."'"; + $email_out=$lang["email_was_send"]."`".$config["email_recipient"]."`
"; + } + if (@mail($config["email_recipient"], stripslashes($subject), $msg_body, $header)) { + $out.= ''.$email_out.''; + WriteLog("$email_log"); + } else { + $out.=''.$lang["mailerror"].'
'; + WriteLog("Email to '".$config["email_recipient"]."' failed !"); + ErrorLog("Email ",$databases["Name"][$dump["dbindex"]],'Subject: '.stripslashes($subject),$lang["mailerror"]); + $dump["errors"]++; + } + + if(isset($mpdatei) && $config["send_mail_dump"]==1) { // && ($config["email_maxsize"]==0 || ($config["email_maxsize"]>0 && $config["multipartgroesse2"]<=$config["email_maxsize"]))) { + for($i=0;$i"; + + if (@mail($config["email_recipient"], stripslashes($subject), $msg_body, $header)) { + $out.= ''.$email_out.''; + WriteLog("$email_log"); + } else { + $out.=''.$lang["mailerror"].'
'; + WriteLog("Email to '".$config["email_recipient"]."' failed !"); + ErrorLog("Email ",$databases["Name"][$dump["dbindex"]],'Subject: '.stripslashes($subject),$lang["mailerror"]); + $dump["errors"]++; + } + } + } +} + +function DoFTP() +{ + global $config,$dump,$out; + + if($config["multi_part"]==0) { + SendViaFTP($dump["backupdatei"],1); + } else { + $dateistamm=substr($dump["backupdatei"],0,strrpos($dump["backupdatei"],"part_"))."part_"; + $dateiendung=($config["compression"]==1)?".sql.gz":".sql"; + for ($i=1;$i<($dump["part"]-$dump["part_offset"]);$i++) { + $mpdatei=$dateistamm.$i.$dateiendung; + SendViaFTP($mpdatei,$i); + } + } + $out.=''."file sent via FTP (".$dump["backupdatei"]." => ".$config["ftp_server"][$config["ftp_connectionindex"]].")

"; +} + +function SendViaFTP($source_file,$conn_msg=1) +{ + global $config,$out,$lang; + flush(); + if($conn_msg==1) $out.=''.$lang['filesendftp']."(".$config["ftp_server"][$config["ftp_connectionindex"]]." - ".$config["ftp_user"][$config["ftp_connectionindex"]].")
"; + + + // Herstellen der Basis-Verbindung + if($config["ftp_useSSL"]==0) + $conn_id = ftp_connect($config["ftp_server"][$config["ftp_connectionindex"]], $config["ftp_port"][$config["ftp_connectionindex"]],$config["ftp_timeout"]); + else + $conn_id = ftp_ssl_connect($config["ftp_server"][$config["ftp_connectionindex"]], $config["ftp_port"][$config["ftp_connectionindex"]],$config["ftp_timeout"]); + // Einloggen mit Benutzername und Kennwort + $login_result = ftp_login($conn_id, $config["ftp_user"][$config["ftp_connectionindex"]], $config["ftp_pass"][$config["ftp_connectionindex"]]); + + // Verbindung überprüfen + if ((!$conn_id) || (!$login_result)) { + $out.= ''.$lang['ftpconnerror'].$config["ftp_server"][$config["ftp_connectionindex"]].$lang['ftpconnerror1'].$config["ftp_user"][$config["ftp_connectionindex"]].$lang['ftpconnerror2'].'
'; + exit; + } else { + if($conn_msg==1) $out.= ''.$lang['ftpconnected1'].$config["ftp_server"][$config["ftp_connectionindex"]].$lang['ftpconnerror1'].$config["ftp_user"][$config["ftp_connectionindex"]].'
'; + } + + // Upload der Datei + $dest=$config["ftp_dir"][$config["ftp_connectionindex"]].$source_file; + $source=$config["paths"]["backup"].$source_file; + $upload = @ftp_put($conn_id, $dest,$source , FTP_BINARY); + + // Upload-Status überprüfen + if (!$upload) { + $out.= ''.$lang['ftpconnerror3']."
($source -> $dest)

"; + } else { + $out.= ''.$lang['file'].' '.$source_file.''.$lang['ftpconnected2'].$config["ftp_server"][$config["ftp_connectionindex"]].$lang['ftpconnected3'].'
'; + WriteLog("'$source_file' sent via FTP."); + } + + // Schließen des FTP-Streams + @ftp_quit($conn_id); +} +?> \ No newline at end of file diff --git a/inc/functions_global.php b/inc/functions_global.php new file mode 100644 index 0000000..edede92 --- /dev/null +++ b/inc/functions_global.php @@ -0,0 +1,684 @@ +0) { + $s1=$s2=0; + for ($i = 0; $i < $databases["Detailinfo"]["tables"]; $i++) + { + $row = mysql_fetch_array($res); + $s1+=$row["Rows"]; + $s2+=$row["Data_length"]+$row["Index_length"]; + } + $databases["Detailinfo"]["records"]=$s1; + $databases["Detailinfo"]["size"]=$s2; + } +} + +//Globale Funktionen +function br($m=1) +{ + //gibt m Zeilenumbrüche zurück + return str_repeat("\n",$m); +} +function Stringformat($s,$count) +{ + return str_repeat("0",$count-strlen($s)).$s; +} +function getmicrotime() +{ + list($usec, $sec) = explode(" ",microtime()); + return ((float)$usec + (float)$sec); +} +function MD_FreeDiskSpace() +{ + global $lang; + $dfs=@diskfreespace("../"); + return ($dfs) ? byte_output($dfs) : $lang['notavail']; +} + +function WriteDynamicText($txt,$object) +{ + return ''; +} + +function byte_output($bytes, $precision = 2, $names = Array()) +{ + if (!is_numeric($bytes) || $bytes < 0) { + return false; + } + for ($level = 0; $bytes >= 1024; $level++) { + $bytes /= 1024; + } + switch ($level) + { + case 0: + $suffix = (isset($names[0])) ? $names[0] : 'Bytes'; + break; + case 1: + $suffix = (isset($names[1])) ? $names[1] : 'KB'; + break; + case 2: + $suffix = (isset($names[2])) ? $names[2] : 'MB'; + break; + case 3: + $suffix = (isset($names[3])) ? $names[3] : 'GB'; + break; + case 4: + $suffix = (isset($names[4])) ? $names[4] : 'TB'; + break; + default: + $suffix = (isset($names[$level])) ? $names[$level] : ''; + break; + } + return round($bytes, $precision) . ' ' . $suffix; +} + +function ExtractDBname($s) +{ + if(strpos(strtolower($s),"_structure_file")>0){ + return substr($s,0,strpos(strtolower($s),"_structure_file")); + break; + } + $sp=explode("_",$s); + $anz=count($sp)-1; + $r=0; + if($anz>4) { + $df=5; //Datumsfelder + if($sp[$anz-1]=="part") $df+=2; + if($sp[$anz-3]=="crondump" || $sp[$anz-1]=="crondump") $df+=2; + $anz=$anz-$df; //Datum weg + for($i=0;$i<=$anz;$i++){ $r+=strlen($sp[$i])+1;} + return substr($s,0,$r-1); + } else { + //Fremdformat + return substr($s,0,strpos($s,".")); + } +} +function ExtractBUT($s) +{ + $i=strpos(strtolower($s),"part"); + if($i>0) $s=substr($s,0,$i-1); + $i=strpos(strtolower($s),"crondump"); + if($i>0) $s=substr($s,0,$i-1); + $i=strpos(strtolower($s),".sql"); + if($i>0) $s=substr($s,0,$i); + $sp=explode("_",$s); + $anz=count($sp)-1; + if($anz>4) { + return $sp[$anz-2].".".$sp[$anz-3].".".$sp[$anz-4]." ".$sp[$anz-1].":".$sp[$anz]; + } else { + //Fremdformat + return ""; + } +} + +function WriteLog($aktion) +{ + global $config; + //Zeile zusammensetzen + $log=date("d.m.Y h:i:s").': '.$aktion."\n"; + //Datei öffnen und schreiben + $fp = @fopen($config["files"]["log"], "a+"); + + if($fp) { + @fwrite ($fp,($log)); + @fclose ($fp); + } else echo '

Log-File kann nicht geschrieben werden!

'; +} +function WriteTempOut($aktion) +{ + global $config; + + $fp = @fopen($config["paths"]["log"]."out.tmp", "w"); + + if($fp) { + @fwrite ($fp,$aktion); + @fclose ($fp); + } +} +function WritePageParams($aktion) +{ + global $config,$restore,$dump,$nl; + + $pars=" $val){ + if(is_array($val)) { + foreach($val as $var2 => $val2){ + if ($config["magic_quotes_gpc"]==0) { + $pars.='$dump["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"".addslashes($val2)."\";$nl"; + } else { + $pars.='$dump["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"$val2\";$nl"; + } + } + } else { + if ($config["magic_quotes_gpc"]==0) { + $pars.='$dump["'."$var\"] = \"".addslashes($val)."\";$nl"; + } else { + $pars.='$dump["'."$var\"] = \"$val\";$nl"; + } + } + } + } elseif($aktion=="restore") { + $datei="restore.tmp"; + foreach($restore as $var => $val){ + if(is_array($val)) { + foreach($val as $var2 => $val2){ + if ($config["magic_quotes_gpc"]==0) { + $pars.='$restore["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"".addslashes($val2)."\";$nl"; + } else { + $pars.='$restore["'."$var\"][".((is_int($var2)) ? $var2 : '"'.$var2.'"')."] = \"$val2\";$nl"; + } + } + } else { + if ($config["magic_quotes_gpc"]==0) { + $pars.='$restore["'."$var\"] = \"".addslashes($val)."\";$nl"; + } else { + $pars.='$restore["'."$var\"] = \"$val\";$nl"; + } + } + } + } + $pars.="$nl?>"; + $fp = @fopen($config["paths"]["log"].$datei, "w"); + + if($fp) { + @fwrite ($fp,$pars."\n"); + @fclose ($fp); + } +} +function ErrorLog($dest,$db,$sql,$error) +{ + global $config; + //Error-Zeile generieren + $errormsg=date("d.m.Y h:i:s").': '; + $errormsg.=($dest=="RESTORE") ? " Restore of db `$db`\n" : " Dump of db `$db`\n"; + $errormsg.="Error-Message: $error\n"; + $errormsg.="SQL : ".$sql."\n\n"; + //Datei öffnen und schreiben + $fp = @fopen($config["paths"]["log"]."error.log", "a+"); + + if($fp) { + @fwrite ($fp,($errormsg)); + @fclose ($fp); + } +} +function DirectoryWarnings($path="") +{ + global $config; + $warn=""; + if($path=="" || $path=="config") if(!is_writable($config["paths"]["config"])) $warn.='Configpath is not writable!   
'; + if($path=="" || $path=="backup") if(!is_writable($config["paths"]["backup"])) $warn.='Backuppath is not writable!   
'; + if($path=="" || $path=="structure") if(!is_writable($config["paths"]["structure"])) $warn.='Structurepath is not writable!   
'; + if($path=="" || $path=="log") if(!is_writable($config["paths"]["log"])) $warn.='Logpath is not writable!   
'; + if($warn!="") $warn='ERROR !
'.$warn.'
'; + return $warn; +} + +function TestWorkDir() +{ + global $config; + + //echo "work_chmod: $config["paths"]["work"]_chmod
"; + SetFileRechte($config["paths"]["work"]); + SetFileRechte($config["paths"]["backup"]); + SetFileRechte($config["paths"]["structure"]); + SetFileRechte($config["paths"]["log"]); + SetFileRechte($config["paths"]["config"]); + + if(!file_exists($config["files"]["parameter"])) SetDefault(); + if(!file_exists($config["files"]["log"])) DeleteLog(); +} + + +function SetFileRechte($file,$perm="0777") +{ + global $lang; + if(substr($file,-1)!="/") $file.="/"; + if(strlen($perm)!=4 || intval($perm)==0 || intval($perm)>777) $perm="0777"; + if( (ini_get('safe_mode')==1) && (!(is_dir($file))) ) + { + echo $lang['critical_safemode']; + return 0; + } else { + clearstatcache(); + if (!@is_dir($file)) @mkdir($file, $perm); + clearstatcache(); + $a=@substr(decoct(fileperms($file)),-4); + $ret=1; + if($a!=$perm && (ini_get('safe_mode')!=1)) { + $ret=@chmod($file,$perm); + } + return $ret; + } +} + + +function SelectDB($index) +{ + global $databases; + $databases["db_actual"] = $databases["Name"][$index]; + $databases["praefix"][$databases["db_selected_index"]] = $databases["praefix"][$index]; + $databases["db_selected_index"]=$index; +} + +function EmptyDB($dbn) +{ + $res=mysql_query("DROP DATABASE `$dbn`") or die(mysql_error().""); + $res=mysql_query("CREATE DATABASE `$dbn`") or die(mysql_error().""); + +} + +function AutoDelete() +{ + global $del_files, $config, $lang,$out; + + //Files einlesen + $dh = opendir($config["paths"]["backup"]); + $dbbackups=Array(); + while (false !== ($filename = readdir($dh))) + { + + + if ($filename != "." && $filename != ".." && !is_dir($config["paths"]["backup"].$filename)) { + //statuszeile auslesen + if(substr($filename,-2)=="gz"){ + $fp = gzopen ($config["paths"]["backup"].$filename, "r"); + $statusline=gzgets($fp,40960); + gzclose ($fp); + }else{ + $fp = fopen ($config["paths"]["backup"].$filename, "r"); + $statusline=fgets($fp,500); + fclose ($fp); + } + $sline=ReadStatusline($statusline); + if($sline[0]=="9999") { + $tabellenanzahl=""; + $eintraege=""; + } else { + $tabellenanzahl=$sline[0]; + $eintraege=$sline[1]; + } + $part=($sline[2]=="") ? 0 : substr($sline[2],3); + $databases["db_actual"]=$sline[3]; + $datum=substr($filename,strlen($databases["db_actual"])+1); + $datum=substr($datum,0,16); + if(isset($dbbackups[$databases["db_actual"]])) $dbbackups[$databases["db_actual"]]++; else $dbbackups[$databases["db_actual"]]=1; + $files[] = "$datum|".$databases["db_actual"]."|$part|$filename"; + } + } + + @rsort($files); + // Mehr Dateien vorhanden, als es laut config.php sein dürften? Dann weg damit :-) + + if($config["del_files_after_days"]>0) { + $nowtime=strtotime("-".($config["del_files_after_days"]+1)." day"); + for($i=0; $i 0) + { + if (sizeof($files) > $config["max_backup_files"]) + { + if($config["max_backup_files_each"]==1) { + //gilt es nur für jede Datenbank + for($i=sizeof($files)-1; $i>=0; $i--) + { + $delfile=explode("|",$files[$i]); + if($dbbackups[$delfile[1]] > $config["max_backup_files"]) + { + $out.=DeleteFile($files[$i],"max"); + unset($files[$i]); + $dbbackups[$delfile[1]]--; + } + } + } else { + //oder gilt es für alle Backups + for($i=sizeof($files)-1; $i>=$config["max_backup_files"]; $i--) + { + $delfile=implode("|",$files); + $out.=DeleteFile($files[$i],"max"); + unset($files[$i]); + } + } + } + } + + + + return $out; +} + +function DeleteFile($files,$function) +{ + global $config,$lang; + $delfile=explode("|",$files); + $ll=($function=="max") ? $lang["fm_autodel1"]:$lang["fm_autodel2"]; + $r="".$ll."
"; + $r.= $delfile[3]."
"; + WriteLog("autodeleted ($function) '$delfile[3]'."); + unlink($config["paths"]["backup"].$delfile[3]); + $r.= "
"; + return $r; +} + +function ReadStatusline($line) +{ + //Format # Status:Tabellen:Datensätze:Multipart:DBname + if(substr($line,0,8)!="# Status") { + $s=Array("-1","-1","","","","","",""); + } else { + $s=explode(":",$line); + array_shift($s); + if(count($s)<7) { + for($i=count($s);$i<8;$i++) {$s[]="";} + } + } + return $s; +} +function NextPart($s,$first=0) { + + $nf=explode("_",$s); + $i=array_search("part",$nf)+1; + $p=substr($nf[$i],0,strpos($nf[$i],".")); + $ext=substr($nf[$i],strlen($p)); + if($first==1) { + $nf[$i]="1".$ext; + } else { + $nf[$i]=++$p.$ext; + } + return implode("_",$nf); +} + +function zeit_format($t) +{ + $tt_m=floor($t/60); + $tt_s=$t-($tt_m*60); + return $tt_m.' min. '.floor($tt_s).' sec'; +} + +function ErrorReport() +{ + global $config,$PHP_SELF,$PATH,$PATH_TRANSLATED,$SCRIPT_FILENAME,$SCRIPT_NAME,$email,$_SERVER; + + $error_kind=$error_aus=""; + if(isset($_POST["p"]) && $_POST["p"]==1) { + //von Programmfehler geposted + $error_kind=$_POST["error_kind"]; + $error_aus=$_POST["error_aus"]; + } + if(isset($_POST["create_sql"])) { + //vom Parser + $error_kind="Parser-Fehler"; + $error_aus=stripslashes(trim($_POST["create_sql"]))."\n\n\n".stripslashes(trim($_POST["insert_sql"])); + } + $subject = "Fehlerbericht vom ".date("d.m.Y H:s"); + + + $r= '
'; + $r.='
'; + $r.=''; + $r.=''; + $r.=''; + $r.=''; + $r.=''; + + $vi= ''; + $vi.= ''; + $vi.= ''; + //$vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + $vi.= ''; + + $evars=str_replace("',"",$evars); + $evars=str_replace('',"",$evars); + $evars=str_replace('',"\n",$evars); + + + + //Form-vars + $r.=$vi.''; + $r.=''; + $r.=''; + + $r.= ''; + + + $r.= "

'.$subject.'

Absender
Name
Art des Fehlers
Anzeige des Fehlers
zusätzliche Bemerkungen
MySQLDump-Version'.$config["version"].'
MySQL-Version'.MSD_MYSQL_VERSION.'
PHP-Version'.phpversion().'
PHP-Extensions'.implode(" ",get_loaded_extensions()).'
safe_mode'.(($config["safe_mode"]==1) ? "on" : "off").'
magic_quotes'.(($config["magic_quotes_gpc"]==1) ? "on" : "off").'
Variable rootdir'.addslashes($config["paths"]["root"]).'
Server PHP_SELF'.$_SERVER["PHP_SELF"].'
Server Path'. addslashes($_SERVER["PATH"]).'
Server Script-Filename'.$_SERVER["SCRIPT_FILENAME"].'
Server Script-Name'.$_SERVER["SCRIPT_NAME"].'
Global PHP_SELF'.$PHP_SELF.'
Global Path'. addslashes($PATH).'
Global Path-Translated'. addslashes($PATH_TRANSLATED).'
Global Script-Filename'.addslashes($SCRIPT_FILENAME).'
Global Script-Name'.addslashes($SCRIPT_NAME).'
","",$vi); + $evars=str_replace('',"",$evars); + $evars=str_replace('
Home
"; + return $r; +} + +function DynOutput($s,$fertig=0) { + + global $config; + + $out="out.html"; + $tempDatei=$config["paths"]["log"].$out; + $tempURL="work/log/".$out; + + + if($fertig==0) { + //$meta=''."\n"; + $meta.=''."\n"; + $meta.=''; + + } else { + + } + //Header für HTML + $h="\n\n".$meta."\nMySqlDumper\n"; + $h.="\n\n\n"; + //Footer + $f=''; + $page=$h.$s.$f; + + $f=fopen($tempDatei,"w"); + fwrite($f,$page); + fclose($f); + echo ''; + + /*echo "
$page
"; + die;*/ +} + +function TesteFTP($ftp_server,$ftp_port,$ftp_user_name,$ftp_user_pass,$ftp_dir) +{ + global $lang,$config; + if($ftp_port=="" || $ftp_port==0) $ftp_port=21; + $pass=-1; + if(!extension_loaded("ftp")) { + $s=''.$lang['noftppossible'].''; + } else $pass=0; + + if($pass==0) { + if($ftp_server=="" || $ftp_user_name=="" || $ftp_user_pass=="") { + $s=''.$lang['wrongconnectionpars'].''; + } else $pass=1; + } + + + if($pass==1) { + $s=$lang['connect_to'].' `'.$ftp_server.'` Port '.$ftp_port.' ... '; + + if($config["ftp_useSSL"]==0) + $conn_id = @ftp_connect($ftp_server,$ftp_port,$config["ftp_timeout"]); + else + $conn_id = @ftp_ssl_connect($ftp_server,$ftp_port,$config["ftp_timeout"]); + + $login_result = @ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + if(!$conn_id || (!$login_result)) { + $s.=''.$lang['conn_not_possible'].''; + } else $pass=2; + } + + if($pass==2) { + $s.='ok, logged in
'.$lang['changedir'].' `'.$ftp_dir.'` ... '; + $dirc=@ftp_chdir($conn_id,$ftp_dir); + if(!$dirc) { + $s.='
'.$lang['changedirerror'].''; + } else $pass=3; + @ftp_close($conn_id); + } + if($pass==3) $s.='

'.$lang['ftp_ok'].''; + return $s; +} + +function headline() { + global $config; + if($config["interface_server_caption"]==1) return ''; +} + +function buildComplement ($color) { + + $komp = -1; + + if (preg_match('/^#[0-9A-F]{1,6}$/i', $color)) { + + $red_str = substr($color, 1, 2); + $green_str = substr($color, 3, 2); + $blue_str = substr($color, 5, 2); + + $red_int = 255 - base_convert($red_str, 16, 10); + $green_int = 255 - base_convert($green_str, 16, 10); + $blue_int = 255 - base_convert($blue_str, 16, 10); + + $red_str = base_convert($red_int, 10, 16); + $green_str = base_convert($green_int, 10, 16); + $blue_str = base_convert($blue_int, 10, 16); + + if (strlen($red_str) == 1) $red_str = '0' . $red_str; + if (strlen($green_str) == 1) $green_str = '0' . $green_str; + if (strlen($blue_str) == 1) $blue_str = '0' . $blue_str; + + $komp = '#' . strtoupper($red_str) . strtoupper($green_str) . strtoupper($blue_str); + + } else return $komp; + + return $komp; + + } + +function dump($v) +{ + // Ausgabe von var_dump über Output-Buffer in Variable einlesen + + ob_start (); + var_dump ($v); + $content = ob_get_contents (); + ob_end_clean (); + + // maximale Einrückung ermitteln + $m = 0; + #1 + preg_match_all ('#^(.*)=>#mU', $content, $stack); + $lines = $stack[1]; + $indents = array_map ('strlen', $lines); + if ($indents) { + $m = max ($indents) + 1; + } + #2 + // Ausgabe von var_dump() an maximaler Einrückung ausrichten + $content = preg_replace ('#^(.*)=>\\n\s+(\S)#eUm', '"\\1" .str_repeat(" ", $m - strlen("\\1")>1 ? $m - strlen("\\1") : 1). "\\2"',$content); + // bei Array-Strukturen öffnende Klammer { in neue Zeile + $content = preg_replace ( '#^((\s*).*){$#m', "\\1\n\\2{", $content); + + echo '
'. htmlentities($content). '
'; + +} + +function Realpfad($p) { + global $config; + if(!isset($config["disabled"])) $config["disabled"]=ini_get("disable_functions"); + if(strpos($config["disabled"],"realpath")) + $s=getcwd(); + else + $s=realpath($p); + $s=str_replace("\\","/",$s); + if(substr($s,-1)!="/") $s.="/"; + return $s; +} + +function GetPerlConfigs() { + global $config; + $default=$config["cron_configurationfile"]; + $dh = opendir($config["paths"]["config"]); + $r=""; + while (false !== ($filename = readdir($dh))) + { + if ($filename != "." && $filename != ".." && !is_dir($config["paths"]["config"].$filename) && substr($filename,-5)==".conf") { + $f=substr($filename,0,strlen($filename)-5); + $r.='
[offene Klammern: $klammerstart] --$rit
"; + + } + return $anz; +} + +function SQL_Is_Complete($s,$debug=0) +{ + $anz=$f_begin=$f_end=0; + $Backslash=chr(92); + $s=trim(strtoupper(($s))); + $s=substr($s,0,strlen($s)-2); + + $i=strpos($s," VALUES")+7; + $s=substr($s,$i); + $i=strpos($s,"(")+1; + $s=substr($s,$i); + + $tb=explode(",",$s); + for ($i=0;$i2) { + + $f_end=1; + } elseif (($B_Delimiter % 2)==1 && strlen($v)>2) { + //ist mit `'` maskiert + $f_end=0; + } elseif(($B_Esc % 2)==1) { + //ist mit Backslash maskiert + $f_end=0; + } else { + + $f_end=1; + } + } + } + if($debug==1) echo "$f_begin/$f_end Feld $i: ".htmlspecialchars($tb[$i])."- $anz ($B_Ticks / $B_Esc)
"; + if($f_begin==1 && $f_end==1) { + $anz++; + + $f_begin=$f_end=0; + } + + } + return $anz; + + +} + + + +?> \ No newline at end of file diff --git a/inc/functions_sql.php b/inc/functions_sql.php new file mode 100644 index 0000000..8ca5e08 --- /dev/null +++ b/inc/functions_sql.php @@ -0,0 +1,788 @@ +0) { + $SQL_ARRAY=file($sf); + } +} +function WriteSQL() +{ + global $SQL_ARRAY,$config; + $sf=$config["paths"]["config"].'sql_statements'; + $str=""; + for($i=0;$i'.$nl; + $s.=''.$nl; + if(count($SQL_ARRAY)>0) { + for($i=0;$i'.SQL_Name($i).''.$nl; + } + } + $s.=''.$nl.$nl; + return $s; +} + +function Table_ComboBox() +{ + global $db,$config,$lang,$nl; + $tabellen = mysql_list_tables($db,$config["dbconnection"]); + $num_tables = mysql_num_rows($tabellen); + $s=$nl.$nl.''.$nl.$nl; + return $s; +} + +function DB_Exists($db) +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $erg=false; + $dbs=mysql_list_dbs($config["dbconnection"]); + while ($row = mysql_fetch_object($dbs)) { + if(strtolower($row->Database)==strtolower($db)) { + $erg=true;break; + } + } + return $erg; +} +function Table_Exists($db,$table) +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $erg=false; + $sqlt="SHOW TABLES FROM `$db`"; + $res=MSD_query($sqlt) or die(SQLError($sqlt,mysql_error())); + + if($res) { + $row = mysql_fetch_row($res); + if(strtolower($row[0])==strtolower($table)) { + $erg=true; + } + } else die("ERROR"); + return $erg; +} + +function DB_Empty($dbn) +{ + $r="DROP DATABASE `$dbn`;\nCREATE DATABASE `$dbn`;"; + MSD_DoSQL($r); + +} + +function DB_Copy($source,$destination,$drop_source=0,$insert_data=1) +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $SQL_Array=$t=""; + if(!DB_Exists($destination)) $SQL_Array.="CREATE DATABASE `$destination` ;\n"; + $SQL_Array.="USE `$destination` ;\n"; + $tabellen = mysql_list_tables($source,$config["dbconnection"]); + $num_tables = mysql_num_rows($tabellen); + for($i=0;$i<$num_tables;$i++) { + $table=mysql_tablename($tabellen,$i); + $sqlt="SHOW CREATE TABLE `$source`.`$table`"; + $res=MSD_query($sqlt) or die(SQLError($sqlt,mysql_error())); + $row=mysql_fetch_row($res); + $c=$row[1]; if(substr($c,-1)==";") $c=substr($c,0,strlen($c)-1); + $SQL_Array.=($insert_data==1) ? "$c SELECT * FROM `$source`.`$table` ;\n" : "$c ;\n"; + } + if($drop_source==1) $SQL_Array.="DROP DATABASE `$source` ;"; + + mysql_select_db($destination); + MSD_DoSQL($SQL_Array); + +} +function Table_Copy($source,$destination,$insert_data,$destinationdb="") +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $SQL_Array=$t=""; + $sqlc="SHOW CREATE TABLE $source"; + $res=MSD_query($sqlc) or die(SQLError($sqlc,mysql_error())); + $row=mysql_fetch_row($res); + $c=$row[1]; + $a1=strpos($c,"`"); + $a2=strpos($c,"`",$a1+1); + $c=substr($c,0,$a1+1).$destination.substr($c,$a2); + if(substr($c,-1)==";") $c=substr($c,0,strlen($c)-1); + $SQL_Array.=($insert_data==1) ? "$c SELECT * FROM $source ;\n" : "$c ;\n"; + //echo "
$SQL_Array
"; + MSD_DoSQL($SQL_Array); + +} +function MSD_DoSQL($sqlcommands,$limit="") +{ + + global $config,$out,$numrowsabs,$numrows,$num_befehle,$time_used,$sql; + + if(!isset($sql["parser"]["sql_commands"])) $sql["parser"]["sql_commands"]=0; + if(!isset($sql["parser"]["sql_errors"])) $sql["parser"]["sql_errors"]=0; + + $sql["parser"]["time_used"]=getmicrotime(); + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $out=$sqlcommand=""; + $allSQL=explode("\n",$sqlcommands); + $sql_queries=count($allSQL); + if(!isset($allSQL[$sql_queries-1])) $sql_queries--; + if($sql_queries==1) { + SQLParser($allSQL[0]); + $sql["parser"]["sql_commands"]++; + $out.=Stringformat(($sql["parser"]["sql_commands"]),4).": ". $allSQL[0]."\n"; + $result =MSD_query($allSQL[0]) or die(SQLError($allSQL[0],mysql_error())); + + } else { + + for($i=0;$i<$sql_queries; $i++) { + $allSQL[$i]=trim(rtrim($allSQL[$i])); + if($allSQL[$i]!="") { + $sqlcommand.=$allSQL[$i]; + SQLParser($sqlcommand); + if($sql["parser"]["start"]==0 && $sql["parser"]["end"]==0) { + //sql complete + $sql["parser"]["sql_commands"]++; + $out.=Stringformat(($sql["parser"]["sql_commands"]),4).": ". $sqlcommand."\n"; + $result =MSD_query($sqlcommand) or die(SQLError($sqlcommand,mysql_error())); + $sqlcommand=""; + } + } + } + } + $sql["parser"]["time_used"]=getmicrotime()-$sql["parser"]["time_used"]; +} + +function SQLParser($s,$debug=0) +{ + global $sql; + $sql["parser"]["start"]=$sql["parser"]["end"]=0; + $sql["parser"]["sqlparts"]=0; + if(!isset($sql["parser"]["drop"])) $sql["parser"]["drop"]=0; + if(!isset($sql["parser"]["create"])) $sql["parser"]["create"]=0; + if(!isset($sql["parser"]["insert"])) $sql["parser"]["insert"]=0; + if(!isset($sql["parser"]["update"])) $sql["parser"]["update"]=0; + if(!isset($sql["parser"]["comment"])) $sql["parser"]["comment"]=0; + $Backslash=chr(92); + $s=rtrim(trim(strtoupper(($s)))); + + //Was ist das für eine Anfrage ? + if(substr($s,0,1)=="#" || substr($s,0,2)=="--") { + $sql["parser"]["comment"]++; + } elseif(substr($s,0,5)=="DROP ") { + $sql["parser"]["drop"]++; + } elseif(substr($s,0,7)=="CREATE ") { + //Hier nur die Anzahl der Klammern zählen + $sql["parser"]["start"]=1; + $kl1=substr_count($s,"("); + $kl2=substr_count($s,")"); + if($kl2-$kl1==0) { + $sql["parser"]["start"]=0; + $sql["parser"]["create"]++; + } + } elseif(substr($s,0,7)=="INSERT " || substr($s,0,7)=="UPDATE ") { + + if(substr($s,0,7)=="INSERT ") $sql["parser"]["insert"]++; else $sql["parser"]["update"]++; + $i=strpos($s," VALUES")+7; + $s=substr($s,$i); + $i=strpos($s,"(")+1; + $s=substr($s,$i); + $s=substr($s,0,strlen($s)-2); + + $tb=explode(",",$s); + for ($i=0;$i2) { + + $sql["parser"]["end"]=1; + } elseif (($B_Delimiter % 2)==1 && strlen($v)>2) { + //ist mit `'` maskiert + $sql["parser"]["end"]=0; + } elseif(($B_Esc % 2)==1) { + //ist mit Backslash maskiert + $sql["parser"]["end"]=0; + } else { + + $sql["parser"]["end"]=1; + } + } + } + if($debug==1) echo "".$sql["parser"]["start"]."/".$sql["parser"]["end"]." Feld $i: ".htmlspecialchars($tb[$i])."- ".$sql["parser"]["sqlparts"]." ($B_Ticks / $B_Esc)
"; + if($sql["parser"]["start"]==1 && $sql["parser"]["end"]==1) { + $sql["parser"]["sqlparts"]++; + + $sql["parser"]["start"]=$sql["parser"]["end"]=0; + } + } + } +} + +function SQLOutput($sqlcommand,$meldung="") +{ + global $sql,$lang; + $s= '
'; + if($meldung!="") $s.='

'.$meldung.'

'; + $s.='
'.$lang['sql_output'].'
'; + $s.=''.$sql["parser"]["sql_commands"].''.$lang['sql_commands_in'].round($sql["parser"]["time_used"],4).$lang['sql_commands_in2'].'

'; + $s.=$lang['sql_out1'].''.$sql["parser"]["drop"].' DROP-, '; + $s.=''.$sql["parser"]["create"].' CREATE-, '; + $s.=''.$sql["parser"]["insert"].' INSERT-, '; + $s.=''.$sql["parser"]["update"].' UPDATE-'.$lang['sql_out2'].'
'; + $s.=$lang['sql_out3'].''.$sql["parser"]["comment"].' '.$lang['sql_out4'].'
'; + if($sql["parser"]["sql_commands"]<5000) + $s.='
'.highlight_sql($sqlcommand).'
'; + else $s.=$lang['sql_out5']."
"; + return $s; +} + + + +function GetCreateTable($db,$tabelle) +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $res=mysql_query("SHOW CREATE TABLE `$db`.`$tabelle`"); + if($res) { + $row=mysql_fetch_array($res); + return $row["Create Table"]; + } else return mysql_error(); + +} + +function KindSQL($sql) +{ + if (preg_match('@^((-- |#)[^\n]*\n|/\*.*?\*/)*(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)@im', $sql)) { + return 2; + } elseif (preg_match('@^((-- |#)[^\n]*\n|/\*.*?\*/)*(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)@im', $sql)) { + return 1; + } +} + + + + +function GetPostParams() +{ + global $db,$dbid,$tablename,$context,$limitstart,$order,$orderdir,$sql; + $db=$_POST["db"]; + $dbid=$_POST["dbid"]; + $tablename=$_POST["tablename"]; + $context=$_POST["context"]; + $limitstart=$_POST["limitstart"]; + $order=$_POST["order"]; + $orderdir=$_POST["orderdir"]; + $sql["sql_statement"]=(isset($_POST["sql"])) ? stripslashes(urldecode($_POST["sql"])) : "SELECT * FROM `$tablename`"; + +} + +function ComboCommandDump($when,$index) +{ + global $SQL_ARRAY,$nl,$databases; + + if($when==0) { + $r=''; + $csql=$databases["command_after_dump"][$index]; + } + + $r.=''; + if(count($SQL_ARRAY)>0) { + for($i=0;$i'.SQL_Name($i).''.$nl; + } + } + + $r.=''; + return $r; +} + +function EngineCombo($default="") +{ + global $config; + if(!$config["dbconnection"]) MSD_mysql_connect(); + + $r=''; + if(!MSD_NEW_VERSION) { + //BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM + $r.=''; + $r.=''; + $r.=''; + $r.=''; + $r.=''; + $r.=''; + $r.=''; + } else { + $res=mysql_query("SHOW ENGINES"); + $num = mysql_num_rows($res); + for($i=0;$i<$num;$i++) { + $row=mysql_fetch_array($res); + $r.=''; + } + } + return $r; +} + +function CharsetCombo($default="") +{ + global $config; + if(!MSD_NEW_VERSION) { return ""; + } else { + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + $res=mysql_query("SHOW Charset"); + $num = mysql_num_rows($res); + $r=''; + for($i=0;$i<$num;$i++) { + $row=mysql_fetch_array($res); + $r.=''; + } + return $r; + } +} + +function GetCollationArray() +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + + $res=mysql_query("SHOW Collation"); + $num = mysql_num_rows($res); + $r=Array(); + for($i=0;$i<$num;$i++) { + $row=mysql_fetch_array($res); + $r[$i]["Collation"]=$row["Collation"]; + $r[$i]["Charset"]=$row["Charset"]; + $r[$i]["Id"]=$row["Id"]; + $r[$i]["Default"]=$row["Default"]; + $r[$i]["Compiled"]=$row["Compiled"]; + $r[$i]["Sortlen"]=$row["Sortlen"]; + } + return $r; +} + +function CollationCombo($default="") +{ + + + if(!MSD_NEW_VERSION) { + return ""; + } else { + $r=GetCollationArray(); + sort($r); + $s=""; + $s=''; + $group=""; + for($i=0;$i'; + } + $s.=''; + } + return $s; + } +} + +function simple_bbcode_conversion($a) +{ + global $config; + $tag_start='
'; + $tag_end='
'; + + //replacements + $a=nl2br($a); + + $a=preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/si","$2",$a); + $a=preg_replace("/\[urltargetself=(.*?)\](.*?)\[\/urltargetself\]/si","$2",$a); + $a=preg_replace("/\[url\](.*?)\[\/url\]/si","$1",$a); + $a=preg_replace("/\[ed2k=\+(.*?)\](.*?)\[\/ed2k\]/si","$2",$a); + $a=preg_replace("/\[ed2k=(.*?)\](.*?)\[\/ed2k\]/si","$2",$a); + + $a=preg_replace("/\[center\](.*?)\[\/center\]/si", "
$1
", $a); + $a=preg_replace("/\[size=([1-2]?[0-9])\](.*?)\[\/size\]/si", "$2", $a); + $a=preg_replace("/\[size=([1-2]?[0-9]):(.*?)\](.*?)\[\/size(.*?)\]/si", "$3", $a); + $a=preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/si", "$2", $a); + $a=preg_replace("/\[color=(.*?)\](.*?)\[\/color\]/si", "$2", $a); + $a=preg_replace("/\[color=(.*?):(.*?)\](.*?)\[\/color(.*?)\]/si", "$3", $a); + $a=preg_replace("/\[img\](.*?)\[\/img\]/si", "", $a); + $a=preg_replace("/\[b\](.*?)\[\/b\]/si", "$1", $a); + $a=preg_replace("/\[b(.*?)\](.*?)\[\/b(.*?)\]/si", "$2", $a); + $a=preg_replace("/\[u\](.*?)\[\/u\]/si", "$1", $a); + $a=preg_replace("/\[u(.*?)\](.*?)\[\/u(.*?)\]/si", "$2", $a); + $a=preg_replace("/\[i\](.*?)\[\/i\]/si", "$1", $a); + $a=preg_replace("/\[i(.*?)\](.*?)\[\/i(.*?)\]/si", "$2", $a); + $a=preg_replace("/\[quote\](.*?)\[\/quote\]/si", "

$1

", $a); + $a=preg_replace("/\[quote:(.*?)\](.*?)\[\/quote(.*?)\]/si", "

$2

", $a); + $a=preg_replace("/\[code:(.*?)\](.*?)\[\/code(.*?)\]/si", "

$2

", $a); + $a=preg_replace("/\[hide\](.*?)\[\/hide\]/si", "
$1
", $a); + + $a=preg_replace("/[[:space:]]http:\/\/(.*?)[[:space:]]/si","$1",$a); + + + + + return $tag_start.$a.$tag_end; + +} + +function ExtractTablename($q) +{ + $offset=0; + $p=strtoupper($q); + $i=strpos($p,"FROM")+5; + $p=substr($p,$i); + if(substr($p,0,1)=="("){ + $offset=2; + echo "$offset
"; + } + if(strpos($p," ",$offset)) { + $j=strpos($p," ",$offset); + $p=substr($p,$offset,$j); + } + $t=substr($q,$i+$offset,strlen($p)-$offset); + if(substr($t,-1)==",") { + //Achtung, keine eindeutige Tabelle + $t=''; + } + if(substr($t,0,1)=="`" && substr($t,-1)=="`") $t=substr($t,1,strlen($t)-2); + return $t; +} + +function GetOptionsCombo($arr,$default) +{ + global $feldtypen,$feldattribute,$feldnull,$feldextras,$feldkeys,$feldrowformat; + $r=""; + foreach ($arr as $s) { + $r.=''."\n"; + } + return $r; +} + +function DefaultFieldVals() +{ + $dfv=Array(); + $dfv["VARCHAR"]["defaultsize"]=255; + $dfv["VARCHAR"]["maxsize"]=255; + + $dfv["TINYINT"]["defaultsize"]=255; + $dfv["TINYINT"]["maxsize"]=255; + + $dfv["TEXT"]["defaultsize"]=""; + $dfv["TEXT"]["maxsize"]=65535; + + + $dfv["DATE"]["defaultsize"]=255; + $dfv["DATE"]["maxsize"]=255; + + $dfv["SMALLINT"]["defaultsize"]=255; + $dfv["SMALLINT"]["maxsize"]=255; + + $dfv["MEDIUMINT"]["defaultsize"]=255; + $dfv["MEDIUMINT"]["maxsize"]=255; + + $dfv["INT"]["defaultsize"]=11; + $dfv["INT"]["maxsize"]=16; + + $dfv["BIGINT"]["defaultsize"]=255; + $dfv["BIGINT"]["maxsize"]=255; + + $dfv["FLOAT"]["defaultsize"]=255; + $dfv["FLOAT"]["maxsize"]=255; + + $dfv["DOUBLE"]["defaultsize"]=255; + $dfv["DOUBLE"]["maxsize"]=255; + + $dfv["DECIMAL"]["defaultsize"]=255; + $dfv["DECIMAL"]["maxsize"]=255; + + $dfv["DATETIME"]["defaultsize"]=255; + $dfv["DATETIME"]["maxsize"]=255; + + $dfv["TIMESTAMP"]["defaultsize"]=255; + $dfv["TIMESTAMP"]["maxsize"]=255; + + $dfv["TIME"]["defaultsize"]=255; + $dfv["TIME"]["maxsize"]=255; + + $dfv["YEAR"]["defaultsize"]=255; + $dfv["YEAR"]["maxsize"]=255; + + $dfv["CHAR"]["defaultsize"]=255; + $dfv["CHAR"]["maxsize"]=255; + + $dfv["TINYBLOB"]["defaultsize"]=255; + $dfv["TINYBLOB"]["maxsize"]=255; + + $dfv["TINYTEXT"]["defaultsize"]=255; + $dfv["TINYTEXT"]["maxsize"]=255; + + $dfv["BLOB"]["defaultsize"]=255; + $dfv["BLOB"]["maxsize"]=255; + + $dfv["MEDIUMBLOB"]["defaultsize"]=255; + $dfv["MEDIUMBLOB"]["maxsize"]=255; + + $dfv["MEDIUMTEXT"]["defaultsize"]=255; + $dfv["MEDIUMTEXT"]["maxsize"]=255; + + $dfv["LONGBLOB"]["defaultsize"]=255; + $dfv["LONGBLOB"]["maxsize"]=255; + + $dfv["LONGTEXT"]["defaultsize"]=255; + $dfv["LONGTEXT"]["maxsize"]=255; + + $dfv["ENUM"]["defaultsize"]=255; + $dfv["ENUM"]["maxsize"]=255; + + $dfv["SET"]["defaultsize"]=255; + $dfv["SET"]["maxsize"]=255; + + return $dfv; +} +function FillFieldinfos($db,$tabelle) +{ + global $config; + + $t=GetCreateTable($db,$tabelle); + $fields_infos=Array(); + $fields_infos["_primarykey_"]=""; + $flds=$keys=$ukeys=$fkeys=0; + $fields_infos["_createtable_"]=$t; + $tmp=explode("\n",$t); + for($i=1;$i"; + + if(substr($t,0,12)=="PRIMARY KEY ") { + $t=str_replace("`","",$t); + $fields_infos["_primarykey_"]=substr($t,strpos($t,"(")+1,strpos($t,")")-strpos($t,"(")-1); + } elseif (substr($t,0,4)=="KEY ") { + $t=str_replace("`","",$t); + $att=explode(" ",$t); + $fields_infos["_key_"][$keys]["name"]=$att[1]; + $att[2]=str_replace("(","",$att[2]); + $att[2]=str_replace(")","",$att[2]); + $fields_infos["_key_"][$keys]["columns"]=$att[2]; + $keys++; + } elseif (substr($t,0,11)=="UNIQUE KEY ") { + $t=str_replace("`","",$t); + $att=explode(" ",$t); + $fields_infos["_uniquekey_"][$ukeys]["name"]=$att[2]; + $att[3]=str_replace("(","",$att[3]); + $att[3]=str_replace(")","",$att[3]); + $fields_infos["_uniquekey_"][$ukeys]["columns"]=$att[3]; + $ukeys++; + } elseif (substr($t,0,13)=="FULLTEXT KEY ") { + $t=str_replace("`","",$t); + $att=explode(" ",$t); + $fields_infos["_fulltextkey_"][$fkeys]["name"]=$att[2]; + $att[3]=str_replace("(","",$att[3]); + $att[3]=str_replace(")","",$att[3]); + $fields_infos["_fulltextkey_"][$fkeys]["columns"]=$att[3]; + $fkeys++; + } else { + + $att=explode(" ",$t); + + if(substr($att[0],0,1)=="`" && substr($att[0],-1)=="`") { + $fields_infos[$flds]["name"]=str_replace("`","",$att[0]); + $s=1; + } else { + $fields_infos[$flds]["name"]=str_replace("`","",$att[0])." "; + for($ii=1;$i"; + $s++; + } + } + + $flds++; + } + + + + } + //echo substr($tmp[count($tmp)-1],2)."
"; + $ext=explode(" ",substr($tmp[count($tmp)-1],2)); + $s="";$haltchar="="; + for($i=0;$i"; + + if($ok[0]==0 && $nk[0]==1) { + $s.="ADD PRIMARY KEY (`$fld`), "; + } elseif ($ok[0]==1 && $nk[0]==0) { + $s.="DROP PRIMARY KEY, "; + } + if($ok[1]==0 && $nk[1]==1) { + $s.="ADD UNIQUE INDEX `$fld` (`$fld`), "; + } elseif ($ok[1]==1 && $nk[1]==0) { + $s.="DROP INDEX `$fld`, "; + } + if($ok[2]==0 && $nk[2]==1) { + $s.="ADD INDEX `$fld` (`$fld`), "; + } elseif ($ok[2]==1 && $nk[2]==0) { + $s.="DROP INDEX `$fld`, "; + } + if($ok[3]==0 && $nk[3]==1) { + $s.="ADD FULLTEXT INDEX `$fld` (`$fld`($size)), "; + } elseif ($ok[3]==1 && $nk[3]==0) { + $s.="DROP FULLTEXT INDEX `$fld`, "; + } + } + if($s!="") $s=substr($s,0,strlen($s)-2); + return $s; +} +?> \ No newline at end of file diff --git a/inc/header.php b/inc/header.php new file mode 100644 index 0000000..4a27b54 --- /dev/null +++ b/inc/header.php @@ -0,0 +1,23 @@ + + + + + +MySqlDumper + + + + + + \ No newline at end of file diff --git a/inc/mysql.php b/inc/mysql.php new file mode 100644 index 0000000..3687635 --- /dev/null +++ b/inc/mysql.php @@ -0,0 +1,83 @@ + "http://dev.mysql.com/doc/mysql/de/Column_types.html"); + + +function MSD_mysql_connect() +{ + global $config,$databases; + $port=(isset($config["dbport"]) && !empty($config["dbport"])) ? ":".$config["dbport"] : ""; + $socket=(isset($config["dbsocket"]) && !empty($config["dbsocket"])) ? ":".$config["dbsocket"] : ""; + $config["dbconnection"] = @mysql_connect($config["dbhost"].$port.$socket,$config["dbuser"],$config["dbpass"]) or die(SQLError("Datenbankverbindung",mysql_error())); + if(!defined('MSD_MYSQL_VERSION')) GetMySQLVersion(); +} + +function GetMySQLVersion() +{ + $res=MSD_query("select version()"); + $row = mysql_fetch_array($res); + $version=$row[0]; + $new=(substr($version,0,3)>=4.1); + if(!defined('MSD_MYSQL_VERSION')) define('MSD_MYSQL_VERSION', $version); + if(!defined('MSD_NEW_VERSION')) define('MSD_NEW_VERSION',$new); +} + +function MSD_query($query) +{ + global $config; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + return @mysql_query($query, $config["dbconnection"]); + +} + +function MSD_mysql_error() +{ + global $config,$databases; + +} + +function SQLError($sql,$error) +{ + global $lang; + echo '
+ + + +
MySQL-ERROR
'.$lang['sql_error1'].'

'.highlight_sql($sql).'
'.$lang['sql_error2'].'

'.$error.'
+
'; + +} + +function Highlight_SQL($sql) +{ + global $sql_keywords; + $tmp="/".implode("/ /",$sql_keywords)."/"; + $tmp_array=explode(" ",$tmp); + $tmp="".implode("###",$sql_keywords).""; + $tmp_replace=explode("###",$tmp); + + $sql=nl2br(htmlentities($sql)); + $sql=preg_replace("/`(.*?)`/si", "`$1`", $sql); + str_replace("{","{
    ",$sql); + str_replace("}","}
",$sql); + str_replace("*","*",$sql); + $sql=preg_replace($tmp_array, $tmp_replace, $sql); + + return $sql; +} +?> diff --git a/inc/runtime.php b/inc/runtime.php new file mode 100644 index 0000000..9f233d7 --- /dev/null +++ b/inc/runtime.php @@ -0,0 +1,65 @@ +'.print_r($p3,true).''; +//Tuning-Ecke +$config["tuning_add"]=1.1; +$config["tuning_sub"]=0.9; +$config["time_buffer"]=0.75; //max_zeit=$config["max_execution_time"]*$config["time_buffer"] +$config["perlspeed"]=10000; //Anzahl der Datensätze, die in einem Rutsch gelesen werden + + +//Bausteine +$meta=br().br().' '.br().''.br(2); +$preload_restore=''; +$preload_dump=''; +$config["homepage"]="http://www.mysqldumper.de/board/"; +$nl="\n"; + +//Initialisierungen + + +//SQL-Library +$sqllib["board_deacticate"]="UPDATE `phpbb_config` set config_value=1 where config_name=\"board_disable\""; +$sqllib["board_acticate"]="UPDATE `phpbb_config` set config_value=0 where config_name=\"board_disable\""; + + + +?> \ No newline at end of file diff --git a/inc/tabellenabfrage.php b/inc/tabellenabfrage.php new file mode 100644 index 0000000..5edc74d --- /dev/null +++ b/inc/tabellenabfrage.php @@ -0,0 +1,71 @@ +'.$row["Name"].''; + $tbl_zeile.=''.$row["Rows"].' '.$lang['datawith'].' '.byte_output($row["Data_length"]+$row["Index_length"]).', '.$lang['lastbufrom'].' '.$row["Update_time"].''; + } +} else { + //Restore - Header aus Backupfile lesen + $button_name='restore_tbl'; + $button_caption=""; + $gz = (substr($filename,-3))==".gz" ? 1 : 0; + if ($gz) + { + $fp = gzopen ($fpath.$filename, "r"); + $statusline=gzgets($fp,40960); + $offset= gztell($fp); + } else { + $fp = fopen ($fpath.$filename, "r"); + $statusline=fgets($fp,5000); + $offset= ftell($fp); + } + //Header auslesen + $sline=ReadStatusline($statusline); + $anzahl_tabellen=$sline[0]; + $anzahl_eintraege=$sline[1]; + $part=($sline[2]=="") ? 0 : substr($sline[2],3); + $EXTINFO= $sline[6]; + if($EXTINFO=="") { + $tbl_zeile.=''.$lang['not_supported'].''; + } else { + for($i=0;$i<$anzahl_tabellen;$i++) { + if ($gz) + { + gzseek($fp,$offset); + $statusline=gzgets($fp,40960); + $offset= gztell($fp); + } else { + fseek($fp,$offset); + $statusline=fgets($fp,5000); + $offset= ftell($fp); + } + $s=explode("|",$statusline); + $tbl_zeile.=''.$s[1].''; + $tbl_zeile.=''.$s[2].' '.$lang['datawith'].' '.byte_output($s[3]).', '.$lang['lastbufrom'].' '.$s[4].''; + } + if($gz) gzclose ($fp); else fclose ($fp); + } +} +echo '

'.$tblr.' - '.$lang['tableselection'].'

'.$lang['db'].': '.$databases["db_actual"].'
'; +echo '
'; +echo ''; +echo $tbl_zeile; +echo '
    '; +echo '
'; + + +?> diff --git a/index.php b/index.php new file mode 100644 index 0000000..8adfb70 --- /dev/null +++ b/index.php @@ -0,0 +1,29 @@ + + + + + + + +MySQL Dumper + + + + + + +<body> +You need to get a newer browser! +</body> + + + \ No newline at end of file diff --git a/install.php b/install.php new file mode 100644 index 0000000..523376f --- /dev/null +++ b/install.php @@ -0,0 +1,812 @@ + + + + + + + + + MySQLDumper - Installation + + + + + + + $getval){ ${$getvar} = $getval; } +foreach($_POST as $postvar => $postval){ ${$postvar} = $postval; } +$dbonly=(isset($dbonly)) ? $dbonly : ""; +$dbport=(isset($dbport)) ? $dbport : ""; +$dbsocket=(isset($dbsocket)) ? $dbsocket : ""; +if(!isset($language)) $language="de"; +if(isset($dbhost) && isset($dbuser) && isset($dbpass)) { + $config["dbhost"]=$dbhost; + $config["dbuser"]=$dbuser; + $config["dbpass"]=$dbpass; + $config["dbonly"]=$dbonly; + $config["dbport"]=$dbport; + $config["dbsocket"]=$dbsocket; + $connstr="$dbhost|$dbuser|$dbpass|$dbonly|$dbport|$dbsocket"; +} else { + if(isset($connstr) && !empty($connstr)) { + $p=explode("|",$connstr); + $dbhost=$config["dbhost"]=$p[0]; + $dbuser=$config["dbuser"]=$p[1]; + $dbpass=$config["dbpass"]=$p[2]; + $dbonly=$config["dbonly"]=$p[3]; + $dbport=$config["dbport"]=$p[4]; + $dbsocket=$config["dbsocket"]=$p[5]; + } else $connstr=""; +} + +//Variabeln +$phase=(isset($phase)) ? $phase : 0; +$config["language"]=(isset($language)) ? $language : "de"; +$delfiles=Array(); + +$img_ok='ok'; +$img_failed='failed'; +$href="install.php?language=$language&phase=$phase&connstr=$connstr"; + +include_once("language/lang_".$config["language"].".php"); + + +if($phase<10) { + if($phase==0) + $Anzeige=$lang['install'].' - '.$lang["installmenu"]; + else $Anzeige=$lang['install'].' - '.$lang["step"].' '.($phase); +} elseif ($phase>9 && $phase<12) { + $Anzeige=$lang['install'].' - '.$lang["step"].' '.($phase-7); +} elseif ($phase>19 && $phase<100) { + $Anzeige=$lang['tools']; +} else { + $Anzeige=$lang['uninstall'].' - '.$lang["step"].' '.($phase-99); +} + + +echo ' +
'.$connstr.'
+'.$lang['install_tomenu'].'
+Version '.$config["version"].'
'.$lang['install_forcescript'].'
+'; + +echo '

'.$Anzeige.'

'; + + +switch ($phase) { + + case 0: // Anfang - Sprachauswahl + echo ' + + + + + + + + + + + + '; + if(file_exists($config["paths"]["config"]."config.gz")) { + echo ' + + '; + } + if(file_exists($config["paths"]["config"]."parameter.php")){ + echo ' + + '; + } + if(file_exists("config.php") && file_exists($config["paths"]["config"]."parameter.php")) { + zipConfig(); + echo ' + + + '; + } + echo '
installiere MySQLDumperinstall MySQLDumper
Tools
MySQLDumper deinstallierenuninstall MySQLDumper
vorhandene Konfigurationssicherung importierenimport existing configurationbackup
Konfigurationssicherung hochladen und importierenupload configuration backup and import
Konfigurationssicherung runterladenDownload Configuration Backup
'; + break; + case 1: // checken + if(isset($trychmod) && $trychmod==1) @chmod("config.php","0777"); + echo '

'.$lang['dbparameter'].'

'; + if(!is_writable("config.php")) { + echo '

'.$lang['confignotwritable'].'

'; + echo ''.$lang['tryagain'].''; + echo '     '.$lang['install_tomenu'].''; + } else { + $tmp=file("config.php"); + $stored=0; + if(!(isset($dbhost) && isset($dbuser) && isset($dbpass))) { + //lese aus config + for($i=0;$i'.$lang['expert'].'
' : ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + if(isset($expert)) { + echo ''; + echo ''; + echo ''; + } + echo ''; + if(isset($dbconnect)) { + + echo ''; + echo ''; + } + echo '
'.$lang['dbparameter'].$exp.'
'.$lang['db_host'].':
'.$lang['db_user'].':
'.$lang['db_pass'].':
'.$lang['db_only'].':
Port:  '.$lang['install_help_port'].'
Socket:  '.$lang['install_help_socket'].'
'.$lang['testconnection'].':
'.$lang['dbconnection'].'
'; + MSD_mysql_connect(); + + if(!$config["dbconnection"]) { + echo '
'.$lang['connectionerror'].'
 '; + } else { + echo '
'.$lang['connection_ok'].'
'; + $connection="ok"; + $connstr="$dbhost|$dbuser|$dbpass|$dbonly|$dbport|$dbsocket"; + echo ''; + SearchDatabases(1); + if(empty($databases["Name"])) echo ''; + } + echo '

'; + + if(isset($connection) && $connection=="ok" && !empty($databases["Name"])) { + + echo '
'; + echo ' + + + '; + echo ''; + echo '
'; + } + } + break; + case 2: // + echo '

MySQLDumper - '.$lang['confbasic'].'

'; + $tmp=file("config.php"); + $stored=0; + for($i=0;$i'.$lang['import12'].'

'; + } else { + if(ini_get('safe_mode')==1) { + $nextphase=(extension_loaded("ftp")) ? 10 : 9; + } else $nextphase=$phase+2; + echo $lang['install_step2finished']; + echo '


'; + echo '
'; + echo '


'; + echo '
'; + } + + break; + case 3: // + if(ini_get('safe_mode')==1) $nextphase=10; else $nextphase=$phase+1; + echo '

'.$lang['editconf'].'

'; + if($config["language"]=="en") echo 'important! change the line $config["language"]=\'de\' to $config["language"]=\'en\'
'; + echo '
+
   +    + '; + echo ''; + echo '
'; + + break; + case 4: //Verzeichnisse + + if(isset($_POST["submit"])) { + $ret=true; + if ($fp=fopen("config.php", "wb")) + { + if (!fwrite($fp,stripslashes(stripslashes($_POST["configfile"])))) $ret=false; + if (!fclose($fp)) $ret=false; + } + else $ret=false; + if($ret==false) { + echo '
'.$lang['errorman'].' config.php '.$lang['manuell'].'.'; + die; + } + } + + echo '

'.$lang['createdirs'].'

'; + + SetFileRechte("work/");@chmod("work",0777); + SetFileRechte("work/config/");@chmod("work/config",0777); + SetFileRechte("work/log/");@chmod("work/log",0777); + SetFileRechte("work/backup/");@chmod("work/backup",0777); + SetFileRechte("work/structure/");@chmod("work/structure",0777); + $iw[0]=IsWritable("work"); + $iw[1]=IsWritable("work/config"); + $iw[2]=IsWritable("work/log"); + $iw[3]=IsWritable("work/backup"); + $iw[4]=IsWritable("work/structure"); + + echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) + echo ''; + echo '
'.$lang['dir'].''.$lang['rechte'].''.$lang['status'].'
work'.Rechte("work").''.(($iw[0]) ? $img_ok : $img_failed).'
work/config'.Rechte("work/config").''.(($iw[1]) ? $img_ok : $img_failed).'
work/log'.Rechte("work/log").''.(($iw[2]) ? $img_ok : $img_failed).'
work/backup'.Rechte("work/backup").''.(($iw[3]) ? $img_ok : $img_failed).'
work/structure'.Rechte("work/structure").''.(($iw[4]) ? $img_ok : $img_failed).'
'.$lang['dirs_created'].'

'; + break; + case 5: + echo '

'.$lang['laststep'].'

'; + + + //SearchDatabases(0); + SetDefault(); + echo '
'.$lang['installfinished']; + + if(file_exists($config["paths"]["config"]."config.gz")) { + echo '

'.$lang['import1'].''; + } + echo '

'.$lang['import2'].''; + + break; + case 9: + + clearstatcache(); + $iw[0]=IsWritable("work"); + $iw[1]=IsWritable("work/config"); + $iw[2]=IsWritable("work/log"); + $iw[3]=IsWritable("work/backup"); + $iw[4]=IsWritable("work/structure"); + echo '

'.$lang['ftpmode'].'

'; + echo '

'.$lang['safemodedesc'].'

'; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) + echo ''; + echo '
'.$lang['idomanual'].'
'.$lang['dofrom'].'
'.Realpfad('./').'
work'.(($iw[0]) ? $img_ok : $img_failed).'
work/config'.(($iw[1]) ? $img_ok : $img_failed).'
work/log'.(($iw[2]) ? $img_ok : $img_failed).'
work/backup'.(($iw[3]) ? $img_ok : $img_failed).'
work/structure'.(($iw[4]) ? $img_ok : $img_failed).'
'.$lang['dirs_created'].'
'; + + break; + case 10: //safe_mode FTP + + clearstatcache(); + $iw[0]=IsWritable("work"); + $iw[1]=IsWritable("work/config"); + $iw[2]=IsWritable("work/log"); + $iw[3]=IsWritable("work/backup"); + $iw[4]=IsWritable("work/structure"); + if(!isset($install_ftp_port) || $install_ftp_port<1) $install_ftp_port=21; + echo '

'.$lang['ftpmode'].'

'; + echo '

'.$lang['safemodedesc'].'

'; + + echo ''; + + echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) + echo ''; + echo '
'.$lang['idomanual'].'
'.$lang['dofrom'].'
'.Realpfad('./').'
work'.(($iw[0]) ? $img_ok : $img_failed).'
work/config'.(($iw[1]) ? $img_ok : $img_failed).'
work/log'.(($iw[2]) ? $img_ok : $img_failed).'
work/backup'.(($iw[3]) ? $img_ok : $img_failed).'
work/structure'.(($iw[4]) ? $img_ok : $img_failed).'
'.$lang['dirs_created'].'
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + if(isset($ftp_connect)) { + echo ''; + } + echo '
'.$lang['ftpmode2'].'
FTP-Server
FTP-Port
FTP-User
FTP-'.$lang['db_pass'].'
'.$lang['info_scriptdir'].'
'.$lang['connect_to'].' `'.$install_ftp_server.'` Port '.$install_ftp_port.' ...
'; + $tftp=TesteFTP($install_ftp_server,$install_ftp_port,$install_ftp_user_name,$install_ftp_user_pass,$install_ftp_path); + echo $tftp; + echo '
 '; + if(substr($tftp,-5)=="") { + echo '
'; + echo ''; + echo '
'; + } + echo '
'; + + + break; + + case 11: //FTP-Create Dirs + echo '

'.$lang['ftpmode'].'

'; + if(CreateDirsFTP()==1) { + SetDefault(); + echo DirectoryWarnings(); + echo '
'.$lang['installfinished']; + + if(is_writable($config["paths"]["config"])) { + if(file_exists($config["paths"]["config"]."config.gz")) { + echo '

'.$lang['import1'].''; + } + echo '
'.$lang['import2'].''; + } + } + break; + case 20: //import + echo '

'.$lang['import'].'

'; + + $import=importConfig($config["paths"]["config"]."config.gz"); + if($import==0) { + echo '
'.$lang['import3'].'
'; + SetDefault(); + echo '
'.$lang['import4'].'
'; + echo ''.$lang['import5'].'    '.$lang['import6'].''; + } elseif($import==1) { + echo '

'.$lang['import11'].'

'; + } elseif($import==2) { + echo '

'.$lang['import12'].'

'; + } + break; + + + + break; + case 21: //upload + import + echo '

'.$lang['import2'].'

'; + echo '
'; + echo '
'; + echo ''; + echo '
'; + + break; + case 22: //posting from upload + echo '

'.$lang['import7'].'

'; + $backlink=''.$lang['import8'].''; + if (isset($_POST["upload"])) + { + $error=false; + if (!($_FILES["upfile"]["name"])) { + echo "".$lang["fm_uploadfilerequest"].'

'.$backlink; + exit; + } + + if (file_exists($config["paths"]["config"].$_FILES["upfile"]["name"])) unlink($config["paths"]["config"].$_FILES["upfile"]["name"]); + + if ($_FILES["upfile"]["name"]!='config.gz') + { + echo "".$lang["import9"]."

".$backlink; + exit; + } + if (move_uploaded_file($_FILES["upfile"]["tmp_name"],$config["paths"]["config"].$_FILES["upfile"]["name"])) + { + chmod($config["paths"]["config"].$upfile_name,0755); + + } else { + echo "".$lang["fm_uploadmoveerror"]."
".$backlink; + exit; + } + } + echo '
'.$lang['import10'].'
'; + $import=importConfig($config["paths"]["config"]."config.gz"); + if($import==0) { + echo '
'.$lang['import3'].'
'; + SetDefault(); + echo '
'.$lang['import4'].'
'; + echo ''.$lang['import5'].'    '.$lang['import6'].''; + } elseif($import==1) { + echo '

'.$lang['import11'].'

'; + } elseif($import==2) { + echo '

'.$lang['import12'].'

'; + } + break; + case 100: //uninstall + echo $lang['ui1'].'

'; + echo zipConfig().'

'; + echo $lang['ui2']."

"; + echo ''.$lang['ui3'].'     '; + echo ''.$lang['ui4'].''; + break; + case 101: + echo '

'.$lang['ui5'].'

'; + $paths=Array(); + $w=substr($config["paths"]["work"],0,strlen($config["paths"]["work"])-1); + if(is_dir($w)) $res = rec_rmdir ($w); else $res=0; + // wurde das Verzeichnis korrekt gelöscht + if($res==0) { + // das Verzeichnis wurde korrekt gelöscht + echo '

'.$lang['ui6'].'

'; + echo $lang['ui7']."
\"".Realpfad("./")."\"
".$lang['manuell'].".

"; + echo ''.$lang['ui8'].''; + + }else { + echo '

'.$lang['ui9'].'"'.$paths[count($paths)-1].'"'; + + } + break; + } + +?> + + + + + + +Download Config from '.$config["paths"]["config"].''; + +} + +function importConfig($importfile) +{ + global $config; + + $cf1=Array(); + $imp1=Array(); + $sql1=Array(); + $tmp=Array(); + + if(!file_exists($importfile)) exit; + $tmp=file("config.php"); + $imp=gzfile($importfile); + + for($i=0;$i'.$lang['connect_to'].' `'.$install_ftp_server.'` Port '.$install_ftp_port.' ...
'; + $conn_id = ftp_connect($install_ftp_server); + // Einloggen mit Benutzername und Kennwort + $login_result = ftp_login($conn_id, $install_ftp_user_name, $install_ftp_user_pass); + // Verbindung überprüfen + if ((!$conn_id) || (!$login_result)) { + echo $lang['ftp_notconnected']; + echo $lang['connwith']." $tinstall_ftp_server ".$lang['asuser']." $install_ftp_user_name ".$lang['notpossible']; + return 0; + } else { + + //Wechsel in betroffenes Verzeichnis + echo $lang['changedir'].' `'.$install_ftp_path.'` ...
'; + ftp_chdir($conn_id,$install_ftp_path); + // Erstellen der Verzeichnisse + echo $lang['dircr1'].' ...
'; + ftp_mkdir($conn_id,"work"); + ftp_site($conn_id, "CHMOD 0777 work"); + echo $lang['changedir'].' `work` ...
'; + ftp_chdir($conn_id,"work"); + echo $lang['indir'].' `'.ftp_pwd($conn_id).'`
'; + echo $lang['dircr5'].' ...
'; + ftp_mkdir($conn_id,"config"); + ftp_site($conn_id, "CHMOD 0777 config"); + echo $lang['dircr2'].' ...
'; + ftp_mkdir($conn_id,"backup"); + ftp_site($conn_id, "CHMOD 0777 backup"); + echo $lang['dircr3'].' ...
'; + ftp_mkdir($conn_id,"structure"); + ftp_site($conn_id, "CHMOD 0777 structure"); + echo $lang['dircr4'].' ...
'; + ftp_mkdir($conn_id,"log"); + ftp_site($conn_id, "CHMOD 0777 log"); + + // Schließen des FTP-Streams + ftp_quit($conn_id); + return 1; + } +} + +function ftp_mkdirs($config,$dirname) +{ + $dir=split("/", $dirname); + for ($i=0;$i"; + } else echo '

ERROR: no Database `'.$config["dbonly"]."` found !
"; + } else { + $db_list = @mysql_list_dbs($config["dbconnection"]); + $i=0; + if($db_list && @mysql_num_rows($db_list)>0) { + $databases["db_selected_index"] = 0; + while ($row = @mysql_fetch_object($db_list)) + { + $databases["Name"][$i]=$row->Database; + $databases["praefix"][$i] = ""; + $databases["command_before_dump"][$i] = ""; + $databases["command_after_dump"][$i] = ""; + + if($printout==1) echo "... found db `$row->Database`
"; + } + $databases["db_actual"]=$databases["Name"][0]; + $databases["db_selected_index"]=0; + } else { + if($printout==1) echo $lang['dbonlyneed'].'
'; + } + } +} +?> diff --git a/language/help_de.php b/language/help_de.php new file mode 100644 index 0000000..bedc642 --- /dev/null +++ b/language/help_de.php @@ -0,0 +1,134 @@ + + + + + + + +MySQL Dumper Hilfe + + + + +

Über dieses Projekt

+Die Idee für dieses Projekt kam von Daniel Schlichholz.

Er eröffnete 2004 das Forum MySQLDumper und schon bald fanden sich Hobby-Programmierer, die neue Skripte schrieben und die von Daniel erweiterten.
Innerhalb kürzester Zeit enstand aus dem kleine Backupskript ein stattliches Projekt.

Wenn Du Vorschläge zur Verbesserung hast, dann wende ich an das MySQLDumper-Forum http://www.daniel-schlichtholz.de/board.

Wir wünschen Dir viel Vergnügen mit diesem Projekt.

Das MySQLDumper-Team

+ +
MySQLDumper +Daniel Schlichtholz - Steffen Kamper
+Perlscript mit Unterstützung von Detlev Richter
+
+
+
+ + +

MySQLDumper Hilfe

+ + +

Download

+Dieses Script erhaltet ihr auf der Homepage von MySQLDumper.
+Es empfielt sich, die Homepage regelmäßig zu besuchen, um Updates und +Hilfestellungen zu erlangen.
+Die Adresse lautet: +http://www.mysqldumper.de/board + + +

Systemvoraussetzung

+Das Script arbeitet auf jedem Server (Windows, Linux, ...)
+mit PHP >= Version 4.3.4 mit GZip-Unterstützung, MySQL (ab Version 3.23), JavaScript (muss aktiviert sein). + +

Installation

+Die Installation geht einfach von statten. +Entpackt das Archiv in einen beliebigen Ordner.
+Ladet alle Dateien auf Euren Webserver hoch. (z.B. in die unterste Ebene in [Server Webverzeichnis/]MySQLDumper)
+... fertig!
+Ihr könnt MySQLDumper nun im Webbrowser aufrufen durch "http://mein-webserver/MySQLDumper"
+um die Installation abzuschliessen. Folgt einfach den Instruktionen.
+
Hinweis:
Falls auf Eurem Server der PHP-Safemode eingeschaltet ist, darf das Script keine +Verzeichnisse erstellen.
+Dies müsst ihr dann von Hand nachholen, da MySqlDump die Daten geordnet in +Verzeichnissen ablegt.
+Das Script bricht mit einer entsprechenden Anweisung ab!
+Nachdem ihr die Verzeichnisse (dem Hinweis entsprechend) erstellt habt, läuft es normal und ohne Einschränkung.
+ +

Bedienung

    + +
    Menü
    +In der obigen Auswahlliste stellt ihr die Datenbank ein.
    +Alle Aktionen beziehen sich auf die hier eingestellte Datenbank. + +
    Startseite
    +Hier erfahrt ihr einiges über euer System, die verschiedenen installierten +Versionen und Details über die konfigurierten Datenbanken.
    +Wenn ihr auf den Datenbanknamen klickt, so seht ihr eine Auflistung der Tabellen +mit der Anzahl der Einträge, der Grösse und das letzte Aktualisierungsdatum. + +
    Konfiguration
    +Hier könnt ihr eure Konfiguration bearbeiten, abspeichern oder die Ausgabgskonfiguration +wieder herstellen. + + +
    Verwaltung
    +Hier werden die eigenlichen Aktionen durchgeführt.
    +Es werden dir alle Dateien im Backup-Verzeichnis angezeigt. +Für die Aktionen "Restore" und "Delete" muss eine Datei selektiert sein. +
      +
    • Restore: hiermit wird die Datenbank mit der ausgewählten Backupdatei aktualisiert.
    • +
    • Delete: hiermit kannst du die selektierte Backupdatei löschen.
    • +
    • Neues Backup starten: hier startest du ein neues Backup (Dump) nach den in der Konfiguration eingestellten Parametern.
    • +
    + +
    Log
    +Hier kannst du die Logeinträge sehen und löschen. + +
    Credits / Hilfe
    +diese Seite. +
+
+

Unsere Sponsoren

+Die Sponsoren finden Sie auch auf der Sponsorenseite
+

Wir sind nicht verantwortlich für den Inhalt der folgenden Seiten.

+ +
Du must online sein !"; +?> + +

+Idee: + +Daniel Schlichtholz - Infoboard: + +www.mysqldumper.de/board

+ + +























+























+ + + diff --git a/language/help_en.php b/language/help_en.php new file mode 100644 index 0000000..08bb876 --- /dev/null +++ b/language/help_en.php @@ -0,0 +1,137 @@ + + + + + + + +MySQL Dumper Help + + + + +

About this project

+The idea for this project comes from Daniel Schlichtholz.

In 2004 he created a forum called MySQLDumper and soon, programmers who wrote new scripts, supplemented Daniel's scripts.
After a short time the small backup-script developed into a stately project.

If you have any improvement suggestions you can visit the MySQLDumper-Forum: http://www.daniel-schlichtholz.de/board.

We wish you a lot of fun with this project.

The MySQLDumper-Team

+
MySQLDumper +Daniel Schlichtholz - Steffen Kamper
+Perlscript with Support from Detlev Richter
+
+
+ + +

MySQLDumper Help

+ + +

Download

+This Script is available on the Homepage of MySQLDumper.
+It is recommanded to visit the Homepage frequently to get the latest information, updates and help.
+The address is +http://www.mysqldumper.de/board + + +

System Mandatories

+The Script works with nearly any server (Windows, Linux, ...)
+and PHP >= Version 4.3.4 with GZip-Library, MySQL (>= 3.23), JavaScript (must be enabled). + +

Installation

+The installation is very easy. +Unpack the archive in any folder, +which is accessible from the Webserver
+(e.g. in the root directory [Server rootdir/]MySQLDumper)
+change config.php to chmod 777
+... all done!
+you can start MySQLDumper in your Browser by typing "http://webserver/MySQLDumper" +to complete the setup, just follow the instructions. + +
Note:
If your webserver runs with the option safemode=ON MySqlDump mustn't create directories.
+You will have to do that yourself.
+MySqlDump breaks in that case and tells you what to do.
+After you created the directories MySqlDump will function normaly.

+ +

Operating

+
+

Our Sponsores

+The Sponsores can be found also at our
Sponsorepage
+

We are not responsable for contents of the following pages.

+ +
You must go online !"; + +?> + + +

+Idea: + +Daniel Schlichtholz - Info Board: + +www.mysqldumper.de/board

+ +


















+


















+


















+


















+ + + diff --git a/language/lang_de.php b/language/lang_de.php new file mode 100644 index 0000000..8dafffd --- /dev/null +++ b/language/lang_de.php @@ -0,0 +1,683 @@ +Achtung: Fortsetzung im Safe-Modus nicht möglich!Folgende Verzeichnisse müssen manuell im Scriptverzeichnisses angelegt werden:

work
work/backup
work/config
work/log
work/structure

Geben sie all diesen Verzeichnissen die vollen Rechte (chmod 777).
Danach kann MySQL Dumper auch im Safe-Modus problemlos genutzt werden.'; + +$lang['mailabsendererror']='Mail kann ohne Absender nicht verschickt werden !'; +$lang['Ausgabe']='Ausgabe'; +$lang['Zusatz']='Zusatz'; +$lang['Variabeln']='Variabeln'; +$lang['berichtsent']='Der Fehlerbericht wurde erfolgreich abgesendet.'; +$lang['autobericht']='automatisch generierter Fehlerbericht von'; +$lang['berichtman1']='Bitte senden Sie die Mail manuell an das'; +$lang['Statusinformationen']='Statusinformationen'; +$lang['Versionsinformationen']='Versionsinformationen'; +$lang['MySQL Dumper Informationen']='MySQL Dumper Informationen'; +$lang['Fehlerbericht']='Fehlerbericht'; +$lang['backupfilesanzahl']='Im Backupverzeichnis befinden sich'; +$lang['lastbackup']='Letztes Backup'; +$lang['notavail']='nicht verfügbar'; +$lang['vom']='vom'; +$lang['mysqlvars']='Mysql-Variabeln'; +$lang['mysqlsys']='Mysql-Befehle'; + +$lang['Status']='Status'; +$lang['Prozesse']='Prozesse'; +$lang['info_novars']='keine Variabeln verfügbar'; +$lang['Inhalt']='Inhalt'; +$lang['info_nostatus']='kein Status verfügbar'; +$lang['info_noprocesses']='keine laufenden Prozesse'; + +//Hilfe-Texte +$lang['help_db']='Dies ist die Liste der vorhandenen Datenbanken'; +$lang['help_praefix']='Der Praefix ist eine Zeichenfolge für den Anfang von Tabellen, der als Filter fungiert.'; +$lang['help_sqltrenn']='Ein Trennzeichen, um die SQL-Befehle eindeutig zu trennen.'; +$lang['help_zip']='Kompression mit GZip - emfohlen ist \'aktiviert\''; +$lang['help_memorylimit']='Das ist die max. Grösse in Bytes, die das Skript an Speicher bekommt'."\n".'0 = deaktiviert'; +$lang['memory_limit']='Speichergrenze'; +$lang['help_budir']='Hier werden die Datenbank-Backups gespeichert.'; +$lang['help_mail1']='wenn aktiviert, dann wird nach der Erstellung der Sicherung eine Email mit dem Backup verschickt.'; +$lang['help_mail2']='Dies ist die Empfänger-Adresse der Email.'; +$lang['help_mail3']='Dies ist die Absende-Adresse der Email.'; +$lang['help_mail4']='Die maximale Grösse für einen Email-Anhang, bei 0 bleibt die Angabe unberücksichtigt'; +$lang['help_mail5']='Hier kann bestimmt werden, ob das Backup als Email-Anhang verschickt werden soll'; +$lang['help_ad1']='Wenn aktiviert, dann werden automatisch Backupfiles gelöscht.'; +$lang['help_ad2']='die maximale Anzahl von Tagen, die ein Backupfile haben darf (für Autodelete)'."\n".'0 = deaktiviert'; +$lang['help_ad3']='die maximale Anzahl von Dateien, die im Backupverzeichnis sein dürfen (für Autodelete)'."\n".'0 = deaktiviert'; +$lang['help_lang']='stell auf die gewünschte Sprache'; +$lang["help_empty_db_before_restore"]='Um überflüssige Daten zu eleminieren kann man anweisen, die Datenbank vor der Wiederherstellung komplett zu leeren'; +$lang['help_crontime']='die Zeit, die das Cronscript zusätzlich bekommt (in Sekunden)'; +$lang['help_cronmail']='bestimme, ob im Cronjob das Backup per Mail verschickt werden soll'; +$lang['help_cronmailprg']='der Pfad zum Mailprogramm, default ist sendmail im angegebenen Pfad'; +$lang['help_cronmailto']='die Adresse, an die die Mail geschickt wird'; +$lang['help_cronftp']='bestimme, ob im Cronjob das Backup per FTP verschickt werden soll'; +$lang['help_cronzip']='Kompression mit GZip - emfohlen ist \'aktiviert\' (die Kompressions-Lib muss installiert sein!)'; +$lang['help_cronperlpath']='Der Pfad zu Perl muss korrekt angegeben werden, sonst ist das Skript nicht lauffähig.'."\n".'In den meisten Fällen ist das der vorgegebene Standardpfad.'; +$lang['help_cronextender']='Die Endung des Perlscriptes, Standard ist \'.pl\''; +$lang['help_cronsavepath']='Der Name der Konfigurationsdatei für das Perlskript'; +$lang['help_cronprintout']='Um das Script im Browser zu starten muss Textausgabe aktiviert sein.'; +$lang['help_cronsamedb']='Soll die gleiche Datenbank für Cronjob wie in Einstellungen benutzt werden?'; +$lang['help_crondbindex']='wähle die Datenbank für den Cronjob'; +$lang['help_cronmail_dump']=''; + + +$lang['help_ftptransfer']='wenn aktiviert, wird nach Backup die Datei per FTP gesendet.'; +$lang['help_ftpserver']='Adresse des FTP-Servers'; +$lang['help_ftpport']='Port des FTP-Servers, Standard: 21'; +$lang['help_ftpuser']='gib den Benutzername der FTP-Verbindung an'; +$lang['help_ftppass']='gib das Passwort der FTP-Verbindung an'; +$lang['help_ftpdir']='wohin soll das File gesendet werden?'; +$lang['help_chmod']='Standardeinstellung ist 777'; +$lang['help_speed']='Minimale und maximale Geschwindigkeit, Standard ist 50 bis 5000'."\n".'(zu hohe Geschwindigkeiten können zu Timeouts führen!)'; +$lang['speed']='Geschwindigkeitskontrolle'; +$lang['help_cronexecpath']="Der Ort, an dem die Perlskripte liegen.\nAusgangspunkt ist die HTTP-Adresse (also im Browser)\nErlaubt sind absolute und relative Pfadangaben."; +$lang['cron_execpath']='Pfad der Perlskripte'; +$lang['help_browser']='Wähle Deinen Browser.'."\n".'Achtung: benutze nicht den Internet Explorer mit der Einstellung \'andere Browser\' !'; + +// Text in filemanagement.php +$lang['fm_title']='Verwaltung'; +$lang['fm_uploadfilerequest']='Bitte gib eine Datei an.'; +$lang['fm_uploadnotallowed1']='Dieser Dateityp ist nicht erlaubt.'; +$lang['fm_uploadnotallowed2']='Gültige Typen sind: *.gz und *.sql-Dateien'; +$lang['fm_uploadmoveerror']='Konnte die hochgeladene Datei nicht in den richtigen Ordner verschieben.'; +$lang['fm_uploadfailed']='Der Upload ist leider fehlgeschlagen!'; +$lang['fm_uploadfileexists']='Es existiert bereits eine Datei mit diesem Namen !'; +$lang['fm_nofile']='Du hast gar keine Datei ausgewählt!'; +$lang['fm_delete1']='Die Datei '; +$lang['fm_delete2']=' wurde erfolgreich gelöscht.'; +$lang['fm_delete3']=' konnte nicht gelöscht werden!'; +$lang['fm_choose_file']='gewählte Datei:'; +$lang['fm_filename']='Dateiname'; +$lang['fm_filesize']='Dateigröße'; +$lang["fm_filedate"]='Datum'; +$lang['fm_nofilesfound']='Keine Datei gefunden.'; +$lang['fm_tables']='Tabellen'; +$lang['fm_records']='Einträge'; + +$lang['fm_all_bu']='alle Backups'; +$lang['fm_anz_bu']='Anzahl Backups'; +$lang['fm_last_bu']='letztes Backup'; +$lang['fm_totalsize']='gesamte Größe'; +$lang['fm_selecttables']='Auswahl der Tabellen'; +$lang['fm_comment']='Kommentar eingeben'; + +$lang['fm_sizesum']='Gesamtgröße'; +$lang['fm_freespace']='Freier Speicher auf Server'; +$lang['fm_choosefile']='Wähle eine Datei zur Wiederherstellung oder zum Löschen aus:'; +$lang['fm_restore']='Wiederherstellen'; +$lang['fm_alertrestore1']='Soll die Datenbank '; +$lang['fm_alertrestore2']='mit den Inhalten der Datei'; +$lang['fm_alertrestore3']='wiederhergestellt werden?'; +$lang['fm_delete']='Löschen'; +$lang['fm_askdelete1']='Möchtest Du die Datei '; +$lang['fm_askdelete2']=' wirklich löschen?'; +$lang['fm_askdelete3']='Möchten sie Autodelete nach den eingestellten Regeln jetzt ausführen?'; +$lang['fm_askdelete4']='Möchten sie alle Backupdateien jetzt löschen?'; +$lang['fm_askdelete5']='Möchten sie alle Backupdateien mit '; +$lang['fm_askdelete5_2']='_* jetzt löschen?'; +$lang['fm_deleteauto']='Autodelete manuell ausführen'; +$lang['fm_deleteall']='alle Backupdateien löschen'; +$lang['fm_deleteallfilter']='alle löschen mit '; +$lang['fm_deleteallfilter2']='_*'; +$lang['fm_newdump']='Oder beginne ein neues Backup:'; +$lang['fm_startdump']='Neues Backup starten'; +$lang['fm_upload']='Oder lade eine Datei hoch:'; +$lang['fm_fileupload']='Datei hochladen'; +$lang['fm_fileimport']='SQL-Datei importieren'; +$lang['fm_dbname']='Datenbankname'; +$lang['fm_files1']='Datenbank-Backups'; +$lang['fm_files2']='Datenbank-Strukturen'; +$lang['fm_autodel1']='Autodelete: Folgende Dateien wurden aufgrund der maximalen Files gelöscht:'; +$lang['fm_autodel2']='Autodelete: Folgende Dateien wurden aufgrund ihres Erstellungsdatums gelöscht:'; + +$lang['fm_dumpsettings']='Einstellungen für das Backup'; +$lang['fm_dumpsettings_cron']='Einstellungen für das Perl-Cronscript'; +$lang['fm_oldbackup']='(unbekannt)'; +$lang['fm_restore_header']='Wiederherstellung der Datenbank "'; +$lang['fm_restore_header2']='"'; +$lang['fm_dump_header']='Backup'; + +$lang['DoCronButton']='Perl-Cronscript ausführen'; +$lang['DoPerlTest']='Perl-Module testen'; +$lang['DoSimpleTest']='Perl testen'; +$lang['cronperldesc']='Dies geht nur, wenn Perl ausgeführt werden kann.
Das Script liegt unter '; + + +// Text in dump.php +$lang['dump']='Backup'; +$lang['dump_headline']='erzeuge Backup...'; +$lang['gzip_compression']='GZip-Kompression ist'; +$lang['on']='an'; +$lang['off']='aus'; +$lang['saving_table']='Speichere Tabelle '; +$lang['of']='von'; +$lang['actual_table']='Aktuelle Tabelle'; +$lang['progress_table']='Fortschritt Tabelle'; +$lang['progress_over_all']='Fortschritt gesamt'; +$lang['entry']='Eintrag'; +$lang['done']='Fertig!'; +$lang['file']='Datei'; +$lang['dump_successful']=' wurde erfolgreich erstellt.'; +$lang['upto']='bis'; +$lang['email_was_send']='Die Email wurde erfolgreich verschickt an '; +$lang['back_to_control']='weiter'; +$lang['dump_filename']='Backup-Datei: '; +$lang['withpraefix']='mit Praefix'; +$lang['dump_notables']='Ich konnte keine Tabellen in der Datenbank \''; +$lang['dump_notables2']='\' finden.'; +$lang['dump_endergebnis1']='Es wurden '; +$lang['dump_endergebnis2']=' Tabellen mit insgesamt '; +$lang['dump_endergebnis3']=' Datensätzen gesichert.
'; +$lang['mailerror']='Leider ist beim Verschicken der Email ein Fehler aufgetreten!'; + +$lang['emailbody_n1']='In der Anlage findest Du die Sicherung Deiner MySQL-Datenbank.
Sicherung der Datenbank '; +$lang['emailbody_n2']='

Viele Grüsse

MySQLDumper
www.mysqldumper.de'; +$lang['emailbody_mp1']='Es wurde eine Multipart-Sicherung erstellt.
Die Sicherungen werden nicht als Anhang mitgeliefert!
Sicherung der Datenbank `'; +$lang['emailbody_mp1an']='Es wurde eine Multipart-Sicherung erstellt.
Die Sicherungen werden in seperaten Mails als Anhang geliefert!
Sicherung der Datenbank `'; +$lang['emailbody_mp1a']='`

Folgene Dateien wurden erzeugt:

'; +$lang['emailbody_mp2']='


Viele Grüsse

MySQLDumper
www.mysqldumper.de'; +$lang['emailbody_tb1']='Die Sicherung überschreitet die Maximalgrösse von '; +$lang['emailbody_tb2']=' und wurde daher nicht angehängt.
Sicherung der Datenbank '; +$lang['emailbody_tb3']='

Viele Grüsse

MySQLDumper
www.mysqldumper.de

Folgene Datei wurde erzeugt:

'; +$lang['emailbody_na']='Das Backup wurde nicht angehängt.
Sicherung der Datenbank '; +$lang['only_attachment']=' ... nur der Anhang'; +$lang['tableselection']='Tabellenauswahl'; +$lang['selectall']='alle deselektieren'; +$lang['deselectall']='alle selektieren'; +$lang['startdump']='Backup starten'; +$lang['datawith']='Datensätze mit'; +$lang['lastbufrom']='letztes Update vom'; +$lang['startrestore']='Wiederherstellung starten'; +$lang['not_supported']='Dieses Backup unterstützt diese Funktion nicht.'; + +$lang['multidump1']='Multidump: Es wurden '; +$lang['multidump2']=' Datenbanken gesichert.'; +$lang['filesendftp']='versende File via FTP... bitte hab etwas Geduld. '; +$lang['ftpconnerror']='FTP-Verbindung nicht hergestellt! Verbindung mit '; +$lang['ftpconnerror1']=' als Benutzer '; +$lang['ftpconnerror2']=' nicht möglich'; +$lang['ftpconnerror3']='FTP-Upload war fehlerhaft! '; +$lang['ftpconnected1']='Verbunden mit '; +$lang['ftpconnected2']=' auf '; +$lang['ftpconnected3']=' geschrieben'; + + +// Text in restore.php +$lang['restore']='Wiederherstellung'; +$lang['restore_db']='der Datenbank '; +$lang['restore_db1']=' auf '; +$lang['restore_db2']='.
'; +$lang['restore_complete']='
Tabellen wurden angelegt.'; +$lang['restore_run1']='
Bisher wurden '; +$lang['restore_run2']=' Datensätze erfolgreich eingetragen.'; +$lang['restore_run3']='
Momentan wird die Tabelle '; +$lang['restore_run4']=' mit Daten gefüllt.
'; +$lang['restore_run5']='der Datei wiederhergestellt.'; +$lang['restore_total_complete']='
Herzlichen Glückwunsch.

Die Datenbank wurde komplett wiederhergestellt.
Alle Daten aus der Backupdatei wurden erfolgreich in die Datenbank eingetragen.

Alles fertig. :-)'; +$lang['db_no_connection']='Keine Verbindung zur Datenbank möglich!'; +$lang['db_select_error']='
Fehler:
Auswahl der Datenbank \''; +$lang['db_select_error2']='\' fehlgeschlagen!'; +$lang['file_open_error']='Fehler: Ich konnte die Datei nicht öffnen.'; +$lang['restore_entryerror']='Fehler beim Eintrag des Befehls:'; + + +// Text in config_overview.php +$lang['config_headline']='Konfiguration'; +$lang['sql_trenn']="Trennzeichen"; +$lang['no_send_mail']='Die fertige Backupdatei wird nicht per Email verschickt.'; +$lang['no_del_files']='Es gibt keine Altersbegrenzung der Backupdateien.'; +$lang['no_number_of_files']='Es gibt keine Begrenzung der Anzahl von Backupdateien.'; +$lang['save_success']='Die Einstellungen wurden erfolgreich gespeichert.'; +$lang['save_error']='Die Einstellungen konnten nicht gespeichert werden !'; +$lang['config_databases']='Datenbanken'; +$lang['config_dumprestore']='Backup / Wiederherstellung'; +$lang['config_email']='Email-Benachrichtigung'; +$lang['config_autodelete']='automatisches Löschen'; +$lang['config_interface']='Interface'; +$lang['config_cron']='Crondump-Einstellungen für das PHP-Script'; +$lang['multi_part']='Multipart-Backup'; +$lang['multi_part_groesse']='maximale Dateigröße'; +$lang['help_multipart']='Bei eingeschaltetem Multipart werden mehrere Backupdateien erzeugt, deren Maximalgrösse sich nach der unteren Einstellung richtet'; +$lang['help_multipartgroesse']='Die maximale Grösse der einzelnen Backupdateien kann hier bei eingeschaltetem Multipart bestimmt werden'; +$lang['empty_db_before_restore']='Datenbank vor Wiederherstellung löschen'; +$lang['allpars']='alle Parameter'; +$lang['cron_timelimit']='Zeitlimit für das PHP-Cronjob-Script'; +$lang['cron_perlpath']='Pfad zu perl(.exe)'; +$lang['cron_extender']='Dateiendung des Scripts'; +$lang['cron_savepath']='Konfigurationsdatei'; +$lang['cron_printout']='Textausgabe'; +$lang['config_cronperl']='Crondump-Einstellungen für das Perlscript'; +$lang['cron_mail']='Backup per Mail senden'; +$lang['cron_mailprg']='Mailprogramm'; +$lang['cron_mailto']='Mailadresse'; +$lang['cron_ftp']='Backup per FTP senden'; +$lang['optimize']='Tabellen vor dem Backup optimieren'; +$lang['help_optimize']='Wenn die Option aktiviert ist, werden vor jedem Backup alle Tabellen optimiert'; +$lang["help_ftptimeout"]='Die Zeit, die bei keiner Übertragung zum Timeout führt, Default 90 sek.'; +$lang["ftp_timeout"]='Verbindungs-Timeout'; +$lang["help_ftpssl"]=''; + +$lang['useconnection']='Benutze Verbindung'; +$lang['wrongconnectionpars']='Falsche oder keine Verbindungs-parameter !'; +$lang['conn_not_pssible']='Verbindung nicht möglich !'; +$lang['servercaption']='Anzeige des Servers'; +$lang['help_servercaption']='Bei Benutzung auf verschieden Systemen kann es hilfreich sein, die Server-Adresse farblich gekennzeichnet einzublenden'; +$lang['otherbrowser']='andere Browser'; +$lang['activate_multidump']='MultiDump aktivieren'; +$lang['praefix']='Tabellen-Präfix'; +$lang['config_askload']='Sollen die Einstellungen wirklich mit den Anfangseinstellungen überschrieben werden?'; +$lang['load']='Anfangseinstellungen laden'; +$lang['load_success']='Die Anfangseinstellungen wurden geladen.'; +$lang['cron_samedb']='Aktuelle Datenbank benutzen'; +$lang['cron_crondbindex']='Datenbank und Tabellen-Präfix
      für den Cronjob'; +$lang['withattach']=' mit Anhang'; +$lang['withoutattach']=' ohne Anhang'; +$lang['multidumpconf']='=Multidump Einstellungen='; +$lang['multidumpall']='=alle Datenbanken='; + + +$lang['gzip']='GZip-Kompression'; +$lang['backup_dir']='Backup-Verzeichnis'; +$lang['db_host']='Hostname'; +$lang['saving_db_form']='Datenbank'; +$lang['db_user']='Benutzer'; +$lang['db_pass']='Passwort'; +$lang['db_only']='nur mit folgender Datenbank verbinden'; +$lang['send_mail_form']='Email senden'; +$lang['send_mail_dump']='Backup anhängen'; +$lang['email_adress']='Email-Adresse'; +$lang['email_subject']='Absender der Email'; +$lang['email_maxsize']='maximale Grösse des Anhangs'; +$lang['age_of_files']='Alter der Dateien (in Tagen)'; +$lang['number_of_files_form']='Anzahl von Backupdateien'; +$lang['language']='Sprache'; +$lang['list_db']='Konfigurierte Datenbanken:'; +$lang['save']='Speichern'; +$lang['reset']='zurücksetzen'; +$lang['autodelete']='automatisches Löschen der Backups'; +$lang['max_backup_files_each1']='für alle Datenbanken'; +$lang['max_backup_files_each2']='für jede Datenbank'; +$lang['config_ftp']='FTP-Transfer der Backupdatei'; + +$lang['ftp_transfer']='FTP-Transfer'; +$lang['ftp_server']='Server'; +$lang['ftp_port']='Port'; +$lang['ftp_user']='User'; +$lang['ftp_pass']='Passwort'; +$lang['ftp_dir']='Upload-Ordner'; +$lang['ftp_ssl']='Sichere SSL-FTP-Verbindung'; +$lang['ftp_useSSL']='benutze SSL-Verbindung'; + +$lang['sqlboxheight']='Höhe der SQL-Box'; +$lang['sqllimit']='Anzahl der Datensätze pro Seite'; +$lang['bbparams']='Einstellung für BB-Code'; +$lang['bbtextcolor']='Textfarbe'; + +$lang['config_expert']='Experten-Einstellungen'; +$lang['exp_chmod']='CHMod für das Arbeitsverzeichnis'; + +$lang["help_commands"]='Man kann vor und nach dem Backup einen Befehl ausführen lassen.'."\n".'Dies kann eine SQL-Anweisung sein oder ein Systembefehl (z.B.ein Script)'; +$lang['withalldbs']='bei jeder Datenbank'; +$lang['cbd']='Befehl vor dem Backup'; +$lang['cad']='Befehl nach dem Backup'; +$lang['exec']='ausführen'; +$lang['commkind']='Art des Befehls'; +$lang['command']='Befehl'; + + +// Sprachen +$lang['lang_de']='Deutsch'; +$lang['lang_en']='Englisch'; + +// Text aus menu.php +$lang['load_database']='Datenbanken neu laden'; +$lang['home']='Home'; +$lang['config']='Konfiguration'; +$lang['file_manage']='Verwaltung'; +$lang['log']='Log'; +$lang['project']='Über das Projekt'; +$lang['choose_db']='Datenbank wählen'; +$lang['credits']='Credits / Hilfe'; +$lang['onlinehelp']='Online-Hilfe'; + + +//Log +$lang['log_delete']='Log löschen'; + + +// Texte aus main.php +$lang['info_location']='Du befindest Dich auf '; +$lang['info_browser']='Dein Browser ist'; +$lang['info_admin']='Der Serveradministrator ist '; +$lang['info_databases']='Folgende Datenbank(en) befinden sich auf dem MySql-Server:'; +$lang['info_nodb']='Datenbank existiert nicht'; +$lang['info_table1']='Tabelle'; +$lang['info_table2']='n'; +$lang['info_dbdetail']='Detail-Info von Datenbank '; +$lang['info_dbempty']='Die Datenbank ist leer !'; +$lang['info_records']='Datensätze'; +$lang['info_size']='Grösse'; +$lang['info_lastupdate']='letztes Update'; +$lang['info_sum']='insgesamt'; +$lang['info_rechte']='Deine Rechte'; +$lang['info_cronyes']='Du kannst MySQL Dumper als Cronjob durchführen.'; +$lang['info_cronno']='Aufgrund deiner PHP-Einstellungen (safe_mode=on) kannst du MySQL Dumper nicht als Cronjob durchführen!'; +$lang['info_optimized']='optimiert'; +$lang['optimize_databases']='Tabellen optimieren'; +$lang['check_tables']='Tabellen überprüfen'; + +$lang['clear_database']='Datenbank leeren'; +$lang['delete_database']='Datenbank löschen'; +$lang['create_database']='neue Datenbank anlegen:'; +$lang['button_create_database']='anlegen'; + +$lang['info_created']='angelegt'; +$lang['info_cleared']='wurde geleert'; +$lang['info_deleted']='wurde gelöscht'; + +$lang['info_scriptdir']='Verzeichnis von MySQLDumper'; +$lang['info_workdir']='Arbeitsverzeichnis'; +$lang['info_backupdir']='Backupverzeichnis'; +$lang['info_cgidir']='CGI-Bin-Verzeichnis'; +$lang['info_cginr']='nicht vorhanden oder kein Zugriffsrecht'; +$lang['info_actdb']='Aktuelle Datenbank'; + +$lang['info_emptydb1']='Soll die Datenbank'; +$lang['info_emptydb2']=' wirklich geleert werden? (ACHTUNG: Alle Daten gehen unwideruflich verloren)'; +$lang['info_killdb']=' wirklich gelöscht werden? (ACHTUNG: Alle Daten gehen unwideruflich verloren)'; + +$lang['dbnoempty']='Datenbankname darf nicht leer sein !'; +$lang['processkill1']='Es wird versucht, Prozess '; +$lang['processkill2']=' zu beenden.'; +$lang['processkill3']='Es wird seit '; +$lang['processkill4']=' sec. versucht, Prozess '; + +$lang['htaccess1']='Verzeichnisschutz erstellen'; +$lang['htaccess2']='Passwort:'; +$lang['htaccess3']='Passwort (Wiederholung):'; +$lang['htaccess4']='Verschlüsselungsart:'; +$lang['htaccess5']='Linux und Unix-Systeme (Crypt)'; +$lang['htaccess6']='Windows (MD5)'; +$lang['htaccess7']='unverschlüsselt'; +$lang['htaccess8']='Es besteht bereits ein Verzeichnisschutz. Wenn Du einen neuen erstellst, wird der alte überschrieben !'; +$lang['htaccess9']='Du musst einen Namen eingeben!
'; +$lang['htaccess10']='Die Passwörter sind nicht identisch oder leer!
'; +$lang['htaccess11']='Soll der Verzeichnisschutz jetzt erstellt werden?'; +$lang['htaccess12']='Der Verzeichnisschutz wurde erstellt.'; +$lang['htaccess13']='Inhalt der Datei'; +$lang['htaccess14']='Es ist ein Fehler bei der Erstellung des Verzeichnisschutzes aufgetreten!
Bitte erzeuge die Dateien manuell mit folgendem Inhalt:'; +$lang['htaccess15']='Dringend empfohlen !'; +$lang['htaccess16']='.htaccess editieren'; +$lang['htaccess17']='.htaccess erstellen und editieren'; +$lang['htaccess18']='.htaccess erstellen in '; +$lang['htaccess19']=' neu laden '; + +$lang['htaccess20']='Skript ausführen'; +$lang['htaccess21']='Handler zufügen'; +$lang['htaccess22']='Ausführbar machen'; +$lang['htaccess23']='Verzeichnis-Listing'; +$lang['htaccess24']='Error-Dokument'; +$lang['htaccess25']='Rewrite aktivieren'; +$lang['htaccess26']='Deny / Allow'; +$lang['htaccess27']='Redirect'; +$lang['htaccess28']='Error-Log'; +$lang['htaccess29']='weitere Beispiele und Dokumentation'; + +$lang['htaccess30']='Provider'; +$lang['htaccess31']='allgemein'; +$lang['htaccess32']='Achtung! Die .htaccess hat eine direkte Auswirkung auf den Browser.
Bei falscher Anwendung sind die Seiten nicht mehr erreichbar.'; +$lang['phpbug']='Bug in zlib ! Keine Kompression möglich'; + + +//Mini-SQL +$lang['sql_warning']='Die Ausführung von SQL-Befehlen kann Daten manipulieren. Der Autor übernimmt keine Haftung bei Datenverlusten.'; +$lang['sql_back']='zurück zur Datenbank-Übersicht'; +$lang['database_overview']='Datenbank-Übersicht'; +$lang['sql_exec']='SQL-Befehl ausführen'; +$lang['sql_dataview']='Daten-Ansicht'; +$lang['sql_tableview']='Tabellen-Ansicht'; +$lang['sql_vonins']='von insgesamt'; +$lang['sql_nodata']='keine Datensätze'; + +$lang['sql_recordupdated']='Datensatz wurde geändert'; +$lang['sql_recordinserted']='Datensatz wurde gespeichert'; +$lang['sql_backdboverview']='zurück zur Datenbankübersicht'; +$lang['sql_recorddeleted']='Datensatz wurde gelöscht'; +$lang['sql_tabledeleted1']='Tabelle `'; +$lang['sql_tabledeleted2']='` wurde gelöscht'; +$lang['sql_recordedit']='edititere Datensatz'; +$lang['sql_recordnew']='Datensatz einfügen'; +$lang['sql_askdelete']='Soll der Datensatz gelöscht werden?'; +$lang['sql_askdeletetable1']='Soll die Tabelle `'; +$lang['sql_askdeletetable2']='` gelöscht werden?'; +$lang['sql_befehle']='SQL-Befehle'; +$lang['sql_befehlneu']='neuer Befehl'; +$lang['sql_befehlsaved1']='SQL-Befehl'; +$lang['sql_befehlsaved2']='wurde hinzugefügt'; +$lang['sql_befehlsaved3']='wurde gespeichert'; +$lang['sql_befehlsaved4']='wurde nach oben gebracht'; +$lang['sql_befehlsaved5']='wurde gelöscht'; + +$lang['sql_queryentry']='Die Abfrage enthält'; +$lang['sql_columns']='Spalten'; + +$lang['fm_askdbdelete1']='Möchtest Du die Datenbank '; +$lang['fm_askdbdelete2']=' samt Inhalt wirklich löschen?'; +$lang['fm_askdbempty1']='Möchtest Du die Datenbank '; +$lang['fm_askdbempty2']=' wirklich leeren?'; +$lang['fm_askdbcopy1']='Möchtest Du den Inhalt der Datenbank '; +$lang['fm_askdbcopy2']=' in die Datenbank '; +$lang['fm_askdbcopy3']=' kopieren?'; + +$lang['sql_tablenew']='Tabellen bearbeiten'; +$lang['sql_output']='SQL-Ausgabe'; +$lang['do_now']='jetzt ausführen'; +$lang['sql_namedest_missing']='Name für die Zieldatenbank fehlt!'; +$lang['sql_askdeletefield']='Soll das Feld gelöscht werden?'; +$lang['sql_commands_in']=' Zeilen in '; +$lang['sql_commands_in2']=' sek. abgearbeitet.'; +$lang['sql_out1']='Es wurden '; +$lang['sql_out2']='Befehle ausgeführt'; +$lang['sql_out3']='Es gab '; +$lang['sql_out4']='Kommentare'; +$lang['sql_out5']='Da die Ausgabe über 5000 Zeilen enthält, wird sie nicht angezeigt.'; +$lang['sql_error1']='Fehler bei der Anfrage:'; +$lang['sql_error2']='MySQL meldet:'; +$lang['sql_selecdb']='Datenbank auswählen'; +$lang['sql_tablesofdb']='Tabellen der Datenbank'; +$lang['sql_edit']='bearbeiten'; +$lang['sql_nofielddelete']='Löschen nicht möglich, da eine Tabelle mindestens 1 Feld haben muss.'; +$lang['sql_fielddelete1']='Das Feld'; +$lang['sql_deleted']='wurde gelöscht'; +$lang['sql_changed']='wurde geändert.'; +$lang['sql_created']='wurde angelegt.'; +$lang['sql_nodest_copy']='Ohne Ziel kann nicht kopiert werden !'; +$lang['sql_desttable_exists']='Zieltabelle existiert schon !'; +$lang['sql_scopy1']='Tabellenstruktur von'; +$lang['sql_scopy2']='wurde in Tabelle'; +$lang['sql_scopy3']='kopiert'; +$lang['sql_copied']='kopiert'; +$lang['sql_copy1']='wurde mit Daten in Tabelle'; +$lang['sql_tablenoname']='Tabelle braucht einen Namen !'; +$lang['sql_tblnameempty']='Tabellenname darf nicht leer sein !'; +$lang['sql_collatenotmatch']='Zeichensatz und Sortierung passen nicht zueinander !'; +$lang['sql_fieldnamenotvalid']='Fehler: Kein gültiger Feldname'; +$lang['sql_createtable']='Tabelle anlegen'; +$lang['sql_copytable']='Tabelle kopieren'; +$lang['sql_structureonly']='nur Struktur'; +$lang['sql_structuredata']='Struktur und Daten'; +$lang['sql_notablesindb']='Es befinden sich keine Tabellen in der Datenbank'; +$lang['sql_selecttable']='Tabelle auswählen'; +$lang['sql_showdatatable']='Daten der Tabelle anzeigen'; +$lang['sql_tblpropsof']='Tabelleneigenschaften von'; +$lang['sql_editfield']='Editiere Feld'; +$lang['sql_newfield']='Neues Feld'; +$lang['sql_indexes']='Indizes'; +$lang['sql_atposition']='an Position einfügen'; +$lang['sql_first']='zuerst'; +$lang['sql_after']='nach'; +$lang['sql_changefield']='Feld ändern'; +$lang['sql_insertfield']='Feld einfügen'; +$lang['sql_insertnewfield']='neues Feld einfügen'; +$lang['sql_tableindexes']='Indizes der Tabelle'; +$lang['sql_allowdups']='Duplikate erlaubt'; +$lang['sql_cardinality']='Kardinalität'; +$lang['sql_tablenoindexes']='Die Tabelle enthält keine Indizes'; +$lang['sql_createindex']='neuen Index erzeugen'; +$lang['sql_wasemptied']='wurde geleert'; +$lang['sql_renamedto']='wurde umbenannt in'; +$lang['sql_dbcopy1']='Der Inhalt der Datenbank'; +$lang['sql_dbcopy2']='wurde in die Datenbank'; +$lang['sql_dbscopy1']='Die Struktur der Datenbank'; +$lang['sql_wascreated']='wurde erzeugt'; +$lang['sql_renamedb']='Umbenennen der Datenbank'; +$lang['sql_actions']='Aktionen'; +$lang['sql_chooseaction']='Aktion wählen'; +$lang['sql_deletedb']='Datenbank löschen'; +$lang['sql_emptydb']='Datenbank leeren'; +$lang['sql_renamedb']='Datenbank umbenennen'; +$lang['sql_copydatadb']='Inhalt in Datenbank kopieren'; +$lang['sql_copysdb']='Struktur in Datenbank kopieren'; + + + +//Installation +$lang['install_forcescript']='MySQLDumper ohne Installation starten'; +$lang['install_tomenu']='zum Hauptmenü'; +$lang['installmenu']='Hauptmenü'; +$lang['step']='Schritt'; +$lang['install']='Installation'; +$lang['uninstall']='Deinstallation'; +$lang['tools']='Tools'; +$lang['editconf']='Konfiguration bearbeiten'; +$lang['osweiter']='ohne Speichern weiter'; +$lang['errorman']='Fehler beim Schreiben der Konfiguration!

Bitte editieren sie das File '; + +$lang['manuell']='manuell'; +$lang['createdirs']='erstelle Verzeichnisse'; +$lang['check0']=' ...ok Rechte: '; +$lang['check1']='prüfe Arbeitsverzeichnis ... '; +$lang['check2']='prüfe Backupverzeichnis ... '; +$lang['check3']='prüfe Strukturverzeichnis ... '; +$lang['check4']='prüfe Logverzeichnis ... '; +$lang['check5']='prüfe Konfigurationsverzeichnis ... '; +$lang['check6']='Ich habe die Verzeichnisse manuell erstellt, '; +$lang['check7']='Die Verzeichnisse wurden erstellt. speicher die Konfiguration ...'; +$lang['bitteweiter']='bitte weiter'; +$lang['install_continue']='mit der Installation fortfahren'; +$lang['installfinished']='
die Installation ist abgeschlossen --> starte MySQLDumper
'; + +$lang['connecttomysql']=' zu MySQL verbinden '; + +$lang['dbparameter']='Datenbank-Parameter'; +$lang['confignotwritable']='Das File "config.php" ist nicht schreibbar. Bitte die entsprechenden Rechte ändern !'; +$lang['testconnection']='Verbindung testen'; +$lang['dbconnection']='Datenbank-Verbindung'; +$lang['connectionerror']='Fehler: konnte keine Verbindung erstellen.'; +$lang['connection_ok']='Datenbank-Verbindung wurde hergestellt.'; +$lang['saveandcontinue']='speichern und Installation fortsetzen'; +$lang['confbasic']='Grundeinstellungen'; +$lang['install_step2finished']='Datenbankeinstellungen wurden gesichert.

Sie können mit der Standardkonfiguration die Installation fortsetzen oder die Konfiguration bearbeiten.'; +$lang['install_step2_1']='Installation mit Standardkonfiguration fortsetzen'; +$lang['laststep']='Abschluss der Installation'; + +$lang['ftpmode']='Verzeichnisse per FTP erzeugen (safe_mode)'; +$lang['safemodedesc']='Da PHP mit der Option "safe_mode=1" läuft, darf PHP keine Verzeichnisse anlegen.
Aus diesem Grund bleibt nur das Erzeugen der Verzeichnisse per FTP. Entweder Du erstellst die erforderlichen Verzeichnisse manuell und setzt die Rechte der Verzeichnisse (wichtig!), oder Du lässt das Script dies machen. Dazu musst Du die Verbindungs-Parameter angeben :'; +$lang['idomanual']='ich erstelle die Verzeichnisse manuell'; +$lang['dofrom']='ausgehend von'; +$lang['ftpmode2']='erstelle die Verzeichnisse per FTP'; +$lang['connect']='verbinden'; +$lang['dirs_created']='Die Verzeichnisse wurden ordnungsgemäss erstellt.'; +$lang['connect_to']='verbinde zu'; +$lang['changedir']='wechsel ins Verzeichnis'; +$lang['changedirerror']='Wechsel ins Verzeichnis nicht möglich'; +$lang['ftp_ok']='FTP-Parameter sind ok'; +$lang['createdirs2']='Verzeichnisse erstellen'; +$lang['ftp_notconnected']='Ftp-Verbindung nicht hergestellt!'; +$lang['connwith']='Verbindung mit'; +$lang['asuser']='als Benutzer'; +$lang['notpossible']='nicht möglich'; +$lang['dircr1']='erstelle Arbeitsverzeichnis'; +$lang['dircr2']='erstelle Backupverzeichnis'; +$lang['dircr3']='erstelle Strukturverzeichnis'; +$lang['dircr4']='erstelle Logverzeichnis'; +$lang['dircr5']='erstelle Konfigurationsverzeichnis'; +$lang['indir']='bin im Verzeichnis'; +$lang['test']='teste'; +$lang['check']='überprüfen'; +$lang['disabledfunctions']="Abgeschaltete Funktionen"; +$lang['noftppossible']="Es stehen keine FTP-Funktionen zur Verfügung!"; +$lang['nogzpossible']="Es stehen keine Kompressions-Funktionen zur Verfügung!"; + +$lang['ui1']='Es werden alle Arbeitsverzeichnisse incl. den darin enthaltenen Backups gelöscht.'; +$lang['ui2']='Sind Sie sicher, das Sie das möchten ?'; +$lang['ui3']='nein, sofort abbrechen'; +$lang['ui4']='ja, bitte fortfahren'; +$lang['ui5']='lösche Arbeitsverzeichnis'; +$lang['ui6']='alles wurde erfolgreich gelöscht.'; +$lang['ui7']='Bitte löschen sie das Skriptverzeichnis'; +$lang['ui8']='eine Ebene nach oben'; +$lang['ui9']='Ein Fehler trat auf, löschen war nicht möglich

Fehler bei Verzeichnis '; + +$lang['import']='Konfiguration importieren'; +$lang['import1']='Einstellungen aus "config.gz" importieren'; +$lang['import2']='Einstellungen hochladen und importieren'; +$lang['import3']='Die Konfiguration wurde geladen ...'; +$lang['import4']='Die Konfiguration wurde gesichert.'; +$lang['import5']='MySQLDumper starten'; +$lang['import6']='Installations-Menü'; +$lang['import7']='Konfiguration uploaden'; +$lang['import8']='zurück zum Upload'; +$lang['import9']='Dies ist keine Konfigurationssicherung !'; +$lang['import10']='Die Konfiguration wurde erfolgreich hochgeladen ...'; +$lang['import11']='Fehler: Es gab Probleme beim Schreiben der sql_statements'; +$lang['import12']='Fehler: Es gab Probleme beim Schreiben der config.php'; +$lang['expert']='erweitert'; +$lang['dbonlyneed']='... keine Database gefunden :
klick auf "erweitert" und gib den Namen der Datenbank an (nur mit folgender Datenbank verbinden ...)!'; +$lang['install_help_port']='(leer = Standardport)'; +$lang['install_help_socket']='(leer = Standardsocket)'; +$lang['tryagain']='nochmal versuchen'; + +?> \ No newline at end of file diff --git a/language/lang_en.php b/language/lang_en.php new file mode 100644 index 0000000..c896ac8 --- /dev/null +++ b/language/lang_en.php @@ -0,0 +1,681 @@ +Attention:Program can\'t continue in Safe-Mode!Create the following directories manually in the Scriptdirectory:

work
work/backup
work/config
work/log
work/structure

Give full permissions to the directories (chmod 777).
After that you can use MySQL Dumper without any problems.'; + +$lang['mailabsendererror']='Mail without Sender can\'t be send !'; +$lang['Ausgabe']='Output'; +$lang['Zusatz']='Addition'; +$lang['Variabeln']='Variables'; +$lang['berichtsent']='The Error-Report was sent successfully.'; +$lang['autobericht']='automatic generated Error-Report from'; +$lang['berichtman1']='Please send the Mail manually to the '; +$lang['Statusinformationen']='State Informations'; +$lang['Versionsinformationen']='Version Informations'; +$lang['MySQL Dumper Informationen']='MySQL Dumper Informations'; +$lang['Fehlerbericht']='Error-Report'; +$lang['backupfilesanzahl']='in the Backupdir there are '; +$lang['lastbackup']='Last Backup'; +$lang['notavail']='not available'; +$lang['vom']='from'; +$lang['mysqlvars']='Mysql-Variables'; +$lang['mysqlsys']='Mysql-Commands'; + +$lang['Status']='State'; +$lang['Prozesse']='Processes'; +$lang['info_novars']='no variables available'; +$lang['Inhalt']='Value'; +$lang['info_nostatus']='no state available'; +$lang['info_noprocesses']='no running processes'; + +//Hilfe-Texte +$lang['help_db']='This is the list of all Databases'; +$lang['help_praefix']='the prefix is a string at the beginning of a table name, which works as a filter.'; +$lang['help_sqltrenn']='A Seperator to seperate the SQL-Statements unambiguous.'; +$lang['help_zip']='Compression with GZip - recommended state is \'activated\''; +$lang['help_memorylimit']='The max. amount of memory in Bytes for the script'."\n".'0 = deactivated'; +$lang['memory_limit']='Memorylimit'; +$lang['help_budir']='Here is the folder where backups are placed..'; +$lang['help_mail1']='If activated, then after a backup, an email is sent with the backup as an attachment.'; +$lang['help_mail2']='This is the receiver of the email.'; +$lang['help_mail3']='This is the sender of the email.'; +$lang['help_mail4']='The maximum size for email-attach , if is 0 it will be ignored'; +$lang['help_mail5']='Here you can select if the backup should send as email-attach'; +$lang['help_ad1']='If activated, then backup files will be deleted automatically.'; +$lang['help_ad2']='the maximum number of days to keep backup file (for autodelete)'."\n".'0 = deactivated'; +$lang['help_ad3']='the maximum number of backup files (for autodelete)'."\n".'0 = deactivated'; +$lang['help_lang']='select your language'; +$lang["help_empty_db_before_restore"]='To eleminate useless data you can instruct to empty the database before restore'; +$lang['help_crontime']='the time in seconds the cronscript will get on top'; +$lang['help_cronmail']='Select if the Cronjob should send the Backup via Mail'; +$lang['help_cronmailprg']='the Path to your mailprogram, default is sendmail with given path'; +$lang['help_cronmailto']='the Adress for sending mail'; +$lang['help_cronftp']='Select if the Cronjob should send the Backup via FTP'; +$lang['help_cronzip']='Compression with GZip in Cronjob- recommended state is \'activated\' (you need the Compression-Lib installed!)'; +$lang['help_cronperlpath']='The Path to perl must be exact, other the script may not work.'."\n".'Default setting works in most cases.'; +$lang['help_cronextender']='The extension of the perlscriptes, default is \'.pl\''; +$lang['help_cronsavepath']='The name of the configurationfile for the perlscript'; +$lang['help_cronprintout']='If you want to start the script in the Browser you need it activated.'; +$lang['help_cronsamedb']='Use same database in cronjob like configured under Database?'; +$lang['help_crondbindex']='choose the database for cronjob'; +$lang['help_cronmail_dump']=''; + + +$lang['help_ftptransfer']='if activated, file will be sent via FTP.'; +$lang['help_ftpserver']='Address of the FTP-Server'; +$lang['help_ftpport']='Port of the FTP-Server, standard: 21'; +$lang['help_ftpuser']='enter username for FTP'; +$lang['help_ftppass']='enter password for FTP'; +$lang['help_ftpdir']='where is the upload-dir? enter path!'; +$lang['help_chmod']='Default setting is 777'; +$lang['help_speed']='Minimum and maximum speed, default is 50 to 5000'; +$lang['speed']='Speed-Control'; +$lang['help_cronexecpath']="The place of the perlscripts.\nStarting Point is the HTTP-Adress (like Adresses in the Browser)\nAllowed are absolute or relative entries."; + +$lang['cron_execpath']='Path of Perlscripts'; +$lang['help_browser']='Select your Browser.'."\n".'Attention: don\'t use Internet Explorer with the setting \'other Browser\' !'; + +// Text in filemanagement.php +$lang['fm_title']='File Administration'; +$lang['fm_uploadfilerequest']='please choose a file.'; +$lang['fm_uploadnotallowed1']='This file type is not supported.'; +$lang['fm_uploadnotallowed2']='Valid types are: *.gz and *.sql-files'; +$lang['fm_uploadmoveerror']='Couldn\'t move selected file to the upload-directory.'; +$lang['fm_uploadfailed']='The upload has failed!'; +$lang['fm_uploadfileexists']='A file with the same name already exists !'; +$lang['fm_nofile']='You didn\'t choose a file!'; +$lang['fm_delete1']='The file '; +$lang['fm_delete2']=' was deleted successfully.'; +$lang['fm_delete3']=' couldn\'t be deleted!'; +$lang['fm_choose_file']='chosen file:'; +$lang['fm_filename']='Filename'; +$lang['fm_filesize']='Filesize'; +$lang["fm_filedate"]='Filedate'; +$lang['fm_nofilesfound']='No file found.'; +$lang['fm_tables']='Tables'; +$lang['fm_records']='Records'; + +$lang['fm_all_bu']='all backups'; +$lang['fm_anz_bu']='Backups'; +$lang['fm_last_bu']='last Backup'; +$lang['fm_totalsize']='total size'; +$lang['fm_selecttables']='Select tables'; +$lang['fm_comment']='Enter Comment'; + +$lang['fm_sizesum']='Total size'; +$lang['fm_freespace']='Free space on server'; +$lang['fm_choosefile']='Choose a file to restore or delete:'; +$lang['fm_restore']='Restore'; +$lang['fm_alertrestore1']='Should the database'; +$lang['fm_alertrestore2']='be restored with the records from the file'; +$lang['fm_alertrestore3']=' ?'; +$lang['fm_delete']='Delete'; +$lang['fm_askdelete1']='Should the file '; +$lang['fm_askdelete2']=' really be deleted?'; +$lang['fm_askdelete3']='Do you want autodelete to be executed with configured rules now?'; +$lang['fm_askdelete4']='Do you want to delete all backup files?'; +$lang['fm_askdelete5']='Do you want to delete all backup files with '; +$lang['fm_askdelete5_2']='_* ?'; +$lang['fm_deleteauto']='execute autodelete manually'; +$lang['fm_deleteall']='delete all backup files'; +$lang['fm_deleteallfilter']='delete all with '; +$lang['fm_deleteallfilter2']='_*'; +$lang['fm_newdump']='Or start a new backup:'; +$lang['fm_startdump']='Start new backup'; +$lang['fm_upload']='Or upload file:'; +$lang['fm_fileupload']='Upload file'; +$lang['fm_fileimport']='Import SQL-File'; +$lang['fm_dbname']='Databasename'; +$lang['fm_files1']='Database Backups'; +$lang['fm_files2']='Database Structures'; +$lang['fm_autodel1']='Autodelete: the following files were deleted because of maximum files setting:'; +$lang['fm_autodel2']='Autodelete: the following files were deleted because of their date:'; + +$lang['fm_dumpsettings']='Configuration for Backup'; +$lang['fm_dumpsettings']='Configuration for Perl-Cronscript'; +$lang['fm_oldbackup']='(unknown)'; +$lang['fm_restore_header']='Restore of Database "'; +$lang['fm_restore_header2']='"'; +$lang['fm_dump_header']='Backup'; + +$lang['DoCronButton']='Do the Perl-Cronscript'; +$lang['DoPerlTest']='test perl-modules'; +$lang['DoSimpleTest']='test perl'; +$lang['cronperldesc']='This only works if you have Perl and the rights to use it
The address of the script is '; + + +// Text in dump.php +$lang['dump']='Backup'; +$lang['dump_headline']='Create backup...'; +$lang['gzip_compression']='GZip-Compression is'; +$lang['on']='on'; +$lang['off']='off'; +$lang['saving_table']='Saving table '; +$lang['of']='of'; +$lang['actual_table']='Actual table'; +$lang['progress_table']='Progress of table'; +$lang['progress_over_all']='Overall Progress'; +$lang['entry']='Entry'; +$lang['done']='Done!'; +$lang['file']='File'; +$lang['dump_successful']=' was successfully created.'; +$lang['upto']='up to'; +$lang['email_was_send']='Email was successfully sent to '; +$lang['back_to_control']='Continue'; +$lang['dump_filename']='Backup-File: '; +$lang['withpraefix']='with praefix'; +$lang['dump_notables']='No tables found in database '; +$lang['dump_notables2']='.'; +$lang['dump_endergebnis1']='The file contains '; +$lang['dump_endergebnis2']=' tables with '; +$lang['dump_endergebnis3']=' records.
'; +$lang['mailerror']='Sending of email failed!'; + +$lang['emailbody_n1']='The Attachment contains the backup of your MySQL-Database.
Backup of Database '; +$lang['emailbody_n2']='

Kind regards

MySQLDumper
www.mysqldumper.de'; +$lang['emailbody_mp1']='A Multipart-Backup was created.
The Backupfiles are not attached to this email!
Backup of Database `'; +$lang['emailbody_mp1an']='A Multipart-Backup was created.
The Backupfiles are attached to seperate emails!
Backup of Database `'; +$lang['emailbody_mp1a']='`

Following Files were created:

'; +$lang['emailbody_mp2']='`

Kind regards

MySQLDumper
www.mysqldumper.de'; +$lang['emailbody_tb1']='The Backupfile exceeded the maximum size of '; +$lang['emailbody_tb2']=' and was not attached to this email.
Backup of Database '; +$lang['emailbody_tb3']='

Kind regards

MySQLDumper
www.mysqldumper.de

Following File was created:

'; +$lang['emailbody_na']='Files are not attached to this email!
Backup of Database '; +$lang['only_attachment']=' ... only attachment'; + +$lang['tableselection']='Tableselection'; +$lang['selectall']='select all'; +$lang['deselectall']='select none'; +$lang['startdump']='start backup'; +$lang['datawith']='Records with'; +$lang['lastbufrom']='last update from'; +$lang['startrestore']='start restore'; +$lang['not_supported']='This backup does\'nt support this function.'; + +$lang['multidump1']='Multidump: Backup of '; +$lang['multidump2']=' Databases done.'; +$lang['filesendftp']='send file via FTP... please be patient. '; +$lang['ftpconnerror']='FTP-connection not established! Connection with '; +$lang['ftpconnerror1']=' as user '; +$lang['ftpconnerror2']=' not possible'; +$lang['ftpconnerror3']='FTP-Upload failed! '; +$lang['ftpconnected1']='Connected with '; +$lang['ftpconnected2']=' on '; +$lang['ftpconnected3']=' transfered successful'; + +// Text in restore.php +$lang['restore']='Restore'; +$lang['restore_db']='of database '; +$lang['restore_db1']=' on '; +$lang['restore_db2']='.
'; +$lang['restore_complete']=' tables created.'; +$lang['restore_run1']='
up to now '; +$lang['restore_run2']=' records were successfully added.'; +$lang['restore_run3']='
momentary the table '; +$lang['restore_run4']=' is receiving data.
'; +$lang['restore_run5']='of the file finished.'; +$lang['restore_total_complete']='
Congratulations.

The restoration of the database is done.
All data from the backup-file was re-restored.

Everything is done. :-)'; +$lang['db_no_connection']='Connection to database failed!'; +$lang['db_select_error']='
Error:
Selection of database '; +$lang['db_select_error2']=' failed!'; +$lang['file_open_error']='Error: could not open file.'; +$lang['restore_entryerror']='Error: command can\'t be done:'; + + +// Text in config_overview.php - Status +$lang['config_headline']='Configuration'; +$lang['sql_trenn']="Seperator"; +$lang['no_send_mail']='The dumpfile won\'t be mailed to anyone.'; +$lang['no_del_files']='There is no age limit for the backupfiles.'; +$lang['no_number_of_files']='There is no limit to the number of backupfiles.'; +$lang['save_success']='Configuration was saved.'; +$lang['save_error']='Error - unable to save configuration!'; +$lang['config_databases']='Databases'; +$lang['config_dumprestore']='Backup / Restore'; +$lang['config_email']='Email-Notification'; +$lang['config_autodelete']='Autodelete'; +$lang['config_interface']='Interface'; +$lang['config_cron']='Crondump-Settings'; +$lang['multi_part']='Multipart-Backup'; +$lang['multi_part_groesse']='maximum Filesize'; +$lang['help_multipart']='If Multipart is switched on, Backup creates multiple Backupfiles, which maximum size determined by the configuration below'; +$lang['help_multipartgroesse']='The maximum size of Backupfiles can be determined here, if Multipart is switched on'; +$lang['empty_db_before_restore']='delete tables before restoring'; +$lang['allpars']='all parameters'; +$lang['cron_timelimit']='Timelimit for Cronjob'; +$lang['cron_perlpath']='Path to perl(.exe)'; +$lang['cron_extender']='Fileextension'; +$lang['cron_savepath']='Configurationfile'; +$lang['cron_printout']='Print additional text'; +$lang['config_cronperl']='Crondump-Settings for perlscript'; +$lang['cron_mail']='Send backup per mail'; +$lang['cron_mailprg']='Mailprogram'; +$lang['cron_mailto']='Mailadress'; +$lang['cron_ftp']='Send backup per FTP'; +$lang['optimize']='Optimize Tables before Backup'; +$lang['help_optimize']='If this option is activated, all tables will be optimized before the backup'; +$lang["help_ftptimeout"]='Die Zeit, die bei keiner Übertragung zum Timeout führt, Default 90 sek.'; +$lang["ftp_timeout"]='Connection-Timeout'; +$lang["help_ftpssl"]=''; + +$lang['useconnection']='Use connection'; +$lang['wrongconnectionpars']='Wrong or empty connection parameters !'; +$lang['conn_not_pssible']='Connection not possible !'; +$lang['servercaption']='Display Server'; +$lang['help_servercaption']='When using MySQLDumper on different systems it can be helpful to fade in the server address coloured characterized'; +$lang['otherbrowser']='other Browser'; +$lang['activate_multidump']='activate multidump'; +$lang['praefix']='Table-Prefix'; +$lang['config_askload']='Do you want to override the actual settings with the default settings?'; +$lang['load']='load default settings'; +$lang['load_success']='The default settings were loaded.'; +$lang['cron_samedb']='use actual database'; +$lang['cron_crondbindex']='Database and Table-Prefix
      for the Cronjob'; +$lang['withattach']=' with attach'; +$lang['withoutattach']=' without attach'; +$lang['multidumpconf']='=Multidump Configuration='; +$lang['multidumpall']='=all Databases='; + +$lang['gzip']='GZip-compression'; +$lang['backup_dir']='Directory for Backup files'; +$lang['db_host']='Host name'; +$lang['saving_db_form']='Database'; +$lang['db_user']='User'; +$lang['db_pass']='Password'; +$lang['db_only']='only connect to this database'; +$lang['send_mail_form']='Send emailreport'; +$lang['send_mail_dump']='Attach backup'; +$lang['email_adress']='Email address'; +$lang['email_subject']='Sender address of the email'; +$lang['email_maxsize']='Maximum size of attachment'; +$lang['age_of_files']='Delete by age of files (in days)'; +$lang['number_of_files_form']='Delete by number of files'; +$lang['language']='Language'; +$lang['list_db']='Configured Databases:'; +$lang['save']='Save'; +$lang['reset']='Reset'; +$lang['autodelete']='Delete backups automatically'; +$lang['max_backup_files_each1']='For all databases'; +$lang['max_backup_files_each2']='For each database'; +$lang['config_ftp']='FTP-Transfer of Backupfile'; + +$lang['ftp_transfer']='FTP-Transfer'; +$lang['ftp_server']='Server'; +$lang['ftp_port']='Port'; +$lang['ftp_user']='User'; +$lang['ftp_pass']='Password'; +$lang['ftp_dir']='Upload-Dir'; +$lang['ftp_ssl']='Secure SSL-FTP connection'; +$lang['ftp_useSSL']='use SSL-Connection'; + +$lang['sqlboxheight']='Height of SQL-Box'; +$lang['sqllimit']='Count of records each page'; +$lang['bbparams']='Configuration for BB-Code'; +$lang['bbtextcolor']='Textcolor'; + +$lang['config_expert']='Expert-Configuration'; +$lang['exp_chmod']='CHMod for Work-Dir'; + + +$lang["help_commands"]='You can execute a command before and after the backup.'."\n".'This command can be a SQL-Construct or a System Command (e.g. a script)'; +$lang['withalldbs']='with every database'; +$lang['cbd']='Command before Backup'; +$lang['cad']='Command after Backup'; +$lang['exec']='execute'; +$lang['commkind']='Kind of Command'; +$lang['command']='Command'; + +// Sprachen +$lang['lang_de']='German'; +$lang['lang_en']='English'; + +// Text aus menu.php +$lang['load_database']='Reload databases'; +$lang['home']='Home'; +$lang['config']='Config'; +$lang['file_manage']='File Administration'; +$lang['log']='Log'; +$lang['project']='About this project'; +$lang['choose_db']='choose Database'; +$lang['credits']='Credits / Help'; +$lang['onlinehelp']='Online-Help'; + + +//Log +$lang['log_delete']='delete Log'; + + +// Texte aus main.php +$lang['info_location']='Your location is '; +$lang['info_browser']='Your Browser is'; +$lang['info_admin']='The Server\'s administrator is '; +$lang['info_databases']='The following database(s) are on your server:'; +$lang['info_nodb']='database does not exist.'; +$lang['info_table1']='Table'; +$lang['info_table2']='s'; +$lang['info_dbdetail']='Detail-Info of database '; +$lang['info_dbempty']='The database is empty !'; +$lang['info_records']='Records'; +$lang['info_size']='Size'; +$lang['info_lastupdate']='last Update'; +$lang['info_sum']='total'; +$lang['info_rechte']='Your Priviliges'; +$lang['info_cronyes']='Du kannst MySQL Dumper als Cronjob durchführen.'; +$lang['info_cronno']='Aufgrund deiner PHP-Einstellungen (safe_mode=on) kannst du MySQL Dumper nicht als Cronjob durchführen!'; +$lang['info_optimized']='optimized'; +$lang['optimize_databases']='Optimize Tables'; +$lang['check_tables']='Check Tables'; + +$lang['clear_database']='Clear database'; +$lang['delete_database']='Delete database'; +$lang['create_database']='Create new database:'; +$lang['button_create_database']='Create'; + +$lang['info_created']='created'; +$lang['info_cleared']='was cleared'; +$lang['info_deleted']='was deleted'; + +$lang['info_scriptdir']='Directory of MySQLDumper'; +$lang['info_workdir']='Working directory'; +$lang['info_backupdir']='Backup directory'; +$lang['info_cgidir']='CGI-Bin-Directory'; +$lang['info_cginr']='does not exist or is forbidden'; +$lang['info_actdb']='Actual Database'; + +$lang['info_emptydb1']='Should the Database'; +$lang['info_emptydb2']=' be truncated? (Attention: All Data will be lost forever!)'; +$lang['info_killdb']=' be deleted? (Attention: All Data will be lost forever!)'; + +$lang['dbnoempty']='Databasename can\'t be empty !'; +$lang['processkill1']='The script tries to kill process '; +$lang['processkill2']=''; +$lang['processkill3']='The script tries since '; +$lang['processkill4']=' sec. to kill the process '; + +$lang['htaccess1']='create directory protection'; +$lang['htaccess2']='Password:'; +$lang['htaccess3']='Password (repeat):'; +$lang['htaccess4']='Kind of encrypting:'; +$lang['htaccess5']='Crypt (Linux and Unix-Systems)'; +$lang['htaccess6']='MD5 (Windows)'; +$lang['htaccess7']='plain text (no cryption)'; +$lang['htaccess8']='It already exists an directory protection. If you create a new one, the older one will be overwritten !'; +$lang['htaccess9']='You have to enter a name !
'; +$lang['htaccess10']='The Passwords are not identically or empty !
'; +$lang['htaccess11']='Shell the directory protection be written now ?'; +$lang['htaccess12']='The directory protection was created.'; +$lang['htaccess13']='Contents of file:'; +$lang['htaccess14']='There was an error while creating the directory protection !
Pleas create the 2 files manually with following content:'; +$lang['htaccess15']='Urgently recommended !'; +$lang['htaccess16']='edit .htaccess'; +$lang['htaccess17']='create and edit .htaccess'; +$lang['htaccess18']='create .htaccess in '; +$lang['htaccess19']=' reload '; + +$lang['htaccess20']='execute script'; +$lang['htaccess21']='add handler'; +$lang['htaccess22']='make executable'; +$lang['htaccess23']='Directory-Listing'; +$lang['htaccess24']='Error-Document'; +$lang['htaccess25']='activate Rewrite'; +$lang['htaccess26']='Deny / Allow'; +$lang['htaccess27']='Redirect'; +$lang['htaccess28']='Error-Log'; +$lang['htaccess29']='more examples and documentation'; + +$lang['htaccess30']='Provider'; +$lang['htaccess31']='allgemein'; +$lang['htaccess32']='Attention! The .htaccess directly manipulate the browser behavior.
With wrong application the sides are no longer attainable.'; +$lang['phpbug']='Bug in zlib ! No Compression possible'; + +//Mini-SQL +$lang['sql_warning']='The Execution of SQL-Statements can manipulate Data. The Author doesn\'t take any liability for losing data.'; +$lang['sql_back']='back to Database-Overview'; +$lang['database_overview']='Database-Overview'; +$lang['sql_exec']='execute SQL-Statement'; +$lang['sql_dataview']='Data-View'; +$lang['sql_tableview']='Table-View'; +$lang['sql_vonins']='from totally'; +$lang['sql_nodata']='no records'; + +$lang['sql_recordupdated']='Record was updated'; +$lang['sql_recordinserted']='Record was added'; +$lang['sql_backdboverview']='back to Overview'; +$lang['sql_recorddeleted']='Record was deleted'; +$lang['sql_tabledeleted1']='Table `'; +$lang['sql_tabledeleted2']='` was deleted'; +$lang['sql_recordedit']='edit record'; +$lang['sql_recordnew']='new record'; +$lang['sql_askdelete']='Are you sure to delete this record?'; +$lang['sql_askdeletetable1']='Shell the table `'; +$lang['sql_askdeletetable2']='` be deleted?'; +$lang['sql_befehle']='SQL-Commands'; +$lang['sql_befehlneu']='new Command'; +$lang['sql_befehlsaved1']='SQL-Command'; +$lang['sql_befehlsaved2']='was added'; +$lang['sql_befehlsaved3']='was saved'; +$lang['sql_befehlsaved4']='was moved up'; +$lang['sql_befehlsaved5']='was deleted'; + +$lang['sql_queryentry']='The Query contains'; +$lang['sql_columns']='Columns'; + +$lang['fm_askdbdelete1']='Do you want to delete the Database '; +$lang['fm_askdbdelete2']=' with the content?'; +$lang['fm_askdbempty1']='Do you want to empty the Database '; +$lang['fm_askdbempty2']=' ?'; +$lang['fm_askdbcopy1']='Do you want to copy the Database '; +$lang['fm_askdbcopy2']=' in the Database '; +$lang['fm_askdbcopy3']=' ?'; + +$lang['sql_tablenew']='Edit Tables'; +$lang['sql_output']='SQL-Output'; +$lang['do_now']='operate now'; +$lang['sql_namedest_missing']='Name of Destination is missing !'; +$lang['sql_askdeletefield']='Do you want to delete the Field?'; +$lang['sql_commands_in']=' lines in '; +$lang['sql_commands_in2']=' sec. parsed.'; +$lang['sql_out1']='Executed '; +$lang['sql_out2']='Commands'; +$lang['sql_out3']='It had '; +$lang['sql_out4']='Comments'; +$lang['sql_out5']='Because the output contains more than 5000 lines it is\'nt displayed.'; +$lang['sql_error1']='Error in Query:'; +$lang['sql_error2']='MySQL says:'; +$lang['sql_selecdb']='Select Database'; +$lang['sql_tablesofdb']='Tables of Database'; +$lang['sql_edit']='edit'; +$lang['sql_nofielddelete']='Delete is not possible because Tables must contain at least one field.'; +$lang['sql_fielddelete1']='The Field'; +$lang['sql_deleted']='was deleted'; +$lang['sql_changed']='was changed.'; +$lang['sql_created']='was created.'; +$lang['sql_nodest_copy']='No Copy without Destination !'; +$lang['sql_desttable_exists']='Destination Table exists !'; +$lang['sql_scopy1']='Tablestructure of'; +$lang['sql_scopy2']='was copied in Table'; +$lang['sql_scopy3']=''; +$lang['sql_copied']='copied'; +$lang['sql_copy1']='was copied with data in Table'; +$lang['sql_tablenoname']='Table needs a name!'; +$lang['sql_tblnameempty']='Tablename can\'t be empty!'; +$lang['sql_collatenotmatch']='Charset and Collation don\'t fit together!'; +$lang['sql_fieldnamenotvalid']='Error: No valid fieldname'; +$lang['sql_createtable']='create table'; +$lang['sql_copytable']='copy table'; +$lang['sql_structureonly']='only Structur'; +$lang['sql_structuredata']='Structur and Data'; +$lang['sql_notablesindb']='No tables found in Database'; +$lang['sql_selecttable']='select table'; +$lang['sql_showdatatable']='Show Data of Table'; +$lang['sql_tblpropsof']='Tableproperties of'; +$lang['sql_editfield']='Edit field'; +$lang['sql_newfield']='New field'; +$lang['sql_indexes']='Indexes'; +$lang['sql_atposition']='insert at position'; +$lang['sql_first']='first'; +$lang['sql_after']='after'; +$lang['sql_changefield']='change field'; +$lang['sql_insertfield']='insert field'; +$lang['sql_insertnewfield']='insert new field'; +$lang['sql_tableindexes']='Indexes of table'; +$lang['sql_allowdups']='Duplicates allowed'; +$lang['sql_cardinality']='Cardinality'; +$lang['sql_tablenoindexes']='No Indexes in Table'; +$lang['sql_createindex']='create new index'; +$lang['sql_wasemptied']='was emptied'; +$lang['sql_renamedto']='was renamed to'; +$lang['sql_dbcopy1']='The Content of Database'; +$lang['sql_dbcopy2']='was copied in Database'; +$lang['sql_dbscopy1']='The Structure of Database'; +$lang['sql_wascreated']='was created'; +$lang['sql_renamedb']='Rename Database'; +$lang['sql_actions']='Actions'; +$lang['sql_chooseaction']='choose Action'; +$lang['sql_deletedb']='Delete Database'; +$lang['sql_emptydb']='Empty Database'; +$lang['sql_renamedb']='Rename Database'; +$lang['sql_copydatadb']='Copy complete Database to'; +$lang['sql_copysdb']='Copy Structure of Database'; + +//Installation +$lang['install_forcescript']='Start MySQLDumper without installation'; +$lang['install_tomenu']='Back to main menu'; +$lang['installmenu']='Main menu'; +$lang['step']='Step'; +$lang['install']='Installation'; +$lang['uninstall']='Uninstall'; +$lang['tools']='Tools'; +$lang['editconf']='edit Configuration'; +$lang['osweiter']='continue without saving'; +$lang['errorman']='Error while saving the Configuration!
Please edit the File '; + +$lang['manuell']='manually'; +$lang['createdirs']='create Directories'; +$lang['check0']=' ...ok Rights: '; +$lang['check1']='checking work-directory ... '; +$lang['check2']='checking backup-directory ... '; +$lang['check3']='checking structure-directory ... '; +$lang['check4']='checking log-directory ... '; +$lang['check5']='checking configuration-directory ... '; +$lang['check6']='I have created the directories manually, '; +$lang['check7']='Directories were created. Saving configuration ...'; +$lang['bitteweiter']='please continue'; +$lang['install_continue']='continue with installation'; +$lang['installfinished']='
Installation completed --> start MySQLDumper
'; + +$lang['connecttomysql']=' connect to MySQL '; + + +$lang['dbparameter']='Database-Parameter'; +$lang['confignotwritable']='The file "config.php" is not writable. Please CHMOD fie to 777!'; +$lang['testconnection']='test connection'; +$lang['dbconnection']='Database-Connection'; +$lang['connectionerror']='Error: unable to connect.'; +$lang['connection_ok']='Database-Connection was established.'; +$lang['saveandcontinue']='Save and continue installation'; +$lang['confbasic']='Basic Parameter'; +$lang['install_step2finished']='Database-Parameter were saved.

You may continue installation with Default-Settings or edit configuration.'; +$lang['install_step2_1']='continue installation with the Default-Settings'; +$lang['laststep']='Installation Finish'; + +$lang['ftpmode']='Create necessary directories in safe-mode'; +$lang['safemodedesc']='Because PHP is running in "safe-mode", it is not allowed to create directorys on this server.
The only way to create directories is using FTP or doing it by yourself. Either you create the dirs manually and set the write permissions to CHMOD 0777 (!!!) or let the script do it via FTP. In order to do so you must enter the correct connection parameters to your FTP-Server:'; +$lang['idomanual']='I create the dirs myself'; +$lang['dofrom']='starting from'; +$lang['ftpmode2']='create the dirs with FTP'; +$lang['connect']='connect'; +$lang['dirs_created']='The dirs were created.'; +$lang['connect_to']='connect to'; +$lang['changedir']='change to dir'; +$lang['changedirerror']='change to dir was not possible'; +$lang['ftp_ok']='FTP-Parameter are ok'; +$lang['createdirs2']='create dirs'; +$lang['ftp_notconnected']='Ftp-Connection not established!'; +$lang['connwith']='Connection with'; +$lang['asuser']='as user'; +$lang['notpossible']='not possible'; +$lang['dircr1']='create workdir'; +$lang['dircr2']='create backupdir'; +$lang['dircr3']='create structurdir'; +$lang['dircr4']='create logdir'; +$lang['dircr5']='create configurationdir'; +$lang['indir']='now in dir'; +$lang['test']='test'; +$lang['check']='check my dirs'; +$lang['disabledfunctions']="Disabled Functions"; +$lang['noftppossible']="You don't have ftp-functions !"; +$lang['nogzpossible']="You don't have compression-functions !"; + +$lang['ui1']='All working directories which can contain backups will be deleted.'; +$lang['ui2']='Are you sure you want that?'; +$lang['ui3']='no, cancel immediately'; +$lang['ui4']='yes, please continue'; +$lang['ui5']='delete working directories'; +$lang['ui6']='all was deleted successfully.'; +$lang['ui7']='Please delete the script directory'; +$lang['ui8']='one level up'; +$lang['ui9']='An error occured, deleting was not possible

Error with directory '; + +$lang['import']='Import Configuration'; +$lang['import1']='Import settings from "config.gz"'; +$lang['import2']='Upload and import settings'; +$lang['import3']='Configuration was loaded ...'; +$lang['import4']='Configuration was saved.'; +$lang['import5']='start MySQLDumper'; +$lang['import6']='Installation-Menu'; +$lang['import7']='Upload configuration'; +$lang['import8']='back to upload'; +$lang['import9']='This is not a configuration backup !'; +$lang['import10']='Configuration was uploaded successfully ...'; +$lang['import11']='Error: There were problems writing sql_statements'; +$lang['import12']='Error: There were problems writing config.php'; +$lang['expert']='extended'; +$lang['dbonlyneed']='... no Database found :
click on "extended" and enter name of your Database (only connect to database ...)!'; +$lang['install_help_port']='(empty = Default Port)'; +$lang['install_help_socket']='(empty = Default Socket)'; +$lang['tryagain']='try again'; + +?> \ No newline at end of file diff --git a/log.php b/log.php new file mode 100644 index 0000000..ee6ccd8 --- /dev/null +++ b/log.php @@ -0,0 +1,79 @@ +$lcap"; + +if(!is_writable($config["paths"]["log"])) die('ERROR !
Logdir is not writable
'); + + +//lesen +$td=''; +$errorbutton=$td.''; +$perlbutton= $td.''; +$perlbutton2=$td.'' ; +//anzeigen +echo '
'; +echo $td.''; +echo $errorbutton.$perlbutton.$perlbutton2; +echo $td.''; +echo '

'; + + +if($r<2) { + echo '
';
+	$zeilen = file($lfile );
+	$zeilen=array_reverse($zeilen);
+	foreach($zeilen as $zeile) echo $zeile;
+	echo '
'; +} elseif ($r==2) { + echo ''; +} elseif ($r==3) { + echo '
';
+	$zeilen = file($lfile );
+	foreach($zeilen as $zeile) echo $zeile;
+	echo '
'; +} + + +include("inc/footer.php"); +?> + diff --git a/main.php b/main.php new file mode 100644 index 0000000..9cb3c6b --- /dev/null +++ b/main.php @@ -0,0 +1,610 @@ +".$databases["db_selected_index"].""; +//$config["disabled"]=ini_get("disable_functions"); +//vars +$td=''; +$action=(isset($_GET["action"])) ? $_GET["action"] : "status"; +$checkit=(isset($_GET["checkit"])) ? urldecode($_GET["checkit"]) : ""; +$repair=(isset($_GET["repair"])) ? $_GET["repair"] : 0; +$is_htaccess=(file_exists(".htaccess")); +if($is_htaccess) $htaccess_exist=file(".htaccess"); +$dba=$hta_dir=$Overwrite=$msg=""; + + +//MySQL-Verbindung herstellen +MSD_mysql_connect(); + +if(isset($_GET["help"]) && $_GET["help"]==1) { + echo '

Verzeichnis-Hilfe

'; + + if($_GET["dir"]=="config") $helpdir=$config["paths"]["config"]; + if($_GET["dir"]=="backup") $helpdir=$config["paths"]["backup"]; + if($_GET["dir"]=="structure") $helpdir=$config["paths"]["structure"]; + if($_GET["dir"]=="log") $helpdir=$config["paths"]["log"]; + + echo 'Hilfe zu '.$_GET["dir"].'-Verzeichnis ('.$helpdir.')

'; + @chmod($helpdir, 0777); + + if(!is_writable($helpdir)) { + echo "
Verzeichnis $helpdir ist nicht schreibbar.
chmod scheitert.
"; + } else { + echo "Verzeichnis $helpdir ist schreibbar.
"; + } + + exit; + +} + +if(isset($_POST["htaccess"]) || $action=="schutz") { + + if($is_htaccess) $Overwrite='

'.$lang["htaccess8"].'

'; + $cry_txt=array($lang["htaccess5"],$lang["htaccess6"],$lang["htaccess7"]); + $step=(isset($_POST["step"]))?$_POST["step"]:0; + $cryptart=(isset($_POST["cryptart"])) ? $_POST["cryptart"] :0; + $uname=(isset($_POST["username"])) ? $_POST["username"] : ""; + $upass1=(isset($_POST["userpass1"])) ? $_POST["userpass1"] : ""; + $upass2=(isset($_POST["userpass2"])) ? $_POST["userpass2"] : ""; + + if($step==1) { + $msg=""; + if($uname=="") $msg=$lang["htaccess9"]; + if(($upass1!=$upass2) || ($upass1=="")) $msg.=$lang["htaccess10"]; + if($msg!="") { + $msg='

'.$msg.'

'; + $step=0; + } else { + $msg='

'.$lang["htaccess11"].'

'; + } + } elseif($step==2) { + $htaccess = "AuthName \"MySQLDump\"\nAuthType Basic\nAuthUserFile ". $config["paths"]["root"]."/.htpasswd\n\nrequire valid-user\n"; + if($cryptart==0) $userpass=crypt($upass1); + elseif($cryptart==1) $userpass=md5($upass1); + else $userpass=$upass1; + $htpasswd = $uname.":".$userpass; + if($file_htpasswd=@fopen(".htpasswd","w")) { + fputs($file_htpasswd,$htpasswd); + fclose($file_htpasswd); + $file_htaccess=@fopen(".htaccess","w"); + fputs($file_htaccess,$htaccess); + fclose($file_htaccess); + $msg= $lang["htaccess12"].'


'.$lang["htaccess13"].' .htaccess:'."\n".htmlspecialchars($htaccess).'


'.$lang["htaccess13"].' .htpasswd:'."\n". htmlspecialchars($htpasswd)."
"; + } else {$msg='

'.$lang["htaccess14"].'


'.$lang["htaccess13"].' .htaccess:'."\n".htmlspecialchars($htaccess).'


'.$lang["htaccess13"].' .htpasswd:'."\n". htmlspecialchars($htpasswd).'
';} + } + + //Ausgabe + echo '

'.$lang["htaccess1"].'

'.$Overwrite; + if($step<2){ + + + if($step==0) { + $un=''; + $p1=''; + $p2=''; + $cry=''.$cry_txt[0].'  '.$cry_txt[1]; + } else { + $un=$uname.''; + $p1='***************'; + $p2='***************'; + $cry=''.$cry_txt[$cryptart]; + } + echo $msg.'
'; + echo ''; + echo '
Name'.$un.'
'.$lang["htaccess2"].''.$p1.'
'.$lang["htaccess3"].''.$p2.'
'.$lang["htaccess4"].' '.$cry.'

'; + echo '
'; + + + } else echo $msg; + echo "











"; + include("inc/footer.php"); + die(); + +} + + +if(isset($_POST["error_submit"])) { + + $debug_adress="debug@daniel-schlichtholz.de"; + //$debug_adress="admin@localhost"; + + if(!isset($_POST["error_absender"]) || $_POST["error_absender"]=="") { + echo '

'.$lang["mailabsendererror"].'

'; + echo 'back ...'; + die; + } + if($_POST["error_name"]=="")$_POST["error_name"]=$_POST["error_absender"]; + $header="From: ".$_POST["error_name"]." <".$_POST["error_absender"].">\n"; + $header .= "Reply-To: ".$_POST["error_absender"]."\n"; + $header .= "X-Mailer: PHP/" . phpversion(). "\n"; + $header .= "X-Sender-IP: $REMOTE_ADDR\n"; + $header .= "Content-Type: text/html"; + $subject=stripslashes($_POST["error_subject"]); + $body="=======================================
Art: ".$_POST["error_kind"]."

"; + $body.=$lang['Ausgabe'].": ".stripslashes(nl2br($_POST["error_aus"]))."

"; + $body.=$lang['Zusatz'].": ".nl2br($_POST["error_zusatz"])."

"; + $body.=$lang['Variabeln'].": ".nl2br($_POST["error_vars"]); + $body.="
=======================================

"; + + if (@mail($debug_adress, $subject, $body, $header)) { + echo $lang['berichtsent']."

"; + } else { + echo '

'.$lang["mailerror"].'

'; + $body=$lang['autobericht']." '".$_POST["error_name"]."'

".$body; + $b=str_replace("
","\n",$body); + $b=str_replace("","\n",$b); + $b=rawurlencode(strip_tags($b)); + echo $lang['berichtman1'].' Debug-Team'; + + } + +} + +if($action=="edithtaccess") { + $htaccessdontexist=0; + + if((isset($_GET["create"]) && $_GET["create"]==1 ) || (isset($_POST["create"]) && $_POST["create"]==1)) { + $fp = fopen("$hta_dir.htaccess", "w"); + fwrite ($fp,"# created by MySQLDumper ".$config["version"]."\n"); + fclose ($fp); + } + if(isset($_POST["newload"])){ + $hta_dir=(isset($_POST["newhtadir"])) ? $_POST["newhtadir"] : ""; + } else $hta_dir=(isset($_POST["hta_dir"])) ? $_POST["hta_dir"] : ""; + if($hta_dir !="" && substr($hta_dir,-1)!="/")$hta_dir.="/"; + + if(isset($_POST["submit"]) && isset($_POST["thta"])){ + $fp = fopen("$hta_dir.htaccess", "w"); + fwrite ($fp,$_POST["thta"]); + fclose ($fp); + } + if(file_exists("$hta_dir.htaccess")){ + $htaccess_exist=file("$hta_dir.htaccess"); + } else { + $htaccessdontexist=1; + } + + + echo '

'.$lang["htaccess16"].'

'; + echo '

'.$lang['htaccess32'].'

'; + echo '
File: .htaccess   '; + if($htaccessdontexist!=1) { + echo '


'; + echo '
'; + //Presets + echo '
Presets

'.$lang['htaccess30'].'

+ all-inkl
+ +

'.$lang['htaccess31'].'

+ '.$lang['htaccess20'].'
+ '.$lang['htaccess21'].'
+ '.$lang['htaccess22'].'
+ '.$lang['htaccess23'].'
+ '.$lang['htaccess24'].'
+ '.$lang['htaccess25'].'
+ '.$lang['htaccess26'].'
+ '.$lang['htaccess27'].'
+ '.$lang['htaccess28'].'
+
+ '.$lang['htaccess29'].' + '; + echo '
'.$lang['htaccess18'].'
'; + echo '   '; + echo '   '; + echo '
'; + } else { + echo '

'.$hta_dir.'.htaccess existiert nicht. Soll sie erstellt werden ?

'; + echo '
'; + } + echo '
zurück'; + //echo "
$_POST[thta]
"; + exit; +} +if($action=="phpinfo") { + phpinfo(); + echo '

Home

'; + exit; +} +if($action=="extinfo") { + echo ErrorReport(); + exit; +} + +if($action=="db") { + for($i=0;$i"; + break; + } + if(isset($_POST["kill".$i])) { + $res=mysql_query("DROP DATABASE `".$databases["Name"][$i]."`") or die(mysql_error().""); + $dba= '

'.$lang["db"]." ".$databases["Name"][$i]." ".$lang["info_deleted"]."

"; + SetDefault(true); + include ($config["files"]["parameter"]); + echo ''; + break; + } + if(isset($_POST["optimize".$i])) { + mysql_select_db($databases["Name"][$i],$config["dbconnection"]); + $res = mysql_list_tables($databases["Name"][$i],$config["dbconnection"]); + $tabellen=""; + WHILE ($row=mysql_fetch_row($res)) $tabellen.=$row[0].","; + $tabellen=substr($tabellen,0,(strlen($tabellen)-1)); + if ($tabellen>"") + { + $query="OPTIMIZE TABLE ".$tabellen; + $res=mysql_query($query) or die(mysql_error().""); + } + $_GET["dbid"]=$i; + $dba= '

'.$lang["db"].' '.$databases["Name"][$i].' '.$lang["info_optimized"].'.

'; + break; + } + if(isset($_POST["check".$i])) { + $checkit="ALL";$_GET["dbid"]=$i; + } + } +} + +if($action=="newdb") { + if(isset($_POST["submit"])) { + if ($_POST["dbneu"]==""){ + $dba='

'.$lang["dbnoempty"].'

'; + } else { + $sql_command="CREATE DATABASE `".$_POST["dbneu"]."`"; + $res=mysql_query($sql_command,$config["dbconnection"]); + $meldung=mysql_error($config["dbconnection"]); + if ($meldung!="") + $dba='

MySQL-Error: '.$meldung.'

'; + else { + SetDefault(true); + include ($config["files"]["parameter"]); + $dba='

'.$lang["db"]." '".$_POST["dbneu"]."' ".$lang["info_created"]."

"; + echo ''; + } + } + } + $action="db"; +} + + + + +//Hier beginnt die Ausgabe +echo "

Home

"; +echo '
'; +echo $td.''; +echo $td.''; +echo $td.''; +echo $td.''; +echo '

'; + + +if($action=="status") { + //Infos über Backups + $Sum_Files=$Sum_Size=0; + $Last_BU=Array(); + $sm=($config["safe_mode"]==1) ? " (Safemode)" : ""; + + $dh = opendir($config["paths"]["backup"]); + while (false !== ($filename = readdir($dh))) + { + if ($filename != "." && $filename != ".." && !is_dir($config["paths"]["backup"].$filename)){ + $files[] = $filename; + $Sum_Files++; + $Sum_Size+=filesize($config["paths"]["backup"].$filename); + $ft=filectime($config["paths"]["backup"].$filename); + if(!isset($Last_BU[2]) || (isset($Last_BU[2]) && $ft>$Last_BU[2])){ + $Last_BU[0]=$filename; + $Last_BU[1]=date("d.m.Y h:i",$ft); + $Last_BU[2]=$ft; + } + } + } + require("inc/runtime.php"); + $status='
'.$lang['Statusinformationen'].'
'; + $status.= DirectoryWarnings(); + //Versionen + $status.='
'.$lang['Versionsinformationen'].'
'; + $status.='MySQL Dumper-Version: '.$config["version"].'
'; + $status.='MySQL-Version: '.MSD_MYSQL_VERSION.'
'; + $status.='PHP-Version: '.PHP_VERSION.' '.(($config["zlib"]) ? '': '  '.$lang["phpbug"].'.  ').'[Info]  '.$sm; + $status.='
PHP-Extensions: '.$config["phpextensions"].''; + if($config["disabled"]!="") $status.='
'.$lang['disabledfunctions'].': '.$config["disabled"].''; + if(!extension_loaded("ftp")) $status.= '
'.$lang['noftppossible'].''; + if(!$config["zlib"]) $status.= '   
'.$lang['nogzpossible'].'
'; + + //MySQLDumper Informationen + $status.='
'.$lang['MySQL Dumper Informationen'].'
'.$lang["info_location"].' "'.$_SERVER["SERVER_NAME"].'" ('.($config["paths"]["root"]).')
'; + $status.=$lang["info_actdb"].": ".$databases["db_actual"]."
"; + $status.='['.$lang['Fehlerbericht'].']

'; + if($config["no_htaccess"]==0) $status.=''.$lang["htaccess1"].'  '.(($is_htaccess) ? '' : ''.$lang["htaccess15"].''); + if($is_htaccess) $status.='*** '.$lang["htaccess16"].' ***'; + else $status.='   +++ '.$lang["htaccess17"].' +++'; + //History + $status.='
History
'.$lang['backupfilesanzahl'].' '.$Sum_Files.' Backups ('.byte_output($Sum_Size).')
'; + + $status.=$lang["fm_freespace"].': '.MD_FreeDiskSpace().'
'; + if($Sum_Files>0) $status.=$lang['lastbackup'].' '.$lang["vom"].' '.((isset($Last_BU[1])) ? $Last_BU[1] : " - ").'
+      '.((isset($Last_BU[1])) ? '' : " - ").''.((isset($Last_BU[0])) ? $Last_BU[0] : " - ").'
'; + $status.='
'; + echo $status; +} elseif($action=="db") { + + + //Datenbanken + echo '
'.$lang["info_databases"].'
'; + echo $dba.''; + if(!isset($config["dbconnection"])) MSD_mysql_connect(); + + for($i=0;$i'; + } else { + mysql_select_db($databases["Name"][$i],$config["dbconnection"]); + $tabellen = mysql_list_tables($databases["Name"][$i],$config["dbconnection"]); + $num_tables = mysql_num_rows($tabellen); + $cl=($i==$databases["db_selected_index"]) ? "#ccffff" : "white"; + echo ''; + echo ''; + } + } + echo '
'.$databases["Name"][$i].''.$lang["info_nodb"].'
'; + echo ($i==$databases["db_selected_index"]) ? "".$databases["Name"][$i]."" : $databases["Name"][$i]; + echo ''.$num_tables.' '.$lang["info_table1"]; + echo ($num_tables>1) ? $lang["info_table2"] : ''; + echo '
'; + + echo '
'; + echo '
'.$lang["create_database"].'
'; + echo '
'; +} elseif($action=="sys") { + $sysaction=(isset($_GET["dosys"])) ? $_GET["dosys"] : 0; + $msg=""; + $res=@mysql_query("SHOW VARIABLES LIKE 'datadir'",$config["dbconnection"]); + if($res) { + $row = mysql_fetch_array($res); + $data_dir=$row[1]; + } + switch($sysaction) { + case 1: //FLUSH PRIVILEGES + $msg="> operating FLUSH PRIVILEGES
"; + $res=@mysql_query("FLUSH PRIVILEGES",$config["dbconnection"]); + $meldung=mysql_error($config["dbconnection"]); + if($meldung!="") { + $msg.='> MySQL-Error: '.$meldung; + } else { + $msg.="> Privileges were reloaded."; + } + break; + case 2: //FLUSH STATUS + $msg="> operating FLUSH STATUS
"; + $res=@mysql_query("FLUSH STATUS",$config["dbconnection"]); + $meldung=mysql_error($config["dbconnection"]); + if($meldung!="") { + $msg.='> MySQL-Error: '.$meldung; + } else { + $msg.="> Status was reset."; + } + break; + case 3: //FLUSH HOSTS + $msg="> operating FLUSH HOSTS
"; + $res=@mysql_query("FLUSH HOSTS",$config["dbconnection"]); + $meldung=mysql_error($config["dbconnection"]); + if($meldung!="") { + $msg.='> MySQL-Error: '.$meldung; + } else { + $msg.="> Hosts were reloaded.";; + } + break; + case 4: //SHOW MASTER LOGS + $msg="> operating SHOW MASTER LOGS
"; + $res=@mysql_query("SHOW MASTER LOGS",$config["dbconnection"]); + $meldung=mysql_error($config["dbconnection"]); + if($meldung!="") { + $msg.='> MySQL-Error: '.$meldung; + } else { + $numrows=mysql_num_rows($res); + if($numrows==0) { + $msg.='> there are no master log-files'; + }else{ + $msg.='> there are '.$numrows.' logfiles
'; + for($i=0;$i<$numrows;$i++) { + $row=mysql_fetch_row($res); + $msg.='> '.$row[0].'   '.(($data_dir) ? byte_output(filesize($data_dir.$row[0])) : '').'
'; + } + } + } + break; + case 5: //RESET MASTER + $msg="> operating RESET MASTER
"; + $res=@mysql_query("RESET MASTER",$config["dbconnection"]); + $meldung=mysql_error($config["dbconnection"]); + if($meldung!="") { + $msg.='> MySQL-Error: '.$meldung; + } else { + $msg.="> All Masterlogs were deleted."; + } + break; + } + echo '
Mysql-Befehle
'; + echo ''; + echo ' + + + + + + + + + + + + +
Reload PrivilegesReset StatusReload HostsShow Log-Files
Reset Master-Log   

'; + echo '
'; + echo '> MysSQL Dumper v'.$config["version"].' - Output Console

'; + echo ($msg!="") ? $msg : '> waiting for operation ...
'; + echo '
'; +} elseif($action=="vars") { + $var=(isset($_GET["var"])) ? $_GET["var"] : "prozesse"; + $Titelausgabe=array("variables"=>$lang['Variabeln'],"status"=>$lang['Status'],"prozesse"=>$lang['Prozesse']); + echo '
'.$lang['mysqlvars'].'
'; + echo ''; + echo '
'.$Titelausgabe[$var].'
'; + echo ''.$lang['Prozesse'].'   '; + echo ''.$lang['Status'].'   '; + echo ''.$lang['Variabeln'].'   '; + + echo '
'; + //Variabeln + switch($var) { + case "variables": + $res=@mysql_query("SHOW variables"); + if($res) $numrows=mysql_num_rows($res); + if($numrows==0) {echo $lang["info_novars"];} else { + echo ''; + for ($i = 0; $i < $numrows; $i++) { + $row = mysql_fetch_array($res); + echo ""; + } + } + echo '
Name'.$lang['Inhalt'].'
$row[0]$row[1]
'; + break; + case "status": + $res=@mysql_query("SHOW STATUS"); + if($res) $numrows=mysql_num_rows($res); + if($numrows==0) {echo $lang["info_nostatus"];} else { + echo ''; + for ($i = 0; $i < $numrows; $i++) { + $row = mysql_fetch_array($res); + echo ""; + } + } + echo '
Name'.$lang['Inhalt'].'
$row[0]$row[1]
'; + break; + case "prozesse": + if($config["processlist_refresh"]<1000)$config["processlist_refresh"]=2000; + if(isset($_GET["killid"]) && $_GET["killid"]>0) { + $killid=(isset($_GET["killid"])) ? $_GET["killid"] : 0; + $wait=(isset($_GET["wait"])) ? $_GET["wait"] : 0; + if($wait==0) { + $ret=mysql_query("KILL ".$_GET["killid"]); + $wait=2; + } else $wait+=2; + + if($wait==0) { + echo '

'.$lang["processkill1"].$_GET["killid"].$lang["processkill2"].$ret.'

'; + } else { + echo '

'.$lang["processkill3"].$wait.$lang["processkill4"].$_GET["killid"].$lang["processkill2"].$ret.'

'; + } + + } + + $killid=$wait=0; + $res=@mysql_query("SHOW FULL PROCESSLIST "); + if($res) $numrows=mysql_num_rows($res); + if($numrows==0) {echo $lang["info_noprocesses"];} else { + echo ''; + for ($i = 0; $i < $numrows; $i++) { + $row = mysql_fetch_array($res); + echo ""; + if($row[0]==$killid && $row[4]=="Killed") { + $wait=$killid=0; + } + } + } + echo '
IDUserHostDBCommandTimeStateInfoRT: '.round($config["processlist_refresh"]/1000).' sec
$row[0]$row[1]$row[2]$row[3]$row[4]$row[5]$row[6]$row[7] kill 
'; + echo '
+ + + +
'; + echo ''; + + break; + } + echo '
'; + +} + + +//Datenbankdetails +if (isset($_GET["dbid"])) +{ + $dbid=$_GET["dbid"]; + echo '

'.$lang["info_dbdetail"].'"'.$databases["Name"][$dbid].'"

'; + + //@mysql_query("USE ".$databases["Name"][$dbid]); + $res=@mysql_query("SHOW TABLE STATUS FROM `".$databases["Name"][$dbid]."`"); + if($res) $numrows=mysql_num_rows($res); + if($numrows==0) { + echo $lang["info_dbempty"]; + + } else { + echo $numrows.' '.$lang["info_table1"]; + echo ($numrows>1) ? $lang["info_table2"] : ''; + + echo '
'. + ''; + $last_update="2000-01-01 00:00:00"; + $s=$s1=$s2=""; + for ($i = 0; $i < $numrows; $i++) + { + $row = mysql_fetch_array($res); + $akt_size=$row["Data_length"]+$row["Index_length"]; + echo ''; + if(isset($row["Update_time"])) if(strtotime($row["Update_time"])>strtotime($last_update)) $last_update=$row["Update_time"]; + $s1=$s1+$row["Rows"]; + $s2=$s2+$row["Data_length"]+$row["Index_length"]; + } + echo ''; + echo '
Nr.'. + $lang["info_table1"].''. + $lang["info_records"].''. + $lang["info_size"].''. + $lang["info_lastupdate"].''. + $lang["info_optimized"].'Status
'.($i+1).''. + $row["Name"].''. + number_format($row["Rows"],0,",",".").''. + number_format($akt_size,0,",","."). + ' Bytes '. + $row["Update_time"].''; + if ($row["Data_free"]==0) echo ''; + else echo ' '.$lang["no"].' '; + echo ''; + if($checkit==$row["Name"] || $repair==1) { + $tmp_res=mysql_query("REPAIR TABLE `".$row["Name"]."`"); + } + if(($checkit==$row["Name"] || $checkit=="ALL") && $akt_size>0) { + $tmp_res=mysql_query("CHECK TABLE `".$row["Name"]."`"); + if($tmp_res) { + $tmp_row = mysql_fetch_row($tmp_res); + echo ($tmp_row[3]=="OK") ? '' : ' repair '; + } else echo "CHECK TABLE `".$row["Name"]."`"; + } else { + if($akt_size>0) echo 'check'; + else echo "-"; + } + echo '
'.$lang["info_sum"].''.number_format($s1,0,",",".").''.number_format($s2,0,",",".").' Bytes'.$last_update.' 
'; + } + $edb=$lang["info_emptydb1"].' `'.$databases["Name"][$dbid].'` '.$lang["info_emptydb2"]; + $kdb=$lang["info_emptydb1"].' `'.$databases["Name"][$dbid].'` '.$lang["info_killdb"]; + + echo '
'; + if($numrows>0) echo ''; + echo ''; + if($numrows>0) { + echo ''; + echo ''; + } + echo '
'; +} +include("inc/footer.php"); + + +?> diff --git a/menu.php b/menu.php new file mode 100644 index 0000000..db686ff --- /dev/null +++ b/menu.php @@ -0,0 +1,130 @@ +parent.MySQL_Dumper_content.location.href=parent.MySQL_Dumper_content.location.href;'; + } + } +} + +// Leerzeile +$row=''; +if(isset($_POST["dbindex"])) +{ + $dbindex=$_POST["dbindex"]; + $databases["db_selected_index"]=$dbindex; + SelectDB($dbindex); + WriteParams(1,$config,$databases); + //include($config["files"]["parameter"]); + //echo ''; + echo ''; +} else { + $dbindex=0; + + +} + +$p="&svice=$svice"; + +?> + + + +MySQL Dumper - Menu + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ MySQL Dumper - Homepage +
Version
+
: + + + + + +
+
+
+
+
+
+ &dbid=" style="display:block;margin:0px;width:100%;height:100%;" target="MySQL_Dumper_content">Mini-SQL
+
+ .php" style="display:block;margin:0px;width:100%;height:100%;" target="MySQL_Dumper_content">
+ Entwickler
+ + + + diff --git a/msd_cron/crondump.pl b/msd_cron/crondump.pl new file mode 100644 index 0000000..ad79955 --- /dev/null +++ b/msd_cron/crondump.pl @@ -0,0 +1,696 @@ +#!/usr/bin/perl -w +######################################################################################## +# MySQLDumper CronDump +# +# 2004,2005 by Steffen Kamper +# additional scripting: Detlev Richter +# +# for support etc. visit http://www.mysqldumper.de/board +# (c) GNU General Public License +######################################################################################## +# Script-Version +my $pcd_version="1.04"; + +######################################################################################## +# please enter the absolute path of the config-dir +# for using the script without Parameters the mysqldumper.conf will be load +# e.g.: +#my $absolute_path_of_configdir="/home/user1234/public_html/mysqldumper/work/config/"; +# +my $absolute_path_of_configdir=""; +my $default_configfile="mysqldumper.conf"; +######################################################################################## + +use strict; +use DBI; +use File::Find; +use File::Basename; +use Compress::Zlib; +use Net::FTP; +use MIME::Lite; +use CGI::Carp qw/ warningsToBrowser fatalsToBrowser /; + +######################################################################################## +# nothing to edit under this line !!! +######################################################################################## + +use vars qw($pcd_version $dbhost $dbname $dbuser $dbpass +$cron_save_all_dbs $cron_db_array $cron_dbpraefix_array $dbpraefix $command_beforedump_array $command_afterdump_array +$compression $backup_path $logdatei $completelogdatei $nl $command_beforedump $command_afterdump +$cron_printout $cronmail $cronmail_dump $cronmailto $cronmailfrom +$cronftp $ftp_server $ftp_port $ftp_user $ftp_pass $ftp_dir $mp $multipart_groesse $email_maxsize +$auto_delete $cron_del_files_after_days $max_backup_files $max_backup_files_each $perlspeed $optimize_tables_beforedump $result +@key_value $pair $key $value $conffile @confname); + + +my @trash_files; +my $time_stamp; +my @filearr; +my $sql_file; +my $backupfile; +my $memory_limit=100000; +my $dbh; # DBI databasehandle +my $sth; # DBI statementhandle +my @db_array; +my @dbpraefix_array; +my @db_command_beforedump_array; +my @db_command_afterdump_array; +my $db_anz; +my $record_count; +my $filesize; +my $status_start; +my $status_end; +my $sql_text; +my $punktzaehler; +my @backupfiles_name; +my @backupfiles_size; + + + +use vars qw/ +$starttime $Sekunden $Minuten $Stunden $Monatstag $Monat $Jahr $Wochentag $Jahrestag $Sommerzeit + $ri $rct $tabelle @tables @tablerecords $dt $sql_create @ergebnis @ar $sql_daten $inhalt + $insert $totalrecords $error_message $cfh $oldbar $print_out $msg $dt $ftp $dateistamm $dateiendung + $mpdatei $i $BodyNormal $BodyMultipart $BodyToBig $BodyNoAttach $Body $DoAttach $cmt $part $fpath $fname + $fmtime $timenow $daydiff $datei $inh $gz $search $fdbname @str @dbarray $item %dbanz $anz %db_dat +/; + +# Script Start +die "absolute_path_of_configdir is empty !\nYou have to edit the crondump.pl and enter the absolute_path_of_configdir !\n\n" if($absolute_path_of_configdir eq ""); + + +opendir(DIR, $absolute_path_of_configdir) or die "The config-directory you entered is wrong !\n($absolute_path_of_configdir - $!) \n\nPlease edit the crondump.pl and enter the right configuration-path.\n\n"; +closedir(DIR); + +my $abc=length($absolute_path_of_configdir)-1; +my $defed=substr($absolute_path_of_configdir,$abc,1); +if($defed ne "/") { + $absolute_path_of_configdir=$absolute_path_of_configdir."/"; +} + + +#include config file +if($ENV{QUERY_STRING}) { + @key_value = split(/&/,$ENV{QUERY_STRING}); + foreach $pair(@key_value){ + $pair =~ tr/+/ /; + ($key,$value) = split(/=/,$pair); + $conffile=$value if($key eq "config"); + } +} +foreach (@ARGV) { + if($_) { + $conffile=substr($_,7,length($_)-7) if(substr($_,0,7) eq "config="); + } +} + +if(!$conffile) { $conffile=$default_configfile; } +require("$absolute_path_of_configdir$conffile"); +@confname=split(/\//,$conffile); +# Output Headers +PrintHeader(); +PrintOut("Config '".$confname[$#confname]."' was loaded.

"); + + + +# SignalHandler einrichten für Browser-Stop-Button, +# unterbrochene Socketverbindungen, Crtl-C +# Datenbankverbindung wird dann noch ordnungsgemäss geschlossen. +$SIG{HUP} = $SIG{PIPE} = $SIG{INT} =\&closeScript; + + +#teste Zugriff auf logfile +PrintOut("Starting Crondump ... "); +write_log(": starting perl crondump $pcd_version\n"); +PrintOut("ok, logging on
"); + + +#Auto-Delete ausführen +if($auto_delete>0) +{ + #Autodelete Days + if($cron_del_files_after_days>0) + { + PrintOut("
Autodelete: search for backups older than $cron_del_files_after_days days ...
"); + find(\&AutoDeleteDays, $backup_path); + DeleteFiles (\@trash_files); + } + #Autodelete Count + if($max_backup_files>0) + { + PrintOut("Autodelete: search for more backups than $max_backup_files ...
"); + find(\&AutoDeleteCount, $backup_path); + DoAutoDeleteCount(); + DeleteFiles (\@trash_files); + } +} +#Jetzt den Dump anschmeissen +# mal schauen, obs mehrere DB's sind +if($cron_save_all_dbs==0) { + $command_beforedump=$command_beforedump_array; + $command_afterdump=$command_afterdump_array; + ExecuteCommand(1); + DoDump(); + ExecuteCommand(2); + PrintOut("
Crondump finished.
"); + closeScript(); +} else { + @db_array=split(/\|/,$cron_db_array); + @dbpraefix_array=split(/\|/,$cron_dbpraefix_array); + @db_command_beforedump_array=split(/\|/,$command_beforedump_array); + @db_command_afterdump_array=split(/\|/,$command_afterdump_array); + $db_anz=@db_array; + PrintOut("

backup $db_anz Databases ...

"); + for(my $ii = 0; $ii < $db_anz; $ii++) { + $dbname=$db_array[$ii]; + $dbpraefix=($dbpraefix_array[$ii]) ? $dbpraefix_array[$ii] : ""; + $command_beforedump=($db_command_beforedump_array[$ii]) ? $db_command_beforedump_array[$ii] : ""; + $command_afterdump=($db_command_afterdump_array[$ii]) ? $db_command_afterdump_array[$ii] : ""; + PrintOut("
Start backup ".($ii+1)." of $db_anz with database `$dbname` ".(($dbpraefix ne "") ? "(with praefix $dbpraefix)" : "")."
"); + ExecuteCommand(1); + DoDump(); + ExecuteCommand(2); + } + PrintOut("


ALL $db_anz BACKUPS ARE COMPLETE !!!


"); + $cron_save_all_dbs=2; + closeScript(); +} + + +############################################## +# Subroutinen # +############################################## +sub DoDump +{ + ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) = localtime(time); + $Jahr+=1900;$Monat+=1;$Jahrestag+=1; + my $CTIME_String = localtime(time); + $time_stamp=$Jahr."_".sprintf("%02d",$Monat)."_".sprintf("%02d",$Monatstag)."_".sprintf("%02d",$Stunden)."_".sprintf("%02d",$Minuten); + $starttime= sprintf("%02d",$Monatstag).".".sprintf("%02d",$Monat).".".$Jahr." ".sprintf("%02d",$Stunden).":".sprintf("%02d",$Minuten); + + # Verbindung mit mSQL herstellen, $dbh ist das Database Handle + PrintOut("connect to database`$dbname`   "); + $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost","$dbuser","$dbpass")|| die "Database connection not made: $DBI::errstr"; + # herausfinden welche Mysql-Version verwendet wird + $sth = $dbh->prepare("SELECT VERSION()"); + $sth->execute; + my @mysql_version=$sth->fetchrow; + my @v=split(/\./,$mysql_version[0]); + if($v[0]>=4 && $v[1]>=1 ){ + #mysql Version >= 4.1 + %db_dat = (name => 0, + rows => 4, + data_length =>6, + index_length =>8, + update_time =>11 ); + } + else{ + #mysql Version < 4.1 + %db_dat = (name => 0, + rows => 3, + data_length =>5 , + index_length =>7, + update_time =>11 ); + } + + PrintOut("ok
MySQL-Version $v[0].$v[1].$v[2]
start Backup ".$starttime."
"); + #Statuszeile erstellen + my $t;my $r; + $t=0;$r=0; + $sth = $dbh->prepare("SHOW TABLE STATUS FROM `$dbname`"); + $sth->execute; + my $st_e="\n"; + #Arrays löschen + undef(@tables); + undef(@tablerecords); + my $opttbl=0; + + while ( @ar=$sth->fetchrow) { + if($optimize_tables_beforedump==1) { + #tabelle optimieren + my $sth_to = $dbh->prepare("OPTIMIZE Table `$ar[$db_dat{name}]`"); + $sth_to->execute; $opttbl++; + } + if($dbpraefix eq ""){ + $t++;$r+=$ar[$db_dat{rows}]; + push(@tables,$ar[$db_dat{name}]); + push(@tablerecords,$ar[$db_dat{rows}]); + $st_e.="# TABLE\|$ar[$db_dat{name}]\|$ar[$db_dat{rows}]\|".($ar[$db_dat{data_length}]+$ar[$db_dat{index_length}])."\|$ar[$db_dat{update_time}]\n"; + } else { + if (substr($ar[$db_dat{name}],0,length($dbpraefix)) eq $dbpraefix) { + $t++; $r+=$ar[$db_dat{rows}]; + push(@tables,$ar[$db_dat{name}]); + push(@tablerecords,$ar[$db_dat{rows}]); + $st_e.="# TABLE\|$ar[$db_dat{name}]\|$ar[$db_dat{rows}]\|".($ar[$db_dat{data_length}]+$ar[$db_dat{index_length}])."\|$ar[$db_dat{update_time}]\n"; + } + } + } + PrintOut("$opttbl tables were optimized
") if($opttbl>0) ; + PrintOut("found $t tables with $r records.


"); + + $status_start="# Status:$t:$r:"; + $status_end=":$dbname:perl:$pcd_version"; + $status_end.="::EXTINFO$st_e\n# Dump created on $CTIME_String by PERL Cron-Script\n# Dump by MySQLDumper 1.14 Preview (http://www.mysqldumper.de/board/)\n\n"; + + + if($mp>0) { + $sql_text=$status_start."MP_$mp".$status_end; + } else { + $sql_text=$status_start.$status_end; + } + NewFilename(); + #WriteToFile($sql_text); + #$sql_text=""; + + #@tables=$dbh->tables; + $totalrecords=0; + for (my $tt=0;$tt<$t;$tt++) { + $tabelle=$tables[$tt]; + # definition auslesen + if($dbpraefix eq "" or ($dbpraefix ne "" && substr($tabelle,0,length($dbpraefix)) eq $dbpraefix)) { + + PrintOut("dumping table `$tabelle` "); + $a="DROP TABLE IF EXISTS `".$tabelle."`;\n"; + $sql_text.=$a; + $sql_create="Show create table `".$tabelle."`"; + $sth = $dbh->prepare($sql_create); + $sth->execute; + @ergebnis=$sth->fetchrow; + $sth->finish; + $a=$ergebnis[1].";\n"; + $sql_text.=$a; + WriteToFile($sql_text); + $sql_text=""; + PrintOut("* "); + $punktzaehler=64; + # daten auslesen + $rct=$tablerecords[$tt]; + for (my $ttt=0;$ttt<$rct;$ttt+=$perlspeed) { + $insert = "INSERT INTO $tabelle VALUES ("; + + $sql_daten="SELECT * FROM `$tabelle` Limit ".$ttt.",".$perlspeed.";"; + $sth = $dbh->prepare($sql_daten); + $sth->execute; + while ( @ar=$sth->fetchrow) { + $a=$insert; + foreach $inhalt(@ar) + {$a.= $dbh->quote($inhalt).", ";} + $a=substr($a,0, length($a)-2).");"; + $sql_text.= $a."\n"; + if($memory_limit>0 && length($sql_text)>$memory_limit) { + WriteToFile($sql_text); + $sql_text=""; + if($mp>0 && $filesize>$multipart_groesse) { NewFilename();} + } + } + } + #jetzt wegschreiben + WriteToFile($sql_text); + $sql_text=""; + PrintOut("
   $tablerecords[$tt] inserted records (backupfile now $filesize Bytes)
"); + $totalrecords+=$tablerecords[$tt]; + if($mp>0 && $filesize>$multipart_groesse) {NewFilename();} + } + } + # Ende + PrintOut("
Backup of Database `$dbname` complete.
"); + write_log(": Perl Cron-Dump `$backupfile` finished.\n"); + + # Jetzt der Versand per Mail + if($cronmail==1) + { + PrintOut("sending mail ...
"); + send_mail(); + write_log(": Mail was sent to $cronmailto.\n"); + PrintOut("Mail was sent to $cronmailto.
"); + } + + # Jetzt der Versand per FTP + if($cronftp==1) + { + PrintOut("sending ftp ...
"); + send_ftp($sql_file); + } +} + +#Wird aufgerufen, wenn Fehler passieren +sub err_trap +{ + $error_message = shift(@_); + print "Perl Cronscript ERROR: $error_message \n"; + close; + #write_log(": Perl Cronscript ERROR: $error_message \n"); + #PrintOut("ERROR: $error_message \n"); + #close; +} + +sub PrintHeader +{ + PrintOut("Content-type: text/html\n\n"); + PrintOut("\n"); + PrintOut("MySQLDumper - Perl CronDump [Version $pcd_version]

MySQLDumper - Perl CronDump [Version $pcd_version]

\n"); +} + +sub PrintOut +{ + $print_out = shift(@_); + if($cron_printout==1) + { + local ($oldbar) = $|; + $cfh = select (STDOUT); + $| = 1; + + print "$print_out\n"; + + $| = $oldbar; + select ($cfh); + } + open(DATEI,">>$completelogdatei") || err_trap("can't open file ($completelogdatei)."); + print DATEI "$print_out\n" || err_trap("can't write to file ($completelogdatei)."); + close(DATEI)|| err_trap("can't close file ($completelogdatei)."); +} + +sub write_log +{ + $msg = shift(@_); + ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) = localtime(time); + $Jahr+=1900; $Monat+=1;$Jahrestag+=1; + $dt=sprintf("%02d",$Monatstag).".".sprintf("%02d",$Monat).".".sprintf("%02d",$Jahr)." ".sprintf("%02d",$Stunden).":".sprintf("%02d",$Minuten).":".sprintf("%02d",$Sekunden); + open(DATEI,">>$logdatei") || err_trap("can't open file ($logdatei)."); + print DATEI "$dt $msg" || err_trap("can't write to file ($logdatei)."); + close(DATEI)|| err_trap("can't close file ($logdatei)."); +} + +sub send_ftp +{ + $ftp = Net::FTP->new($ftp_server, Port => $ftp_port, Timeout => 360, Debug => 1) or err_trap( "FTP-ERROR: Can't connect: $@\n"); + $ftp->login($ftp_user, $ftp_pass) or err_trap("FTP-ERROR: Couldn't login\n"); + $ftp->binary(); + $ftp->cwd($ftp_dir) or err_trap("FTP-ERROR: Couldn't change directory\n"); + if($mp==0) + { + $ftp->put($sql_file) or err_trap("FTP-ERROR: Couldn't put $sql_file\n"); + write_log(": FTP-Transfer `$backupfile` to $ftp_server completed.\n"); + PrintOut("FTP-Transfer `$backupfile` to $ftp_server completed.
"); + } + else + { + $dateistamm=substr($backupfile,0,index($backupfile,"part_"))."part_"; + $dateiendung=($compression==1)?".sql.gz":".sql"; + $mpdatei=""; + for ($i=1;$i<$mp;$i++) { + $mpdatei=$dateistamm.$i.$dateiendung; + $ftp->put($backup_path.$mpdatei) or err_trap("Couldn't put $backup_path.$mpdatei\n"); + write_log(": FTP-Transfer `$mpdatei` to $mpdatei completed.\n"); + PrintOut("FTP-Transfer `$mpdatei` to $ftp_server completed.
"); + } + } +} + +sub send_mail +{ + MIME::Lite->send("sendmail", "/usr/lib/sendmail -t -oi -oem"); + $BodyNormal='In der Anlage findest Du die Sicherung Deiner MySQL-Datenbank.
Sicherung der Datenbank '.$dbname.'

Viele Grüsse

MySQLDumper
www.mysqldumper.de'; + $BodyMultipart='Es wurde eine Multipart-Sicherung erstellt. Die Sicherungen werden nicht als Anhang mitgeliefert!
Sicherung der Datenbank `'.$dbname.'`

Folgene Dateien wurden erzeugt:

'; + $BodyToBig='Die Sicherung überschreitet die Maximalgrösse von '.$email_maxsize.' Bytes und wurde daher nicht angehängt.
Sicherung der Datenbank '.$dbname.'

Viele Grüsse

MySQLDumper
www.mysqldumper.de

Folgene Datei wurde erzeugt:

'; + $BodyNoAttach='Das Backup wurde nicht angehängt.
Sicherung der Datenbank `'.$dbname.'`
'; + $Body=""; + $DoAttach=1; + + if($mp==0) + { + if(($email_maxsize>0 && $filesize>$email_maxsize) || $cronmail_dump==0) + { + if($cronmail_dump==0) + { + $Body=$BodyNoAttach.$backupfile."   ".$filesize; + } else { + $Body=$BodyToBig.$backupfile."   ".$filesize; + } + $DoAttach=0; + } + else + { + $Body=$BodyNormal; + } + } + else + { + $Body=$BodyMultipart; + $dateistamm=substr($backupfile,0,index($backupfile,"part_"))."part_"; + $dateiendung=($compression==1)?".sql.gz":".sql"; + $mpdatei=""; + for ($i=1;$i<$mp;$i++) { + $mpdatei=$dateistamm.$i.$dateiendung; + $Body.="$mpdatei (".(stat($backup_path.$mpdatei))[7]." Bytes)
"; + } + $Body.='


Viele Grüsse

MySQLDumper
www.mysqldumper.de'; + $DoAttach=0; + } + + + $msg = new MIME::Lite ; + $msg = build MIME::Lite + From => $cronmailfrom , + To => $cronmailto , + Subject => "MySQLDumper Perl Crondump" , + Type => 'text/html', + Data => $Body; + if($DoAttach==1) + { + attach $msg + Type => "application/gzip" , + Path => "$sql_file" , + Encoding => "base64", + Filename => "$backupfile" ; + } + + $msg->send || err_trap("Error sending mail !"); + +} + + +sub check_emailadr +{ + $cmt = shift(@_); + if ($cmt =~ /^([\w\-\+\.]+)@([\w\-\+\.]+)$/) + { return (1) } + else + { return (0) } +} + +sub NewFilename +{ + $part=""; + if($mp>0) + { + $part="_part_$mp"; + $mp++; + } + if($compression==0) + { + $sql_file=$backup_path.$dbname."_".$time_stamp."_crondump_perl".$part.".sql"; + $backupfile=$dbname."_".$time_stamp."_crondump_perl".$part.".sql"; + } + else + { + $sql_file=$backup_path.$dbname."_".$time_stamp."_crondump_perl".$part.".sql.gz"; + $backupfile=$dbname."_".$time_stamp."_crondump_perl".$part.".sql.gz"; + } + if($mp==0) + { + PrintOut("
Start Perl Cron-Dump with file `$backupfile`
"); + write_log(": Start Perl Cron-Dump with file `$backupfile` \n"); + } + if($mp==2) + { + PrintOut("
Start Perl Multipart-Cron-Dump with file `$backupfile`
"); + write_log(": Start Perl Multipart-Cron-Dump with file `$backupfile` \n"); + } + if($mp>2) + { + PrintOut("
Continue Perl Multipart-Cron-Dump with file `$backupfile`
"); + write_log(": Continue Perl Multipart-Cron-Dump with file `$backupfile` \n"); + } + + if($mp>0) { + $sql_text=$status_start."MP_".($mp-1).$status_end; + } else { + $sql_text=$status_start.$status_end; + } + WriteToFile($sql_text); + $sql_text=""; + $punktzaehler=0; + push(@backupfiles_name,$sql_file); +} + +sub WriteToFile { + $inh=shift; + if(length($inh)>0) { + if($compression==0){ + open(DATEI,">>$sql_file"); + print DATEI $inh; + close(DATEI); + } else { + $gz = gzopen($sql_file, "ab") || err_trap("Cannot open : ".$gz->gzerror()); + $gz->gzwrite($inh) || err_trap("Error writing: ".$gz->gzerror()); ; + $gz->gzclose ; + } + PrintOut("."); + $filesize= (stat($sql_file))[7]; + $punktzaehler++; + if($punktzaehler>180){ + $punktzaehler=0; + PrintOut("
"); + } + } +} + +sub AutoDeleteDays { + $fpath=$File::Find::name; + $fname=basename($fpath); + $fmtime=(stat($fname))[9]; + if($fmtime) { + $timenow=time; + $daydiff=($timenow-$fmtime)/60/60/24; + if (((/\.gz$/) || (/\.sql$/)) && ($daydiff>$cron_del_files_after_days)) { + print "$fpath $daydiff
" if (-f $fname); + push(@trash_files,$fpath); + } + } +} + +sub AutoDeleteCount { + $fpath=$File::Find::name; + $fname=basename($fpath); + $fmtime=(stat($fname))[9]; + if($fmtime) { + ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, $Jahr)=localtime($fmtime); + $Jahr+=1900; $Monat+=1; + $Monat="0".$Monat if(length($Monat)==1); + $search="_".$Jahr."_".$Monat."_"; + $fdbname=substr($fname,0,index($fname,$search)); + if ((/\.gz$/) || (/\.sql$/)) { + push(@filearr,"$fmtime|$fdbname|$fpath"); + } + } +} + +sub DoAutoDeleteCount +{ + my @str; + my @dbarray; + my $item; + my %dbanz; + my $anz=@filearr; + @filearr=sort(@filearr); + if($max_backup_files_each==0) + { + PrintOut("Autodelete by Count ($max_backup_files) => found $anz Backups
"); + for($i = 0; $i < ($anz-$max_backup_files); $i++) { + @str=split(/\|/,$filearr[$i]); + push(@trash_files, $str[2]); + } + } + else + { + PrintOut("Autodelete by Count each DB ($max_backup_files) => found $anz Backups
"); + foreach $item (@filearr) + { + @str=split(/\|/,$item); + $dbanz{$str[1]}++; + push(@trash_files, $str[2]) if($dbanz{$str[1]}>$max_backup_files); + } + } +} + +sub DeleteFiles +{ + + if(@trash_files==0) + { + PrintOut("no file to delete.
"); + } else { + foreach $datei(@trash_files) + { + PrintOut("".$datei." deleted.
"); + write_log( ": Perl Cronsript Autodelete - $datei deleted.\n" ) ; + } + } + unlink @trash_files ; + undef(@trash_files); +} + +sub ExecuteCommand +{ + my $cmt = shift(@_); + my (@cad, $errText, $succText, $cd2, $commandDump); + + if($cmt==1) { #before dump + $commandDump=$command_beforedump; + $errText="Error while executing Query before Dump"; + $succText="executing Query before Dump was successful"; + write_log(": Executing Command before dump\n"); + } else { + $commandDump=$command_afterdump; + $errText="Error while executing Query after Dump"; + $succText="executing Query after Dump was successful"; + write_log(": Executing Command after dump\n"); + } + if(length($commandDump)>0) { + #jetzt ausführen + if(substr($commandDump,0,7) ne "system:") { + $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost","$dbuser","$dbpass")|| die "Database connection not made: $DBI::errstr"; + $dbh->{PrintError} = 0; + if(index($commandDump,";")>=0) { + @cad=split(/;/,$commandDump); + for($i=0;$i<@cad;$i++) { + if($cad[$i] ne ""){ + write_log(": Executing Command ($cad[$i]\n"); + $sth = $dbh->prepare($cad[$i]); + $sth->execute; + $sth->finish; + } + } + } else { + write_log(": Executing Command ($commandDump)\n"); + if($commandDump) { + $sth = $dbh->prepare($commandDump); + $sth->execute; + $sth->finish; + } + } + if($@){ + my $ger=$@; + PrintOut("

$errText ($commandDump):
$ger

"); + write_log(": $errText ($commandDump): $ger\n"); + } else { + PrintOut("

$succText

"); + write_log(": $succText\n"); + } + } else { + #Systembefehl + $commandDump=substr($commandDump,7); + system($commandDump); + PrintOut("

$succText ($commandDump)

"); + write_log(": $succText ($commandDump)\n"); + } + } +} + +sub closeScript +{ + my $Start; my $Jetzt; my $Totalzeit; + $Start = $^T; $Jetzt = (time); + $Totalzeit=$Jetzt - $Start; + ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) = localtime(time); + $Jahr+=1900;$Monat+=1;$Jahrestag+=1; + $starttime= sprintf("%02d",$Monatstag).".".sprintf("%02d",$Monat).".".$Jahr." ".sprintf("%02d",$Stunden).":".sprintf("%02d",$Minuten); + if($cron_save_all_dbs!=1) { + PrintOut("closing script $starttime, bye
total time used: $Totalzeit sec.\n"); + # Datenbankverbindung schliessen + $sth->finish() if (defined $sth); + ($dbh->disconnect() || warn $dbh->errstr) if (defined $dbh); + } + +} \ No newline at end of file diff --git a/msd_cron/perltest.pl b/msd_cron/perltest.pl new file mode 100644 index 0000000..37c4c40 --- /dev/null +++ b/msd_cron/perltest.pl @@ -0,0 +1,92 @@ +#!/usr/bin/perl -w +use strict; +use Socket; +use Config; +use CGI::Carp qw(warningsToBrowser fatalsToBrowser); +use CGI; +my $cgi = CGI->new(); +print $cgi->header(); +warningsToBrowser(1); # dies ist ganz wichtig! + +use vars qw($eval_in_died $mod_dbi $mod_ff $mod_fb $mod_gz $mod_ftp $mod_mime); + + +print "

Perl-Test f�r MySQLDumper

\n"; +print "
Unbedingt notwendige Funktionen f�r das Cronscript
"; +print "

teste DBI ...

\n"; +eval { $eval_in_died = 1; require DBI; }; + if(!$@){ + $mod_dbi = 1; + import DBI; + } +if($mod_dbi!=1){ + print "DBI ist nicht vorhanden !
\n"; +} else { + print "DBI ist installiert.
\n"; +} + +print "

teste File::Find ...

\n"; +eval { $eval_in_died = 1; require File::Find; }; + if(!$@){ + $mod_ff = 1; + import File::Find; + } +if($mod_ff!=1){ + print "File::Find ist nicht vorhanden !
\n"; +} else { + print "File::Find ist installiert.
\n"; +} + + +print "

teste File::Basename ...

\n"; +eval { $eval_in_died = 1; require File::Basename; }; + if(!$@){ + $mod_fb = 1; + import File::Basename; + } +if($mod_fb!=1){ + print "File::Basename ist nicht vorhanden !
\n"; +} else { + print "File::Basename ist installiert.
\n"; +} + +print "
Konfigurierbare Funktionen f�r das Cronscript
"; + +print "

teste Compress::Zlib ...

\n"; +eval { $eval_in_died = 1; require Compress::Zlib; }; + if(!$@){ + $mod_gz = 1; + import Compress::Zlib; + } +if($mod_gz!=1){ + print "Compress::Zlib ist nicht vorhanden !
\n"; +} else { + print "Compress::Zlib ist installiert.
\n"; +} + +print "

teste Net::FTP ...

\n"; +eval { $eval_in_died = 1; require Net::FTP; }; + if(!$@){ + $mod_ftp = 1; + import Net::FTP; + } +if($mod_ftp!=1){ + print "Net::FTP ist nicht vorhanden !
\n"; +} else { + print "Net::FTP ist installiert.
\n"; +} + +print "

teste MIME::Lite ...

\n"; +eval { $eval_in_died = 1; require MIME::Lite; }; + if(!$@){ + $mod_mime = 1; + import MIME::Lite; + } +if($mod_mime!=1){ + print "MIME::Lite ist nicht vorhanden !
\n"; +} else { + print "MIME::Lite ist installiert.
\n"; +} + + +print "\n"; \ No newline at end of file diff --git a/msd_cron/simpletest.pl b/msd_cron/simpletest.pl new file mode 100644 index 0000000..c70183d --- /dev/null +++ b/msd_cron/simpletest.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl -w + + +use strict; +use CGI::Carp qw(fatalsToBrowser); + +# warningsToBrowser(1); # dies ist ganz wichtig! + +print "Content-type: text/html\n\n"; +print '', "\n"; +print "Testausgabe\n"; +print "\n"; + +print "Wenn Du das siehst, funktioniert Perl auf Deinem System !

"; +print "If you see this perl works fine on your system !"; +print "\n"; diff --git a/restore.php b/restore.php new file mode 100644 index 0000000..ef12388 --- /dev/null +++ b/restore.php @@ -0,0 +1,304 @@ +20) +{ + $fname=substr($restore["filename"],-20); + $pp=strpos($fname,"part"); + $fmp=($pp>0); + if(($fmp>0) && $restore["offset"]==0 && $restore["part"]=="") + { + //ersten Part erzeugen + $restore["filename"]=NextPart($restore["filename"],1); + } +} +//die($restore["filename"]); + +// Datei oeffnen +$restore["filehandle"] = ($restore["compressed"]) ? gzopen($fpath.$restore["filename"],"r") : fopen($fpath.$restore["filename"],"r"); +if ($restore["filehandle"]) +{ + //nur am Anfang Logeintrag + if($restore["offset"]==0) + { + if($fmp>0) + WriteLog("Start Multipart-Restore '".$restore["filename"]."'"); + else + WriteLog("Start Restore '".$restore["filename"]."'"); + // Statuszeile auslesen + if ($restore["compressed"]) + { + //$fp = gzopen ($fpath.$restore["filename"], "r"); + $statusline=gzgets($restore["filehandle"],40960); + //gzclose ($fp); + } + else + { + //$fp = fopen ($fpath.$restore["filename"], "r"); + $statusline=fgets($restore["filehandle"],500); + //fclose ($fp); + } + $sline=ReadStatusline($statusline); + $restore["anzahl_tabellen"]=$sline[0]; + $restore["anzahl_eintraege"]=$sline[1]; + $restore["part"]=($sline[2]=="") ? 0 : substr($sline[2],3); + + if($config["empty_db_before_restore"]==1 && $restore["part"]==0) EmptyDB($databases["db_actual"]); + + } + // Wenn GZ-Komprimierung aus ist, koennen wir mit Hilfe der Filegroesse + // ausrechnen, wieviel Prozent der Datei fertig sind. + // Bei GZ=1 geht es nicht, weil sich der Offset auf die ungepackte Groesse + // bezieht und somit nicht ins Verhältnis zur Dateigroesse gestellt werden kann. + + if ($restore["compressed"]==0) $filegroesse=filesize($fpath.$restore["filename"]); + + // Dateizeiger an die richtige Stelle setzen + ($restore["compressed"]) ? gzseek($restore["filehandle"],$restore["offset"]) : fseek($restore["filehandle"],$restore["offset"]); + + // Jetzt basteln wir uns mal unsere Befehle zusammen... + $a=0; + + //print_r($restore);echo "
"; + + $dauer=0; + WHILE ( ($a<$restore["anzahl_zeilen"] ) && (!$restore["fileEOF"]) && ($dauer<$restore["max_zeit"]) ) + { + $sql_command=get_sqlbefehl(); + if($sql_command!="") $res=mysql_query($sql_command,$config["dbconnection"]); + // Bei MySQL-Fehlern sofort abbrechen und Info ausgeben + $meldung=mysql_error($config["dbconnection"]); + if ($meldung!="") + { + //Errorlog("RESTORE",$databases["db_actual"],$sql_command,$meldung); + //$restore["errors"]++; + ///die($meldung."
-------
$sql_command"); + } + + $a++; + $dauer=time()-$restore["startzeit"]; + + + } + $eingetragen=$a-1; + + $restore["offset"]= ($restore["compressed"]) ? gztell($restore["filehandle"]) : ftell($restore["filehandle"]); + if ($restore["compressed"]) gzclose($restore["filehandle"]); else fclose($restore["filehandle"]); + + if (!$restore["fileEOF"]) + { + $restore["aufruf"]++; + if (!$restore["compressed"]) $prozent=($restore["offset"]*100)/$filegroesse; + else + { + if ($restore["anzahl_eintraege"]>0) $prozent=$restore["eintraege_ready"]*100/$restore["anzahl_eintraege"]; + else $prozent=0; + } + if ($prozent>100) $prozent=100; + $aus[]= '

'.$lang["restore"].'

'; + if($aus1!="") $aus[]= '
'.$aus1.'

'; + $aus[]= $lang["restore_db"].$databases["db_actual"].$lang["restore_db1"].$config["dbhost"].$lang["restore_db2"].'
Backup-File: '.$restore["filename"].' '; + if($fmp>0) $aus[]= '
Multipart File '.$restore["part"].''; + $aus[]= '

'; + if ($restore["table_ready"]>0) $aus[]= $restore["table_ready"]-1; else $aus[]= '0'; + if ($restore["anzahl_tabellen"]!=-1) $aus[]= ' '.$lang["of"].' '.$restore["anzahl_tabellen"].' '; + $aus[]= $lang["restore_complete"].$lang["restore_run1"].number_format($restore["eintraege_ready"],0,",",".").' '; + if ($restore["anzahl_eintraege"]>0) $aus[]= $lang["of"].' '.(number_format($restore["anzahl_eintraege"],0,",",".")).' '; + + $prozentbalken=(round($prozent,0)*3); + $aus[]= $lang["restore_run2"].'
'; + + $aus[]= $lang["restore_run3"].$restore["actual_table"].$lang["restore_run4"].'
'.$lang["progress_over_all"].': '; + + //Fortschrittsbalken + if ($restore["anzahl_eintraege"]>0) + { + $aus[]= ''; + if ($prozentbalken>=3) $aus[]= ''; + $aus[]= '' + .'
+  '.(number_format($prozent,2,",",".")).' %
'; + } + else $aus[]= ' unknown count of records

'; + + //Speed-Anzeige + $fw=($config["maxspeed"]==$config["minspeed"]) ? 300 : round(($restore["anzahl_zeilen"]-$config["minspeed"])/($config["maxspeed"]-$config["minspeed"])*300,0); + $aus[]='
'; + $aus[]='
'; + $aus[]='Speed
'.$restore["anzahl_zeilen"].'
'; + $aus[]=''; + $aus[]='
'; + $aus[]=''; + $aus[]='
'; + $aus[]=''; + $aus[]=''; + $aus[]='
'.$config["minspeed"].''.$config["maxspeed"].'
'; + + //Status-Text + $aus[]= '

'.zeit_format(time()-$restore["xtime"]).', '.$restore["aufruf"].' pages'; //, speed '.$anzahl_zeilen; + $aus[]= ($fmp>0) ? ', file '.$restore["part"] : ''; + $aus[]= ($restore["errors"]>0) ? ', '.$restore["errors"].' errors' : ''; + $aus[]= '

'; + + + $restore["summe_eintraege"]+=$eingetragen; + + //Zeitanpassung + if($config["direct_connection"]==1) { + if ($dauer<$restore["max_zeit"]) + { + $restore["anzahl_zeilen"]=$restore["anzahl_zeilen"]*$config["tuning_add"]; + } + else + { + $restore["anzahl_zeilen"]=$restore["anzahl_zeilen"]*$config["tuning_sub"]; + } + $restore["anzahl_zeilen"]=round($restore["anzahl_zeilen"],0); + if($config["minspeed"]>0) {if ($restore["anzahl_zeilen"]<$config["minspeed"]) $restore["anzahl_zeilen"]=$config["minspeed"];} + if($config["maxspeed"]>0) {if($restore["anzahl_zeilen"]>$config["maxspeed"]) $restore["anzahl_zeilen"]=$config["maxspeed"];} + } + + $page_parameter='offset='.$restore["offset"].'&aufruf='.$restore["aufruf"].'&actual_table='.$restore["actual_table"]; + $page_parameter.="&filename=".urlencode($restore["filename"])."&kind=".$restore["kind"]."&xtime=".$restore["xtime"]; + $page_parameter.= "&table_ready=".$restore["table_ready"]."&eintraege_ready=".$restore["eintraege_ready"]; + $page_parameter.= "&anzahl_tabellen=".$restore["anzahl_tabellen"]."&anzahl_eintraege=".$restore["anzahl_eintraege"]; + $page_parameter.= "&actual_fieldcount=".$restore["actual_fieldcount"]."&part=".$restore["part"]; + $page_parameter.= "&anzahl_zeilen=".$restore["anzahl_zeilen"]; + $page_parameter.= "&summe_eintraege=".$restore["summe_eintraege"]."&do_it=".$restore["do_it"]."&err=".$restore["errors"]; + + + } + else + { + if(($restore["part"]=="") || ($restore["table_ready"]==$restore["anzahl_tabellen"] && $restore["eintraege_ready"]==$restore["anzahl_eintraege"])) { + // Uff, geschafft! Jetzt darf die Leitung wieder abkuehlen. :-) + + $restore["xtime"]=time()-$restore["xtime"]; + WriteLog("Restore '".$restore["filename"]."' finished in ".zeit_format($restore["xtime"])."."); + + $aus[]= '

'.$lang["restore"].'

'; + $aus[]= $lang["restore_db"].'`'.$databases["db_actual"].'`'.$lang['restore_db1'].'`'.$config["dbhost"].'`'.$lang['restore_db2']; + $aus[]= $lang["restore_total_complete"]."
"; + $aus[]= '
'.$restore["table_ready"].''. $lang["restore_complete"]."
"; + $aus[]= ''.(number_format($restore["eintraege_ready"],0,",",".")).' '.$lang['restore_run2'].'
'; + $aus[]= '

'.zeit_format($restore["xtime"]).", ".$restore["aufruf"]." pages

"; + if($restore["errors"]>0) $aus[]='

Es sind '.$restore["errors"].' Fehler aufgetreten: ansehen

'; + } else { + //Multipart-Restore + $nextfile=NextPart($restore["filename"]); + if(!file_exists($config["paths"]["backup"].$nextfile)) { + $aus[]= '

'.$lang["restore"].'

'; + $aus[]= $lang["restore_db"]; + $aus[]= '

Multipart-Backup: Missing File \''.$nextfile.'\' !

'; + $aus[]= ''.(number_format($restore["eintraege_ready"],0,",",".")).' '.$lang['restore_run2'].'
'; + $aus[]= '

'.zeit_format($restore["xtime"]).", ".$restore["aufruf"]." pages

"; + if($restore["errors"]>0) $aus[]='

'.$lang['errors_occured'].': '.$lang['view'].'

'; + + } else { + //Selbstaufruf mit nächstem File + + + $page_parameter="offset=0&aufruf=".$restore["aufruf"]."&actual_table=".$restore["actual_table"]; + $page_parameter.= "&filename=".urlencode($nextfile)."&kind=".$restore["kind"]."&xtime=".$restore["xtime"]; + $page_parameter.= "&table_ready=".$restore["table_ready"]."&eintraege_ready=".$restore["eintraege_ready"]; + $page_parameter.= "&anzahl_tabellen=".$restore["anzahl_tabellen"]."&anzahl_eintraege=".$restore["anzahl_eintraege"]; + $page_parameter.= "&actual_fieldcount=".$restore["actual_fieldcount"]."&part=".++$restore["part"]; + $page_parameter.= "&anzahl_zeilen=".$restore["anzahl_zeilen"]; + $page_parameter.= "&summe_eintraege=".$restore["summe_eintraege"]."&do_it=".$restore["do_it"]."&err=".$restore["errors"]; + + + } + + } + } +} +else $aus[]=$fpath.$restore["filename"]." : ".$lang["file_open_error"]; + + + +//===================================================================== +//================= Anzeige =========================================== +//===================================================================== + +//Seite basteln + +//DEBUGGER +$debugausgabe=""; +//$debugausgabe="
".$page_parameter; + +$sc=headline(); + +if($config["interface_browser_ie"]) { + + $js_aufruf_automatisch=($page_parameter=="") ? ">" : "onload=\"restart_restore()\">"; + $js_aufruf_manuell=($page_parameter=="") ? ">" : '>

'; + + + $s="\n"; + $pageheader=''.$meta.'MySqlDump'.$s.' + parent.msd_ausgabe.location.href="./work/log/out.html";'; + +} else { + $pageheader=''.$meta.'MySqlDump'.$sc; + $pagefooter=''; + $js_aufruf_automatisch=''; + $js_aufruf_manuell=''; + $selbstaufruf=($page_parameter=="") ? "" : $js_aufruf_automatisch; + $complete_page=$pageheader.(($aus!="") ? implode("\n",$aus) : "").$debugausgabe.$selbstaufruf.$pagefooter; + // und raus + echo $complete_page; + flush(); +} + + +?> \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..29cf8e0 --- /dev/null +++ b/script.js @@ -0,0 +1,163 @@ +var NS = (document.layers); +var IE = (document.all); + +//Filemanagement +function GetSelectedFilename() +{ + var a=""; + var obj=document.getElementsByName("file[]"); + var anz=0; + if(!obj.length) + { + if(obj.checked){a=obj.value;} + } + else + { + for (i=0; i23) obj.style.pixelHeight=obj.style.pixelHeight - 20; + if(i==2) obj.style.pixelHeight=obj.style.pixelHeight + 40; + } else { + //alert("not IE"); + if(i==0) obj.style.height=4; + if(i==1) obj.style.height=20; + if(i==2) obj.style.height=240; + } +} + +function GetSQLHeight() { + var obj=document.getElementById("tb_sql"); + if(IE) { + return obj.style.pixelHeight; + } else { + return obj.style.height; + } +} \ No newline at end of file diff --git a/sql.php b/sql.php new file mode 100644 index 0000000..57e0ff1 --- /dev/null +++ b/sql.php @@ -0,0 +1,916 @@ +0) $sql_to_display_data=0; + +if($sql_to_display_data==1) { + //nur ein SQL-Statement + $limitende=($limitstart+$config["sql_limit"]); + //Darf sortiert werden? + $op=strpos($sql["sql_statement"],"ORDER"); + if($op>0) { + $sql["order_statement"]=substr($sql["sql_statement"],$op); + $sql["sql_statement"]=substr($sql["sql_statement"],0,$op); + if(strpos($rest,",")>0) $no_order=true; + } + //Darf editiert werden? + $no_edit=(strtoupper(substr($sql["sql_statement"],0,6))!="SELECT" || $showtables==1); + + if($no_edit)$no_order=true; +} + +if(isset($_POST["tableselect"])) $tablename=$_POST["tableselect"]; + +//MySQL verbinden +MSD_mysql_connect(); + +mysql_select_db($db,$config["dbconnection"]); + + +///*** EDIT / UPDATES / INSERTS ***/// +///*** ***/// + +//Datensatz editieren +if(isset($_POST["update"])) { + GetPostParams(); + $f=explode("|",$_POST["feldnamen"]); + $sqlu='Update `'.$tablename.'` Set '; + for($i=0;$i'; +} +//Datensatz einfügen +if(isset($_POST["insert"])) { + GetPostParams(); + $f=explode("|",$_POST["feldnamen"]); + $sqlu='Insert into `'.$tablename.'` Set '; + for($i=0;$i'; +} + +if(isset($_POST["cancel"])) GetPostParams(); + + + + +//Tabellenansicht +$showtables=(substr(strtoupper($sql["sql_statement"]),0,5)=="SHOW ") ? 1 : 0; +$tabellenansicht=(substr(strtoupper($sql["sql_statement"]),0,10)=="SHOW TABLE") ? 1 : 0; + + +if(strtolower(substr($sql["sql_statement"],0,6))=="select") $limit=' LIMIT '.$limitstart.', '.$limitende.';'; +$params="sql.php?db=".$db."&tablename=".$tablename."&dbid=".$dbid.'&context='.$context.'&sql_statement='.urlencode($sql["sql_statement"]).'&showtables='.$showtables; +if($order!="") $params.="&order=".$order."&orderdir=".$orderdir.'&context='.$context; +if($bb>-1) $params.="&bb=".$bb; + + +echo '

Mini-SQL

'; +echo ''.$lang['sql_backdboverview'].'  '; +echo ''.$lang['db'].'  '; +if($context==0 || $context==2) { + echo '`'.$db.'` '.(($tablename!="") ? ''.$lang['table'].' `'.$tablename.'`' : '').''; +} else echo "(".$lang['sql_selecdb'].")"; +echo '

'; +if($context==0) { +//Start SQL-Box +if(isset($_GET["readfile"]) && $_GET["readfile"]==1) { + echo '
'; + echo ''; + echo '
'; + echo 'SQL-File öffnen (auch gz möglich):(max 2 MB)     
'; +} +if(isset($_POST["submit_openfile"])) { + //open file + if (!isset($_FILES["upfile"]["name"]) || empty($_FILES["upfile"]["name"])) echo ''.$lang["fm_uploadfilerequest"].''; + else { + $fn=$_FILES["upfile"]["tmp_name"]; + if(strtolower(substr($_FILES["upfile"]["name"],-3))==".gz") + $read__user_sqlfile=gzfile($fn); + else + $read__user_sqlfile=file($fn); + echo 'geladenes File: '.$_FILES["upfile"]["name"].'   '.byte_output(filesize($_FILES["upfile"]["tmp_name"])).''; + } +} +echo '
'; +//Titelzeile +echo '
'; +echo '  '; +echo 'show less'; +echo ' show more   '; +echo ''.SQL_ComboBox().'  '.Table_ComboBox(); +echo '   '; + +if(!isset($_GET["readfile"])) echo '  read file'; + +echo '
'; +//Eingabebox +echo '
'; +echo '
'.$lang['sql_warning'].'
'; +} +echo ''; +echo '

'; + + +if(isset($_GET["mode"]) && $context==0) { + if(isset($_GET["recordkey"])) $rk=stripslashes(urldecode($_GET["recordkey"])); + if(isset($_GET['tablename'])) $tablename=$_GET['tablename']; + + if($_GET["mode"]=="kill") { + + if($showtables==0) { + $sqlk= "DELETE FROM `$tablename` WHERE ".$rk; + $res=MSD_query($sqlk) or die(SQLError($sqlk,mysql_error())); + echo '

'.$lang['sql_recorddeleted'].'

'; + } else { + $sqlk= "Drop Table `$rk`"; + $res=MSD_query($sqlk) or die(SQLError($sqlk,mysql_error())); + echo '

'.$lang['sql_tabledeleted1'].$rk.$lang['sql_tabledeleted2'].'

'; + } + } + if($_GET["mode"]=="edit") { + echo '
'.$lang['sql_recordedit'].' '.$rk.''; + $sqledit="Select * from $tablename where $rk"; + + $res=MSD_query($sqledit) or die(SQLError($sqledit,mysql_error())); + echo '
'; + echo ''; + $row=mysql_fetch_row($res); + echo ''; + $feldnamen=""; + for($x=0; $xname.'|'; + echo ''; + echo ''; //'.$str->type.' + } + + echo ''; + echo '
'.$str->name.''; + if($str->type=='blob') + echo ''; + else + echo ''; + echo ' 
      
'.FormHiddenParams().'
'; + } + if($_GET["mode"]=="new") { + echo '
'.$lang['sql_recordnew'].''; + $sqledit="SHOW FIELDS FROM $tablename"; + $res=MSD_query($sqledit) or die(SQLError($sqledit,mysql_error())); + $num=mysql_numrows($res); + echo '
'; + echo ''; + + echo ''; + $feldnamen=""; + for($x=0; $x<$num; $x++) { + $row=mysql_fetch_row($res); + $feldnamen.=$row[0].'|'; + echo ''; + echo ''; //'.$str->type.' + } + echo ''; + echo '
'.$row[0].''; + $type=strtoupper($row[1]); + if(strpos($type,'BLOB') || strpos($type,'TEXT')) + echo ''; + else + echo ''; + echo ' 
      
'.FormHiddenParams().'
'; + + } +} + + +if($context==0){ + //Data-View + echo '

'.(($showtables==1)?$lang['sql_tableview']:$lang['sql_dataview']).'

'; + if($showtables==0){ + $p='sql.php?sql_statement='.urlencode($sql["sql_statement"]).'&db='.$db.'&tablename='.$tablename.'&dbid='.$dbid.'&limitstart='.$limitstart.'&order='.$order.'&orderdir='.$orderdir; + echo ''.$lang['sql_recordnew'].''; + } else { + $p='sql.php?db='.$db.'&dbid='.$dbid.'&context=2'; + echo ''.$lang['sql_tablenew'].''; + } + //Statuszeile + echo '

'; + if(isset($msg))echo $msg; + + //SQL ausführen + if($sql_to_display_data==0) { + //mehrere SQL-Statements + $numrowsabs=$numrows=0; + MSD_DoSQL($sql["sql_statement"]); + echo SQLOutput($out); + + } else { + $numrowsabs=$numrows=0; + $res=MSD_query($sql["sql_statement"]) or die(SQLError($sql["sql_statement"],mysql_error())); + + $numrowsabs=mysql_num_rows($res); + $res=MSD_query($sql["sql_statement"].$sql["order_statement"].$limit) or die(SQLError($sql["sql_statement"].$sql["order_statement"].$limit,mysql_error())); + $numrows=mysql_num_rows($res); + if($limitende>$numrowsabs)$limitende=$numrowsabs; + } + + + if($numrowsabs>0 && $Anzahl_SQLs<=1) { + if($showtables==0) { + $command_line=$lang['info_records']." ".($limitstart+1)." - $limitende ".$lang['sql_vonins']." $numrowsabs    "; + $command_line.=($limitstart>0) ? '<<    ' : '<<    '; + $command_line.=($limitstart>0) ? '<    ' : '<    '; + $command_line.=($limitende<$numrowsabs) ? '>    ' : '>    '; + $command_line.=($limitende<($numrowsabs-$config["sql_limit"])) ? '>>' : '>>'; + echo $command_line; + } else { + echo $numrowsabs." ".$lang['tables']; + } + echo '

'; + //Datentabelle + echo ''; + + $t=$d=""; + $fdesc=Array(); + $key=-1; + if ($numrows>0){ + //Infos und Header holen + //1.Datensatz für Feldinfos + $row= mysql_fetch_row($res); + $t=''; + $t.=''; + for($x=0; $xname; + $fdesc[$x]['table']=$str->table; + $fdesc[$x]['max_length']=$str->max_length; + $fdesc[$x]['not_null']=$str->not_null; + $fdesc[$x]['primary_key']=$str->primary_key; + $fdesc[$x]['unique_key']=$str->unique_key; + $fdesc[$x]['multiple_key']=$str->multiple_key; + $fdesc[$x]['numeric']=$str->numeric; + $fdesc[$x]['blob']=$str->blob; + $fdesc[$x]['type']=$str->type; + $fdesc[$x]['unsigned']=$str->unsigned; + $fdesc[$x]['zerofill']=$str->zerofill; + + $tt="Name: ".$fdesc[$x]['name']."\nType: ".$fdesc[$x]['type']."\nMax Length: ".$fdesc[$x]['max_length']."\nUnsigned: ".$fdesc[$x]['unsigned']."\nzerofill: ".$fdesc[$x]['zerofill']; + $pic=''; + if($str->primary_key==1 || $str->unique_key==1) { + if($key==-1) $key=$x; + if($str->primary_key==1) $pic='primary key'; + elseif($str->unique_key==1) $pic='unique key'; + } + + if($bb==-1) + $bb_link=($str->type=="blob") ? '   [BB]' : ''; + else + $bb_link=($str->type=="blob") ? '   [no BB]' : ''; + if($no_order==false && $showtables==0) + $t.=$pic.' '.$str->name.''.$bb_link; + else + $t.=$pic.' '.$str->name.''.$bb_link; + + $arname=($orderdir==" ASC") ? "arup.gif" : "ardown.gif"; + if($str->name==$order)$t.='  '; + $t.=''; + + //echo "
DOING HEADERS
$t"; + } + + //und jetzt Daten holen + mysql_data_seek ($res, 0); + + for ($i=0;$i<$numrows;$i++) { + $row= mysql_fetch_row($res); + for($x=0; $xedit '; + } + } + if($showtables==0) { + $d.='delete'; + } else { + if($tabellenansicht==1) { + $d.='edit table  '; + $d.='delete table  '; + } + } + $d.=''; + } + $d.='
'; + } + if($i==0) echo ''.$t.''; + echo ''.$d.''; + $d=""; + } + } + echo '
'.$lang['sql_queryentry'].' '.count($row).' '.$lang['sql_columns'].'
 '; + if($bb==$x){ + $data=simple_bbcode_conversion($row[$x]); + } else + $data=($fdesc[$x]['type']=='string' || $fdesc[$x]['type']=='blob') ? strip_tags($row[$x]) : $row[$x]; + $d.=($tabellenansicht==1 && $x==0) ? "$data" : $data; + $d.=' 
'; + if($showtables==0) echo '
'.$command_line; + } else echo '

'.$lang['sql_nodata'].'

'; +} elseif ($context==1) { + //SQL-Strings + echo '

'.$lang['sql_befehle'].' ('.count($SQL_ARRAY).')

'; + echo ''.$lang['sql_befehlneu'].''; + if(isset($_GET["sqlnewupdate"])) { + $ind=count($SQL_ARRAY); + if(count($SQL_ARRAY)>0) + array_push($SQL_ARRAY,$_GET["sqlname".$ind]."|".$_GET["sqlstring".$ind]); + else $SQL_ARRAY[0]=$_GET["sqlname0"]."|".$_GET["sqlstring0"]; + WriteSQL(); + echo '

'.$lang['sql_befehlsaved1'].' \''.$_GET["sqlname".$ind].'\' '.$lang['sql_befehlsaved2'].'

'; + } + echo '

+ + + + '; + echo ''; + $i=0; + if(count($SQL_ARRAY)>0) { + for($i=0;$i"; + echo '

'.$lang['sql_befehlsaved1'].' \''.$_GET["sqlname".$i].'\' '.$lang['sql_befehlsaved3'].'

'; + $SQL_ARRAY[$i]=$_GET["sqlname".$i]."|".$_GET["sqlstring".$i]; + WriteSQL(); + } + if(isset($_GET["sqlmove".$i])) { + echo '

'.$lang['sql_befehlsaved1'].' \''.$_GET["sqlname".$i].'\' '.$lang['sql_befehlsaved4'].'

'; + $a[]=$SQL_ARRAY[$i]; + array_splice($SQL_ARRAY,$i,1); + $SQL_ARRAY=array_merge($a,$SQL_ARRAY); + WriteSQL(); + } + if(isset($_GET["sqldelete".$i])) { + echo '

'.$lang['sql_befehlsaved1'].' \''.$_GET["sqlname".$i].'\' '.$lang['sql_befehlsaved5'].'

'; + array_splice($SQL_ARRAY,$i,1); + WriteSQL(); + } + } + for($i=0;$i

'; + echo ''; + echo ''; + } + } + if(isset($_GET["new"])) { + echo ' + +
PositionNameSQLBefehl
'.($i+1).''; + echo '
+
+
'.($i+1).''; + echo '
'; + } + echo '
'; + +} elseif ($context==2) { + //Tabellen + echo '

'.$lang['sql_tablesofdb'].' `'.$databases["Name"][$dbid].'` '.$lang['sql_edit'].'

'; + if(isset($_GET["kill"])) { + if($_GET["anz"]==1) + echo '

'.$lang['sql_nofielddelete'].'

'; + else { + $sql_alter="ALTER TABLE `".$databases["Name"][$dbid]."`.`".$_GET["table"]."` DROP COLUMN `".$_GET["kill"]."`"; + MSD_DoSQL($sql_alter); + echo '
'; + echo '

'.$lang['sql_fielddelete1'].' `'.$_GET["kill"].'` '.$lang['sql_deleted'].'.

'.highlight_sql($out).'
'; + } + } + if(isset($_POST["tablecopysubmit"])) { + $table_edit_name=$_GET["tablename"]; + if($_POST["tablecopyname"]=="") { + echo '

'.$lang['sql_nodest_copy'].'

'; + } elseif(Table_Exists($databases["Name"][$dbid],$_POST["tablecopyname"])) { + echo '

'.$lang['sql_desttable_exists'].'

'; + } else { + Table_Copy("`".$databases["Name"][$dbid]."`.`".$table_edit_name."`",$_POST["tablecopyname"],$_POST["copyatt"]); + echo '
'; + echo ($_POST["copyatt"]==0) ? '

'.$lang['sql_scopy1'].' `'.$table_edit_name.'` '.$lang['sql_scopy2'].' `'.$_POST["tablecopyname"].'` '.$lang['sql_scopy3'].'.

' : '

'.$lang['table'].' `'.$table_edit_name.'` '.$lang['sql_copy1'].' `'.$_POST["tablecopyname"].'` '.$lang['sql_copied'].'.

'; + echo highlight_sql($out).'
'; + $tablename=$_POST["tablecopyname"]; + } + } + if(isset($_POST["newtablesubmit"])) { + if($_POST["newtablename"]=="") { + echo '

'.$lang['sql_tablenoname'].'

'; + } else { + $sql_alter="CREATE TABLE `".$databases["Name"][$dbid]."`.`".$_POST["newtablename"]."` (`id` int(6) unsigned not null) ".((MSD_NEW_VERSION) ? "ENGINE" : "TYPE")."=MyISAM;"; + MSD_DoSQL($sql_alter); + echo SQLOutput($out,$lang['table'].' `'.$_POST["newtablename"].'` '.$lang['sql_created']); + } + } + if(isset($_POST["t_edit_submit"])) { + $sql_alter="ALTER TABLE `".$databases["Name"][$dbid]."`.`".$_POST["table_edit_name"]."` "; + if($_POST["t_edit_name"]=="") + echo '

'.$lang['sql_tblnameempty'].'

'; + elseif(MSD_NEW_VERSION && $_POST["t_edit_collate"]!="" && substr($_POST["t_edit_collate"],0,strlen($_POST["t_edit_charset"]))!=$_POST["t_edit_charset"]) + echo '

'.$lang['sql_collatenotmatch'].'

'; + else { + if($_POST["table_edit_name"]!=$_POST["t_edit_name"]) { + $sql_alter.="RENAME TO `".$_POST["t_edit_name"]."`, "; + $table_edit_name=$_POST["t_edit_name"]; + } else $table_edit_name=$_POST["table_edit_name"]; + if($_POST["t_edit_engine"]!="") $sql_alter.=((MSD_NEW_VERSION) ? "ENGINE=" : "TYPE=").$_POST["t_edit_engine"].", "; + if($_POST["t_edit_rowformat"]!="") $sql_alter.="ROW_FORMAT=".$_POST["t_edit_rowformat"].", "; + if(MSD_NEW_VERSION && $_POST["t_edit_charset"]!="") $sql_alter.="DEFAULT CHARSET=".$_POST["t_edit_charset"].", "; + if(MSD_NEW_VERSION && $_POST["t_edit_collate"]!="") $sql_alter.="COLLATE ".$_POST["t_edit_collate"].", "; + $sql_alter.="COMMENT='".$_POST["t_edit_comment"]."' "; + + MSD_DoSQL($sql_alter); + echo SQLOutput($out,$lang['table'].' `'.$_POST["table_edit_name"].'` '.$lang['sql_changed']); + } + } else { + if(!isset($table_edit_name) || $table_edit_name=="") { + $table_edit_name=(isset($_GET["tablename"])) ? $_GET["tablename"] : ""; + if(isset($_POST["tableselect"])) $table_edit_name=$_POST["tableselect"]; + if(isset($_POST["newtablesubmit"])) $table_edit_name=$_POST["newtablename"]; + } + } + if(isset($_POST["newfield_posted"])) { + //build sql for alter + $def_fieldvals=DefaultFieldVals(); + if($_POST["f_name"]=="") { + echo '

'.$lang['sql_fieldnamenotvalid'].' ('.$_POST["f_name"].')

'; + $field_fehler=1; + } else { + $sql_stamm="ALTER TABLE `".$databases["Name"][$dbid]."`.`$table_edit_name` "; + $sql_alter=$sql_stamm.((isset($_POST["editfield"])) ? "CHANGE COLUMN `".$_POST["fieldname"]."` `".$_POST["f_name"]."` " : "ADD COLUMN `".$_POST["f_name"]."` "); + $sql_alter.=$_POST["f_type"]; + $size=($_POST["f_size"]!="") ? $_POST["f_size"] : $def_fieldvals[strtoupper($_POST["f_type"])]["maxsize"]; + $sql_alter.="(".$size.") "; + $sql_alter.=$_POST["f_null"]." "; + $sql_alter.=($_POST["f_default"]!="") ? "DEFAULT '".$_POST["f_default"]."' " :""; + + if(MSD_NEW_VERSION && $_POST["f_collate"]!="") $sql_alter.="COLLATE ".$_POST["f_collate"]." "; + + $sql_alter.=$_POST["f_position"]." ;"; + + //alter Key + $oldkeys[0]=$_POST["f_primary"]; + $oldkeys[1]=$_POST["f_unique"]; + $oldkeys[2]=$_POST["f_index"]; + $oldkeys[3]=$_POST["f_fulltext"]; + //neuer Key + $newkeys[0]=($_POST["f_index_new"]=="primary")? 1 : 0; + $newkeys[1]=($_POST["f_index_new"]=="unique")? 1 : 0; + $newkeys[2]=($_POST["f_index_new"]=="index")? 1 : 0; + $newkeys[3]=(isset($_POST["f_indexfull"])) ? 1 : 0; + + //$s="$oldkeys[0] | $oldkeys[1] | $oldkeys[2] | $oldkeys[3] *** $newkeys[0] | $newkeys[1] |$newkeys[2] | $newkeys[3]"; + $add_sql=ChangeKeys($oldkeys,$newkeys,$_POST["f_name"],$size); + if($add_sql!="") { + $add_sql=$sql_stamm.$add_sql; + $sql_alter=$sql_alter."\n".$add_sql." ;"; + } + MSD_DoSQL($sql_alter); + + echo '
'; + echo '

`'.$_POST["f_name"].'` '.((isset($_POST["editfield"])) ? $lang['sql_changed'] : $lang['sql_created']).'.

'; + echo highlight_sql($out).'
'; + $fields_infos=FillFieldinfos($databases["Name"][$dbid],$table_edit_name); + } + } + mysql_select_db($databases["Name"][$dbid]); + $sqlt="SHOW TABLE STATUS FROM `".$databases["Name"][$dbid]."` ;"; + $res=MSD_query($sqlt) or die(SQLError($sqlt,mysql_error())); + $anz_tabellen=mysql_numrows($res); + $p="sql.php?db=".$databases["Name"][$dbid]."&dbid=$dbid&tablename=$table_edit_name&context=2"; + + echo '
'; + echo ''; + echo '
'.$lang['new'].' '.$lang['sql_createtable'].':
'.$lang['sql_copytable'].':
'; + + echo ''; + + if($anz_tabellen==0) { + echo ''; + } else { + + + echo ''; + echo ''; + echo ''; + } + echo '
'.$lang['sql_notablesindb'].' `'.$databases["Name"][$dbid].'`
'.$lang['sql_selecttable'].':     
'; + if($table_edit_name!="") { + + $sqlf="SHOW FIELDS FROM `".$databases["Name"][$dbid]."`.`$table_edit_name` ;"; + $res=MSD_query($sqlf) or die(SQLError($sqlf,mysql_error())); + $anz_fields=mysql_numrows($res); + + + + //Array füllen + + $fields_infos=FillFieldinfos($databases["Name"][$dbid],$table_edit_name); + if(MSD_NEW_VERSION) + $t_engine=(isset($fields_infos["_tableinfo_"]["ENGINE"])) ? $fields_infos["_tableinfo_"]["ENGINE"] : "MyISAM"; + else + $t_engine=(isset($fields_infos["_tableinfo_"]["TYPE"])) ? $fields_infos["_tableinfo_"]["TYPE"] : "MyISAM"; + $t_charset=(isset($fields_infos["_tableinfo_"]["DEFAULT CHARSET"])) ? $fields_infos["_tableinfo_"]["DEFAULT CHARSET"] : ""; + $t_collation=(isset($fields_infos["_tableinfo_"]["COLLATE"])) ? $fields_infos["_tableinfo_"]["COLLATE"] : ""; + $t_comment=(isset($fields_infos["_tableinfo_"]["COMMENT"])) ? substr($fields_infos["_tableinfo_"]["COMMENT"],1,strlen($fields_infos["_tableinfo_"]["COMMENT"])-2) : ""; + $t_rowformat=(isset($fields_infos["_tableinfo_"]["ROW_FORMAT"])) ? $fields_infos["_tableinfo_"]["ROW_FORMAT"] : ""; + + echo "

Tabelle `$table_edit_name`

"; + $td=''; + + + //Tabelleneigenschaften + echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
'.$lang['sql_tblpropsof'].' `'.$table_edit_name.'` ('.$anz_fields.' '.$lang['fields'].')Name
Engine
Row Format
'.$lang['charset'].'
'.$lang['collation'].'
'.$lang['comment'].'
 


'; + + $field_fehler=0; + + if(isset($_GET["newfield"]) || isset($_GET["editfield"]) || $field_fehler>0) { + if(isset($_GET["editfield"])) $id=$_GET["editfield"]; + $d_name=(isset($_GET["editfield"])) ? $fields_infos[$id]["name"] : ""; + $d_type=(isset($_GET["editfield"])) ? $fields_infos[$id]["type"] : ""; + $d_size=(isset($_GET["editfield"])) ? $fields_infos[$id]["size"] : ""; + $d_null=(isset($_GET["editfield"])) ? $fields_infos[$id]["null"] : ""; + $d_default=(isset($_GET["editfield"])) ? substr($fields_infos[$id]["default"],1,strlen($fields_infos[$id]["default"])-2) : ""; + $d_extra=(isset($_GET["editfield"])) ? $fields_infos[$id]["extra"] : ""; + $d_primary=$d_unique=$d_index=$d_fulltext=0; + if(isset($_GET["editfield"])) { + $d_primary=(isset($fields_infos["_primarykey_"]) && $fields_infos["_primarykey_"]==$fields_infos[$id]["name"]) ? 1 : 0; + if(isset($fields_infos["_key_"])) { + for($i=0;$i'; + if (isset($_GET["editfield"])) echo ''; + if(isset($_POST["newtablesubmit"])) echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo '
'.((isset($_GET["editfield"])) ? $lang['sql_editfield']." `".$d_name."`" : $lang['sql_newfield']).'
Name
Type
Size
NULL
Default
Extra
'.$lang['sql_indexes'].'
'; + echo 'No Index '; + echo 'Primary Key '; + echo 'Unique Index '; + echo 'Index '; + echo 'Fulltext Index '; + + + echo '
'.$lang['collation'].'
'.$lang['sql_atposition'].':
'; + } else + echo ''.$lang['sql_insertnewfield'].'

'; + + //Felder ausgeben + echo ''; + for($i=0;$i<$anz_fields;$i++) { + if($i==0) echo ''; + echo ''.$td.''.$fields_infos[$i]["name"].''.$td.$fields_infos[$i]["type"].''.$td.$fields_infos[$i]["size"].''; + echo $td.$fields_infos[$i]["null"].''.$td; + //key + if($fields_infos["_primarykey_"]==$fields_infos[$i]["name"]) echo 'Primary Key'; + if(isset($fields_infos["_fulltextkey_"])) { + for($ii=0;$ii'; break; + } + } + } + if(isset($fields_infos["_uniquekey_"])) { + for($ii=0;$ii'; break; + } + } + } + if(isset($fields_infos["_key_"])) { + for($ii=0;$ii".$fields_infos["_key_"][$ii]["columns"].""; + if($fields_infos["_key_"][$ii]["name"]==$fields_infos[$i]["name"]) { + echo 'Index'; break; + } + } + } + echo ''.$td.$fields_infos[$i]["default"].''.$td.$fields_infos[$i]["extra"].''; + echo ''.$td.$fields_infos[$i]["collate"].''; + } + echo '
 FieldTypeSizeNULLKeyDefaultExtraSortierung
'; + echo 'edit field  '; + echo 'delete field  '; + + echo '

'; + + echo '
'.$lang['sql_tableindexes'].' `'.$table_edit_name.'`
'; + echo ''.((MSD_NEW_VERSION) ? '' : '').''; + $sqlk="SHOW KEYS FROM `".$databases["Name"][$dbid]."`.`$table_edit_name`;"; + $res=MSD_query($sqlk) or die(SQLError($sqlk,mysql_error())); + $num=mysql_numrows($res); + if($num==0) { + echo ''; + } else { + for($i=0;$i<$num;$i++) { + $row=mysql_fetch_array($res); + //Images + echo ''; + echo ''; + if(MSD_NEW_VERSION) echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + } + echo '
 Index-NameTyp'.$lang['sql_allowdups'].''.$lang['sql_cardinality'].'Spalten
'.$lang['sql_tablenoindexes'].'
  '.$row["Key_name"].''.$row["Index_type"].''.(($row["Non_unique"]==1) ? $lang["yes"]: $lang["no"]).''.(($row["Cardinality"]>=0) ? $row["Cardinality"] : "keine").''.$row["Column_name"].'

'; + + /*echo "
"; + echo '
';print_r($fields_infos);echo '
';*/ + } + +} elseif ($context==3) { + //Datenbanken + if(isset($_GET["dbrefresh"])) SetDefault(true); + + echo "

".$lang['dbs']."

"; + if(isset($_POST["dbdosubmit"])) { + $newname=$_POST["newname"]; + $db_index=$_POST["db_index"]; + $db_action=$_POST["db_action"]; + $changed=false;$ausgabe=$out=""; + switch($db_action) { + case "drop": + MSD_DoSQL("DROP DATABASE `".$databases["Name"][$db_index]."`"); + echo SQLOutput($out,'

'.$lang['db'].' `'.$databases["Name"][$db_index].'` wurde gelöscht.

'); + $changed=true; + break; + case "empty": + DB_Empty($databases["Name"][$db_index]); + echo SQLOutput($out,'

'.$lang['db'].' `'.$databases["Name"][$db_index].'` '.$lang['sql_wasemptied'].'.

'); + break; + case "rename": + $dbold=$databases["Name"][$db_index]; + DB_Copy($dbold,$newname,1); + echo SQLOutput($out,'

'.$lang['db'].' `'.$dbold.'` '.$lang['sql_renamedto'].' `'.$newname.'`.

'); + $changed=true; + break; + case "copy": + $dbold=$databases["Name"][$db_index]; + DB_Copy($dbold,$newname); + $changed=true; + echo SQLOutput($out,'

'.$lang['sql_dbcopy1'].' `'.$dbold.'` '.$lang['sql_dbcopy2'].' `'.$newname.'` '.$lang['sql_copied'].'.

'); + break; + case "structure": + DB_Copy($databases["Name"][$db_index],$newname,0,0); + $changed=true; + echo SQLOutput($out,'

'.$lang['sql_dbscopy1'].' `'.$databases["Name"][$db_index].'` '.$lang['sql_dbcopy2'].' `'.$newname.'` '.$lang['sql_copied'].'.

'); + break; + case "rights": + break; + } + + + if($changed=true) { + SetDefault(true); + include ($config["files"]["parameter"]); + echo ''; + + } + } + if(isset($_POST["dbwantaction"])) { + if(isset($_POST["db_createnew"])) { + $newname=$_POST["db_create"]; + if(!empty($newname)) { + $sqlc="CREATE DATABASE `$newname`"; + MSD_query($sqlc) or die(SQLError($sqlc,mysql_error())); + echo $lang['db']." `$newname` ".$lang['sql_wascreated'].".
"; + SetDefault(true); + } + } + $db_action=$newname="";$db_index=-1; + for($i=0;$i
'; + echo '
'; + switch($db_action) { + case "drop": + echo ''.$lang["fm_askdbdelete1"].'`'.$databases["Name"][$i].'`'.$lang["fm_askdbdelete2"].'

'; + echo ''; + break; + case "empty": + echo ''.$lang["fm_askdbempty1"].'`'.$databases["Name"][$i].'`'.$lang["fm_askdbempty2"].'

'; + echo ''; + break; + case "rename": + echo ''.$lang['sql_renamedb'].' `'.$databases["Name"][$db_index].'` '.$lang['in'].' `'.$newname.'`

'; + echo ''; + break; + case "copy": + echo ''.$lang["fm_askdbcopy1"].'`'.$databases["Name"][$db_index].'`'.$lang["fm_askdbcopy2"].'`'.$newname.'`'.$lang["fm_askdbcopy3"].'

'; + if($newname=="") echo '

'.$lang['sql_namedest_missing'].'

'; else { + echo ''; + + } + break; + case "structure": + echo ''.$lang["fm_askdbcopy1"].'`'.$databases["Name"][$db_index].'`'.$lang["fm_askdbcopy2"].'`'.$newname.'`'.$lang["fm_askdbcopy3"].'

'; + if($newname=="") echo '

'.$lang['sql_namedest_missing'].'

'; else { + echo ''; + + } + break; + case "rights": + break; + } + echo "

"; + + + } + } + + echo '
'; + echo '
'; + echo ''; + echo ''; + for($i=0;$i' : ''; + echo ''; + echo ''; + } + + echo '
neue Datenbank:  
'.$lang["dbs"].''.$lang['sql_actions'].'
'.$databases["Name"][$i].''; + echo '  '; + echo "\n\n".'  '; + + echo '
'; + + +} elseif ($context==4) { + //Tabellen + +} + +echo '


'; + + + +include("inc/footer.php"); + + +function FormHiddenParams() +{ + global $db,$dbid,$tablename,$context,$limitstart,$order,$orderdir; + + $s=''; + $s.=''; + $s.=''; + $s.=''; + $s.=''; + $s.=''; + $s.=''; + + return $s; + +} + +?> diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..7082c92 --- /dev/null +++ b/styles.css @@ -0,0 +1,407 @@ +body +{ + font-family: Verdana,Helvetica,sans-serif; + color: #111111; + margin: 4px; + padding: 4px; + font-size: 12px; + background-color: #F5F5F5; + +} +body.menu { + + font-family:Verdana,Helvetica,sans-serif; + color:#111111; + margin:4px; + padding:4px; + font-size:12px; + background-color:#D0DCE0; +} + +body.control { + font-size: 10px; + background-color: #D8D8D8; + color: Navy; +} +td,tr { + font-family:Verdana,Helvetica,sans-serif; + color:#111111; + margin:4px; + padding:4px; + font-size:12px; +} + +td.nomargin { + margin: 0px; + padding: 0px; +} + +h1 { + font-size:16px; +} + +h6 { + font-size:11px; + background-color:#ccffcc; +} +.small + { + font-size:10px; + } +.verysmall + { + font-size: 9px; + } +.meldung + { + font-size: 10pt; + color:#000000; + font-weight:normal; + } + +.success + { + font-size: 10pt; + color:green; + font-weight:bold; + } + +.warnung + { + font-size: 11pt; + color:red; + font-weight:normal; + } +.swarnung + { + font-size: 12px; + color:red; + font-weight:normal; + } +.desc + { + font-size: 9pt; + padding-left:20px; + } + +a + { + font-family:Verdana,Helvetica,sans-serif; + color:#333333; + font-weight:normal; + font-style:normal; + font-size:12px; + text-decoration:none; + } + +a:hover { + text-decoration: underline; + color: #D00030; +} + +a:hover { + text-decoration: none; + color: #D00030; +} + +a.ul + { + font-family:Verdana,Helvetica,sans-serif; + color:#333333; + font-weight:normal; + font-style:normal; + font-size:12px; + text-decoration:underline; + } +a.ul:hover { + text-decoration: underline; + color: #D00030; +} +a.uls + { + font-family:Verdana,Helvetica,sans-serif; + color:#333333; + font-weight:normal; + font-style:normal; + font-size:10px; + text-decoration:underline; + } +a.uls:hover { + text-decoration: underline; + color: #D00030; +} +a.datacell + { + font-family:Verdana,Helvetica,sans-serif; + color : black; + text-decoration: none; + background-color : transparent; + + padding : 4px; + cursor : default + } +a.ul:datacell { + color: black; + text-decoration: none; + background-color : transparent; + border : 1px solid red; + padding : 4px; + cursor : default +} + +form { padding:0px; + margin:0px; + } +td.tableheads_on { + border:1px solid black; + color:#ffffff; + background:#9f9f9f; + padding: 2px; + padding-left: 5px; + text-align:center; + border-spacing:0px; +} + +td.tableheads_off { + border:1px solid black; + background:#cfcfcf; + padding: 2px; + padding-left: 5px; + text-align:center; + border-spacing:0px; + color:#ffffff; +} + +td.sm { + font-size:8pt; +} + +.blau { + color: Blue; +} +img { border:0px; } + +.hd { + FONT-SIZE: 11px; + color: #191970; + background:#ffffcc; + vertical-align: top; + text-align: center; +} +.hdl { + FONT-SIZE: 11px; + color: #191970; + background:#ffffcc; + vertical-align: top; + text-align: left; +} +.hd2 { + FONT-SIZE: 11px; + color: #191970; + background:#ffcc33; + vertical-align: top; + text-align: center; +} +.hellblau { + background:#B4ECEF; +} + +.green { + color: green; +} +.green1 { + color: green; + font-size: 12px; + font-weight: bold; +} +.Menubutton{ + border: 0px; + color: blue; + /*background-color: white; + text-decoration: underline;*/ + cursor: pointer; +} +.Menubutton2{ + border: 0px; + color: blue; + FONT-SIZE: 10px; + /*background-color: white; + text-decoration: underline;*/ + cursor: pointer; +} +.Formbutton{ + border: thin solid Navy; + color: blue; + background-color: Silver; + cursor: pointer; + width:140px; +} +.Formbutton2{ + border: thin solid Navy; + color: blue; + FONT-SIZE: 11px; + background-color: Silver; + cursor: pointer; + width:110px; +} +.Formbutton3{ + border: thin solid green; + color: blue; + background-color: #ccffff; + cursor: pointer; + FONT-SIZE: 10px; + width:160px; + +} +.Formbutton4{ + border: thin solid Navy; + color: blue; + background-color: Silver; + cursor: pointer; + +} +.textk { + FONT-SIZE: 10px; +} +.scrollbox{ + overflow: auto; + border: 1px solid silver; + width:250px; + height: 100px; +} +.dbscrollbox{ + overflow: auto; + border: 1px solid silver; + width:100%; + height: 100px; +} +.sqlbox + { + font-size: 9pt; + padding: 0px; + background-color: #DCDCDC; + color: Green; + border: thin ridge #5B5B5B; + height: auto; +} +.sqleditbox + { + font-size: 9pt; + padding: 6px; + background-color: #DCDCDC; + color: Navy; + border: thin solid #525252; + height: auto; + width: auto; +} +.sqloutbox + { + font-size: 9pt; + padding: 6px; + background-color: #DCDCDC; + color: Navy; + border: thin solid #525252; + height: auto; + width: 90%; + overflow: auto; +} +.sqlnewbox + { + font-size: 9pt; + padding-left: 6px; + padding-right: 6px; + background-color: #FFFFAA; + color: #750000; + border: thin solid #00008B; + height: auto; + width: auto; +} +.MySQLbox + { + font-size: 10pt; + padding: 6px; + background-color: Black; + color: White; + border: thin solid #999999; + height: 200px; + width: 80%; + text-align: left; + overflow: auto; +} +td.sqletbl { + color: #000153; + vertical-align: top; +} +.sbox2 { + font-size: 9pt; +} +.wtitle { + background-color: #7F8E9C; + padding: 0px; /*width: 80%; + border: thin solid Black;*/ +} +.sqleingabe { + + width: 100%; + +} +.SQLbutton{ + border: 1px solid Navy; + color: blue; + FONT-SIZE: 10px; + background-color: Silver; + cursor: pointer; +} +.MYSQLbutton{ + border: 1px solid Navy; + color: blue; + FONT-SIZE: 11px; + background-color: Silver; + cursor: pointer; + padding-top:3px; + padding-bottom:3px; + padding-left:6px; + padding-right:6px; + width: 140px; + text-align: center; +} +.SQLCombo { + color: Blue; + FONT-SIZE: 10px; + background-color: Silver; +} +.crondumppars{ + color: #004C01; +} +.dumppars{ + color: #009B01; +} +.smallgrey { + font-size: 9px; + color:#999999; +} +.smallwarnung { + font-size: 9px; + color:red; + +} +.smallblue { + font-size: 9px; + color:blue; +} +.smallblack { + font-size: 9px; + color:black; +} +.smallgreen { + font-size: 9px; + color:green; +} +.smallbrown { + ont-size: 9px; + color:brown; +} +.smalldblue { + ont-size: 9px; + color:#000099; +} \ No newline at end of file