154
config.php
Normale Datei
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
//////////////////////////////////////////////////////////
|
||||
// MySQL Dumper Configuration
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
// The Connection-Data for MySQL
|
||||
//
|
||||
// Host-Adress, default 'localhost'
|
||||
$config["dbhost"] = 'localhost';
|
||||
// port - if empty, mysql uses default
|
||||
$config["dbport"] = '';
|
||||
// socket - if empty, mysql uses default
|
||||
$config["dbsocket"] = '';
|
||||
|
||||
// Username
|
||||
$config["dbuser"] = 'root';
|
||||
//User-Pass. For no Password leave empty
|
||||
$config["dbpass"] = '';
|
||||
// If you only want to see one database enter then name here and there will be no lookup for other databases
|
||||
$config["dbonly"] = '';
|
||||
//Use 0 if the Script and MySQL-Server is not on the same server
|
||||
$config["direct_connection"]=1;
|
||||
|
||||
//Speed Values between 50 and 1000000
|
||||
//use low values if you have bad connection or slow machines
|
||||
$config["minspeed"]=100;
|
||||
$config["maxspeed"]=5000;
|
||||
|
||||
// Your Interface language. Use 'de' for german, 'en' for english
|
||||
$config["language"]="de";
|
||||
//Browser-Switch 0=autonatic detection, 1=IE, 2=other
|
||||
$config["browser_switch"]=0;
|
||||
//Shows the Serveradress on top if 1
|
||||
$config["interface_server_caption"]=1;
|
||||
$config["interface_server_captioncolor"]="#ff9966";
|
||||
//Position of the Serveradress 0=left, 1=right
|
||||
$config["interface_server_caption_position"]=0;
|
||||
//select your stylesheet
|
||||
$config["theme"]="classic";
|
||||
|
||||
//Height of the SQL-Box in Mini-SQL in pixel
|
||||
$config["interface_sqlboxsize"]=70;
|
||||
|
||||
// Determine the maximum Amount for Memory Use in Bytes, 0 for no limit
|
||||
$config["memory_limit"]=100000;
|
||||
|
||||
// For gz-Compression set to 1, without compression set to 0
|
||||
$config["compression"]=1;
|
||||
|
||||
//The Backupformat
|
||||
$config["backup_complete_inserts"]=0;
|
||||
$config["backup_extended_inserts"]=0;
|
||||
$config["backup_ignore_inserts"]=0;
|
||||
$config["backup_delayed_inserts"]=0;
|
||||
$config["backup_downgrade"]=0;
|
||||
//Lock tables if 1
|
||||
$config["backup_lock_tables"]=0;
|
||||
|
||||
|
||||
//Refreshtime for MySQL processlist in msec, use any value >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;
|
||||
$config["stop_with_error"]=1;
|
||||
|
||||
// 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["cron_completelog"]=1;
|
||||
$config["multi_dump"]=0;
|
||||
|
||||
$config["logcompression"] = "0";
|
||||
$config["log_maxsize1"] = "1";
|
||||
$config["log_maxsize2"] = "2";
|
||||
$config["log_maxsize"] = "1048576";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
664
config_overview.php
Normale Datei
|
@ -0,0 +1,664 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
// wenn neue Sprache angewählt wurde schon vor dem includen übernehmen
|
||||
if (isset($_POST["save"]) && $_POST["language"]!=$_POST["lang_old"]) {
|
||||
$config["language"]=$_POST["language"];
|
||||
$temp_lang=$config["language"];
|
||||
include_once("inc/header.php"); // Normal prodecure (resets config[language])
|
||||
$config["language"]=$temp_lang; // re-set language
|
||||
include("language/lang_list.php"); // This re-initializes $lang[] and loads appropiate language files
|
||||
}
|
||||
else include_once("inc/header.php"); // language not changed, go on as usual
|
||||
|
||||
include_once("language/".$config["language"]."/lang_help.php");
|
||||
include_once("language/".$config["language"]."/lang_config_overview.php");
|
||||
include_once("language/".$config["language"]."/lang_sql.php");
|
||||
include_once("inc/runtime.php");
|
||||
include_once("inc/functions_sql.php");
|
||||
|
||||
$config["theme"]=(!isset($config["theme"])) ? "classic" : $config["theme"];
|
||||
|
||||
$config["interface_server_caption"]=(!isset($config["interface_server_caption"])) ? 0 : $config["interface_server_caption"];
|
||||
$config["interface_server_caption_position"]=(!isset($config["interface_server_caption_position"])) ? 0 : $config["interface_server_caption_position"];
|
||||
$config["cron_smtp_port"]=(!isset($config["cron_smtp_port"])) ? 25 : $config["cron_smtp_port"];
|
||||
$msg="";
|
||||
$sel=(isset($_POST["sel"])) ? $_POST["sel"] : "db";
|
||||
|
||||
$ftptested=-1;
|
||||
$oldtheme=$config["theme"];
|
||||
$oldscposition=$config["interface_server_caption_position"];
|
||||
$checkFTP=Array("","","");
|
||||
if(isset($_POST["testFTP0"])) {
|
||||
$checkFTP[0]='<div class="smallgrey">'.$lang['test'].' FTP-Connection 1<br><br>'.TesteFTP($_POST["ftp_server0"],$_POST["ftp_port0"],$_POST["ftp_user0"],$_POST["ftp_pass0"],$_POST["ftp_dir0"]).'</div>';
|
||||
if($command<6) $command=4;
|
||||
$ftptested=0;
|
||||
}
|
||||
if(isset($_POST["testFTP1"])) {
|
||||
$checkFTP[1]='<div class="smallgrey">'.$lang['test'].' FTP-Connection 2<br><br>'.TesteFTP($_POST["ftp_server1"],$_POST["ftp_port1"],$_POST["ftp_user1"],$_POST["ftp_pass1"],$_POST["ftp_dir1"]).'</div>';
|
||||
if($command<6)$command=4;
|
||||
$ftptested=1;
|
||||
}
|
||||
if(isset($_POST["testFTP2"])) {
|
||||
$checkFTP[2]='<div class="smallgrey">'.$lang['test'].' FTP-Connection 3<br><br>'.TesteFTP($_POST["ftp_server2"],$_POST["ftp_port2"],$_POST["ftp_user2"],$_POST["ftp_pass2"],$_POST["ftp_dir2"]).'</div>';
|
||||
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(true);
|
||||
$msg=nl2br($msg)."<br>". $lang["load_success"]."<br>";
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_menu.location.href="menu.php";</script>';
|
||||
}
|
||||
|
||||
if (isset($_POST["save"]))
|
||||
{
|
||||
//Parameter auslesen
|
||||
|
||||
$config["multi_dump"]=(isset($_POST["MultiDBDump"])) ? $_POST["MultiDBDump"] : 0;
|
||||
$databases["db_actual_cronpraefix"]=$_POST["dbcronpraefix"];
|
||||
$config["compression"]=$_POST["compression"];
|
||||
$config["language"]=$_POST["language"];
|
||||
$config["interface_server_caption"]=$_POST["server_caption"];
|
||||
$config["interface_server_caption_position"]=$_POST["server_caption_position"];
|
||||
$config["interface_sqlboxsize"]=$_POST["sqlboxsize"];
|
||||
$config["theme"]=$_POST["theme"];
|
||||
|
||||
$config["email_recipient"]=$_POST["email0"];
|
||||
$config["email_sender"]=$_POST["email1"];
|
||||
$config["send_mail"]=$_POST["send_mail"];
|
||||
$config["send_mail_dump"]=$_POST["send_mail_dump"];
|
||||
|
||||
$config["email_maxsize1"]=$_POST["email_maxsize1"]; if($config["email_maxsize1"]=="") $config["email_maxsize1"]=0;
|
||||
$config["email_maxsize2"]=$_POST["email_maxsize2"];
|
||||
$config["email_maxsize"]=$config["email_maxsize1"]*(($config["email_maxsize2"]==1) ? 1024 : 1024*1024);
|
||||
|
||||
$config["backup_complete_inserts"]=(isset($_POST["backup_complete_inserts"])) ? 1 : 0;
|
||||
$config["backup_extended_inserts"]=(isset($_POST["backup_extended_inserts"])) ? 1 : 0;
|
||||
$config["backup_delayed_inserts"]=(isset($_POST["backup_delayed_inserts"])) ? 1 : 0;
|
||||
$config["backup_ignore_inserts"]=(isset($_POST["backup_ignore_inserts"])) ? 1 : 0;
|
||||
$config["backup_lock_tables"]=(isset($_POST["backup_lock_tables"])) ? 1 : 0;
|
||||
$config["backup_downgrade"]=(isset($_POST["backup_downgrade"])) ? 1 : 0;
|
||||
|
||||
$config["memory_limit"]=$_POST["memory_limit"]; if($config["memory_limit"]=="") $config["memory_limit"]=0;
|
||||
$config["minspeed"]=$_POST["minspeed"]; if($config["minspeed"]<50) $config["minspeed"]=50;
|
||||
$config["maxspeed"]=$_POST["maxspeed"];
|
||||
$config["stop_with_error"]=$_POST["stop_with_error"];
|
||||
|
||||
$config["multi_part"]=$_POST["multi_part"];
|
||||
$config["multipartgroesse1"]=$_POST["multipartgroesse1"];
|
||||
$config["multipartgroesse2"]=$_POST["multipartgroesse2"];
|
||||
if($config["multipartgroesse1"]<100 && $config["multipartgroesse2"]==1)$config["multipartgroesse1"]=100;
|
||||
|
||||
$oldlogcompression=$config["logcompression"];
|
||||
$config["logcompression"]=(isset($_POST["logcompression"]) && $_POST["logcompression"]==1) ? 1 : 0;
|
||||
$config["log_maxsize1"]=$_POST["log_maxsize1"]; if($config["log_maxsize1"]=="") $config["log_maxsize1"]=0;
|
||||
$config["log_maxsize2"]=$_POST["log_maxsize2"];
|
||||
$config["log_maxsize"]=$config["log_maxsize1"]*(($config["log_maxsize2"]==1) ? 1024 : 1024*1024);
|
||||
|
||||
$config["auto_delete"]=$_POST["auto_delete"];
|
||||
$config["del_files_after_days"]=$_POST["del_files_after_days"];
|
||||
$config["max_backup_files"]=$_POST["max_backup_files"];
|
||||
$config["max_backup_files_each"]=$_POST["max_backup_files_each"];
|
||||
|
||||
|
||||
$config["empty_db_before_restore"]=$_POST["empty_db_before_restore"];
|
||||
$config["optimize_tables_beforedump"]=$_POST["optimize_tables"];
|
||||
$config["cron_samedb"]=$_POST["cron_samedb"];
|
||||
|
||||
|
||||
$config["cron_extender"]=$_POST["cron_extender"];
|
||||
// cron_select_savepath/
|
||||
if(isset($_POST["cron_savepath_new"]) && !empty($_POST["cron_savepath_new"]))
|
||||
$config["cron_configurationfile"]=$_POST["cron_savepath_new"].".conf";
|
||||
else
|
||||
$config["cron_configurationfile"]=$_POST["cron_select_savepath"].".conf";
|
||||
|
||||
|
||||
$config["cron_execution_path"]=$_POST["cron_execution_path"];
|
||||
if($config["cron_execution_path"]=="")$config["cron_execution_path"]="msd_cron/";
|
||||
if(strlen($config["cron_execution_path"])>1 && substr($config["cron_execution_path"],-1)!="/") $config["cron_execution_path"].="/";
|
||||
$config["cron_mail"]=$_POST["cron_mail"];
|
||||
$config["cron_mail_dump"]=$_POST["cron_mail_dump"];
|
||||
|
||||
$config["cron_use_sendmail"]=$_POST["cron_use_sendmail"];
|
||||
$config["cron_sendmail"]=$_POST["cron_sendmail"];
|
||||
$config["cron_smtp"]=$_POST["cron_smpt"];
|
||||
|
||||
$config["cron_printout"]=$_POST["cron_printout"];
|
||||
$config["cron_completelog"]=$_POST["cron_completelog"];
|
||||
$config["cron_ftp"]=$_POST["cron_ftp"];
|
||||
$config["cron_compression"]=$_POST["cron_compression"];
|
||||
$config["cron_comletelog"]=$_POST["cron_completelog"];
|
||||
|
||||
$config["browser_switch"]=$_POST["browserswitch"];
|
||||
|
||||
$databases["multi"]=Array();
|
||||
$databases["multi_praefix"]=Array();
|
||||
$databases["multi_commandbeforedump"]=Array();
|
||||
$databases["multi_commandafterdump"]=Array();
|
||||
for($i=0;$i<count($databases["Name"]);$i++) {
|
||||
$databases["praefix"][$i]=$_POST["dbpraefix_".$i];
|
||||
$databases["command_before_dump"][$i]=(!isset($_POST["command_before_".$i])) ? "" : ($config["magic_quotes_gpc"]==1) ? $_POST["command_before_".$i] : addslashes($_POST["command_before_".$i]);
|
||||
$databases["command_after_dump"][$i]=(!isset($_POST["command_after_".$i])) ? "" : ($config["magic_quotes_gpc"]==1) ? $_POST["command_after_".$i] : addslashes($_POST["command_after_".$i]);
|
||||
if(isset($_POST["db_multidump_$i"]) && $_POST["db_multidump_$i"]=="db_multidump_$i") {
|
||||
$databases["multi"][]=$databases["Name"][$i];
|
||||
$databases["multi_praefix"][]=$databases["praefix"][$i];
|
||||
$databases["multi_commandbeforedump"][]=$databases["command_before_dump"][$i];
|
||||
$databases["multi_commandafterdump"][]=$databases["command_after_dump"][$i];
|
||||
}
|
||||
|
||||
}
|
||||
$databases["multisetting"]=(count($databases["multi"])>0)?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"];
|
||||
|
||||
if($config["dbhost"]!=$_POST["dbhost"] ||
|
||||
$config["dbuser"]!=$_POST["dbuser"] ||
|
||||
$config["dbpass"]!=$_POST["dbpass"] ||
|
||||
$config["dbonly"]!=$_POST["dbonly"] ||
|
||||
$config["dbport"]!=$_POST["dbport"] ||
|
||||
$config["dbsocket"]!=$_POST["dbsocket"]) {
|
||||
//neue Verbindungsparameter
|
||||
|
||||
//alte Parameter sichern
|
||||
$old["dbhost"]=$config["dbhost"];
|
||||
$old["dbuser"]=$config["dbuser"];
|
||||
$old["dbpass"]=$config["dbpass"];
|
||||
$old["dbonly"]=$config["dbonly"];
|
||||
$old["dbport"]=$config["dbport"];
|
||||
$old["dbsocket"]=$config["dbsocket"];
|
||||
|
||||
//neu setzen
|
||||
$config["dbhost"]=$_POST["dbhost"];
|
||||
$config["dbuser"]=$_POST["dbuser"];
|
||||
$config["dbpass"]=$_POST["dbpass"];
|
||||
$config["dbonly"]=$_POST["dbonly"];
|
||||
$config["dbport"]=$_POST["dbport"];
|
||||
$config["dbsocket"]=$_POST["dbsocket"];
|
||||
if(MSD_mysql_connect()) {
|
||||
SetDefault();
|
||||
$msg.= '<script language="JavaScript">parent.MySQL_Dumper_menu.location.href="menu.php";</script>';
|
||||
} else {
|
||||
//alte Werte holen
|
||||
$config["dbhost"]=$old["dbhost"];
|
||||
$config["dbuser"]=$old["dbuser"];
|
||||
$config["dbpass"]=$old["dbpass"];
|
||||
$config["dbonly"]=$old["dbonly"];
|
||||
$config["dbport"]=$old["dbport"];
|
||||
$config["dbsocket"]=$old["dbsocket"];
|
||||
$msg.='<p class="error">'.$lang['wrong_connectionpars'].'</p>';
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// und wegschreiben
|
||||
if (WriteParams(0,$config,$databases)==true)
|
||||
{
|
||||
//neue Sprache? Dann Menü links auch aktualisieren
|
||||
if( $_POST["lang_old"]!=$config["language"]
|
||||
|| $_POST["scaption_old"]!=$config["interface_server_caption"]
|
||||
|| $oldtheme!=$config["theme"]
|
||||
|| $oldscposition!=$config["interface_server_caption_position"])
|
||||
{
|
||||
$msg.= '<script language="JavaScript">parent.MySQL_Dumper_menu.location.href="menu.php";</script>';
|
||||
}
|
||||
//Parameter laden
|
||||
include($config["files"]["parameter"]);
|
||||
if ($config["logcompression"]!=$oldlogcompression) SwitchLogfileFormat();
|
||||
$msg.= $lang["save_success"];
|
||||
} else $msg.= $lang["save_error"];
|
||||
}
|
||||
}
|
||||
|
||||
echo MSDHeader();
|
||||
ReadSQL();
|
||||
|
||||
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function hide_pardivs() {
|
||||
document.getElementById("db").style.display = 'none';
|
||||
document.getElementById("global1").style.display = 'none';
|
||||
document.getElementById("global2").style.display = 'none';
|
||||
document.getElementById("global3").style.display = 'none';
|
||||
document.getElementById("transfer1").style.display = 'none';
|
||||
document.getElementById("transfer2").style.display = 'none';
|
||||
document.getElementById("cron").style.display = 'none';
|
||||
for(i=1;i<9;i++) {
|
||||
document.getElementById("command"+i).className ='ConfigButton';
|
||||
}
|
||||
}
|
||||
function SwitchVP() {
|
||||
if(document.getElementById('VP').style.display=='none')
|
||||
document.getElementById('VP').style.display='block';
|
||||
else
|
||||
document.getElementById('VP').style.display='none'
|
||||
}
|
||||
|
||||
function show_pardivs(lab) {
|
||||
hide_pardivs();
|
||||
switch(lab) {
|
||||
case "db":
|
||||
document.getElementById("db").style.display = 'block';
|
||||
document.getElementById("command1").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "global1":
|
||||
document.getElementById("global1").style.display = 'block';
|
||||
document.getElementById("command2").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "global2":
|
||||
document.getElementById("global3").style.display = 'block';
|
||||
document.getElementById("command3").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "global3":
|
||||
document.getElementById("global2").style.display = 'block';
|
||||
document.getElementById("command4").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "transfer1":
|
||||
document.getElementById("transfer1").style.display = 'block';
|
||||
document.getElementById("command5").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "transfer2":
|
||||
document.getElementById("transfer2").style.display = 'block';
|
||||
document.getElementById("command6").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "cron":
|
||||
document.getElementById("cron").style.display = 'block';
|
||||
document.getElementById("command7").className ='ConfigButtonSelected';
|
||||
break;
|
||||
case "all":
|
||||
document.getElementById("db").style.display = 'block';
|
||||
document.getElementById("global1").style.display = 'block';
|
||||
document.getElementById("global2").style.display = 'block';
|
||||
document.getElementById("global3").style.display = 'block';
|
||||
document.getElementById("transfer1").style.display = 'block';
|
||||
document.getElementById("transfer2").style.display = 'block';
|
||||
document.getElementById("cron").style.display = 'block';
|
||||
document.getElementById("command8").className ='ConfigButtonSelected';
|
||||
break;
|
||||
default:
|
||||
document.getElementById("db").style.display = 'block';
|
||||
document.getElementById("command1").className ='ConfigButtonSelected';
|
||||
break;
|
||||
}
|
||||
document.getElementById("sel").value=lab;
|
||||
}
|
||||
function WriteMem()
|
||||
{
|
||||
document.getElementById("mlimit").value=<?php echo round($config["ram"]*1024*1024*0.9,0);?>;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
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"]);
|
||||
|
||||
|
||||
|
||||
|
||||
//Ausgabe-Teile
|
||||
$aus["formstart"]=headline($lang["config_headline"]).$msg."\n";
|
||||
$aus["formstart"].='<form name="frm_config" method="POST" action="config_overview.php"><input type="hidden" name="sel" id="sel" value="db">'.$nl;
|
||||
$aus["formstart"].='<table border="0" cellpadding="0" cellspacing="0" align="left" width="90%">'.$nl;
|
||||
$aus["formstart"].='<tr><td align="left" width="138" align="center"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command1" onclick="show_pardivs(\'db\');" value="'.$lang['dbs'].'" class="ConfigButton"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command2" onclick="show_pardivs(\'global1\');" value="'.$lang['general'].'" class="ConfigButton"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command3" onclick="show_pardivs(\'global2\');" value="'.$lang['config_interface'].'" class="ConfigButton"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command4" onclick="show_pardivs(\'global3\');" value="'.$lang['config_autodelete'].'" class="ConfigButton"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command5" onclick="show_pardivs(\'transfer1\');" value="Email" class="ConfigButton"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command6" onclick="show_pardivs(\'transfer2\');" value="FTP" class="ConfigButton"><br>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command7" onclick="show_pardivs(\'cron\');" value="Cronscript" class="ConfigButton"><br><hr>'.$nl;
|
||||
$aus["formstart"].='<input type="Button" id="command8" onclick="show_pardivs(\'all\');" value="'.$lang['allpars'].'" class="ConfigButton"><hr><br>'.$nl;
|
||||
|
||||
$aus["formstart"].='<input class="Formbutton" type="reset" name="reset" value="'.$lang["reset"].'"><br><br><input class="Formbutton" type="submit" name="save" value="'.$lang["save"].'"><br><br><br>'.$nl;
|
||||
$aus["formstart"].='<input class="Formbutton" type="Submit" name="load" value="'.$lang["load"].'" onclick="if (!confirm(\''.$lang["config_askload"].'\')) return false;"></td>'.$nl;
|
||||
|
||||
$aus["formstart"].='<td class="sm"><br>'.$nl;
|
||||
|
||||
// Zugangsdaten
|
||||
$aus["db"]='<div id="db"><fieldset><legend><b>'.$lang['connectionpars'].'</b></legend>'.$nl.$nl;
|
||||
$aus["db"].='<div id="VP" style="display:none;"><table><tr><td class="sm">Host / User / Passwort:</td><td><input class="sm" type="text" name="dbhost" value="'.$config["dbhost"].'"> / <input class="sm" type="text" name="dbuser" value="'.$config["dbuser"].'"> / <input class="sm" type="password" name="dbpass" value="'.$config["dbpass"].'"></td></tr>';
|
||||
$aus["db"].='<tr><td class="sm" colspan="2"><strong>'.$lang['extendedpars'].'</strong></td></tr>';
|
||||
$aus["db"].='<tr><td class="sm">'.$lang['dbonly'].':</td><td><input class="sm" type="text" name="dbonly" value="'.$config["dbonly"].'"></td></tr>';
|
||||
$aus["db"].='<tr><td class="sm">Port / Socket:</td><td><input class="sm" type="text" name="dbport" value="'.$config["dbport"].'"> / <input class="sm" type="text" name="dbsocket" value="'.$config["dbsocket"].'"></td></tr>';
|
||||
|
||||
$aus["db"].='</table></div><div align="right"><a class="sm" href="#" onclick="SwitchVP();">'.$lang['fade_in_out'].'</a></div></fieldset><fieldset><legend><b>'.$lang['db_backuppars'].'</b></legend><table>';
|
||||
|
||||
|
||||
if(count($databases["Name"])==1) {
|
||||
$aus["db"].='<tr><td class="sm">'.Help($lang["help_db"],"conf1").$lang["list_db"].'</td><td class="sm">';
|
||||
$aus["db"].='<strong>'.$databases["db_actual"].'</strong>'.(($config["dbonly"]!="") ? '<br><br><span class="smallgrey">dbonly='.$config["dbonly"].'</span>' : '').'</td></tr>';
|
||||
$aus["db"].='<tr><td class="sm">'.Help($lang["help_praefix"],"conf2").$lang["praefix"].'</td><td><input type="text" name="dbpraefix_'.$databases["db_selected_index"].'" size="10" value="'.$databases["praefix"][$databases["db_selected_index"]].'"></td></tr>';
|
||||
$aus["db"].= '<tr><td class="sm">'.Help($lang["help_commands"],"").'Command before Dump</td><td>'.ComboCommandDump(0,$databases["db_selected_index"]).'</td></tr>';
|
||||
$aus["db"].= '<tr><td class="sm">'.Help($lang["help_commands"],"").'Command after Dump</td><td>'.ComboCommandDump(1,$databases["db_selected_index"]).'</td></tr>';
|
||||
} else {
|
||||
$aus["db"].='<tr><td class="sm">'.Help($lang["help_db"],"conf1").$lang["list_db"].'</td><td class="sm"><input type="checkbox" class="checkbox" name="MultiDBDump" value="1" '.(($config["multi_dump"]==1) ? "CHECKED" : "").'>'.$lang['activate_multidump'].'</td>';
|
||||
$aus["db"].='<tr><td colspan="2"><table cellpadding="0" cellspacing="0" width="100%">';
|
||||
$aus["db"].='<tr><td class="hd">'.$lang['db'].'</td><td class="hd"> </td><td class="hd">Multidump<br>(<a href="javascript:SelectMD(true,'.count($databases["Name"]).')" class="small">'.$lang["all"].'</a> <a href="javascript:SelectMD(false,'.count($databases["Name"]).')" class="small">'.$lang["none"].'</a>)</td>';
|
||||
$aus["db"].='<td class="hd">'.Help($lang["help_praefix"],"conf2").$lang["praefix"].'</td><td class="hd">'.Help($lang["help_commands"],"",11).'Command before Dump</td><td class="hd">'.Help($lang["help_commands"],"",11).'Command after Dump</td></tr>';
|
||||
|
||||
//erst die aktuelle DB
|
||||
$aus["db"].= '<tr class="dbrowsel"><td class="sm"><strong>'.$databases["db_actual"].'</strong></td>';
|
||||
$aus["db"].= '<td> </td><td align="center"><input type="checkbox" class="checkbox" name="db_multidump_'.$databases["db_selected_index"].'" value="db_multidump_'.$databases["db_selected_index"].'" '.((in_array($databases["db_actual"],$databases["multi"])) ? "CHECKED" : "").'></td>';
|
||||
$aus["db"].= '<td><img src="images/blank.gif" width="40" height="1" alt=""><input type="text" name="dbpraefix_'.$databases["db_selected_index"].'" size="10" value="'.$databases["praefix"][$databases["db_selected_index"]].'" class="sm"></td>';
|
||||
$aus["db"].= '<td>'.ComboCommandDump(0,$databases["db_selected_index"]).'</td><td>'.ComboCommandDump(1,$databases["db_selected_index"]).'</td></tr>';
|
||||
|
||||
$dbacombo=$dbbcombo="";$j=0;
|
||||
for($i=0;$i<count($databases["Name"]);$i++)
|
||||
{
|
||||
if($i!=$databases["db_selected_index"]) {
|
||||
$j++;
|
||||
$aus["db"].= '<tr class="'.(($j % 2) ? 'dbrow' : 'dbrow1').'"><td class="sm">'.$databases["Name"][$i].'</td>';
|
||||
$aus["db"].= '<td> </td><td align="center"><input type="checkbox" class="checkbox" name="db_multidump_'.$i.'" value="db_multidump_'.$i.'" '.((in_array($databases["Name"][$i],$databases["multi"])) ? "CHECKED" : "").'></td>';
|
||||
$aus["db"].= '<td><img src="images/blank.gif" width="40" height="1" alt=""><input type="text" name="dbpraefix_'.$i.'" size="10" value="'.$databases["praefix"][$i].'" class="sm"></td><td>'.ComboCommandDump(0,$i).'</td><td>'.ComboCommandDump(1,$i).'</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
$aus["db"].='</select></table></td></tr>';
|
||||
}
|
||||
$aus["db"].='</table></fieldset></div>';
|
||||
|
||||
// sonstige Einstellungen
|
||||
$aus["global1"]='<div id="global1"><fieldset><legend><b>'.$lang['general'].'</b></legend><table>';
|
||||
|
||||
$aus["global1"].='<tr><td class="sm">'.Help("","").'Logfiles: </td>';
|
||||
$aus["global1"].='<td class="sm"><input type="checkbox" class="checkbox" value="1" name="logcompression" '.(($config["zlib"]) ? '' : 'disabled').(($config["logcompression"]==1)?" checked":"").'>'.$lang["compressed"].'<br>';
|
||||
$aus["global1"].=''.$lang['maxsize'].': <input class="sm" type="text" name="log_maxsize1" size="3" maxlength="3" value="'.$config["log_maxsize1"].'"> ';
|
||||
$aus["global1"].='<select name="log_maxsize2" class="sm"><option value="1" '.(($config["log_maxsize2"]==1) ? ' SELECTED' : '').'>Kilobytes</option>';
|
||||
$aus["global1"].='<option value="2" '.(($config["log_maxsize2"]==2) ? ' SELECTED' : '').'>Megabytes</option></select></td></tr>';
|
||||
|
||||
$aus["global1"].='<tr><td class="sm">'.Help($lang["help_memorylimit"],"").$lang["memory_limit"].': </td>';
|
||||
$aus["global1"].='<td class="sm">';
|
||||
$aus["global1"].='<input type="text" size="10" id="mlimit" name="memory_limit" maxlength="10" style="text-align:right;font-size:11px;" value="'.$config["memory_limit"].'"> Bytes <a href="#" onclick="WriteMem();" class="small">automatisch ermitteln</a>';
|
||||
$aus["global1"].='</td></tr>';
|
||||
|
||||
$aus["global1"].='<tr><td class="sm">'.Help($lang["help_speed"],"").$lang["speed"].': </td>';
|
||||
$aus["global1"].='<td class="sm"><input class="sm" type="text" size="6" name="minspeed" maxlength="6" style="text-align:right;" value="'.$config["minspeed"].'"> '.$lang["to"].' <input class="sm" type="text" size="6" name="maxspeed" maxlength="9" style="text-align:right;" value="'.$config["maxspeed"].'"></td></tr>';
|
||||
|
||||
$aus["global1"].='</table></fieldset><fieldset><legend><b>'.$lang['dump'].'</b></legend><table>';
|
||||
|
||||
$aus["global1"].='<tr><td class="sm">'.Help($lang["help_zip"],"conf3").$lang["gzip"].': </td>';
|
||||
$aus["global1"].='<td class="sm"><input type="radio" class="radio" value="1" name="compression" '.(($config["zlib"]) ? '' : 'disabled').(($config["compression"]==1)?" checked":"").'>'.$lang["activated"];
|
||||
$aus["global1"].='<input type="radio" class="radio" value="0" name="compression" '.(($config["compression"]==0)?" checked":"").'>'.$lang["not_activated"].'</td></tr>';
|
||||
//Multipart-Backup -->
|
||||
$aus["global1"].='<tr><td class="sm">'.Help($lang["help_multipart"],"").$lang["multi_part"].': </td><td>';
|
||||
$aus["global1"].='<input type="radio" class="radio" value="1" name="multi_part" onclick="document.getElementById(\'mpg\').style.visibility=\'visible\';" '.(($config["multi_part"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["global1"].='<input type="radio" class="radio" value="0" name="multi_part" onclick="document.getElementById(\'mpg\').style.visibility=\'hidden\';" '.(($config["multi_part"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["global1"].='</td></tr><tr><td class="sm">'.Help($lang["help_multipartgroesse"],"").$lang["multi_part_groesse"].': </td>';
|
||||
$aus["global1"].='<td class="sm"> <div id="mpg" style="visibility:'.(($config["multi_part"]==0)?"hidden":"visible").';">';
|
||||
$aus["global1"].='<input class="sm" type="text" name="multipartgroesse1" size="3" maxlength="3" value="'.$config["multipartgroesse1"].'"> ';
|
||||
$aus["global1"].='<select name="multipartgroesse2" class="sm"><option value="1" '.(($config["multipartgroesse2"]==1) ? 'SELECTED' : '').';>Kilobytes</option><option value="2" '.(($config["multipartgroesse2"]==2) ? 'SELECTED' : '').'>Megabytes</option></select></div></td></tr>';
|
||||
$aus["global1"].='<tr><td class="sm">'.Help($lang["help_optimize"],"").$lang['optimize'].': </td>';
|
||||
$aus["global1"].='<td class="sm"><input type="radio" class="radio" value="1" name="optimize_tables" '.(($config["optimize_tables_beforedump"]==1)?" checked":"").'>'.$lang["activated"];
|
||||
$aus["global1"].='<input type="radio" class="radio" value="0" name="optimize_tables" '.(($config["optimize_tables_beforedump"]==0)?" checked":"").'>'.$lang["not_activated"].'</td></tr>';
|
||||
$aus["global1"].='<tr><td class="sm">'.Help("","").$lang['backup_format'].': </td>';
|
||||
|
||||
$aus["global1"].='<td class="sm"><input type="checkbox" class="checkbox" name="backup_complete_inserts" value="1" '.(($config["backup_complete_inserts"]==1) ? "checked" : "").'>'.$lang['inserts_complete'].'<br>';
|
||||
$aus["global1"].='<input type="checkbox" class="checkbox" name="backup_extended_inserts" value="1" '.(($config["backup_extended_inserts"]==1) ? "checked" : "").'>'.$lang['inserts_extended'].'<br>';
|
||||
$aus["global1"].='<input type="checkbox" class="checkbox" name="backup_delayed_inserts" id="bdi" value="1" '.(($config["backup_delayed_inserts"]==1) ? "checked" : "").'>'.$lang['inserts_delayed'].'<br>';
|
||||
$aus["global1"].='<input type="checkbox" class="checkbox" name="backup_ignore_inserts" value="1" '.(($config["backup_ignore_inserts"]==1) ? "checked" : "").'>'.$lang['inserts_ignore'].'<br>';
|
||||
$aus["global1"].='<input type="checkbox" class="checkbox" name="backup_lock_tables" id="blt" value="1" '.(($config["backup_lock_tables"]==1) ? "checked" : "").'>'.$lang['lock_tables'].'<br>';
|
||||
$aus["global1"].='<input type="checkbox" class="checkbox" name="backup_downgrade" id="blt" value="1" '.(($config["backup_downgrade"]==1) ? "checked" : "").' '.((defined('MSD_MYSQL_VERSION') && !MSD_NEW_VERSION) ? "disabled" : "").'>'.$lang['downgrade'].'</td></tr>';
|
||||
|
||||
|
||||
$aus["global1"].='</table></fieldset><fieldset><legend><b>'.$lang['restore'].'</b></legend><table>';
|
||||
$aus["global1"].='<tr><td class="sm">'.Help($lang["help_empty_db_before_restore"],"conf4").$lang["empty_db_before_restore"].': </td><td class="sm">';
|
||||
$aus["global1"].='<input type="radio" class="radio" value="1" name="empty_db_before_restore" '.(($config["empty_db_before_restore"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["global1"].='<input type="radio" class="radio" value="0" name="empty_db_before_restore" '.(($config["empty_db_before_restore"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["global1"].='</td></tr>';
|
||||
|
||||
|
||||
$aus["global1"].='<tr><td class="sm">'.Help("","").$lang['errorhandling_restore'].'</td><td class="sm">';
|
||||
$aus["global1"].='<input type="radio" class="radio" name="stop_with_error" value="0" '.(($config["stop_with_error"]==0)?" checked":"").'>'.$lang['ehrestore_continue'].'<br>';
|
||||
$aus["global1"].='<input type="radio" class="radio" name="stop_with_error" value="1" '.(($config["stop_with_error"]==1)?" checked":"").'>'.$lang['ehrestore_stop'];
|
||||
$aus["global1"].='</td></tr></table></fieldset></div>';
|
||||
|
||||
//Interface -->
|
||||
$aus["global3"]='<div id="global3"><fieldset><legend><b>'.$lang["config_interface"].'</b></legend><table>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help($lang["help_lang"],"conf11").$lang["language"].': </td>';
|
||||
$aus["global3"].='<td><select name="language" class="sm">'.GetLanguageCombo("op");
|
||||
$aus["global3"].='</select> <a href="'.$languagepacks_ref.'" target="_blank" class="uls">'.$lang["download_languages"].'</a><input type="hidden" name="lang_old" value="'.$config["language"].'"><input type="hidden" name="scaption_old" value="'.$config["interface_server_caption"].'"></td></tr>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help($lang["help_browser"],"").'Browser:</td>';
|
||||
$aus["global3"].='<td class="sm"><input type="radio" class="radio" value="0" name="browserswitch" '.(($config["browser_switch"]==0)?" checked":"").'>'.$lang['automatic'].'<br>
|
||||
<input type="radio" class="radio" value="1" name="browserswitch" '.(($config["browser_switch"]==1)?" checked":"").'>Internet Explorer<br>
|
||||
<input type="radio" class="radio" value="2" name="browserswitch" '.(($config["browser_switch"]==2)?" checked":"").'>'.$lang['otherbrowser'].'</td></tr>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help($lang["help_servercaption"],"").$lang['servercaption'].':</td>';
|
||||
$aus["global3"].='<td class="sm"><input type="checkbox" class="checkbox" value="1" name="server_caption" '.(($config["interface_server_caption"]==1)?" checked":"").'>'.$lang['activated'].' ';
|
||||
$aus["global3"].='<input type="radio" class="radio" name="server_caption_position" value="1" '.(($config["interface_server_caption_position"]==1) ? "checked" : "").'>'.$lang['in_mainframe'].' <input type="radio" class="radio" name="server_caption_position" value="0" '.(($config["interface_server_caption_position"]==0) ? "checked" : "").'>'.$lang['in_leftframe'].'';
|
||||
$aus["global3"].='</td></tr>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help("","").'Theme</td><td><select name="theme" class="sm">'.GetThemes().'</select> <a href="'.$stylepacks_ref.'" target="_blank" class="uls">'.$lang["download_styles"].'</a></td></tr>';
|
||||
|
||||
$aus["global3"].='<tr></table></fieldset><fieldset><legend><b>Mini-SQL</b></legend><table>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help("","").$lang['sqlboxheight'].': </td>';
|
||||
$aus["global3"].='<td class="sm"><input class="sm" type="text" name="sqlboxsize" value="'.$config["interface_sqlboxsize"].'" size="3" maxlength="3"> pixel</td></tr>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help("","").$lang['sqllimit'].': </td>';
|
||||
$aus["global3"].='<td class="sm"><input class="sm" type="text" name="sql_limit" value="'.$config["sql_limit"].'" size="3" maxlength="3"> </td></tr>';
|
||||
$aus["global3"].='<tr><td class="sm">'.Help("","").$lang['bbparams'].': </td>';
|
||||
$aus["global3"].='<td>';
|
||||
$aus["global3"].='<table><tr><td class="sm">'.$lang['width'].':</td><td class="sm"><input class="sm" type="text" name="bb_width" value="'.$config["bb_width"].'" size="3" maxlength="3"> pixel</td></tr>';
|
||||
$aus["global3"].='<tr><td class="sm">'.$lang['bbtextcolor'].': </td>';
|
||||
$aus["global3"].='<td class="sm"><select name="bb_textcolor" class="sm">
|
||||
<option value="#000000" style="color :#000000;" '.(($config["bb_textcolor"]=="#000000" ? "selected" : "")).'> Textcolor </option>
|
||||
<option value="#000066" style="color :#000066;" '.(($config["bb_textcolor"]=="#000066" ? "selected" : "")).'> Textcolor </option>
|
||||
<option value="#800000" style="color :#800000;" '.(($config["bb_textcolor"]=="#800000" ? "selected" : "")).'> Textcolor </option>
|
||||
<option value="#990000" style="color :#990000;" '.(($config["bb_textcolor"]=="#990000" ? "selected" : "")).'> Textcolor </option>
|
||||
<option value="#006600" style="color :#006600;" '.(($config["bb_textcolor"]=="#006600" ? "selected" : "")).'> Textcolor </option>
|
||||
<option value="#996600" style="color :#996600;" '.(($config["bb_textcolor"]=="#996600" ? "selected" : "")).'> Textcolor </option>
|
||||
<option value="#999999" style="color :#999999;" '.(($config["bb_textcolor"]=="#999999" ? "selected" : "")).'> Textcolor </option>
|
||||
</td></tr></table>';
|
||||
$aus["global3"].='</td></tr></table></fieldset></div>';
|
||||
|
||||
//automatisches Löschen-->
|
||||
$aus["global2"]='<div id="global2"><fieldset><legend><b>'.$lang["config_autodelete"].'</b></legend><table>';
|
||||
$aus["global2"].='<tr><td class="sm">'.Help($lang["help_ad1"],"conf8").$lang["autodelete"].': </td>';
|
||||
$aus["global2"].='<td class="sm"><input type="radio" class="radio" value="1" name="auto_delete" '.(($config["auto_delete"]==1)?" checked":"").'>'.$lang["activated"];
|
||||
$aus["global2"].='<input type="radio" class="radio" value="0" name="auto_delete" '.(($config["auto_delete"]==0)?" checked":"").'>'.$lang["not_activated"];
|
||||
$aus["global2"].='</td></tr><tr><td class="sm">'.Help($lang["help_ad2"],"conf9").$lang["age_of_files"].': </td>';
|
||||
$aus["global2"].='<td class="sm"><input class="sm" type="text" size="3" name="del_files_after_days" value="'.$config["del_files_after_days"].'"></td>';
|
||||
$aus["global2"].='</tr><tr><td class="sm">'.Help($lang["help_ad3"],"conf10").$lang["number_of_files_form"].': </td>';
|
||||
$aus["global2"].='<td><table><tr><td><input class="sm" type="text" size="3" name="max_backup_files" value="'.$config["max_backup_files"].'">';
|
||||
$aus["global2"].='</td><td class="sm"><input type="radio" class="radio" value="0" name="max_backup_files_each" '.(($config["max_backup_files_each"]==0)?" checked":"").'>'.$lang["max_backup_files_each1"].'<br>';
|
||||
$aus["global2"].='<input type="radio" class="radio" value="1" name="max_backup_files_each" '.(($config["max_backup_files_each"]==1)?" checked":"").'>'.$lang["max_backup_files_each2"];
|
||||
$aus["global2"].='</td></tr></table></td></tr></table></fieldset></div>';
|
||||
|
||||
|
||||
//Email-->
|
||||
$aus["transfer1"]='<div id="transfer1"><fieldset><legend><b>'.$lang["config_email"].'</b></legend><table>';
|
||||
$aus["transfer1"].='<tr><td class="sm">'.Help($lang["help_mail1"],"conf5").$lang["send_mail_form"].': </td>';
|
||||
$aus["transfer1"].='<td class="sm"><input type="radio" class="radio" value="1" name="send_mail" '.(($config["send_mail"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["transfer1"].='<input type="radio" class="radio" value="0" name="send_mail" '.(($config["send_mail"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["transfer1"].='</td></tr><tr><td class="sm">'.Help($lang["help_mail2"],"conf6").$lang["email_adress"].': </td><td><input class="sm" type="text" name="email0" value="'.$config["email_recipient"].'" size="30"></td></tr>';
|
||||
$aus["transfer1"].='<tr><td class="sm">'.Help($lang["help_mail3"],"conf7").$lang["email_subject"].': </td><td><input class="sm" type="text" name="email1" value="'.$config["email_sender"].'" size="30"></td></tr>';
|
||||
$aus["transfer1"].='<tr><td class="sm">'.Help($lang["help_mail5"],"").$lang["send_mail_dump"].': </td><td class="sm">';
|
||||
$aus["transfer1"].='<input type="radio" class="radio" value="1" name="send_mail_dump" '.(($config["send_mail_dump"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["transfer1"].='<input type="radio" class="radio" value="0" name="send_mail_dump"'.(($config["send_mail_dump"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["transfer1"].='</td></tr><tr><td class="sm">'.Help($lang["help_mail4"],"").$lang["email_maxsize"].': </td><td>';
|
||||
$aus["transfer1"].='<input class="sm" type="text" name="email_maxsize1" size="3" maxlength="3" value="'.$config["email_maxsize1"].'"> ';
|
||||
$aus["transfer1"].='<select name="email_maxsize2" class="sm"><option value="1" '.(($config["email_maxsize2"]==1) ? ' SELECTED' : '').'>Kilobytes</option>';
|
||||
$aus["transfer1"].='<option value="2" '.(($config["email_maxsize2"]==2) ? ' SELECTED' : '').'>Megabytes</option></select></td></tr>';
|
||||
$aus["transfer1"].='<tr><td class="sm">'.Help($lang["help_cronmailprg"],"").$lang["cron_mailprg"].': </td>';
|
||||
$aus["transfer1"].='<td><table><tr><td class="sm"><input type="radio" class="radio" name="cron_use_sendmail" value="1" '.(($config["cron_use_sendmail"]==1)?" checked":"").'>sendmail</td><td><input class="sm" type="text" size="30" name="cron_sendmail" value="'.$config["cron_sendmail"].'"></td></tr>';
|
||||
$aus["transfer1"].='<tr><td class="sm"><input type="radio" class="radio" name="cron_use_sendmail" value="0" '.(($config["cron_use_sendmail"]==0)?" checked":"").'>SMPT</td><td class="sm"><input class="sm" type="text" size="30" name="cron_smpt" value="'.$config["cron_smtp"].'"></td></tr><tr><td> </td><td class="sm">SMTP-Port: <strong>'.$config["cron_smtp_port"].'</strong></td></tr>';
|
||||
$aus["transfer1"].='</table></td></tr></table></fieldset></div>';
|
||||
|
||||
//FTP-->
|
||||
$aus["transfer2"]='<div id="transfer2"><fieldset><legend><b>'.$lang["config_ftp"].'</b></legend><table>';
|
||||
$aus["transfer2"].='<tr><td class="sm">'.Help($lang["help_ftptransfer"],"conf13").$lang["ftp_transfer"].': </td>';
|
||||
$aus["transfer2"].='<td class="sm"><input type="radio" class="radio" value="1" name="ftp_transfer" '.((!extension_loaded("ftp")) ? "disabled " : "").(($config["ftp_transfer"]==1)?" checked":"").'>'.$lang["activated"];
|
||||
$aus["transfer2"].=' <input type="radio" class="radio" value="0" name="ftp_transfer" '.(($config["ftp_transfer"]==0)?" checked":"").'>'.$lang["not_activated"].'</td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="sm">'.Help($lang['useconnection'].":","").$lang['useconnection'].': </td><td class="sm">';
|
||||
$aus["transfer2"].=' <input type="radio" class="radio" value="0" name="ftp_transferconn" '.(($config["ftp_connectionindex"]==0)?" checked":"").'>FTP 1 ';
|
||||
$aus["transfer2"].=' <input type="radio" class="radio" value="1" name="ftp_transferconn" '.(($config["ftp_connectionindex"]==1)?" checked":"").'>FTP 2 ';
|
||||
$aus["transfer2"].=' <input type="radio" class="radio" value="2" name="ftp_transferconn" '.(($config["ftp_connectionindex"]==2)?" checked":"").'>FTP 3</td></tr>';
|
||||
|
||||
$aus["transfer2"].='<tr><td class="sm">'.Help($lang["help_ftptimeout"],"").$lang["ftp_timeout"].': </td>';
|
||||
$aus["transfer2"].='<td class="sm"><input class="sm" type="text" size="10" name="ftp_timeout" maxlength="3" style="text-align:right;" value="'.$config["ftp_timeout"].'"> sec</td></tr>';
|
||||
|
||||
$aus["transfer2"].='<tr><td class="sm">'.Help($lang["help_ftpssl"],"").$lang["ftp_ssl"].': </td>';
|
||||
$aus["transfer2"].='<td class="sm"><input type="checkbox" class="checkbox" name="ftp_useSSL" value="1" '.(($config["ftp_useSSL"]==1) ? 'checked' : '').' '.((!extension_loaded("openssl")) ? "disabled " : "").'>';
|
||||
$aus["transfer2"].='<span '.((!extension_loaded("openssl")) ? 'style="color:#999999;"' : '').'>'.$lang['ftp_useSSL'].'</span></td></tr><tr><td colspan="2" class="sm">';
|
||||
|
||||
//1
|
||||
$aus["transfer2"].='<fieldset><legend><b>FTP-Connection 1</b></legend><table><tr><td><input type="submit" name="testFTP0" value="'.$lang['testconnection'].'" class="ConfigButton"><br>'.$checkFTP[0].'</td><td><table>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpserver"],"conf14",12).$lang["ftp_server"].': </td><td><input class="small" type="text" size="30" name="ftp_server0" value="'.$config["ftp_server"][0].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpport"],"conf15",12).$lang["ftp_port"].': </td><td class="small"><input class="small" type="text" size="30" name="ftp_port0" value="'.$config["ftp_port"][0].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpuser"],"conf16",12).$lang["ftp_user"].' </td><td class="small"><input class="small" type="text" size="30" name="ftp_user0" value="'.$config["ftp_user"][0].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftppass"],"conf17",12).$lang["ftp_pass"].': </td><td class="small"><input class="small" type="password" size="30" name="ftp_pass0" value="'.$config["ftp_pass"][0].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpdir"],"conf18",12).$lang["ftp_dir"].': </td><td class="small"><input class="small" type="text" size="30" name="ftp_dir0" value="'.$config["ftp_dir"][0].'"></td></tr>';
|
||||
$aus["transfer2"].='</table></td></tr></table></fieldset>';
|
||||
//2
|
||||
$aus["transfer2"].='<fieldset><legend><b>FTP-Connection 2</b></legend><table><tr><td><input type="submit" name="testFTP1" value="'.$lang['testconnection'].'" class="ConfigButton"><br>'.$checkFTP[1].'</td><td><table>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpserver"],"conf14",12).$lang["ftp_server"].': </td><td><input class="small" type="text" size="30" name="ftp_server1" value="'.$config["ftp_server"][1].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpport"],"conf15",12).$lang["ftp_port"].': </td><td class="small"><input class="small" type="text" size="30" name="ftp_port1" value="'.$config["ftp_port"][1].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpuser"],"conf16",12).$lang["ftp_user"].' </td><td class="small"><input class="small" type="text" size="30" name="ftp_user1" value="'.$config["ftp_user"][1].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftppass"],"conf17",12).$lang["ftp_pass"].': </td><td class="small"><input class="small" type="password" size="30" name="ftp_pass1" value="'.$config["ftp_pass"][1].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpdir"],"conf18",12).$lang["ftp_dir"].': </td><td class="small"><input class="small" type="text" size="30" name="ftp_dir1" value="'.$config["ftp_dir"][1].'"></td></tr>';
|
||||
$aus["transfer2"].='</table></td></tr></table></fieldset>';
|
||||
//3
|
||||
$aus["transfer2"].='<fieldset><legend><b>FTP-Connection 3</b></legend><table><tr><td><input type="submit" name="testFTP2" value="'.$lang['testconnection'].'" class="ConfigButton"><br>'.$checkFTP[2].'</td><td><table>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpserver"],"conf14",12).$lang["ftp_server"].': </td><td><input class="small" type="text" size="30" name="ftp_server2" value="'.$config["ftp_server"][2].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpport"],"conf15",12).$lang["ftp_port"].': </td><td class="small"><input class="small" type="text" size="30" name="ftp_port2" value="'.$config["ftp_port"][2].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpuser"],"conf16",12).$lang["ftp_user"].' </td><td class="small"><input class="small" type="text" size="30" name="ftp_user2" value="'.$config["ftp_user"][2].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftppass"],"conf17",12).$lang["ftp_pass"].': </td><td class="small"><input class="small" type="password" size="30" name="ftp_pass2" value="'.$config["ftp_pass"][2].'"></td></tr>';
|
||||
$aus["transfer2"].='<tr><td class="small">'.Help($lang["help_ftpdir"],"conf18",12).$lang["ftp_dir"].': </td><td class="small"><input class="small" type="text" size="30" name="ftp_dir2" value="'.$config["ftp_dir"][2].'"></td></tr>';
|
||||
$aus["transfer2"].='</table></td></tr></table></fieldset></td></tr></table></fieldset></div>';
|
||||
|
||||
|
||||
//Crondump
|
||||
$aus["cron"]='<div id="cron"><fieldset><legend><b>'.$lang["config_cronperl"].'</b></legend><table>';
|
||||
$aus["cron"].='<tr><td class="sm">'.Help($lang["help_cronextender"],"").$lang["cron_extender"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="0" name="cron_extender" '.(($config["cron_extender"]==0)?" checked":"").'>.pl';
|
||||
$aus["cron"].='<input type="radio" class="radio" value="1" name="cron_extender" '.(($config["cron_extender"]==1)?" checked":"").'>.cgi';
|
||||
$aus["cron"].='</td></tr><tr><td class="sm">'.Help($lang["help_cronsavepath"],"").$lang["cron_savepath"].': </td>';
|
||||
|
||||
$aus["cron"].='<td><table><tr><td class="sm">'.$lang['existing'].':</td><td><select name="cron_select_savepath" class="sm">'.GetPerlConfigs().'</select></td></tr>';
|
||||
$aus["cron"].='<tr><td class="sm">'.$lang['new'].':</td><td class="sm"><input class="sm" type="text" size="18" name="cron_savepath_new" value=""> .conf</td></tr></table></td>';
|
||||
|
||||
$aus["cron"].='</tr><tr><td class="sm">'.Help($lang["help_cronexecpath"],"").$lang["cron_execpath"].': </td>';
|
||||
$aus["cron"].='<td><input class="sm" type="text" size="30" name="cron_execution_path" value="'.$config["cron_execution_path"].'"></td>';
|
||||
$aus["cron"].='</tr><tr><td class="sm">'.Help($lang["help_cronprintout"],"").$lang["cron_printout"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="1" name="cron_printout" '.(($config["cron_printout"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="0" name="cron_printout" '.(($config["cron_printout"]==0)?" checked":"").'>'.$lang["no"].'</td></tr>';
|
||||
$aus["cron"].='</tr><tr><td class="sm">'.Help($lang["help_croncompletelog"],"").$lang["cron_completelog"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="1" name="cron_completelog" '.(($config["cron_completelog"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="0" name="cron_completelog" '.(($config["cron_completelog"]==0)?" checked":"").'>'.$lang["no"].'</td></tr>';
|
||||
$aus["cron"].='<tr><td class="sm">'.Help($lang["help_cronsamedb"],"conf13").$lang["cron_samedb"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="0" name="cron_samedb" onclick="document.getElementById(\'cdb\').style.visibility=\'hidden\';" '.(($config["cron_samedb"]==0)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="1" name="cron_samedb" onclick="document.getElementById(\'cdb\').style.visibility=\'visible\';" '.(($config["cron_samedb"]==1)?" checked":"").'>'.$lang["no"];
|
||||
$aus["cron"].='</td></tr><tr><td class="sm">'.Help($lang["help_crondbindex"],"conf14").$lang["cron_crondbindex"].': </td>';
|
||||
$aus["cron"].='<td><div id="cdb" style="visibility:'.(($config["cron_samedb"]==0)?"hidden;":"visible;").'"><select name="cron_dbindex" class="sm">';
|
||||
$datenbanken=count($databases["Name"]);
|
||||
for($i=0;$i<$datenbanken;$i++)
|
||||
{
|
||||
$aus["cron"].='<option value="'.$i.'" ';
|
||||
if($i==$databases["db_actual_cronindex"]) $aus["cron"].='SELECTED';
|
||||
$aus["cron"].='>'.$databases["Name"][$i]."</option>\n";
|
||||
}
|
||||
$aus["cron"].='<option value="-2" ';
|
||||
if($databases["db_actual_cronindex"]==-2) $aus["cron"].='SELECTED';
|
||||
$aus["cron"].='>'.$lang['multidumpconf']."</option>\n";
|
||||
$aus["cron"].='<option value="-3" ';
|
||||
if($databases["db_actual_cronindex"]==-3) $aus["cron"].='SELECTED';
|
||||
$aus["cron"].='>'.$lang['multidumpall']."</option>\n";
|
||||
|
||||
$aus["cron"].='</select> <input class="sm" type="text" name="dbcronpraefix" value="'.$databases["db_actual_cronpraefix"].'"></div></td></tr>';
|
||||
$aus["cron"].='<tr><td class="sm">'.Help($lang["help_cronzip"],"").$lang["gzip"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="1" name="cron_compression" '.(($config["cron_compression"]==1)?" checked":"").'>'.$lang["activated"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="0" name="cron_compression" '.(($config["cron_compression"]==0)?" checked":"").'>'.$lang["not_activated"];
|
||||
$aus["cron"].='</td></tr><tr><td class="sm">'.Help($lang["help_cronmail"],"").$lang["send_mail_form"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="1" name="cron_mail" '.(($config["cron_mail"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="0" name="cron_mail" '.(($config["cron_mail"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["cron"].='</td></tr><tr><td class="sm">'.Help($lang["help_cronmail_dump"],"").$lang["send_mail_dump"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="1" name="cron_mail_dump" '.(($config["cron_mail_dump"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="0" name="cron_mail_dump" '.(($config["cron_mail_dump"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["cron"].='</td></tr>';
|
||||
|
||||
$aus["cron"].='<tr><td class="sm">'.Help($lang["help_cronftp"],"").$lang["cron_ftp"].': </td>';
|
||||
$aus["cron"].='<td class="sm"><input type="radio" class="radio" value="1" name="cron_ftp" '.(($config["cron_ftp"]==1)?" checked":"").'>'.$lang["yes"];
|
||||
$aus["cron"].='<input type="radio" class="radio" value="0" name="cron_ftp" '.(($config["cron_ftp"]==0)?" checked":"").'>'.$lang["no"];
|
||||
$aus["cron"].='</td></tr></table></fieldset></div>';
|
||||
|
||||
|
||||
|
||||
|
||||
//Formular-Buttons -->
|
||||
$aus["formende"]='</td></tr><tr><td colspan="2">';
|
||||
|
||||
|
||||
|
||||
// AUSGABE
|
||||
|
||||
|
||||
echo $aus["formstart"];
|
||||
echo $aus["db"];
|
||||
echo $aus["global1"];
|
||||
echo $aus["global2"];
|
||||
echo $aus["global3"];
|
||||
echo $aus["transfer1"];
|
||||
echo $aus["transfer2"];
|
||||
echo $aus["cron"];
|
||||
|
||||
echo $aus["formende"];
|
||||
|
||||
echo MSDFooter();
|
||||
echo '</table><br></form></div>';
|
||||
|
||||
echo '<script language="JavaScript">show_pardivs("'.$sel.'");</script>';
|
||||
|
||||
?>
|
24
control.php
Normale Datei
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
include_once("inc/functions.php");
|
||||
$h='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>MySQLDumper</title><link rel="stylesheet" type="text/css" href="styles.css"></head><body class="control">';
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function SwitchDiv(d)
|
||||
{
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
$t='Hallo Service ! <a href="control.php?showpars=1">pars</a> <a href="control.php?showvars=1">vars</a> ';
|
||||
$f='</body></html>';
|
||||
|
||||
echo $h.$t;
|
||||
echo '<div id="aus" style="display:none"> </div>';
|
||||
if(isset($_GET["showpars"])) {
|
||||
$au=file(Realpath("./")."/work/config/parameter.php");
|
||||
$sp='<br><strong>Parameter</strong><pre>'.print_r($au,true).'</pre>';
|
||||
echo '<script language="JavaScript">getElementById("aus").innerHTML=\''.$sp.'\';</script>';
|
||||
}
|
||||
echo $f;
|
||||
|
||||
?>
|
BIN
css/classic/cellpic.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1,1 KiB |
BIN
css/classic/menubutton.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 359 B |
509
css/classic/style.css
Normale Datei
|
@ -0,0 +1,509 @@
|
|||
/* STYLESHEET Default
|
||||
|
||||
Name: classic
|
||||
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
font-family: Verdana,Helvetica,sans-serif;
|
||||
color: #111111;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 12px;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
}
|
||||
body.menu {
|
||||
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
color:#111111;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
font-size:12px;
|
||||
background-color:#D0DCE0;
|
||||
}
|
||||
|
||||
body.control {
|
||||
font-size: 10px;
|
||||
background-color: #D8D8D8;
|
||||
color: Navy;
|
||||
}
|
||||
|
||||
/* LINKS */
|
||||
|
||||
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.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.datacell:hover {
|
||||
text-decoration: underline;
|
||||
color: #A52A2A;
|
||||
}
|
||||
#menu a {
|
||||
display:block;
|
||||
width: 157px;
|
||||
height: 27px;
|
||||
margin: 1em 0;
|
||||
text-align:center;
|
||||
font: 12px/22px verdana, sans-serif;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
border: 1px solid #767676;
|
||||
background: url(menubutton.gif) 0 0 no-repeat;
|
||||
}
|
||||
#menu a:hover {
|
||||
background-position: -157px 0;
|
||||
color: red;
|
||||
}
|
||||
#menu a:active {
|
||||
background-position: -314px 0;
|
||||
color:white;
|
||||
}
|
||||
|
||||
/* different Background-Pictures */
|
||||
|
||||
#menu a.home { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.config { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.backup { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.restore { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.filemanagement { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.sql { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.log { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.credit { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
|
||||
|
||||
/* Opera needs this to show the Buttons correctly */
|
||||
#menu a.home:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.home:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.config:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.config:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.backup:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.backup:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.restore:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.restore:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.filemanagement:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.filemanagement:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.sql:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.sql:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.log:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.credit:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.credit:hover { background-position: -157px 0; color:red;}
|
||||
#menu a.credit:active { background-position: -314px 0; color:white;}
|
||||
|
||||
/* TEXT */
|
||||
|
||||
h1 {
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size:11px;
|
||||
background-color:#ccffcc;
|
||||
padding-left: 12px;
|
||||
}
|
||||
.pagetitle {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
background-color: #6495ED;
|
||||
letter-spacing: 2px;
|
||||
color: White;
|
||||
background-image: url(cellpic.gif);
|
||||
padding-left: 6px;
|
||||
padding-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
.server {
|
||||
background-image: url(cellpic.gif);
|
||||
text-align:center;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
a.server {
|
||||
color:#333333;
|
||||
font-size:10px;
|
||||
}
|
||||
a.server:hover {
|
||||
text-decoration: underline;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
td,tr {
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
color:#111111;
|
||||
margin:4px;
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
td.nomargin {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
||||
td.sm {
|
||||
font-size:8pt;
|
||||
}
|
||||
.hd {
|
||||
FONT-SIZE: 11px;
|
||||
color: #191970;
|
||||
background-color:#ffffcc;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
.hdl {
|
||||
FONT-SIZE: 11px;
|
||||
color: #191970;
|
||||
background-color:#ffffcc;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dbrow {
|
||||
background-color:white;
|
||||
}
|
||||
.dbrow1 {
|
||||
background-color: #E2E2E2;
|
||||
}
|
||||
.dbrowsel {
|
||||
background-color:#ccffff;
|
||||
}
|
||||
.hellblau {
|
||||
background-color:#B4ECEF;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.sm {
|
||||
font-size:11px;
|
||||
}
|
||||
.small {
|
||||
font-size:10px;
|
||||
}
|
||||
.verysmall {
|
||||
font-size: 9px;
|
||||
padding-left: 6px;
|
||||
color: #1E505F;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.content {
|
||||
padding-left:12px;
|
||||
}
|
||||
|
||||
.blau {
|
||||
color: Blue;
|
||||
}
|
||||
|
||||
td.sqletbl {
|
||||
color: #000153;
|
||||
vertical-align: top;
|
||||
}
|
||||
.sbox2 {
|
||||
font-size: 9pt;
|
||||
}
|
||||
.wtitle {
|
||||
background-color: #7F8E9C;
|
||||
padding: 0px; /*width: 80%;
|
||||
border: thin solid Black;*/
|
||||
}
|
||||
|
||||
.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 {
|
||||
font-size: 9px;
|
||||
color: #8B4513;
|
||||
}
|
||||
.smalldblue {
|
||||
font-size: 9px;
|
||||
color:#000099;
|
||||
}
|
||||
|
||||
.sqlNew {
|
||||
background-color: #ffff99;
|
||||
}
|
||||
|
||||
/* FORM ELEMENTS */
|
||||
|
||||
form {
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.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 #686868;
|
||||
color: #F3F3F3;
|
||||
text-align: center;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
width: 150px;
|
||||
}
|
||||
.Formbutton_small{
|
||||
border: thin solid #686868;
|
||||
color: #F3F3F3;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
width:150px;
|
||||
}
|
||||
.ConfigButton {
|
||||
width:130px;
|
||||
font-size:11px;
|
||||
background-color:#ffffcc;
|
||||
}
|
||||
.ConfigButtonSelected {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background-color: #99ff99;
|
||||
}
|
||||
.SQLbutton{
|
||||
border: 1px solid Navy;
|
||||
color: white;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
}
|
||||
.MYSQLbutton{
|
||||
border: 1px solid Navy;
|
||||
color: white;
|
||||
FONT-SIZE: 11px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
padding-top:3px;
|
||||
padding-bottom:3px;
|
||||
padding-left:6px;
|
||||
padding-right:6px;
|
||||
width: 140px;
|
||||
text-align: center;
|
||||
}
|
||||
/* BOXES */
|
||||
.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;
|
||||
}
|
||||
.Logbox
|
||||
{
|
||||
font-size: 10pt;
|
||||
padding: 6px;
|
||||
border: thin solid #999999;
|
||||
height: 320px;
|
||||
width: 90%;
|
||||
text-align: left;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.sqleingabe {
|
||||
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.SQLCombo {
|
||||
color: Blue;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
}
|
||||
|
||||
input,textarea,select {
|
||||
background-color: white;
|
||||
color: black;
|
||||
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
background-color: transparent;
|
||||
color: green;
|
||||
}
|
||||
.radio {
|
||||
background-color: transparent;
|
||||
color: green;
|
||||
}
|
BIN
css/gray/button.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 751 B |
BIN
css/gray/button1.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 10 KiB |
BIN
css/gray/cellpic.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1 KiB |
BIN
css/gray/cellpic2.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 156 B |
BIN
css/gray/menubutton.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 359 B |
BIN
css/gray/softbg.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 2,7 KiB |
517
css/gray/style.css
Normale Datei
|
@ -0,0 +1,517 @@
|
|||
/* STYLESHEET Default
|
||||
|
||||
Name: classic
|
||||
|
||||
*/
|
||||
|
||||
body {
|
||||
font-family: Verdana,Helvetica,sans-serif;
|
||||
color: #DCDCDC;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 12px;
|
||||
background-color: #B7B7B7;
|
||||
background-image: url("softbg.gif");
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
body.menu {
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
color:#111111;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
font-size:12px;
|
||||
background-color:#D0DCE0;
|
||||
}
|
||||
|
||||
body.control {
|
||||
font-size: 10px;
|
||||
background-color: #D8D8D8;
|
||||
color: Navy;
|
||||
}
|
||||
|
||||
/* LINKS */
|
||||
|
||||
a {
|
||||
font-family: Verdana,Helvetica,sans-serif;
|
||||
color: #F1EBAF;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: #FFFFA8;
|
||||
}
|
||||
|
||||
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.datacell:hover {
|
||||
text-decoration: underline;
|
||||
color: #A52A2A;
|
||||
}
|
||||
|
||||
|
||||
#menu a {
|
||||
display:block;
|
||||
width: 157px;
|
||||
height: 27px;
|
||||
margin: 1em 0;
|
||||
text-align:center;
|
||||
font: 12px/22px verdana, sans-serif;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
border: 1px solid #767676;
|
||||
background: url(button1.gif) 0 0 no-repeat;
|
||||
}
|
||||
#menu a:hover {
|
||||
background-position: -157px 0;
|
||||
color: red;
|
||||
}
|
||||
#menu a:active {
|
||||
background-position: -314px 0;
|
||||
color:blue;
|
||||
}
|
||||
|
||||
/* different Background-Pictures */
|
||||
|
||||
#menu a.home { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.config { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.backup { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.restore { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.filemanagement { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.sql { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.log { background: url("button1.gif") 0 0 no-repeat; }
|
||||
#menu a.credit { background: url("button1.gif") 0 0 no-repeat; }
|
||||
|
||||
|
||||
/* Opera needs this to show the Buttons correctly */
|
||||
#menu a.home:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.home:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.config:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.config:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.backup:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.backup:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.restore:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.restore:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.filemanagement:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.filemanagement:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.sql:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.sql:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.log:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.credit:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
#menu a.credit:hover { background-position: -157px 0; color:red;}
|
||||
#menu a.credit:active { background-position: -314px 0; color:blue;}
|
||||
|
||||
/* TEXT */
|
||||
|
||||
h1 {
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size:11px;
|
||||
color:white;
|
||||
background-image: url(cellpic.gif);
|
||||
padding-left: 12px;
|
||||
}
|
||||
.pagetitle {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
background-color: #6495ED;
|
||||
letter-spacing: 2px;
|
||||
color: White;
|
||||
background-image: url(cellpic.gif);
|
||||
padding-left: 6px;
|
||||
padding-bottom: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.server {
|
||||
background-image: url(cellpic.gif);
|
||||
text-align:center;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
a.server {
|
||||
color:#000099;
|
||||
font-size:10px;
|
||||
}
|
||||
a.server:hover {
|
||||
text-decoration: underline;
|
||||
color: white;
|
||||
}
|
||||
.version {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.dbmenu {
|
||||
color: #E2E2E2;
|
||||
}
|
||||
td,tr {
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
color:#111111;
|
||||
margin:4px;
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
td.nomargin {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
td.sm {
|
||||
font-size:8pt;
|
||||
}
|
||||
.hd {
|
||||
FONT-SIZE: 11px;
|
||||
color: #F1EBAB;
|
||||
background-color: #636363;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
.hdl {
|
||||
FONT-SIZE: 11px;
|
||||
color: Gray;
|
||||
background-color:#DCDCDC;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dbrow {
|
||||
background-color: #F1F1F1;
|
||||
}
|
||||
.dbrow1 {
|
||||
background-color: #DBDBDB;
|
||||
}
|
||||
.dbrowsel {
|
||||
background-color: #A5CDAA;
|
||||
background-image: url(cellpic2.gif);
|
||||
}
|
||||
.hellblau {
|
||||
background-color: #DCDCDC;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: Teal;
|
||||
}
|
||||
.green1 {
|
||||
color: green;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sm {
|
||||
font-size:11px;
|
||||
}
|
||||
.small {
|
||||
font-size:10px;
|
||||
}
|
||||
.verysmall {
|
||||
font-size: 9px;
|
||||
padding-left: 6px;
|
||||
color: #1E505F;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.content {
|
||||
padding-left:12px;
|
||||
}
|
||||
|
||||
.blau {
|
||||
color: Blue;
|
||||
}
|
||||
|
||||
td.sqletbl {
|
||||
color: #000153;
|
||||
vertical-align: top;
|
||||
}
|
||||
.sbox2 {
|
||||
font-size: 9pt;
|
||||
}
|
||||
.wtitle {
|
||||
background-color: #7F8E9C;
|
||||
padding: 0px; /*width: 80%;
|
||||
border: thin solid Black;*/
|
||||
}
|
||||
|
||||
.crondumppars{
|
||||
color: #525252;
|
||||
}
|
||||
.dumppars{
|
||||
color: #454545;
|
||||
}
|
||||
.smallgrey {
|
||||
font-size: 9px;
|
||||
color: #D9D9D9;
|
||||
}
|
||||
.smallwarnung {
|
||||
font-size: 9px;
|
||||
color:red;
|
||||
|
||||
}
|
||||
.smallblue {
|
||||
font-size: 9px;
|
||||
color:blue;
|
||||
}
|
||||
.smallblack {
|
||||
font-size: 9px;
|
||||
color:black;
|
||||
}
|
||||
.smallgreen {
|
||||
font-size: 9px;
|
||||
color: Teal;
|
||||
}
|
||||
.smallbrown {
|
||||
font-size: 9px;
|
||||
color:#8B4513;
|
||||
}
|
||||
.smalldblue {
|
||||
font-size: 9px;
|
||||
color:#000099;
|
||||
}
|
||||
.sqlNew {
|
||||
background-color: #ffff99;
|
||||
background-image: url(cellpic2.gif);
|
||||
}
|
||||
|
||||
/* FORM ELEMENTS */
|
||||
|
||||
form {
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
|
||||
legend {
|
||||
color: White;
|
||||
}
|
||||
.Menubutton {
|
||||
border: 0px;
|
||||
color: #191970;
|
||||
cursor: pointer;
|
||||
}
|
||||
.Menubutton2 {
|
||||
border: 0px;
|
||||
color: blue;
|
||||
FONT-SIZE: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.Formbutton {
|
||||
border: thin solid #686868;
|
||||
color: #F3F3F3;
|
||||
text-align: center;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
width: 150px;
|
||||
}
|
||||
.Formbutton_small{
|
||||
border: thin solid #686868;
|
||||
color: #F3F3F3;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
width:150px;
|
||||
}
|
||||
.SQLbutton{
|
||||
border: 1px solid Navy;
|
||||
color: #F3F3F3;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
}
|
||||
.MYSQLbutton{
|
||||
border: 1px solid Navy;
|
||||
color: #F3F3F3;
|
||||
FONT-SIZE: 11px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
padding-top:3px;
|
||||
padding-bottom:3px;
|
||||
padding-left:6px;
|
||||
padding-right:6px;
|
||||
width: 140px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ConfigButton {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background-color: #E0E0E0;
|
||||
}
|
||||
.ConfigButtonSelected {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background-color: #B1B1B1;
|
||||
}
|
||||
|
||||
/* BOXES */
|
||||
.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: #2F4F4F;
|
||||
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;
|
||||
}
|
||||
.Logbox
|
||||
{
|
||||
font-size: 10pt;
|
||||
padding: 6px;
|
||||
border: thin solid #999999;
|
||||
height: 320px;
|
||||
width: 90%;
|
||||
text-align: left;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.sqleingabe {
|
||||
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.SQLCombo {
|
||||
color: White;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: #757575;
|
||||
/*background: url("softbg.gif"); */
|
||||
}
|
||||
|
||||
input,textarea,select {
|
||||
background-color: #E9E9E9;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
background-color: transparent;
|
||||
color: Red;
|
||||
}
|
||||
.radio {
|
||||
background-color: transparent;
|
||||
color: Red;
|
||||
}
|
BIN
css/orange/button.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 751 B |
BIN
css/orange/cellpic.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 369 B |
BIN
css/orange/menubutton.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 835 B |
BIN
css/orange/menubutton_.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 359 B |
515
css/orange/style.css
Normale Datei
|
@ -0,0 +1,515 @@
|
|||
/* STYLESHEET Default
|
||||
|
||||
Name: classic
|
||||
|
||||
*/
|
||||
|
||||
body {
|
||||
font-family: Verdana,Helvetica,sans-serif;
|
||||
color: #111111;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 12px;
|
||||
background-color: #ffcc00;
|
||||
|
||||
}
|
||||
body.menu {
|
||||
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
color:#111111;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
font-size:12px;
|
||||
background-color:#ffcc22;
|
||||
}
|
||||
|
||||
body.control {
|
||||
font-size: 10px;
|
||||
background-color: #D8D8D8;
|
||||
color: Navy;
|
||||
}
|
||||
|
||||
/* LINKS */
|
||||
|
||||
a {
|
||||
font-family: Verdana,Helvetica,sans-serif;
|
||||
color: Maroon;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: #191970;
|
||||
}
|
||||
|
||||
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.datacell:hover {
|
||||
text-decoration: underline;
|
||||
color: #A52A2A;
|
||||
}
|
||||
#menu a {
|
||||
display:block;
|
||||
width: 157px;
|
||||
margin: 1em 0;
|
||||
height: 27px;
|
||||
text-align:center;
|
||||
font: 12px/22px verdana, sans-serif;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
background: url(menubutton.gif) 0 0 no-repeat;
|
||||
}
|
||||
#menu a:hover {
|
||||
background-position: -157px 0;
|
||||
color: red;
|
||||
}
|
||||
#menu a:active {
|
||||
background-position: -314px 0;
|
||||
color:white;
|
||||
}
|
||||
|
||||
/* different Background-Pictures */
|
||||
|
||||
#menu a.home { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.config { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.backup { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.restore { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.filemanagement { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.sql { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.log { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
#menu a.credit { background: url("menubutton.gif") 0 0 no-repeat; }
|
||||
|
||||
|
||||
/* Opera needs this to show the Buttons correctly */
|
||||
#menu a.home:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.home:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.config:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.config:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.backup:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.backup:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.restore:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.restore:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.filemanagement:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.filemanagement:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.sql:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.sql:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.log:hover { background-position: -157px 0; color: red; }
|
||||
#menu a.credit:active { background-position: -314px 0; color:white;}
|
||||
|
||||
#menu a.credit:hover { background-position: -157px 0; color:white;}
|
||||
#menu a.credit:active { background-position: -314px 0; color:white;}
|
||||
|
||||
/* TEXT */
|
||||
h1 {
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 11px;
|
||||
background-color: #FF7F50;
|
||||
background-image: url(cellpic.gif);
|
||||
padding-left: 12px;
|
||||
}
|
||||
.pagetitle {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
background-color: #DFCA0B;
|
||||
letter-spacing: 2px;
|
||||
color: #006400;
|
||||
background-image: url(cellpic.gif);
|
||||
padding-left: 6px;
|
||||
padding-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
.server {
|
||||
background-image: url(cellpic.gif);
|
||||
text-align:center;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
a.server {
|
||||
color: #4682B4;
|
||||
font-size:10px;
|
||||
}
|
||||
a.server:hover {
|
||||
text-decoration: underline;
|
||||
color: #AFEEEE;
|
||||
}
|
||||
.version {
|
||||
font-size: 10px;
|
||||
color: #8B0000;
|
||||
}
|
||||
.dbmenu {
|
||||
color: #E2E2E2;
|
||||
}
|
||||
td,tr {
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
color:#111111;
|
||||
margin:4px;
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
td.nomargin {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
td.sm {
|
||||
font-size:8pt;
|
||||
}
|
||||
.hd {
|
||||
FONT-SIZE: 11px;
|
||||
color: #191970;
|
||||
background-color: #FEFF84;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
.hdl {
|
||||
FONT-SIZE: 11px;
|
||||
color: #191970;
|
||||
background-color:#ffffcc;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dbrow {
|
||||
background-color: #FFE5B5;
|
||||
}
|
||||
.dbrow1 {
|
||||
background-color: #FFD991;
|
||||
}
|
||||
.dbrowsel {
|
||||
background-color: #F4A000;
|
||||
color: #FFFFCC;
|
||||
}
|
||||
|
||||
.hellblau {
|
||||
background-color:#B4ECEF;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: green;
|
||||
}
|
||||
.green1 {
|
||||
color: green;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sm {
|
||||
font-size:11px;
|
||||
}
|
||||
.small {
|
||||
font-size:10px;
|
||||
color: #8B0000;
|
||||
}
|
||||
.verysmall {
|
||||
font-size: 9px;
|
||||
padding-left: 6px;
|
||||
color: #1E505F;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.content {
|
||||
padding-left:12px;
|
||||
}
|
||||
|
||||
.blau {
|
||||
color: Blue;
|
||||
}
|
||||
|
||||
td.sqletbl {
|
||||
color: #000153;
|
||||
vertical-align: top;
|
||||
}
|
||||
.sbox2 {
|
||||
font-size: 9pt;
|
||||
}
|
||||
.wtitle {
|
||||
background-color: #FFC284;
|
||||
padding: 0px;
|
||||
background-image: url(cellpic.gif);
|
||||
}
|
||||
|
||||
.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 {
|
||||
font-size: 9px;
|
||||
color:#8B4513;
|
||||
}
|
||||
.smalldblue {
|
||||
font-size: 9px;
|
||||
color:#000099;
|
||||
}
|
||||
|
||||
.sqlNew {
|
||||
background-color: #ffff99;
|
||||
}
|
||||
/* FORM ELEMENTS */
|
||||
|
||||
|
||||
form {
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
|
||||
.Menubutton {
|
||||
border: 0px;
|
||||
color: #8B0000; /*background-color: white;
|
||||
text-decoration: underline;*/
|
||||
cursor: pointer;
|
||||
}
|
||||
.Menubutton2 {
|
||||
border: 0px;
|
||||
color: #8B0000;
|
||||
FONT-SIZE: 10px;
|
||||
/*background-color: white;
|
||||
text-decoration: underline;*/
|
||||
cursor: pointer;
|
||||
}
|
||||
.Formbutton {
|
||||
border: thin solid #686868;
|
||||
color: #CD5C5C;
|
||||
text-align: center;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
width: 150px;
|
||||
}
|
||||
.Formbutton_small{
|
||||
border: thin solid #686868;
|
||||
color: #CD5C5C;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
width:150px;
|
||||
}
|
||||
.SQLbutton{
|
||||
border: 1px solid Navy;
|
||||
color: #CD5C5C;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
}
|
||||
.MYSQLbutton{
|
||||
border: 1px solid Navy;
|
||||
color: #CD5C5C;
|
||||
FONT-SIZE: 11px;
|
||||
background-color: Silver;
|
||||
background: url(cellpic.gif);
|
||||
cursor: pointer;
|
||||
padding-top:3px;
|
||||
padding-bottom:3px;
|
||||
padding-left:6px;
|
||||
padding-right:6px;
|
||||
width: 140px;
|
||||
text-align: center;
|
||||
}
|
||||
.ConfigButton {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background-color: #FFDAAC;
|
||||
}
|
||||
.ConfigButtonSelected {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background-color: #FFB962;
|
||||
}
|
||||
|
||||
/* BOXES */
|
||||
.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;
|
||||
}
|
||||
.Logbox
|
||||
{
|
||||
font-size: 10pt;
|
||||
padding: 6px;
|
||||
border: thin solid #999999;
|
||||
height: 320px;
|
||||
width: 90%;
|
||||
text-align: left;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.sqleingabe {
|
||||
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.SQLCombo {
|
||||
color: #B22222;
|
||||
FONT-SIZE: 10px;
|
||||
background-color: #F0E68C;
|
||||
}
|
||||
|
||||
input,textarea,select {
|
||||
background-color: #FFFFB9;
|
||||
color: #B22222;
|
||||
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
background-color: transparent;
|
||||
color: Red;
|
||||
}
|
||||
.radio {
|
||||
background-color: transparent;
|
||||
color: Red;
|
||||
}
|
223
develop.php
Normale Datei
|
@ -0,0 +1,223 @@
|
|||
<!--
|
||||
Kommentare zu MySQL
|
||||
|
||||
Dump ohne Kommentare
|
||||
mysqldump --host=$HostName --user=$UserName --password=$Password --opt $db_name $db_tables | sed -e 's/^--/##/' -e '/^\//d' > $dateiname
|
||||
|
||||
-- Kommentar
|
||||
/*!40000 ALTER TABLE xxx DISABLE KEYS */;
|
||||
|
||||
-->
|
||||
<?
|
||||
|
||||
include("inc/header.php");
|
||||
require_once("inc/functions_restore.php");
|
||||
echo MSDHeader();
|
||||
|
||||
if($config["magic_quotes_gpc"]) {
|
||||
foreach($_POST as $postvar => $postval){ ${$postvar} = stripslashes($postval); }
|
||||
foreach($_GET as $getvar => $getval){ ${$getvar} = stripslashes($getval); }
|
||||
} else {
|
||||
foreach($_POST as $postvar => $postval){ ${$postvar} = $postval; }
|
||||
foreach($_GET as $getvar => $getval){ ${$getvar} = $getval; }
|
||||
}
|
||||
|
||||
if((isset($rows) && $rows<5) || !isset($rows)) $rows=5;
|
||||
if((isset($fontsize) && $fontsize<9) || !isset($fontsize)) $fontsize=9;
|
||||
|
||||
if(!isset($destfile)) $destfile="";
|
||||
if(!isset($selectfile)) $selectfile="";
|
||||
if(!isset($compressed)) $compressed=0;
|
||||
if(!isset($debugoutput)) $debugoutput=0;
|
||||
if(!isset($insert)) $insert="";
|
||||
if(!isset($create)) $create="";
|
||||
if(!isset($exp)) $exp=0;
|
||||
|
||||
echo headline("Entwicklung - Tests, Konverter, ...");
|
||||
// Konverter
|
||||
echo '<h6>Konverter</h6>';
|
||||
echo '<form action="develop.php" method="post">';
|
||||
echo '<table border="1" rules="all"><tr><td colspan="2" class="hd">Erweiterte Inserts -> vollständige Inserts (alles findet im backup-Verzeichnis statt)</td></tr>';
|
||||
echo '<tr><td>zu konvertierendes File</td><td>'.FilelisteCombo($config["paths"]["backup"],$selectfile).'</td></tr>';
|
||||
echo '<tr><td>Name des Zielfiles (ohne Endung):</td><td><input type="text" name="destfile" size="50" value="'.$destfile.'"></td></tr>';
|
||||
echo '<tr><td><input type="checkbox" name="compressed" value="1" '.(($compressed==1) ? "checked" : "").'>komprimiert</td><td><input type="submit" name="startconvert" value=" Konvertierung starten "></td></tr>';
|
||||
echo '</table></form><br>';
|
||||
|
||||
if(isset($startconvert)) {
|
||||
$destfile.=($compressed==1) ? ".sql.gz" : ".sql";
|
||||
echo "Konvertierung $selectfile ==> $destfile<br>";
|
||||
if(file_exists($config["paths"]["backup"].$selectfile) && strlen($destfile)>7) {
|
||||
Converter($selectfile,$destfile,$compressed);
|
||||
}
|
||||
else echo "falsche Parameter ! Konvertierung ist nicht möglich.";
|
||||
|
||||
}
|
||||
|
||||
// Parser-Test
|
||||
echo '<h6>Parser-Test</h6>';
|
||||
echo '<span style="font-size:11px;"><form action="develop.php" method="post">';
|
||||
echo '<table border="1" rules="all"><tr><td colspan="2" class="hd">Parser-Test ';
|
||||
echo 'Fontgrösse: <select name="fontsize" style="font-size:11px;"><option value="9" '.(($fontsize==9) ? "SELECTED" : "").'>9 px</option><option value="10" '.(($fontsize==10) ? "SELECTED" : "").'>10 px</option><option value="12" '.(($fontsize==12) ? "SELECTED" : "").'>12 px</option><option value="14" '.(($fontsize==14) ? "SELECTED" : "").'>14 px</option></select>';
|
||||
echo ' Zeilen: <select name="rows" style="font-size:11px;"><option value="5" '.(($rows==5) ? "SELECTED" : "").'>5</option><option value="10" '.(($rows==10) ? "SELECTED" : "").'>10</option><option value="15" '.(($rows==15) ? "SELECTED" : "").'>15</option></select>';
|
||||
echo '</td></tr><tr><td>Create-Anweisung:</td><td><textarea cols="100" rows="'.$rows.'" name="create" style="font-size:'.$fontsize.'px; width: 500px;">'.$create.'</textarea></td></tr>';
|
||||
echo '<tr><td>Insert-Anweisung:</td><td><textarea cols="100" rows="'.$rows.'" name="insert" style="font-size:'.$fontsize.'px; width: 500px;">'.$insert.'</textarea></td></tr>';
|
||||
echo '<tr><td><input type="checkbox" name="debugoutput" value="1"'.(($debugoutput==1) ? " CHECKED" : "").'>mit Debugausgabe</td><td><input type="submit" name="startparse" value=" Parsertest starten "> erwartete Anzahl:<input type="text" name="exp" value="'.$exp.'"></td></tr>';
|
||||
echo '</table></form></span><br>';
|
||||
|
||||
if(isset($startparse)) {
|
||||
$restore["erweiterte_inserts"]=0;
|
||||
|
||||
echo '<font face="Courier">';
|
||||
if($debugoutput==1) echo '<strong>DEBUG-Ausgabe "Create"-parsing</strong><br>';
|
||||
$AnzahlFelder=AnzahlTabellenfelder($create,$debugoutput);
|
||||
if($debugoutput==1) echo '<strong>DEBUG-Ausgabe "Insert"-parsing</strong><br>';
|
||||
$AnzahlParser=SQL_Is_Complete($insert,$exp,$debugoutput);
|
||||
echo "</font><hr>Create-Anweisung: $AnzahlFelder Felder, Insert-Anweisung: $AnzahlParser Felder<br>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Testwiese
|
||||
echo '<a name="testwiese"></a><h6>Testwiese</h6>';
|
||||
include("inc/functions_restore.php");
|
||||
MSD_mysql_connect();
|
||||
$c="CREATE TABLE `changelog` ( `id` int(11) NOT NULL auto_increment, `datum` date NOT NULL default '0000-00-00', `beschreibung` text collate latin1_general_ci NOT NULL, `autor` varchar(50) collate latin1_general_ci NOT NULL default '', `version` varchar(8) collate latin1_general_ci default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci";
|
||||
echo "<p>CREATE:<br>$c</p>";
|
||||
echo "<hr><p>UMWANDLUNG:<br>".ConvertCreate($c)."</p>";
|
||||
echo '<br><br><br><br><br><br><br><br><br><br><br><br><br>';
|
||||
include("inc/footer.php");
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////// Funktionen ////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function FilelisteCombo($fpath,$selected) {
|
||||
$r='<select name="selectfile">';
|
||||
$r.='<option value="" '.(($selected=="") ? "SELECTED" : "").'></option>';
|
||||
|
||||
$dh = opendir($fpath);
|
||||
while (false !== ($filename = readdir($dh)))
|
||||
{
|
||||
if ($filename != "." && $filename != ".." && !is_dir($fpath.$filename)) {
|
||||
$r.='<option value="'.$filename.'" ';
|
||||
if($filename==$selected) $r.=' SELECTED';
|
||||
$r.='>'.$filename.'</option>'."\n";
|
||||
}
|
||||
}
|
||||
$r.='</select>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
function Converter1($filesource,$filedestination,$cp)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
$insert= substr($f[0],0,strpos($f[0],"("));
|
||||
for($i=0;$i<count($f);$i++) {
|
||||
$f[$i]=str_replace("),(",");\n$insert (",$f[$i]);
|
||||
|
||||
}
|
||||
|
||||
$z= fopen($config["paths"]["backup"].$filedestination,"w");
|
||||
fwrite($z,implode("\n",$f));
|
||||
fclose($z);
|
||||
echo "fertig";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Converter($filesource,$filedestination,$cp)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$cps=(substr(strtolower($filesource),-2)=="gz") ? 1 : 0;
|
||||
|
||||
echo "<h5>Datei '$filesource' wird eingelesen.....</h5><span style=\"font-size:10px;\">";
|
||||
|
||||
if(file_exists($config["paths"]["backup"].$filedestination)) unlink($config["paths"]["backup"].$filedestination);
|
||||
|
||||
$f = ($cps==1) ? gzopen($config["paths"]["backup"].$filesource,"r") : fopen($config["paths"]["backup"].$filesource,"r");
|
||||
$z= ($cps==1) ? gzopen($config["paths"]["backup"].$filedestination,"w") : fopen($config["paths"]["backup"].$filedestination,"w");
|
||||
|
||||
$insert=$mode="";
|
||||
$n=0;
|
||||
$eof= ($cps==1) ? gzeof($f) : feof($f);
|
||||
WHILE (!$eof)
|
||||
{
|
||||
$eof= ($cps==1) ? gzeof($f) : feof($f);
|
||||
$zeile= ($cps==1) ? gzgets($f,8192) : fgets($f,8192);
|
||||
if (substr($zeile,0,2)=="--") $zeile="";
|
||||
//$zeile=rtrim($zeile);
|
||||
$t=strtolower(substr($zeile,0,10));
|
||||
if ($t>"")
|
||||
{
|
||||
switch ($t)
|
||||
{
|
||||
case "insert int":
|
||||
{
|
||||
// eine neue Insert Anweisung beginnt
|
||||
$insert= substr($zeile,0,strpos($zeile,"("));
|
||||
if(substr(strtoupper($insert),-7)!="VALUES ") $insert.="VALUES ";
|
||||
$mode="insert";
|
||||
|
||||
};
|
||||
break;
|
||||
|
||||
case "create tab":
|
||||
{
|
||||
$mode="create";
|
||||
WHILE (substr(rtrim($zeile),-1)!=";")
|
||||
{
|
||||
|
||||
$zeile.=fgets($f,8192);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "drop table":
|
||||
{
|
||||
$mode="drop";
|
||||
$zeile.="\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($mode=="insert")
|
||||
{
|
||||
// Komma loeschen
|
||||
$zeile=str_replace("),(",");\n$insert (",$zeile);
|
||||
if(substr(rtrim($zeile),0,2)==",(" && $insert !="") {
|
||||
$zeile=";\n".$insert.substr($zeile,1);
|
||||
}
|
||||
if(substr(rtrim($zeile),-2)==")," && $insert !="") {
|
||||
$zeile=substr(rtrim($zeile),0,strlen(rtrim($zeile))-1).";\n$insert";
|
||||
}
|
||||
}
|
||||
$n++;
|
||||
if ($n>1000) { $n=0;echo "<br>"; }
|
||||
echo ".";
|
||||
if($cps==1) gzwrite($z,$zeile); else fwrite($z,$zeile);
|
||||
}
|
||||
flush();
|
||||
$n++;
|
||||
}
|
||||
if($cps==1) gzclose($z); else fclose($z);
|
||||
if($cps==1) gzclose($f); else fclose($f);
|
||||
|
||||
echo "</span><h5>Konvertierung abgeschlossen, '$filedestination' wurde erzeugt.</h5>";
|
||||
}
|
||||
|
||||
|
||||
function ReadStatus($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);
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
?>
|
6
doc/_htaccessproblem.txt
Normale Datei
|
@ -0,0 +1,6 @@
|
|||
Standard war:
|
||||
AllowOverride None
|
||||
|
||||
jetzt wie auf pima:
|
||||
AllowOverride AuthConfig FileInfo Indexes Limit
|
||||
|
18
doc/changelog.txt
Normale Datei
|
@ -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
|
||||
|
63
doc/install_deutsch.txt
Normale Datei
|
@ -0,0 +1,63 @@
|
|||
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 !
|
||||
|
||||
|
||||
Anleitung für das Perlskript:
|
||||
|
||||
Die meisten haben ein cgi-bin Verzeichnis, in dem Perl ausgeführt werden kann.
|
||||
Dies ist meist per Browser über http://www.domain.de/cgi-bin/ erreichbar.
|
||||
|
||||
Für diesen Fall bitte folgende Schritte durchführen:
|
||||
|
||||
1. Rufe im MySQLDumper die Seite Backup auf.
|
||||
2. Kopiere den Pfad, der hinter Eintrag in crondump.pl für $absolute_path_of_configdir: steht.
|
||||
3. öffne die Datei "crondump.pl" im Editor
|
||||
4. trage den kopierten Pfad dort bei absolute_path_of_configdir ein (keine Leerzeichen)
|
||||
5. Speicher crondump.pl
|
||||
6. kopiere crondump.pl, sowie perltest.pl und simpletest.pl ins cgi-bin-Verzeichnis (Ascii-Modus im FTP)
|
||||
7. gebe den Datein die Rechte 755
|
||||
7b. Wenn die Endung cgi gewünscht ist, ändere bei allen 3 Dateien die Endung von pl -> cgi (umbenennen)
|
||||
|
||||
8. Rufe die Konfiguration im MySQLDumper auf
|
||||
9. wähle Seite Cronscript
|
||||
10. ändere Perl Ausführungspfad in /cgi-bin/
|
||||
10b. wenn die Scripte .cgi haben, ändere die Dateiendung auf .cgi
|
||||
11. speicher die Konfiuguration
|
||||
|
||||
fertig, die Skripte lassen sich nun von der Backupseite aufrufen
|
||||
|
||||
Wer Perl in allen Verzeichnissen ausführen kann, dem reichen folgende Schritte:
|
||||
|
||||
1. Rufe im MySQLDumper die Seite Backup auf.
|
||||
2. Kopiere den Pfad, der hinter Eintrag in crondump.pl für $absolute_path_of_configdir: steht.
|
||||
3. öffne die Datei "crondump.pl" im Editor
|
||||
4. trage den kopierten Pfad dort bei absolute_path_of_configdir ein (keine Leerzeichen)
|
||||
5. Speicher crondump.pl
|
||||
6. gebe den Datein die Rechte 755
|
||||
6b. Wenn die Endung cgi gewünscht ist, ändere bei allen 3 Dateien die Endung von pl -> cgi (umbenennen)
|
||||
(ev. 10b+11 von oben)
|
||||
|
||||
|
||||
Windowsuser müssen bei allen Scripten die erste Zeile ändern, dort steht der Pfad von Perl. Beispiel:
|
||||
statt: #!/usr/bin/perl -w
|
||||
jetzt #!C:\perl\bin\perl.exe -w
|
||||
|
65
doc/install_english.txt
Normale Datei
|
@ -0,0 +1,65 @@
|
|||
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 !
|
||||
|
||||
Guidance for the Perl script:
|
||||
|
||||
Most have a cgi-bin directory, in which Perl can be executed.
|
||||
This is usually by Browser over http://www.domain.de/cgi-bin/ available.
|
||||
|
||||
Make the following steps for this case please.
|
||||
|
||||
1. Call in MySQLDumper the page Backup
|
||||
2. Copy the path, that stands behind entry in crondump.pl for $absolute_path_of_configdir:
|
||||
3. open the file "crondump.pl" in the editor
|
||||
4. paste the copied path there with absolute_path_of_configdir (no blanks)
|
||||
5. Save crondump.pl
|
||||
6. copy crondump.pl, as well as perltest.pl and simpletest.pl to the cgi-bin directory (ASCII mode in the ftp-client!)
|
||||
7. chmod 755 to the scripts.
|
||||
7b. If the ending cgi is desired, change the ending of all 3 files pl - > cgi (rename)
|
||||
8. Call in the MySQLDumper the page Configuration
|
||||
9. click on Cronscript
|
||||
10. changes Perl execution path to /cgi-bin/
|
||||
10b. if the Scripts are renamed to *.cgi , change Fileextension to cgi
|
||||
11 save the Configuration
|
||||
|
||||
Ready ! The scripts are available from the Page "Backup"
|
||||
|
||||
When you can execute Perl anywhere, only following step are needed:
|
||||
|
||||
1. Call in MySQLDumper the page Backup.
|
||||
2. Copy the path, that stands behind entry in crondump.pl for $absolute_path_of_configdir:
|
||||
3. open the file "crondump.pl" in the editor
|
||||
4. paste the copied path there with absolute_path_of_configdir (no blanks)
|
||||
5. Save crondump.pl
|
||||
|
||||
6. chmod 755 to the scripts.
|
||||
6b. If the ending cgi is desired, change the ending of all 3 files pl - > cgi (rename)
|
||||
(ev. 10b+11 from above)
|
||||
|
||||
|
||||
Windowsuser must change the first line of all Perlscripts, to the path of Perl.
|
||||
|
||||
Example:
|
||||
|
||||
instead of: #!/usr/bin/perl w
|
||||
now #!C:\perl\bin\perl.exe w
|
||||
|
105
doc/license_deutsch.txt
Normale Datei
|
@ -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
|
88
doc/license_english.txt
Normale Datei
|
@ -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
|
15
doc/readme.txt
Normale Datei
|
@ -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.
|
451
dump.php
Normale Datei
|
@ -0,0 +1,451 @@
|
|||
<?
|
||||
include_once("inc/functions_dump.php");
|
||||
include_once($config["files"]["parameter"]);
|
||||
include_once("inc/mysql.php");
|
||||
include_once("language/".$config["language"]."/lang.php");
|
||||
include_once("language/".$config["language"]."/lang_dump.php");
|
||||
|
||||
$pageheader=MSDHeader();
|
||||
$DumpFertig=0;
|
||||
//Browserweiche
|
||||
if($config["browser_switch"]==0) {
|
||||
$frames=(MSD_BROWSER_AGENT == "IE") ? 0 : 1;
|
||||
} else $frames=$config["browser_switch"]-1;
|
||||
|
||||
$relativ_path=($frames==1) ? "../../" : "./";
|
||||
|
||||
|
||||
//$_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);
|
||||
$dump["totalrecords"]=(isset($_GET["totalrecords"])) ? $_GET["totalrecords"] : 0;
|
||||
|
||||
$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<h1>Abruch durch Benutzer</h1>Der Backupvorgang wurde unterbrochen.<br><br>";
|
||||
echo "Folgende angefangene Backupdateien wurden gelöscht:<br><br>";
|
||||
echo $wildcard."*<br>".$wildcard2;
|
||||
echo '</div></body></html>';
|
||||
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;$ii<count($databases["multi"]);$ii++) {
|
||||
$dump["dbindex"]=$flipped[$databases["multi"][$ii]];
|
||||
$tabellen = mysql_list_tables($databases["Name"][$dump["dbindex"]],$config["dbconnection"]);
|
||||
$num_tables = mysql_num_rows($tabellen);
|
||||
// Array mit den gewünschten Tabellen zusammenstellen... wenn Präfix angegeben, werden die anderen einfach nicht übernommen
|
||||
if ($num_tables>0)
|
||||
{
|
||||
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"]]."<br>";
|
||||
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[]= '<p class="smallwarnung">'.$lang["error"].": ".sprintf($lang["dump_notables"],$databases["Name"][$dump["dbindex"]]).'</p>';
|
||||
}
|
||||
|
||||
$num_tables=count($dump["tables"]);
|
||||
if($config["optimize_tables_beforedump"]==1 && $dump["table_offset"]==-1) $out.='<span class="smallblue">'.$num_tables.' Tabellen wurden optimiert.</span><br>';
|
||||
|
||||
$dump["data"]="";
|
||||
$dump["structure"]="";
|
||||
$dump["dbindex"]=(isset($_GET["dbi"])) ? $_GET["dbi"] :$flipped[$databases["multi"][0]];
|
||||
|
||||
|
||||
|
||||
//Ausgaben-Header bauen
|
||||
$aus_header[]= PicCache($relativ_path);
|
||||
$aus_header[]= headline('Backup: '.(($config["multi_dump"]==1) ? "Multidump (".count($databases["multi"])." ".$lang["dbs"].")" : $lang["db"].': '.$databases["Name"][$dump["dbindex"]].(($databases["praefix"][$dump["dbindex"]]!="") ?' ('.$lang["withpraefix"].' <span class="blau">'.$databases["praefix"][$dump["dbindex"]].'</span>)' : '')));
|
||||
if(isset($aus_error) && count($aus_error)>0) $aus_header=array_merge($aus_header,$aus_error);
|
||||
|
||||
$aus_header[]='Browser : <img src="'.$relativ_path.$BrowserIcon.'"> '.(($config["browser_switch"]==0) ? " (automatisch erkannt)" : ""); //.' / '.$frames;
|
||||
if(count($dump["tables"])==0) {
|
||||
//keine Tabellen gefunden
|
||||
$aus[]='<p class="Warnung">'.sprintf($lang['dump_notables'],$databases["Name"][$dump["dbindex"]]).'</p>';
|
||||
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();
|
||||
} else {
|
||||
|
||||
// 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'].'<br><div style="padding-left:20px;">';
|
||||
$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;
|
||||
clearstatcache();
|
||||
$sz=byte_output(@filesize($config["paths"]["backup"].$mpdatei));
|
||||
$out.= $lang["file"].' <a href="'.$config["paths"]["backup"].$mpdatei.'" class="smallblack">'.$mpdatei.' ('.$sz.')</a> '.$lang["dump_successful"].'<br>';
|
||||
}
|
||||
$out.='</div><br>';
|
||||
} else {
|
||||
clearstatcache();
|
||||
$out.=$lang['finished'].': <a href="'.$config["paths"]["backup"].$dump["backupdatei"].'" class="smallblack">'.$dump["backupdatei"].' ('.byte_output(filesize($config["paths"]["backup"].$dump["backupdatei"])).")</a><br>";
|
||||
}
|
||||
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<br>";
|
||||
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,0);
|
||||
}
|
||||
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[]= '<div style="word-spacing:3mm; white-space:normal;">';
|
||||
for($i=0;$i<count($databases["multi"]);$i++) {
|
||||
$a.=$databases["multi"][$i];
|
||||
if($databases["Name"][$dump["dbindex"]]==$databases["multi"][$i])
|
||||
$aus[]= '<span style="color:red"><strong>'.$databases["multi"][$i].'</strong></span> ';
|
||||
else
|
||||
$aus[]= '<span style="color:green">'.$databases["multi"][$i].'</span> ';
|
||||
if(strlen($a)>60) {$aus[]='<br>';$a="";}
|
||||
}
|
||||
$aus[]= '</div>';
|
||||
}
|
||||
if($config["multi_part"]==1) $aus[]= '<h5>Multipart-Backup: '.$config["multipartgroesse1"].' '.$mp2[$config["multipartgroesse2"]].'</h5>';
|
||||
|
||||
$aus[]= '<h4>'.$lang["dump_headline"].'</h4>';
|
||||
|
||||
if($dump["kommentar"]) $aus[]= $lang['comment'].': <span style="color:green;">'.$dump["kommentar"].'</span><br>';
|
||||
if($config["multi_dump"]==1) $aus[]= $lang["db"].': <strong>'.$databases["Name"][$dump["dbindex"]].'</strong>'.(($databases["praefix"][$dump["dbindex"]]!="") ?' ('.$lang["withpraefix"].' <span style="color:blue">'.$databases["praefix"][$dump["dbindex"]].'</span>)' : '').'<br>';
|
||||
if(isset($tbl_sel)) $aus[]= $msgTbl.'<br><br>';
|
||||
|
||||
|
||||
|
||||
if($config["multi_part"]==1)
|
||||
{
|
||||
$aus[]= '<span style="color:green;">Multipart-Backup File <strong>'.($dump["part"]-$dump["part_offset"]-1).'</strong></span><br>';
|
||||
$aus2=", ".($dump["part"]-1)." files";
|
||||
}
|
||||
$aus[]= $lang["dump_filename"]."<b>".$dump["backupdatei"]."</b>";
|
||||
$aus[]= '<br>'.$lang['filesize'].': <b>'.byte_output($dump["filesize"]).'</b><br><br>'.$lang["gzip_compression"].' <b>';
|
||||
$aus[]= ($config["compression"]==1) ? $lang["activated"] : $lang["not_activated"];
|
||||
$aus[]= '</b>.<br>';
|
||||
|
||||
|
||||
|
||||
$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);
|
||||
$dump["zeilen_total"]=intval($row->anzahl);
|
||||
|
||||
if ($dump["zeilen_total"]>0)
|
||||
{
|
||||
$fortschritt=round(((100*$dump["zeilen_offset"])/$dump["zeilen_total"]),0);
|
||||
if ($dump["anzahl_zeilen"]>=$dump["zeilen_total"]) $fortschritt=100;
|
||||
}
|
||||
else $fortschritt=100;
|
||||
//Debug-Ausgabe
|
||||
//$aus[]="Restzeilen: ".$dump["zeilen_total"]." (".$dump["zeilen_offset"].")<br>";
|
||||
//$aus[]='<br><br>';
|
||||
|
||||
$aus[]= $lang["saving_table"].'<b>'.($dump["table_offset"]+1).'</b> '.$lang["of"].'<b> '.sizeof($dump["tables"]).'</b><br>'
|
||||
.$lang["actual_table"].': <b>'.$table.'</b><br><br>'
|
||||
.$lang["progress_table"].':<br>';
|
||||
|
||||
|
||||
$aus[]= '<table border="0" width="380"><tr>'
|
||||
.'<td width="'.($fortschritt*3).'"><img src="'.$relativ_path.'images/fbd.gif" alt="" width="'.($fortschritt*3).'" height="16" border="0"></td>'
|
||||
.'<td width="'.((100-$fortschritt)*3).'"> </td>'
|
||||
.'<td width="80" align="right">'.($fortschritt).'%</td>';
|
||||
|
||||
if ($dump["anzahl_zeilen"]+$dump["zeilen_offset"]>=$dump["zeilen_total"])
|
||||
{
|
||||
$eintrag=$dump["zeilen_offset"]+1;
|
||||
$zeilen_gesamt=$dump["zeilen_total"];
|
||||
if ($zeilen_gesamt==0) $eintrag=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeilen_gesamt=$dump["zeilen_offset"]+$dump["anzahl_zeilen"];
|
||||
$eintrag=$dump["zeilen_offset"]+1;
|
||||
}
|
||||
|
||||
$aus[]= '</tr><tr>'
|
||||
.'<td colspan="3">'.$lang["entry"].' <b>'.number_format($eintrag,0,",",".").'</b> '.$lang["upto"].' <b>'
|
||||
.number_format(($zeilen_gesamt),0,",",".").'</b> '.$lang["of"].' <b>'
|
||||
.number_format($dump["zeilen_total"],0,",",".").'</b></td></tr></table>';
|
||||
|
||||
$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;
|
||||
$noch_zu_speichern=$dump["totalrecords"]-$dump["countdata"];
|
||||
$prozent= ($dump["totalrecords"]>0) ? round(((100*$noch_zu_speichern)/$dump["totalrecords"]),0) : 100;
|
||||
if ($noch_zu_speichern==0) $prozent=100;
|
||||
|
||||
$aus[]= '<br>'.$lang["progress_over_all"].':'
|
||||
.'<table border="0" width="550" cellpadding="0" cellspacing="0"><tr>'
|
||||
.'<td width="'.(5*(100-$prozent)).'"><img src="'.$relativ_path.'images/fbd.gif" alt="" width="'.(5*(100-$prozent)).'" height="16" border="0"></td>'
|
||||
.'<td width="'.($prozent*5).'" align="center"></td>'
|
||||
.'<td width="50">'.(100-$prozent).'%</td></tr></table>';
|
||||
|
||||
//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[]= '<br><table border="0" cellpadding="0" cellspacing="0"><tr nowrap>';
|
||||
$aus[]= '<td class="nomargin" width="60" valign="top" align="center" style="font-size:10px;" >';
|
||||
$aus[]= '<strong>Speed</strong><br>'.$dump["anzahl_zeilen"].'</td><td class="nomargin" width="300">';
|
||||
$aus[]= '<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr nowrap>';
|
||||
$aus[]= '<td class="nomargin" align="left"class="small" width="300" nowrap><img src="'.$relativ_path.'images/fbs.gif" alt="" width="'.$fw.'" height="14" border="0" vspace="0" hspace="0">';
|
||||
$aus[]= '</td></tr></table><table border="0" width="100%" cellpadding="0" cellspacing="0"><tr nowrap>';
|
||||
$aus[]= '<td class="nomargin" align="left" width="50%" nowrap style="font-size:10px;" >'.$config["minspeed"].'</td>';
|
||||
$aus[]= '<td class="nomargin" align="right" width="50%" nowrap style="font-size:10px;" >'.$config["maxspeed"].'</td>';
|
||||
$aus[]= '</tr></table></td></tr></table>';
|
||||
|
||||
//Status-Text
|
||||
$aus[]= '<p class="small">'.zeit_format(time()-$xtime).', '.$dump["aufruf"].' pages'.$aus2;
|
||||
$aus[]= ($dump["errors"]>0) ? ', <span style="color:red;">'.$dump["errors"].' errors</span>' : '';
|
||||
$aus[]= '</p>';
|
||||
$aus[]= '<div style="position:absolute;width:600px;height:90px;overflow:auto;"><span class="smallgrey">'.$out.'</span></div></div>';
|
||||
|
||||
}
|
||||
//////////////////////////////////////
|
||||
// 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) {
|
||||
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"].'&totalrecords='.$dump["totalrecords"];
|
||||
}
|
||||
else
|
||||
{
|
||||
//Backup fertig
|
||||
// Zeitmessung wird beendet
|
||||
$dump["data"]="\n".$mysql_commentstring." EOB\n\n\n";
|
||||
WriteToDumpFile();
|
||||
ExecuteCommand("a");
|
||||
if($config["multi_part"]==1) {
|
||||
$out.=$lang['finished'].'<br><div style="padding-left:20px;">';
|
||||
$dateistamm=substr($dump["backupdatei"],0,strrpos($dump["backupdatei"],"part_"))."part_";
|
||||
$dateiendung=($config["compression"]==1)?".sql.gz":".sql";
|
||||
clearstatcache();
|
||||
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"].' <a href="'.$config["paths"]["backup"].$mpdatei.'" class="smallblack">'.$mpdatei.' ('.$sz.')</a> '.$lang["dump_successful"].'<br>';
|
||||
}
|
||||
$out.='</div>';
|
||||
} else {
|
||||
$out.=$lang['finished'].': <a href="'.$config["paths"]["backup"].$dump["backupdatei"].'" class="smallblack">'.$dump["backupdatei"].' ('.byte_output(filesize($config["paths"]["backup"].$dump["backupdatei"])).")</a><br>";
|
||||
}
|
||||
$backup_ready=1;
|
||||
$xtime=time()-$xtime;
|
||||
$aus=Array();
|
||||
$aus[]= "<br>";
|
||||
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[]= '<br><br><strong>'.$lang["done"]."</strong><br><br>";
|
||||
if($dump["errors"]>0) $aus[]='<p class="warnung">Es sind '.$dump["errors"].' Fehler aufgetreten: <a href="log.php?r=3">ansehen</a></p>';
|
||||
|
||||
if($config["multi_dump"]==1) {
|
||||
$aus[]= sprintf($lang['multidump'],count($databases["multi"]))."<br>";
|
||||
}
|
||||
$aus[]= '<br>'.sprintf($lang["dump_endergebnis"],$num_tables,number_format($dump["countdata"],0,",",".")).'<br><br><span class="smallgrey">'.$out.'</span><br><br>'
|
||||
.'<p class="small">'.zeit_format($xtime).', '.$dump["aufruf"].' pages'.$aus2.'</p>' //.$dump["fileoperations"].' Schreibzugriffe'
|
||||
.str_repeat(" ",60).'<br>';
|
||||
$aus[]= "<br><br><input class=\"Formbutton\" type=\"button\" value=\"".$lang["back_to_control"]."\" onclick=\"self.location.href='".$relativ_path."filemanagement.php'\"></a>";
|
||||
$aus[]= " <input class=\"Formbutton\" type=\"button\" value=\"".$lang["back_to_minisql"]."\" onclick=\"self.location.href='".$relativ_path."sql.php'\"></a>";
|
||||
$aus[]= " <input class=\"Formbutton\" type=\"button\" value=\"".$lang["back_to_overview"]."\" onclick=\"self.location.href='".$relativ_path."main.php?action=db&dbid=".$dump["dbindex"]."#dbid'\"></a>";
|
||||
|
||||
$DumpFertig=1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================
|
||||
//================= Anzeige ===========================================
|
||||
//=====================================================================
|
||||
|
||||
//Seite basteln
|
||||
$svice=(isset($_GET["svice"])) ? $_GET["svice"] : 0;
|
||||
$config_array=(isset($config)) ? "<strong>CONFIG</strong><pre>".@print_r($config,true)."</pre>": "";
|
||||
$database_array=(isset($database)) ? "<strong>DATABASE</strong><pre>".@print_r($database,true)."</pre>": "";
|
||||
$dump_array=(isset($dump)) ? "<strong>DUMP</strong><pre>".@print_r($dump,true)."</pre>": "";
|
||||
|
||||
$aus=array_merge($aus_header,$aus);
|
||||
//DEBUGGER
|
||||
//$debugausgabe='<hr><table width="600"><tr><td>Aufruf:'.$dump["aufruf"].' Datensätze: '.$dump["countdata"].' Dateigrösse: '.$dump["filesize"].'<br><br><span class="small">'.$page_parameter.'</span></td></tr></table><hr>';
|
||||
$manuell=0;
|
||||
$pagefooter=($DumpFertig==1) ? '<p align="center" class="small">Autoren: <a class="small" href="http://www.daniel-schlichtholz.de" target="_new">Daniel Schlichtholz & Steffen Kamper</a> - Infoboard: <a class="small" href="'.$config["homepage"].'" target="_new">'.$config["homepage"].'</a></p>' : '';
|
||||
if($svice==1) $pagefooter.='<table width="100%"><tr bgcolor="#808080"><td>'.$config_array.'</td></tr><tr bgcolor="#808080"><td>'.$database_array.'</td></tr><tr bgcolor="#808080"><td>'.$dump_array.'</td></tr><tr bgcolor="#808080"><td>'.$restore_array.'</td></tr></table>';
|
||||
$pagefooter.='</div></BODY></HTML>';
|
||||
|
||||
if($frames==1) {
|
||||
|
||||
$js_aufruf_automatisch=($page_parameter=="") ? ">" : "onload=\"restart_dump()\">";
|
||||
$js_aufruf_manuell=($page_parameter=="") ? ">" : '><input type="Button" value="weitermachen" onclick="restart_dump()"><br><br>';
|
||||
|
||||
|
||||
$s="\n<script type=\"text/javascript\">\n";
|
||||
$s.="function restart_dump()\n{\n";
|
||||
$s.="parent.msd_action.location.href=\"".$relativ_path."dump.php?".$page_parameter."\";\n";
|
||||
$s.="\n}\n";
|
||||
$s.="</script>";
|
||||
$pageheader='<html><head>'.$meta.'<title>MySqlDump</title><link rel="stylesheet" type="text/css" href="'.$relativ_path.'css/'.$config["theme"].'/style.css">'.$s.'</head>
|
||||
<body bgcolor="#F5F5F5" '.(($manuell==1) ? $js_aufruf_manuell : $js_aufruf_automatisch).headline();
|
||||
$complete_page=$pageheader.$debugausgabe.implode("\n",$aus).$pagefooter;
|
||||
// und raus
|
||||
WriteTempOut($out);
|
||||
$f=fopen("work/log/out.html","w");
|
||||
fwrite($f,$complete_page);
|
||||
fclose($f);
|
||||
flush();
|
||||
echo '<script type="text/javascript">parent.msd_ausgabe.location.href="./work/log/out.html";</script>';
|
||||
|
||||
} else {
|
||||
$js_aufruf_automatisch='<script language="javascript">self.location="dump.php?'.$page_parameter.'";</script>';
|
||||
$js_aufruf_manuell='<input type="Button" value="weitermachen" onclick="self.location.href=\'dump.php?'.$page_parameter.'\'">';
|
||||
$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();
|
||||
}
|
||||
|
||||
|
||||
?>
|
481
filemanagement.php
Normale Datei
|
@ -0,0 +1,481 @@
|
|||
<?php
|
||||
include("inc/header.php");
|
||||
include_once("language/".$config['language']."/lang.php");
|
||||
include_once("language/".$config['language']."/lang_filemanagement.php");
|
||||
include_once("language/".$config['language']."/lang_config_overview.php");
|
||||
include("inc/functions_files.php");
|
||||
|
||||
echo MSDHeader();
|
||||
|
||||
$dirs=Array("","./","./inc/","./msd_cron/","./language/","./work/config/");
|
||||
if($config['auto_delete']==1)$msg=AutoDelete();
|
||||
if (file_exists("work/log/dump.html")) @unlink("work/log/dump.html");
|
||||
@unlink($config['paths']['log']."out.tmp");
|
||||
@unlink($config['paths']['log']."out.html");
|
||||
|
||||
//0=Datenbank 1=Struktur
|
||||
$action=(isset($_GET['action'])) ? $_GET['action'] : "files";
|
||||
$kind=(isset($_GET['kind'])) ? $_GET['kind'] : 0;
|
||||
$expand=(isset($_GET['expand'])) ? $_GET['expand'] : -1;
|
||||
$selectfile=(isset($_POST['selectfile'])) ? $_POST['selectfile'] : "";
|
||||
$destfile=(isset($_POST['destfile'])) ? $_POST['destfile'] : "";
|
||||
$compressed=(isset($_POST['compressed'])) ? $_POST['compressed'] : "";
|
||||
|
||||
$toolboxstring="";
|
||||
$svice=0;
|
||||
if(isset($_GET['svice']))$svice=$_GET['svice'];
|
||||
if(isset($_POST['svice']))$svice=$_POST['svice'];
|
||||
|
||||
if($kind==0) $fpath=$config['paths']['backup']; else $fpath=$config['paths']['structure'];
|
||||
$dbactiv=(isset($_GET['dbactiv'])) ? $_GET['dbactiv'] : $databases['db_actual'];
|
||||
$msg="";
|
||||
|
||||
//Browserweiche
|
||||
if($config['browser_switch']==0) {
|
||||
$frames=(MSD_BROWSER_AGENT == "IE") ? 0 : 1;
|
||||
} else $frames=$config['browser_switch']-1;
|
||||
|
||||
|
||||
if($config['multi_dump']==1) {
|
||||
$databases['multi']=Array();
|
||||
if($databases['multisetting']==""){
|
||||
$databases['multi'][0]=$databases['db_actual'];
|
||||
} else {
|
||||
$databases['multi']=explode(";",$databases['multisetting']);
|
||||
$toolboxstring="Datenbanken\n------------------\n\n".str_replace(";","\n",$databases['multisetting']);
|
||||
}
|
||||
} else $databases['multi'][0]=$databases['db_actual'];
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** Abfrage ob Dump nach Tabellenaufruf ***
|
||||
//--------------------------------------------------------
|
||||
if (isset($_POST['dump_tbl']))
|
||||
{
|
||||
@TestWorkDir();
|
||||
$databases['db_actual_tableselected']=substr($_POST['tbl_array'],0,strlen($_POST['tbl_array'])-1);
|
||||
WriteParams(1,$config,$databases);
|
||||
@unlink($config['paths']['log']."out.tmp");
|
||||
$dk=(isset($_POST['dumpKommentar'])) ? $_POST['dumpKommentar'] : "";
|
||||
$dump['fileoperations']=0;
|
||||
if ($frames==1)
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="frameset.php?action=dump&comment='.urlencode($dk).'";</script>';
|
||||
else
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="dump.php?comment='.urlencode($dk).'";</script>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** Abfrage ob Dump ***
|
||||
//--------------------------------------------------------
|
||||
if (isset($_POST['dump']))
|
||||
{
|
||||
|
||||
if(isset($_POST['tblfrage']) && $_POST['tblfrage']==1) {
|
||||
//Tabellenabfrage
|
||||
$tblfrage_refer="dump";
|
||||
include ("inc/tabellenabfrage.php");
|
||||
exit;
|
||||
} else {
|
||||
@TestWorkDir();
|
||||
$databases['db_actual_tableselected']="";
|
||||
WriteParams(1,$config,$databases);
|
||||
|
||||
$dk=(isset($_POST['dumpKommentar'])) ? $_POST['dumpKommentar'] : "";
|
||||
$dump['fileoperations']=0;
|
||||
if ($frames==1)
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="frameset.php?action=dump&comment='.urlencode($_POST['dumpKommentar']).'";</script>';
|
||||
else
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="dump.php?comment='.urlencode($_POST['dumpKommentar']).'";</script>';
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** 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 '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="frameset.php?action=restore&filename='.$_POST['filename'].'&kind='.$kind.'";</script>';
|
||||
|
||||
exit;
|
||||
}
|
||||
//--------------------------------------------------------
|
||||
//*** Abfrage ob Restore ***
|
||||
//--------------------------------------------------------
|
||||
if (isset($_POST['restore']))
|
||||
{
|
||||
if (isset($_POST['file']))
|
||||
{
|
||||
if(file_exists($config['paths']['log']."restore.tmp")) @unlink($config['paths']['log']."restore.tmp");
|
||||
if(isset($_POST['tblfrage']) && $_POST['tblfrage']==1) {
|
||||
//Tabellenabfrage
|
||||
$tblfrage_refer="restore";
|
||||
$filename=urldecode($_POST['file'][0]);
|
||||
include ("inc/tabellenabfrage.php");
|
||||
exit;
|
||||
} else {
|
||||
$databases['db_actual_tableselected']="";
|
||||
WriteParams(1,$config,$databases);
|
||||
if($frames==1)
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="frameset.php?action=restore&filename='.$_POST['file'][0].'&kind='.$kind.'";</script>';
|
||||
else
|
||||
echo '<script language="JavaScript">parent.MySQL_Dumper_content.location.href="restore.php?filename='.$_POST['file'][0].'&kind='.$kind.'";</script>';
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
$msg.= '<p class="fehler">'.$lang['fm_nofile'].'</p>'.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.= '<p>';
|
||||
for($i=0;$i<count($_POST['file']);$i++)
|
||||
{
|
||||
if($_POST['multipart'][$i]==0) {
|
||||
$delfiles[]=$_POST['file'][$i];
|
||||
} else {
|
||||
$delfiles[]=substr($_POST['file'][$i],0,strpos($_POST['file'][$i],"_part_"))."*.*";
|
||||
}
|
||||
|
||||
}
|
||||
for($i=0;$i<count($delfiles);$i++) {
|
||||
$del=DeleteFilesM($fpath,$delfiles[$i]);
|
||||
if($del==0){
|
||||
$msg.= '<p class="fehler">'.$lang['fm_delete1'].$fpath.$delfiles[$i].$lang['fm_delete3'].'</p>';
|
||||
} else {
|
||||
for ($j=0; $j<count($del); $j++) {
|
||||
$msg.=$lang['fm_delete1'].$del[$j].$lang['fm_delete2'].'<br>';
|
||||
WriteLog("deleted '$del[$j]'.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$msg.='</p>';
|
||||
|
||||
|
||||
} else {
|
||||
if (DeleteFilesM($fpath,$_POST['file'][0])) {
|
||||
$msg.= '<p class="meldung">'.$lang['fm_delete1'].$fpath.$_POST['file'][0].$lang['fm_delete2'].'</p>';
|
||||
WriteLog("deleted '".$_POST['file'][0]."'.");
|
||||
} else {
|
||||
$msg.= '<p class="fehler">'.$lang['fm_delete1'].$fpath.$_POST['file'][0].$lang['fm_delete3'].'</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$msg.= '<p class="fehler">'.$lang['fm_nofile'].'</p>'.br();
|
||||
}
|
||||
if (isset($_POST['deleteauto']) ) $msg.=AutoDelete();
|
||||
|
||||
if (isset($_POST['deleteall']) )
|
||||
{
|
||||
//hier kommt alldelete rein
|
||||
$del=DeleteFilesM($fpath,"*.sql");
|
||||
if($del==0){
|
||||
//$msg.="Fehler beim löschen!";
|
||||
}else{
|
||||
for ($i=0; $i<sizeof($del); $i++) {
|
||||
$msg.="File '".$del[$i]."' gelöscht<br>";
|
||||
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<sizeof($del); $i++) {
|
||||
$msg.="File '".$del[$i]."' gelöscht<br>";
|
||||
WriteLog("deleted '$del[$i]'.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Upload
|
||||
///////////////////////////////////
|
||||
if (isset($_POST['upload']))
|
||||
{
|
||||
$error=false;
|
||||
if (!isset($_FILES['upfile']['name'])) echo '<span class="warnung">'.$lang['fm_uploadfilerequest'].'</span><br><br>';
|
||||
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.= "<font color=\"red\">".$lang['fm_uploadnotallowed1']."<br>";
|
||||
$msg.= $lang['fm_uploadnotallowed2']."</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$error)
|
||||
{
|
||||
if (move_uploaded_file($_FILES['upfile']['tmp_name'],$fpath.$_FILES['upfile']['name'])) @chmod($fpath.$upfile_name,0755);
|
||||
else $error.="<font color=\"red\">".$lang['fm_uploadmoveerror']."<br>";
|
||||
}
|
||||
if ($error) $msg.= $error."<font color=\"red\">".$lang['fm_uploadfailed']."</font><br>";
|
||||
}
|
||||
}
|
||||
else $msg.= "<font color=\"red\">".$lang['fm_uploadfileexists']."</font><br>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Seitenteile vordefinieren
|
||||
$href='filemanagement.php?action='.$action.'&kind='.$kind;
|
||||
$a1= br(3).'<form name="fm" id="fm" method="post" action="'.$href.'">'.br();
|
||||
$a1.= '<div align="center">'.br().'<table border="0">'.br().'<tr>'.br();
|
||||
|
||||
$td='<td>';
|
||||
$ul= '<h4>'.$lang['fm_fileupload'].'</h4>'.br();
|
||||
$ul.= '<form action="'.$href.'" method="POST" enctype="multipart/form-data">'.br();
|
||||
$ul.= '<table>'.br();
|
||||
$ul.= '<tr>'.br().'<td align="center" colspan="2">'.br().'<input type="file" name="upfile"></td>'.br();
|
||||
$ul.= '<td align="center"><input type="submit" name="upload" value="'.$lang['fm_fileupload'].'">'.br();
|
||||
$ul.= '</td>'.br().'</tr>'.br().'</table>'.br();
|
||||
$ul.= '</table>'.br();
|
||||
$ul.= '</form>'.br();
|
||||
|
||||
$tbl_abfrage='<td> ';
|
||||
if($config['multi_dump']==0) $tbl_abfrage.='<input type="checkbox" class="checkbox" name="tblfrage" value="1">'.$lang['fm_selecttables'];
|
||||
$tbl_abfrage.='</td><td> </td><td>'.$lang['fm_comment'].': <input type="text" name="dumpKommentar"></td>'.br();
|
||||
|
||||
$autodel='<span class="small">'.$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.='</span><br><br>'.br().br();
|
||||
|
||||
//Fallunterscheidung
|
||||
|
||||
switch ($action) {
|
||||
case "dump":
|
||||
//Perlscript
|
||||
if($config['multi_dump']==0) DBDetailInfo($databases['db_selected_index']);
|
||||
$cext=($config['cron_extender']==0) ? "pl" : "cgi";
|
||||
$actualUrl=substr($_SERVER['SCRIPT_NAME'],0,strrpos($_SERVER['SCRIPT_NAME'],"/")+1);
|
||||
if(substr($actualUrl,-1)!="/") $actualUrl.="/";
|
||||
if(substr($actualUrl,0,1)!="/") $actualUrl="/$actualUrl";
|
||||
$refdir=(substr($config['cron_execution_path'],0,1)=="/") ? "" : $actualUrl;
|
||||
$scriptdir=$config['cron_execution_path'].'crondump.'.$cext;
|
||||
$sfile=$config['cron_execution_path']."perltest.$cext";
|
||||
$simplefile=$config['cron_execution_path']."simpletest.$cext";
|
||||
$scriptentry=Realpfad("./").$config['paths']['config'];
|
||||
$cronabsolute=(substr($config['cron_execution_path'],0,1)=="/") ? $_SERVER['DOCUMENT_ROOT'].$scriptdir : Realpfad("./").$scriptdir;
|
||||
$confabsolute=$config['cron_configurationfile'];
|
||||
$scriptref="http://".$_SERVER['SERVER_NAME'].$refdir.$config['cron_execution_path'].'crondump.'.$cext."?config=".$confabsolute;
|
||||
$cronref="perl ".$cronabsolute." config=".$confabsolute;
|
||||
echo headline($lang['fm_dump_header']);
|
||||
if(!is_writable($config['paths']['backup'])) die('<span class="warnung"><strong>ERROR !</strong><br>Backupdir is not writable</span>');
|
||||
|
||||
echo (isset($msg) && $msg!="")?"$msg<br>":"";
|
||||
|
||||
echo $autodel;
|
||||
|
||||
echo $a1.'<td><input class="Formbutton" name="dump" type="submit" value="';
|
||||
echo $lang['fm_startdump'].'"></td>';
|
||||
echo $tbl_abfrage;
|
||||
|
||||
echo '</tr></table>';
|
||||
|
||||
|
||||
echo '</form></div>';
|
||||
|
||||
echo '<h6>'.$lang['fm_dumpsettings'].'</h6><table><tr valign="top"><td width="50%">';
|
||||
|
||||
echo '<table><tr><td>'.$lang['db'].':</td><td class="dumppars"><strong>'.
|
||||
(($config['multi_dump']==1) ?
|
||||
'<div title="'.$toolboxstring.'">Multidump ('.count($databases['multi']).' '.$lang['dbs'].')</div>'
|
||||
:
|
||||
$databases['db_actual'].' <span class="smallgreen">('.$databases['Detailinfo']['tables']." Tables, ".$databases['Detailinfo']['records']." Records, ".byte_output($databases['Detailinfo']['size']).")</span>").'</strong></td></tr>';
|
||||
echo '<tr><td>'.$lang['praefix'].':</td><td class="dumppars">'.(($config['multi_dump']==1) ? '-' : $databases['praefix'][$databases['db_selected_index']]).'</td></tr>';
|
||||
echo '<tr><td>'.$lang['gzip'].':</td><td class="dumppars">'.(($config['compression']==1) ? $lang['activated'] : $lang['not_activated']).'</td></tr>';
|
||||
echo '<tr><td valign="top">'.$lang['multi_part'].':</td><td class="dumppars">'.(($config['multi_part']==1) ? $lang['yes'] : $lang['no']);
|
||||
if($config['multi_part']==1) {
|
||||
echo '<br>'.$lang['multi_part_groesse'].': '.byte_output($config['multipart_groesse']);
|
||||
}
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td>'.$lang['backup_format'].':</td><td class="smallgreen">';
|
||||
$t="";
|
||||
if($config['backup_complete_inserts']==1) $t.=$lang['inserts_complete']." / ";
|
||||
if($config['backup_extended_inserts']==1) $t.=$lang['inserts_extended']." / ";
|
||||
if($config['backup_ignore_inserts']==1) $t.=$lang['inserts_ignore']." / ";
|
||||
if($config['backup_delayed_inserts']==1) $t.=$lang['inserts_delayed']." / ";
|
||||
if($config['backup_lock_tables']==1 && $config['backup_delayed_inserts']==0) $t.=$lang['lock_tables']." / ";
|
||||
$t=($t=="") ? $t=$lang['normal'] : substr($t,0,strlen($t)-3);
|
||||
if($config["backup_downgrade"]==1) $t.='<br>'.htmlspecialchars($lang["downgrade"]);
|
||||
|
||||
echo $t.'</td></tr>';
|
||||
echo '</table></td><td width="50%"><table>';
|
||||
|
||||
if($config['send_mail']==1) {
|
||||
$t=$config['email_recipient'].(($config['send_mail_dump']==1) ? $lang['withattach'] : $lang['withoutattach']);
|
||||
}
|
||||
echo '<tr><td valign="top">'.$lang['send_mail_form'].':</td><td class="dumppars">'.(($config['send_mail']==1) ? $t : $lang['not_activated']);
|
||||
echo '</td></tr> ';
|
||||
|
||||
echo '<tr><td valign="top">'.$lang['ftp_transfer'].':</td><td class="dumppars">'.(($config['ftp_transfer']==1) ? $lang['activated'] : $lang['not_activated']);
|
||||
if($config['ftp_transfer']==1) {
|
||||
echo '<br>Host: '.$config['ftp_server'][$config['ftp_connectionindex']].' Port '.$config['ftp_port'][$config['ftp_connectionindex']].'<br>User: '.$config['ftp_user'][$config['ftp_connectionindex']].' Dir: '.$config['ftp_dir'][$config['ftp_connectionindex']];
|
||||
}
|
||||
echo '<br><div style="display:none"><img src="images/fbd.gif" width="120" height="12" alt=""><br><img src="images/fbs.gif" width="120" height="12" alt=""></div></td></tr> ';
|
||||
|
||||
echo '</table></td></tr></table>';
|
||||
|
||||
|
||||
//crondumpsettings
|
||||
echo '<h6 style="white-space: nowrap;">'.$lang['fm_dumpsettings_cron'].' '.Help("","perl").'</h6>';
|
||||
echo '<span class="smallgreen">'.$lang['perloutput1'].': <strong>'.$scriptentry.'</strong><br>';
|
||||
echo $lang['perloutput2'].': <strong>'.$scriptref.'</strong><br>';
|
||||
echo $lang['perloutput3'].': <strong>'.$cronref.'</strong></span>';
|
||||
|
||||
echo '<table><tr valign="top"><td>';
|
||||
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 "<table><tr><td>".$lang['db'].":</td><td class='crondumppars'><strong>$cron_dbname</strong></td></tr>";
|
||||
echo "<tr><td>".$lang['praefix'].":</td><td class='crondumppars'>$cron_dbpraefix</td></tr> ";
|
||||
echo "<tr><td>".$lang['gzip'].":</td><td class='crondumppars'>".(($config['cron_compression']==1)?$lang['activated']:$lang['not_activated'])."</td></tr> ";
|
||||
echo "<tr><td valign=\"top\">".$lang['multi_part'].":</td><td class='crondumppars'>".(($config['multi_part']==1)?$lang['yes']:$lang['no']);
|
||||
if($config['multi_part']==1) {
|
||||
echo "<br>".$lang['multi_part_groesse'].": ".byte_output($config['multipart_groesse']);
|
||||
}
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td>'.$lang['cron_printout'].':</td><td class="crondumppars">'.(($config['cron_printout']==1)?$lang['activated']:$lang['not_activated']).'</td></tr>';
|
||||
|
||||
|
||||
echo "</table></td><td><table>";
|
||||
|
||||
if($config['cron_mail']==1) {
|
||||
$t=$config['email_recipient'].(($config['cron_mail_dump']==1) ? $lang['withattach'] : $lang['withoutattach']);
|
||||
}
|
||||
echo "<tr><td valign=\"top\">".$lang['send_mail_form'].":</td><td class='crondumppars'>".(($config['cron_mail']==1)?$t:$lang['not_activated']);
|
||||
|
||||
echo "</td></tr> ";
|
||||
|
||||
echo "<tr><td valign=\"top\">".$lang['ftp_transfer'].":</td><td class='crondumppars'>".(($config['cron_ftp']==1)?$lang['activated']:$lang['not_activated']);
|
||||
if($config['cron_ftp']==1) {
|
||||
echo "<br>Host: ".$config['ftp_server'][$config['ftp_connectionindex']]." Port ".$config['ftp_port'][$config['ftp_connectionindex']]."<br>User: ".$config['ftp_user'][$config['ftp_connectionindex']]." Dir: ".$config['ftp_dir'][$config['ftp_connectionindex']];
|
||||
}
|
||||
echo "</td></tr>";
|
||||
echo '<tr><td colspan="2"><input class="Formbutton_small" type="Button" name="DoCronscript" value="'.$lang['DoCronButton'].'" onclick="self.location.href=\''.$scriptref.'\'"> ';
|
||||
echo '<input class="Formbutton_small" type="Button" name="DoPerlTest" value="'.$lang['DoPerlTest'].'" onclick="self.location.href=\''.$sfile.'\'"> ';
|
||||
echo '<input class="Formbutton_small" type="Button" name="DoSimpleTest" value="'.$lang['DoSimpleTest'].'" onclick="self.location.href=\''.$simplefile.'\'"></td></tr>';
|
||||
|
||||
echo "</table></td></tr></table><br>";
|
||||
|
||||
//echo '<div class="verysmall" style="color:green;">'.$lang['phpcrondesc'].'</div>';
|
||||
break;
|
||||
|
||||
case "restore":
|
||||
echo headline($lang['fm_restore_header'].$databases['db_actual'].$lang['fm_restore_header2']);
|
||||
echo (isset($msg) && $msg!="")?"$msg<br>":"";
|
||||
echo $autodel;
|
||||
echo $a1.$td.'<input class="Formbutton" name="restore" type="submit" value="'.$lang['fm_restore'].'" onclick="if (!confirm(\''.$lang['fm_alertrestore1'].' `'.$databases['db_actual'].'` '.$lang['fm_alertrestore2'].' `\' + GetSelectedFilename() + \'` '.$lang['fm_alertrestore3'].'\')) return false;"></td>';
|
||||
|
||||
//echo '</tr></table>'.$tbl_abfrage.'</div>';
|
||||
echo '</tr></table></div><br>';
|
||||
echo FileList().'</form>';
|
||||
break;
|
||||
case "files":
|
||||
$sysfedit=(isset($_POST['sysfedit'])) ? 1 : 0;
|
||||
$sysfedit=(isset($_GET['sysfedit'])) ? $_GET['sysfedit'] : $sysfedit;
|
||||
echo headline($lang['file_manage']);
|
||||
echo (isset($msg) && $msg!="") ? $msg.'<br>' : '';
|
||||
echo $autodel;
|
||||
echo $a1.'<input type="hidden" name="svice" value="'.$svice.'">';
|
||||
echo $td.br().'<input class="Formbutton" name="delete" type="submit" value="'.$lang['fm_delete'].'" onclick="if (!confirm(\''.$lang['fm_askdelete1'].'`\' + GetSelectedFilename() + \'`'.$lang['fm_askdelete2'].'\')) return false;"></td>'.br();
|
||||
echo $td.br().'<input class="Formbutton" name="deleteauto" type="submit" value="'.$lang['fm_deleteauto'].'" onclick="if (!confirm(\''.$lang['fm_askdelete3'].'\')) return false;"></td>'.br();
|
||||
echo $td.br().'<input class="Formbutton" name="deleteall" type="submit" value="'.$lang['fm_deleteall'].'" onclick="if (!confirm(\''.$lang['fm_askdelete4'].'\')) return false;"></td>'.br();
|
||||
echo $td.br().'<input class="Formbutton" name="deleteallfilter" type="submit" value="'.$lang['fm_deleteallfilter'].$databases['db_actual'].$lang['fm_deleteallfilter2'].'" onclick="if (!confirm(\''.$lang['fm_askdelete5'].$databases['db_actual'].$lang['fm_askdelete5_2'].'\')) return false;"></td>'.br();
|
||||
if(isset($svice) && $svice==1) echo $td.br().'<input class="Menubutton2" name="sysfedit" type="submit" value="Service"></td>'.br();
|
||||
echo '</tr>'.br().'</table>'.br().'<br>'.br();
|
||||
|
||||
if($sysfedit==0) echo FileList().'</form></div>'.br().$ul.'<br>'.br().'<br>'.br();
|
||||
else {
|
||||
echo '</form></div>'.br().'<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 '<h5>Save: '.$savefile.' - Länge '.strlen($savetext).'</h5>';
|
||||
if(!is_writable($savefile)) echo "Kann nicht speichern !"; else {
|
||||
if ($fp=fopen($savefile, "wb"))
|
||||
{
|
||||
fwrite($fp,$savetext);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo SYS_editor($dir,$fname);
|
||||
}
|
||||
echo '<a href="filemanagement.php?action=convert">'.$lang["converter"].'</a>';
|
||||
break;
|
||||
case "convert":
|
||||
// Konverter
|
||||
echo headline($lang["converter"]);
|
||||
echo '<br><br><form action="filemanagement.php?action=convert" method="post">';
|
||||
echo '<table border="1" rules="all"><tr><td colspan="2" class="hd">'.$lang["convert_title"].'</td></tr>';
|
||||
echo '<tr><td>'.$lang["convert_file"].'</td><td>'.FilelisteCombo($config["paths"]["backup"],$selectfile).'</td></tr>';
|
||||
echo '<tr><td>'.$lang["convert_filename"].':</td><td><input type="text" name="destfile" size="50" value="'.$destfile.'"></td></tr>';
|
||||
echo '<tr><td><input type="checkbox" name="compressed" value="1" '.(($compressed==1) ? "checked" : "").'>'.$lang["compressed"].'</td><td><input type="submit" name="startconvert" value=" Konvertierung starten "></td></tr>';
|
||||
echo '</table></form><br>';
|
||||
if(isset($_POST["startconvert"])) {
|
||||
$destfile.=($compressed==1) ? ".sql.gz" : ".sql";
|
||||
echo $lang["converting"]." $selectfile ==> $destfile<br>";
|
||||
|
||||
if($selectfile!="" && file_exists($config["paths"]["backup"].$selectfile) && strlen($destfile)>7) {
|
||||
Converter($selectfile,$destfile,$compressed);
|
||||
}
|
||||
else echo $lang["convert_wrong_parameters"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo '<br><br>'.br(3);
|
||||
echo MSDFooter();
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
18
frameset.php
Normale Datei
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
"http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="Author" content="Daniel Schlichtholz in 2004">
|
||||
<title>MySQLDumper</title>
|
||||
</head>
|
||||
<frameset rows="1,*" frameborder="0" framespacing="0" border="0">
|
||||
<frame name="msd_action" src="<? echo ($_GET["action"]=="dump") ? "dump.php" : "restore.php?filename=".$_GET["filename"]."&kind=".$_GET["kind"]; ?>" scrolling="auto" noresize frameborder="0">
|
||||
<frame name="msd_ausgabe" src="" scrolling="auto" frameborder="0">
|
||||
<noframes>
|
||||
<body>
|
||||
You need to get a newer browser!
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
BIN
images/ardown.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 859 B |
BIN
images/arrowdown.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 65 B |
BIN
images/arrowleft.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 878 B |
BIN
images/arrowup.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 64 B |
BIN
images/arup.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 857 B |
BIN
images/blank.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 43 B |
BIN
images/close.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 880 B |
BIN
images/delete.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 861 B |
BIN
images/edit.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 901 B |
BIN
images/empty.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 861 B |
BIN
images/emptykeys.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 864 B |
BIN
images/fbd.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 502 B |
BIN
images/fbr.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 471 B |
BIN
images/fbs.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 484 B |
BIN
images/fulltext.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1,3 KiB |
BIN
images/germany.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 158 B |
BIN
images/gz.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1,4 KiB |
BIN
images/help16.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 147 B |
BIN
images/help32.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 252 B |
BIN
images/key.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 489 B |
BIN
images/konqueror.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 285 B |
BIN
images/logo.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 6,5 KiB |
BIN
images/mozilla.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 289 B |
BIN
images/msie.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 314 B |
BIN
images/nokey.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1,3 KiB |
BIN
images/notok.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 900 B |
BIN
images/ok.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 905 B |
BIN
images/omniweb.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 355 B |
BIN
images/openfile.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 941 B |
BIN
images/opera.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 284 B |
BIN
images/primary.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1,3 KiB |
BIN
images/rename.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 296 B |
BIN
images/safari.png
Normale Datei
Nachher Breite: | Höhe: | Größe: 324 B |
BIN
images/slider.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 235 B |
BIN
images/track.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 195 B |
BIN
images/unique.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 1,3 KiB |
BIN
images/usa.gif
Normale Datei
Nachher Breite: | Höhe: | Größe: 206 B |
19
inc/footer.php
Normale Datei
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
$svice=(isset($_GET["svice"])) ? $_GET["svice"] : 0;
|
||||
$config_array=(isset($config)) ? "<strong>CONFIG</strong><pre>".@print_r($config,true)."</pre>": "";
|
||||
$database_array=(isset($database)) ? "<strong>DATABASE</strong><pre>".@print_r($database,true)."</pre>": "";
|
||||
$dump_array=(isset($dump)) ? "<strong>DUMP</strong><pre>".@print_r($dump,true)."</pre>": "";
|
||||
$restore_array=(isset($restore)) ? "<strong>RESTORE</strong><pre>".@print_r($restore,true)."</pre>" : "";
|
||||
|
||||
echo '<p align="center" class="small">'.$lang['authors'].':
|
||||
<a class="small" href="http://www.daniel-schlichtholz.de" target="_new">
|
||||
Daniel Schlichtholz & Steffen Kamper</a> - Infoboard:
|
||||
<a class="small" href="'.$config["homepage"].'" target="_blanc">'.
|
||||
$config["homepage"].'</a></p>';
|
||||
|
||||
if($svice==1) echo '<table width="100%"><tr bgcolor="#808080"><td>'.$config_array.'</td></tr><tr bgcolor="#808080"><td>'.$database_array.'</td></tr><tr bgcolor="#808080"><td>'.$dump_array.'</td></tr><tr bgcolor="#808080"><td>'.$restore_array.'</td></tr></table>';
|
||||
echo '</div></BODY></HTML>';
|
||||
|
||||
|
||||
?>
|
369
inc/functions.php
Normale Datei
|
@ -0,0 +1,369 @@
|
|||
<?php
|
||||
|
||||
include_once("inc/functions_global.php");
|
||||
include_once("inc/mysql.php");
|
||||
|
||||
function Help($ToolTip,$Anker,$imgsize=12)
|
||||
{
|
||||
global $config;
|
||||
if($Anker!=""){
|
||||
return '<a href="language/'.$config["language"].'/help.php#'.$Anker.'" titel="'.$ToolTip.'"><img src="images/help16.gif" width="'.$imgsize.'" height="'.$imgsize.'" hspace="'.($imgsize/4).'" vspace="0" border="0"></a>';
|
||||
} else {
|
||||
return '<img src="images/help16.gif" width="'.$imgsize.'" height="'.$imgsize.'" alt="Help" title="'.$ToolTip.'" border="0" hspace="'.($imgsize/4).'" vspace="0">';
|
||||
}
|
||||
}
|
||||
|
||||
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"];
|
||||
|
||||
if($load_default==true){
|
||||
@unlink($config["files"]["parameter"]);
|
||||
include("./config.php");
|
||||
$config["language"]=$old_lang;
|
||||
include("language/".$config["language"]."/lang.php");
|
||||
}
|
||||
|
||||
//DB-Liste holen
|
||||
MSD_mysql_connect();
|
||||
|
||||
$databases["db_selected_index"]=-1;
|
||||
if($config["dbonly"]!="") {
|
||||
if(mysql_select_db($config["dbonly"],$config["dbconnection"])) {
|
||||
$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 die(SQLError("Datenbankverbindung","Datenbank ".$config["dbonly"]." existiert nicht !"));
|
||||
} 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`<br>";
|
||||
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='<?php '.$nl;
|
||||
if(!isset($config["email_maxsize"])) $config["email_maxsize"]=$config["email_maxsize1"]*(($config["email_maxsize2"]==1) ? 1024 : 1024*1024);
|
||||
if(!isset($config["cron_execution_path"])) $config["cron_execution_path"]="msd_cron/";
|
||||
if($as==0) $config["paths"]["root"]=addslashes(Realpfad("./"));
|
||||
foreach($config as $var => $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" && $var != "ram") $pars_all.='$config["'."$var\"] = \"".addslashes($val)."\";$nl";
|
||||
} else {
|
||||
if($var != "dbconnection" && $var != "version" && $var != "ram") $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;
|
||||
@chmod($config["files"]["parameter"], 0777);
|
||||
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"].(($config["logcompression"]==1) ? '.gz':'');
|
||||
$p3=$r.$config["files"]["perllogcomplete"].(($config["logcompression"]==1) ? '.gz':'');
|
||||
//$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="'.$p1.'";'.$nl;
|
||||
$cronscript.='$logdatei="'.$p2.'";'.$nl;
|
||||
$cronscript.='$completelogdatei="'.$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="'.str_replace("@","\@",$config["email_recipient"]).'";'.$nl;
|
||||
$cronscript.='$cronmailfrom="'.str_replace("@","\@",$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.='$logcompression='.$config["logcompression"].';'.$nl;
|
||||
$cronscript.='$log_maxsize='.$config["log_maxsize"].';'.$nl;
|
||||
$cronscript.='$backup_complete_inserts='.$config["backup_complete_inserts"].';'.$nl;
|
||||
$cronscript.='$backup_extended_inserts='.$config["backup_extended_inserts"].';'.$nl;
|
||||
$cronscript.='$backup_delayed_inserts='.$config["backup_delayed_inserts"].';'.$nl;
|
||||
$cronscript.='$backup_ignore_inserts='.$config["backup_ignore_inserts"].';'.$nl;
|
||||
$cronscript.='$backup_lock_tables='.$config["backup_lock_tables"].';'.$nl;
|
||||
$cronscript.='$complete_log='.$config["cron_completelog"].';'.$nl;
|
||||
$cronscript.='1;';
|
||||
|
||||
|
||||
//Datei öffnen und schreiben
|
||||
$ret=true;
|
||||
|
||||
|
||||
|
||||
$ext=($config["cron_extender"]==0) ? "pl" : "cgi";
|
||||
|
||||
$sfile=$config["paths"]["config"].$config["cron_configurationfile"];
|
||||
|
||||
@chmod("$sfile",0777);
|
||||
if ($fp=fopen($sfile, "wb"))
|
||||
{
|
||||
if (!fwrite($fp,$cronscript)) $ret=false;
|
||||
if (!fclose($fp)) $ret=false;
|
||||
}
|
||||
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 LogFileInfo($logcompression) {
|
||||
global $config;
|
||||
|
||||
$l=Array();$sum=$s=$l["log_size"]=$l["perllog_size"]=$l["perllogcomplete_size"]=$l["errorlog_size"]=$l["log_totalsize"]=0;
|
||||
if($logcompression==1) {
|
||||
$l["log"]=$config["files"]["log"].".gz";
|
||||
$l["perllog"]=$config["files"]["perllog"].".gz";
|
||||
$l["perllogcomplete"]=$config["files"]["perllogcomplete"].".gz";
|
||||
$l["errorlog"]=$config["paths"]["log"]."error.log.gz";
|
||||
} else {
|
||||
$l["log"]=$config["files"]["log"];
|
||||
$l["perllog"]=$config["files"]["perllog"];
|
||||
$l["perllogcomplete"]=$config["files"]["perllogcomplete"];
|
||||
$l["errorlog"]=$config["paths"]["log"]."error.log";
|
||||
}
|
||||
$l["log_size"]+=@filesize($l["log"]);$sum+=$l["log_size"];
|
||||
$l["perllog_size"]+=@filesize($l["perllog"]);$sum+=$l["perllog_size"];
|
||||
$l["perllogcomplete_size"]+=@filesize($l["perllogcomplete"]);$sum+=$l["perllogcomplete_size"];
|
||||
$l["errorlog_size"]+=@filesize($l["errorlog"]);$sum+=$l["errorlog_size"];
|
||||
$l["log_totalsize"]+=$sum;
|
||||
|
||||
|
||||
return $l;
|
||||
}
|
||||
|
||||
function DeleteLog()
|
||||
{
|
||||
global $config;
|
||||
//Datei öffnen und schreiben
|
||||
$log=date("d.m.Y h:i:s").": Log created.\n";
|
||||
if($config["logcompression"]==1) {
|
||||
$fp = @gzopen($config["files"]["log"].'.gz', "wb");
|
||||
@gzwrite ($fp,$log);
|
||||
@gzclose ($fp);
|
||||
@chmod($config["files"]["log"].'.gz',0755);
|
||||
} else {
|
||||
$fp = @fopen($config["files"]["log"], "wb");
|
||||
@fwrite ($fp,$log);
|
||||
@fclose ($fp);
|
||||
@chmod($config["files"]["log"],0755);
|
||||
}
|
||||
}
|
||||
|
||||
function SwitchLogfileFormat()
|
||||
{
|
||||
global $config;
|
||||
$del=DeleteFilesM($config["paths"]["log"],"*");
|
||||
DeleteLog();
|
||||
}
|
||||
|
||||
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.='<a '.((is_writable($filename)) ? '' : 'class="swarnung"').' href="'.$ref.'&dir='.$dir.'&filename='.$filename.'">'.$filename.'</a> ';
|
||||
$i++;if(($i % 4)==1) $f.='<br>';
|
||||
}
|
||||
} elseif($dir>0 && $fname!="") {
|
||||
$dirname=$dirs[$dir];
|
||||
$text=implode("",file($dirname.$fname));
|
||||
}
|
||||
|
||||
|
||||
$r='<form action="'.$ref.'" method="post"><table border="1" rules="rows"><tr><td class="hd" colspan="2">Files in ';
|
||||
$r.='<a href="'.$ref.'&dir=1">./</a> ';
|
||||
$r.='<a href="'.$ref.'&dir=2">inc</a> ';
|
||||
$r.='<a href="'.$ref.'&dir=3">msd_cron</a> ';
|
||||
$r.='<a href="'.$ref.'&dir=4">language</a> ';
|
||||
$r.='<a href="'.$ref.'&dir=5">config</a> ';
|
||||
$r.='</td></tr>'.((!empty($f)) ? '<tr><td colspan="2">'.$f.'</td></tr>' : '');
|
||||
if($fname!="") $r.='<tr><td colspan="2" class="hd" align="center"><strong>File `'.$fname.'`</strong></td></tr>';
|
||||
$r.='<tr><td><input type="reset" name="rest" value=" reset "></td><td><input type="submit" name="fedit_save" value=" save "></tr>';
|
||||
$r.='<tr><td colspan="2" align="center"><input type="hidden" name="edit_filename" value="'.$fname.'"><input type="hidden" name="dir" value="'.$dir.'">';
|
||||
|
||||
$r.='<textarea name="editor" style="width:740px;height:500px;overflow:auto;">'.$text.'</textarea></td></tr></table></form>';
|
||||
|
||||
return $r;
|
||||
}
|
||||
?>
|
461
inc/functions_dump.php
Normale Datei
|
@ -0,0 +1,461 @@
|
|||
<?php
|
||||
include_once("inc/functions_global.php");
|
||||
|
||||
function new_file($last_groesse=0)
|
||||
{
|
||||
global $dump,$databases,$config,$out,$lang,$nl,$mysql_commentstring;
|
||||
|
||||
|
||||
// Dateiname aus Datum und Uhrzeit bilden
|
||||
if ($dump["part"]-$dump["part_offset"]==1) $dump["filename_stamp"]=date("Y_m_d_H_i",time());
|
||||
if ($config["multi_part"]==1) {
|
||||
$dateiname=$databases["Name"][$dump["dbindex"]]."_".$dump["filename_stamp"]."_part_".($dump["part"]-$dump["part_offset"]);
|
||||
} else
|
||||
$dateiname=$databases["Name"][$dump["dbindex"]]."_".date("Y_m_d_H_i",time());
|
||||
$structurefilename=$databases["Name"][$dump["dbindex"]]."_structure_file";
|
||||
$endung= ($config["compression"]) ? ".sql.gz" : ".sql";
|
||||
$dump["backupdatei"]=$dateiname.$endung;
|
||||
$dump["backupdatei_structure"]=$structurefilename.$endung;
|
||||
|
||||
if (file_exists($config["paths"]["backup"].$dump["backupdatei"])) unlink($config["paths"]["backup"].$dump["backupdatei"]);
|
||||
if($config["multi_part"]==0 || ($config["multi_part"]==1 && ($dump["part"]-$dump["part_offset"])==1)) {
|
||||
if (file_exists($config["paths"]["structure"].$dump["backupdatei_structure"])) unlink($config["paths"]["structure"].$dump["backupdatei_structure"]);
|
||||
}
|
||||
$cur_time=date("Y-m-d H:i");
|
||||
$statuszeile=GetStatusLine().$nl.$mysql_commentstring." Dump by MySQLDump ".MSD_VERSION." (".$config["homepage"].")".$nl;
|
||||
|
||||
if ($dump["part"]-$dump["part_offset"]==1)
|
||||
{
|
||||
if($config["multi_part"]==0) {
|
||||
if($config["multi_dump"]==1) WriteLog("starting Multidump with ".count($databases["multi"])." Datenbases.");
|
||||
WriteLog("Start Dump '".$dump["backupdatei"]."'");
|
||||
} else {
|
||||
WriteLog("Start Multipart-Dump '$dateiname'");
|
||||
}
|
||||
$out.="<strong>".$lang['startdump']."`".$databases["Name"][$dump["dbindex"]]."`</strong>".(($databases["praefix"][$dump["dbindex"]]!="") ?' ('.$lang["withpraefix"].' <span style="color:blue">'.$databases["praefix"][$dump["dbindex"]].'</span>)' : '')."... ";
|
||||
ExecuteCommand("b");
|
||||
if($dump["part"]==1) {
|
||||
$dump["table_offset"]=0;
|
||||
$dump["countdata"]=0;
|
||||
}
|
||||
// Seitenerstaufruf -> Backupdatei anlegen
|
||||
|
||||
$dump["data"]=$statuszeile.$mysql_commentstring.' Dump created at '.$cur_time.$nl.$nl;
|
||||
$dump["structure"]="$mysql_commentstring Status:0:0::".$databases["Name"][$dump["dbindex"]];
|
||||
$dump["structure"].=":php:".MSD_VERSION.$nl;
|
||||
$dump["structure"].="$mysql_commentstring Dump by MySQLDump ".MSD_VERSION." (".$config["homepage"].")".$nl;
|
||||
$dump["structure"].="$mysql_commentstring Dump created on ".$cur_time.$nl."$mysql_commentstring This file is only the structure of the database without data \n\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.$mysql_commentstring.' 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,$mysql_commentstring;
|
||||
|
||||
$t_array=explode("|",$databases["db_actual_tableselected"]);
|
||||
$t=0;
|
||||
$r=0;
|
||||
$mp="";$t_zeile="$mysql_commentstring\n$mysql_commentstring TABLE-INFO\n";
|
||||
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.="$mysql_commentstring TABLE|".$erg["Name"]."|".$erg["Rows"]."|".($erg["Data_length"]+$erg["Index_length"])."|".$erg["Update_time"]."\n";
|
||||
}
|
||||
}
|
||||
$dump["totalrecords"]=$r;
|
||||
if($config["multi_part"]==1) $mp="MP_".($dump["part"]-$dump["part_offset"]);
|
||||
return "$mysql_commentstring Status:$t:$r:$mp:".$databases["Name"][$dump["dbindex"]].":$kind:".MSD_VERSION.":".$dump["kommentar"].":EXTINFO\n".$t_zeile."$mysql_commentstring"."EOF TABLE-INFO\n$mysql_commentstring\n\n";
|
||||
}
|
||||
|
||||
// Liest die Eigenschaften der Tabelle aus der DB und baut die CREATE-Anweisung zusammen
|
||||
function get_def($db, $table,$withdata=1)
|
||||
{
|
||||
global $config,$nl,$mysql_commentstring;
|
||||
|
||||
$def = "\n\n$mysql_commentstring\n$mysql_commentstring Create Table `$table`\n$mysql_commentstring\n\nDROP TABLE IF EXISTS `$table`;\n";
|
||||
mysql_select_db($db);
|
||||
$result = mysql_query("SHOW CREATE TABLE `$table`",$config["dbconnection"]);
|
||||
$row=mysql_fetch_row($result);
|
||||
$def .= (($config["backup_downgrade"]==1) ? DownGrade($row[1],false) : $row[1].";")."\n\n";
|
||||
if($withdata==1) {
|
||||
$def.="$mysql_commentstring\n$mysql_commentstring Data for Table `$table`\n$mysql_commentstring\n\n";
|
||||
if($config["backup_delayed_inserts"]==0) $def.="/*!40000 ALTER TABLE `$table` DISABLE KEYS */;".$nl;
|
||||
if($config["backup_lock_tables"]==1 && $config["backup_delayed_inserts"]==0) $def.="LOCK TABLES `$table` WRITE;\n\n";
|
||||
}
|
||||
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="";
|
||||
$delayed=(isset($config["backup_delayed_inserts"]) && $config["backup_delayed_inserts"]==1) ? "DELAYED " : "";
|
||||
$complete=(isset($config["backup_complete_inserts"]) && $config["backup_complete_inserts"]==1) ? Fieldlist($db,$table)." " : "";
|
||||
$ignore=(isset($config["backup_ignore_inserts"]) && $config["backup_ignore_inserts"]==1) ? "IGNORE " : "";
|
||||
|
||||
$table_ready=0;
|
||||
$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);
|
||||
$first=1;
|
||||
|
||||
//$dump["countdata"]+=$ergebnisse;
|
||||
if ($ergebnisse>$dump["restzeilen"])
|
||||
{
|
||||
$dump["zeilen_offset"]+=$dump["restzeilen"];
|
||||
$ergebnisse--;
|
||||
$dump["restzeilen"]=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dump["table_offset"]++;
|
||||
$dump["zeilen_offset"]=0;
|
||||
$dump["restzeilen"]=$dump["restzeilen"]-$ergebnisse;
|
||||
$table_ready=1;
|
||||
}
|
||||
$ax=0;
|
||||
for ($x=0;$x<$ergebnisse;$x++)
|
||||
{
|
||||
$row=mysql_fetch_row($result);
|
||||
$ax++;
|
||||
{
|
||||
if($config["backup_extended_inserts"]==0 || ($config["backup_extended_inserts"]==1 && $first==1 && $ax==1) ) {
|
||||
$insert = "INSERT ".$delayed.$ignore."INTO `$table` ".$complete."VALUES (";
|
||||
$first=0;
|
||||
} else $insert="(";
|
||||
|
||||
$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);
|
||||
if(strlen($dump["data"])>400000 || $x==($ergebnisse-1)) {
|
||||
$ax=0;$first=1;
|
||||
}
|
||||
$insert .= ($config["backup_extended_inserts"]==0 || $x==($ergebnisse-1) || $ax==0) ? ");\n" : "),";
|
||||
$dump["data"] .= $insert;
|
||||
$dump["countdata"]++;
|
||||
if(strlen($content)>$config["memory_limit"] || ($config["multi_part"]==1 && strlen($content)>$config["multipart_groesse"]) ) {
|
||||
WriteToDumpFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($table_ready==1 && $config["backup_lock_tables"]==1 && $config["backup_delayed_inserts"]==0) $dump["data"].="\nUNLOCK TABLES;";
|
||||
if($table_ready==1 && $config["backup_delayed_inserts"]==0) $dump["data"].="\n/*!40000 ALTER TABLE `$table` ENABLE KEYS */;\n\n";
|
||||
|
||||
|
||||
mysql_free_result($result);
|
||||
}
|
||||
|
||||
function WriteToDumpFile()
|
||||
{
|
||||
global $config,$dump;
|
||||
$dump["filesize"]=0;
|
||||
|
||||
$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="<br>";
|
||||
} 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;$i<count($cad);$i++) {
|
||||
if($cad[$i]) $result .= @mysql_query($cad[$i],$config["dbconnection"]);
|
||||
}
|
||||
} else {
|
||||
$result = @mysql_query($cd,$config["dbconnection"]);
|
||||
}
|
||||
if(!$result) {
|
||||
WriteLog("Error while executing Query $cap ($cd) : ".mysql_error());
|
||||
ErrorLog("Command ".$cap,$databases["Name"][$dump["dbindex"]],$cd,mysql_error());
|
||||
$dump["errors"]++;
|
||||
$out.=$lf.'<span class=smallwarnung>ERROR executing Query '.$cap.'</span><br>';
|
||||
} else {
|
||||
WriteLog("executing Query $cap ($cd) was successful");
|
||||
$out.=$lf.'<span class=smallblue>executing Query '.$cap.' was successful</span><br>';
|
||||
}
|
||||
} 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.'<span class=smallwarnung>ERROR executing System Command '.$cap.'</span><br>';
|
||||
} else {
|
||||
WriteLog("executing System Command $cap was successful. [$returnval]");
|
||||
$out.=$lf.'<span class=smallblue>executing System Command '.$cap.' was successful</span><br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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 = sprintf($lang["emailbody_toobig"],byte_output($config["email_maxsize"]),$databases["Name"][$dump["dbindex"]],"$file (".byte_output(filesize($config["paths"]["backup"].$file)).")<br>");
|
||||
} else {
|
||||
$msg_body = sprintf($lang["emailbody_noattach"],$databases["Name"][$dump["dbindex"]],"$file (".byte_output(filesize($config["paths"]["backup"].$file)).")");
|
||||
}
|
||||
$email_log="Email sent to '".$config["email_recipient"]."'";
|
||||
$email_out=$lang["email_was_send"]."`".$config["email_recipient"]."`<br>";
|
||||
} else {
|
||||
//alles ok, anhang generieren
|
||||
$msg_body = sprintf($lang["emailbody_attach"],$databases["Name"][$dump["dbindex"]],"$file (".byte_output(filesize($config["paths"]["backup"].$file)).")");
|
||||
$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/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"]."`.<br>";
|
||||
}
|
||||
} else {
|
||||
//Multipart
|
||||
$mp_sub="Backup '".$databases["Name"][$dump["dbindex"]]."' - ".date("d\.m\.Y",time());
|
||||
$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";
|
||||
$dateistamm=substr($dump["backupdatei"],0,strrpos($dump["backupdatei"],"part_"))."part_";
|
||||
$dateiendung=($config["compression"]==1)?".sql.gz":".sql";
|
||||
$mpdatei=Array();
|
||||
$mpfiles="";
|
||||
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]));
|
||||
$mpfiles.=$mpdatei[$i-1]." (".$sz.")<br>";
|
||||
}
|
||||
$msg_body = ($config["send_mail_dump"]==1) ? sprintf($lang["emailbody_mp_attach"],$databases["Name"][$dump["dbindex"]],$mpfiles) : sprintf($lang["emailbody_mp_noattach"],$databases["Name"][$dump["dbindex"]],$mpfiles);
|
||||
$email_log="Email was sent to '".$config["email_recipient"]."'";
|
||||
$email_out=$lang["email_was_send"]."`".$config["email_recipient"]."`<br>";
|
||||
}
|
||||
if (@mail($config["email_recipient"], stripslashes($subject), $msg_body, $header)) {
|
||||
$out.= '<span class="smallbrown">'.$email_out.'</span>';
|
||||
WriteLog("$email_log");
|
||||
} else {
|
||||
$out.='<span class="smallwarnung">'.$lang["mailerror"].'</span><br>';
|
||||
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<count($mpdatei);$i++) {
|
||||
$file_name=$mpdatei[$i];
|
||||
$file_type = filetype($config["paths"]["backup"].$mpdatei[$i]);
|
||||
$file_size = filesize($config["paths"]["backup"].$mpdatei[$i]);
|
||||
$fp = fopen($config["paths"]["backup"].$mpdatei[$i], "r");
|
||||
$contents = fread($fp, $file_size);
|
||||
$encoded_file = chunk_split(base64_encode($contents));
|
||||
fclose($fp);
|
||||
$subject =$mp_sub. " [Part ".($i+1)." / ".count($mpdatei)."]";
|
||||
$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/html\n";
|
||||
$body_top.= "Content-transfer-encoding: 7BIT\n";
|
||||
$body_top.= "Content-description: Mail message body\n\n";
|
||||
$msg_body = $body_top.$lang['email_only_attachment'].$lang['emailbody_footer'];
|
||||
$msg_body.= "\n\n--Message-Boundary\n";
|
||||
$msg_body.= "Content-type: $file_type; name=\"".$mpdatei[$i]."\"\n";
|
||||
$msg_body.= "Content-Transfer-Encoding: BASE64\n";
|
||||
$msg_body.= "Content-disposition: attachment; filename=\"".$mpdatei[$i]."\"\n\n";
|
||||
$msg_body.= "$encoded_file\n";
|
||||
$msg_body.= "--Message-Boundary--\n";
|
||||
$email_log="Email with $mpdatei[$i] was sent to '".$config["email_recipient"]."'";
|
||||
$email_out=$lang["email_was_send"]."`".$config["email_recipient"]."`".$lang['with']."`".$mpdatei[$i]."`.<br>";
|
||||
|
||||
if (@mail($config["email_recipient"], stripslashes($subject), $msg_body, $header)) {
|
||||
$out.= '<span class="smallbrown">'.$email_out.'</span>';
|
||||
WriteLog("$email_log");
|
||||
} else {
|
||||
$out.='<span class="smallwarnung">'.$lang["mailerror"].'</span><br>';
|
||||
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.='<span class="smallgreen">'."file sent via FTP (".$dump["backupdatei"]." => ".$config["ftp_server"][$config["ftp_connectionindex"]].")</span><br><br>";
|
||||
}
|
||||
|
||||
function SendViaFTP($source_file,$conn_msg=1)
|
||||
{
|
||||
global $config,$out,$lang;
|
||||
flush();
|
||||
if($conn_msg==1) $out.='<span class="smallgreen" style="padding-left:20px;">'.$lang['filesendftp']."(".$config["ftp_server"][$config["ftp_connectionindex"]]." - ".$config["ftp_user"][$config["ftp_connectionindex"]].")</span><br>";
|
||||
|
||||
|
||||
// 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.= '<span class="smallwarnung" style="padding-left:20px;">'.$lang['ftpconnerror'].$config["ftp_server"][$config["ftp_connectionindex"]].$lang['ftpconnerror1'].$config["ftp_user"][$config["ftp_connectionindex"]].$lang['ftpconnerror2'].'</span><br>';
|
||||
exit;
|
||||
} else {
|
||||
if($conn_msg==1) $out.= '<span class="smallgreen" style="padding-left:20px;">'.$lang['ftpconnected1'].$config["ftp_server"][$config["ftp_connectionindex"]].$lang['ftpconnerror1'].$config["ftp_user"][$config["ftp_connectionindex"]].'</span><br>';
|
||||
}
|
||||
|
||||
// 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.= '<span class="smallwarnung">'.$lang['ftpconnerror3']."<br>($source -> $dest)</span><br>";
|
||||
} else {
|
||||
$out.= '<span class="smallgreen" style="padding-left:20px;">'.$lang['file'].' <a href="'.$config["paths"]["backup"].$source_file.'" class="smallblack">'.$source_file.'</a>'.$lang['ftpconnected2'].$config["ftp_server"][$config["ftp_connectionindex"]].$lang['ftpconnected3'].'</span><br>';
|
||||
WriteLog("'$source_file' sent via FTP.");
|
||||
}
|
||||
|
||||
// Schließen des FTP-Streams
|
||||
@ftp_quit($conn_id);
|
||||
}
|
||||
?>
|
322
inc/functions_files.php
Normale Datei
|
@ -0,0 +1,322 @@
|
|||
<?php
|
||||
function FilelisteCombo($fpath,$selected) {
|
||||
$r='<select name="selectfile">';
|
||||
$r.='<option value="" '.(($selected=="") ? "SELECTED" : "").'></option>';
|
||||
|
||||
$dh = opendir($fpath);
|
||||
while (false !== ($filename = readdir($dh)))
|
||||
{
|
||||
if ($filename != "." && $filename != ".." && !is_dir($fpath.$filename)) {
|
||||
$r.='<option value="'.$filename.'" ';
|
||||
if($filename==$selected) $r.=' SELECTED';
|
||||
$r.='>'.$filename.'</option>'."\n";
|
||||
}
|
||||
}
|
||||
$r.='</select>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
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.='<div align="center">'.br().$lang['fm_choose_file'].br();
|
||||
$fl.='<span id="gd" style="color:#330099; font-weight:bold;"> </span>'.br().'<br><br>';
|
||||
|
||||
$fl.='<table border="1" rules="rows" align="center" width="80%" cellpadding="0" cellspacing="0">'.br();
|
||||
$fl.='<tr>'.br().'<td colspan="7" align="left"><strong>'.$Theader.'</strong></td>'.br().'<td colspan="3" align="right"><a href="filemanagement.php?action='.$action.'&kind='.$akind.'" class="small">'.$Wheader.'</a></td>'.br().'</tr>'.br();
|
||||
|
||||
//Tableheader
|
||||
$fl.='<tr>'.br().'<td colspan="2" class="hd">'.$lang['db'].'</td>'.br().'
|
||||
<td class="hd">gz</td>'.br().'
|
||||
<td class="hd">Script</td>'.br().'
|
||||
<td class="hd">'.$lang['comment'].'</td>'.br().'
|
||||
|
||||
<td class="hd">'.$lang['fm_filedate'].'</td>'.br().'
|
||||
<td class="hd">Multipart</td>'.br().'
|
||||
<td class="hd">'.$lang['fm_tables'].' / '.$lang['fm_records'].'</td>'.br().'
|
||||
<td align="right" colspan="2" class="hd">'.$lang['fm_filesize'].'</td>'.br().'</tr>'.br();
|
||||
|
||||
//@rsort($files);
|
||||
$checkindex=$arrayindex=$gesamt=0;
|
||||
$db_summary_anzahl=Array();
|
||||
if(count($files)>0) {
|
||||
for ($i=0; $i<sizeof($files); $i++)
|
||||
{
|
||||
// Dateigröße
|
||||
$size = filesize($fpath.$files[$i]);
|
||||
$file_datum=date("d\.m\.Y H:i", filemtime($fpath.$files[$i]));
|
||||
//statuszeile auslesen
|
||||
if(substr($files[$i],-2)=="gz"){
|
||||
if($config['zlib']) {
|
||||
$fp = gzopen ($fpath.$files[$i], "r");
|
||||
$statusline=gzgets($fp,40960);
|
||||
gzclose ($fp);
|
||||
} else $statusline="";
|
||||
}else{
|
||||
$fp = fopen ($fpath.$files[$i], "r");
|
||||
$statusline=fgets($fp,500);
|
||||
fclose ($fp);
|
||||
}
|
||||
$tabellenanzahl="-1";
|
||||
$eintraege="-1";
|
||||
$sline=ReadStatusline($statusline);
|
||||
if($sline[0]!="-1") {
|
||||
$tabellenanzahl=$sline[0];
|
||||
$eintraege=$sline[1];
|
||||
}
|
||||
$part=($sline[2]=="") ? 0 : substr($sline[2],3);
|
||||
$kommentar=(isset($sline[6])) ? $sline[6] : "";
|
||||
if($kommentar=="EXTINFO") $kommentar="";
|
||||
|
||||
$but=ExtractBUT($files[$i]);
|
||||
if($but=="")$but=$file_datum;
|
||||
$dbn=ExtractDBname($files[$i]);
|
||||
//jetzt alle in ein Array packen
|
||||
|
||||
|
||||
if($part==0) {
|
||||
$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']=0;
|
||||
$db_backups[$arrayindex]['kommentar']=$kommentar;
|
||||
$db_backups[$arrayindex]['script']=(!empty($sline[4]) && !empty($sline[5])) ? $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;
|
||||
|
||||
} 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.='<input type="hidden" name="multi" value="'.$multi.'">';
|
||||
if($db_backups[$i]['multipart']>0) {$dbn=NextPart($db_backups[$i]['name'],1);}else{$dbn=$db_backups[$i]['name'];}
|
||||
$fl.='<tr '.(($dbactiv==$databases['db_actual']) ? 'class="dbrowsel"' : '').'>'.br();
|
||||
$fl.='<td align="left" colspan="2">'.br();
|
||||
if($multi==0){
|
||||
$fl.='<input type="hidden" name="multipart[]" value="'.$db_backups[$i]['multipart'].'"><input name="file[]" type="radio" class="radio" value="'.$dbn.'" onClick="Check('.$checkindex++.',0);">';
|
||||
} else {
|
||||
$fl.='<input type="hidden" name="multipart[]" value="'.$db_backups[$i]['multipart'].'"><input name="file[]" type="checkbox" class="checkbox" value="'.$dbn.'" onClick="Check('.$checkindex++.',1);">';
|
||||
}
|
||||
$fl.=($db_backups[$i]['multipart']==0) ? ' <a href="'.$fpath.$dbn.'" title="Backupfile: '.$dbn.'" style="font-size:8pt;">'.$db_backups[$i]['db'].'</a></td>'.br() : ' <span style="font-size:8pt;">'.$db_backups[$i]['db'].'</span></td>'.br();
|
||||
|
||||
$fl.='<td class="sm" nowrap align="center">'.((substr($dbn,-3)==".gz") ? '<img src="images/gz.gif" alt="'.$lang['compressed'].'" width="16" height="16" border="0">' : " ").'</td>';
|
||||
$fl.='<td class="sm" nowrap align="center">'.$db_backups[$i]['script'].'</td>';
|
||||
$fl.='<td class="sm" nowrap align="center">'.(($db_backups[$i]['kommentar']!="") ? '<img src="images/rename.gif" alt="'.$db_backups[$i]['kommentar'].'" width="16" height="16" border="0">' : " ").'</td>';
|
||||
|
||||
|
||||
$fl.='<td class="sm" nowrap>'.$db_backups[$i]['date'].'</td>'.br();
|
||||
$fl.='<td align="center" style="font-size:8pt;">';
|
||||
$fl.=($db_backups[$i]['multipart']==0) ? $lang['no'] : '<a style="font-size:11px;" href="filemanagement.php?action=files&kind=0&dbactiv='.$dbactiv.'&expand='.$i.'">'.$db_backups[$i]['multipart'].' Files</a>'; //
|
||||
$fl.='</td>'.br().'<td align="center" style="font-size:8pt;" nowrap>';
|
||||
$fl.=($db_backups[$i]['eintraege']!=-1) ? $db_backups[$i]['tabellen'].' / '.number_format($db_backups[$i]['eintraege'],0,",",".") :$lang['fm_oldbackup'];
|
||||
$fl.='</td>'.br();
|
||||
$fl.='<td align="right" colspan="2" style="font-size:8pt;">'.byte_output($db_backups[$i]['size']).'</td>'.br();
|
||||
$fl.='</tr>'.br();
|
||||
|
||||
if($expand==$i) {
|
||||
$fl.='<tr '.(($dbactiv==$databases['db_actual']) ? 'bgcolor="#e6e6e6"' : '').'>'.br();
|
||||
$fl.='<td class="sm" valign="top">All Parts:</td><td class="sm" colspan="9">'.PartListe($db_backups[$i]['name'],$db_backups[$i]['multipart']).'</td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fl.='<tr>'.br().'<td colspan="10"> <strong>'.$lang['fm_all_bu'].'</strong></td>'.br().'</tr>'.br();
|
||||
//Tableheader
|
||||
$fl.='<tr>'.br().'<td class="hd" colspan="4" style="text-align:left;">'.$lang['fm_dbname'].'</td>'.br().'
|
||||
<td class="hd" align="left">'.$lang['fm_anz_bu'].'</td>'.br().'
|
||||
<td class="hd">'.$lang['fm_last_bu'].'</td>'.br().'
|
||||
<td class="hd" colspan="4" style="text-align:right;">'.$lang['fm_totalsize'].'</td>'.br();
|
||||
//die anderen Backups
|
||||
if(count($db_summary_anzahl)>0) {
|
||||
while(list($key, $val) = each($db_summary_anzahl))
|
||||
{
|
||||
$keyaus=($key=="") ? "<em>[unknown]</em>" : $key;
|
||||
$fl.='<tr>'.br().'<td colspan="4"><a href="'.$href.'&dbactiv='.$key.'">'.$keyaus.'</a></td>'.br();
|
||||
$fl.='<td align="center">'.$val.' </td>'.br();
|
||||
$fl.='<td class="sm" nowrap>'.((isset($db_summary_last[$key])) ? $db_summary_last[$key] : "").'</td>'.br();
|
||||
$fl.='<td align="right" style="font-size:8pt;" colspan="5">'.byte_output($db_summary_size[$key]).' </td>'.br();
|
||||
$fl.='</tr>'.br(3);
|
||||
|
||||
}
|
||||
}
|
||||
if (!is_array($files)) $fl.='<tr><td colspan="10" class="dbrow">'.$lang['fm_nofilesfound'].'</td></tr>'.br();
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** Ausgabe der Gesamtgröße aller Backupfiles ***
|
||||
//--------------------------------------------------------
|
||||
$space = MD_FreeDiskSpace();
|
||||
$fl.= '<tr>'.br();
|
||||
$fl.= '<td align="left" colspan="7"><b>'.$lang['fm_sizesum'].'('.$Sum_Files.' files): </b> </td>'.br();
|
||||
$fl.= '<td align="right" colspan="3"><b>'.byte_output($gesamt).'</b></td>'.br();
|
||||
$fl.= '</tr>'.br();
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** Ausgabe des freien Speicher auf dem Rechner ***
|
||||
//--------------------------------------------------------
|
||||
$fl.= '<tr class="dbrow">'.br();
|
||||
$fl.= '<td colspan="7">'.$lang['fm_freespace'].': </td>'.br();
|
||||
$fl.= '<td colspan="3" align="right"><b>'.$space.'</b></td>'.br();
|
||||
$fl.= '</tr>'.br();
|
||||
$fl.= '</table>'.br();
|
||||
|
||||
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.="<br>";
|
||||
$s.='<a href="'.$config['paths']['backup'].$dateistamm.$i.$dateiendung.'" style="font-size:8pt;">'.$dateistamm.$i.$dateiendung.'</a> '.byte_output(@filesize($config['paths']['backup'].$dateistamm.$i.$dateiendung));
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
function Converter($filesource,$filedestination,$cp) {
|
||||
global $config,$lang;
|
||||
|
||||
$cps=(substr(strtolower($filesource),-2)=="gz") ? 1 : 0;
|
||||
echo "<h5>".sprintf($lang["convert_fileread"],$filesource).".....</h5><span style=\"font-size:10px;\">";
|
||||
if(file_exists($config["paths"]["backup"].$filedestination)) unlink($config["paths"]["backup"].$filedestination);
|
||||
$f = ($cps==1) ? gzopen($config["paths"]["backup"].$filesource,"r") : fopen($config["paths"]["backup"].$filesource,"r");
|
||||
$z= ($cps==1) ? gzopen($config["paths"]["backup"].$filedestination,"w") : fopen($config["paths"]["backup"].$filedestination,"w");
|
||||
$insert=$mode="";
|
||||
$n=0;
|
||||
$eof= ($cps==1) ? gzeof($f) : feof($f);
|
||||
WHILE (!$eof)
|
||||
{
|
||||
$eof= ($cps==1) ? gzeof($f) : feof($f);
|
||||
$zeile= ($cps==1) ? gzgets($f,8192) : fgets($f,8192);
|
||||
if (substr($zeile,0,2)=="--") $zeile="";
|
||||
//$zeile=rtrim($zeile);
|
||||
$t=strtolower(substr($zeile,0,10));
|
||||
if ($t>"")
|
||||
{
|
||||
switch ($t)
|
||||
{
|
||||
case "insert int":
|
||||
{
|
||||
// eine neue Insert Anweisung beginnt
|
||||
$insert= substr($zeile,0,strpos($zeile,"("));
|
||||
if(substr(strtoupper($insert),-7)!="VALUES ") $insert.="VALUES ";
|
||||
$mode="insert";
|
||||
|
||||
};
|
||||
break;
|
||||
case "create tab":
|
||||
{
|
||||
$mode="create";
|
||||
WHILE (substr(rtrim($zeile),-1)!=";")
|
||||
{
|
||||
$zeile.=fgets($f,8192);
|
||||
}
|
||||
$zeile=MySQL_Ticks($zeile);
|
||||
break;
|
||||
}
|
||||
case "drop table":
|
||||
{
|
||||
$mode="drop";
|
||||
$zeile.="\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($mode=="insert")
|
||||
{
|
||||
// Komma loeschen
|
||||
$zeile=str_replace("),(",");\n$insert (",$zeile);
|
||||
if(substr(rtrim($zeile),0,2)==",(" && $insert !="") {
|
||||
$zeile=";\n".$insert.substr($zeile,1);
|
||||
}
|
||||
if(substr(rtrim($zeile),-2)==")," && $insert !="") {
|
||||
$zeile=substr(rtrim($zeile),0,strlen(rtrim($zeile))-1).";\n$insert";
|
||||
}
|
||||
}
|
||||
$n++;
|
||||
if ($n>1000) { $n=0;echo "<br>"; }
|
||||
echo ".";
|
||||
if($cps==1) gzwrite($z,$zeile); else fwrite($z,$zeile);
|
||||
}
|
||||
flush();
|
||||
$n++;
|
||||
}
|
||||
if($cps==1) gzclose($z); else fclose($z);
|
||||
if($cps==1) gzclose($f); else fclose($f);
|
||||
echo "</span><h5>".sprintf($lang["convert_finished"],$filedestination)."</h5>";
|
||||
}
|
||||
|
||||
|
||||
?>
|
792
inc/functions_global.php
Normale Datei
|
@ -0,0 +1,792 @@
|
|||
<?php
|
||||
include_once("inc/runtime.php");
|
||||
|
||||
function FillMultiDBArrays()
|
||||
{
|
||||
global $config,$databases;
|
||||
|
||||
$databases["multi"]=Array();
|
||||
$databases["multi_praefix"]=Array();
|
||||
if(!isset($databases["db_selected_index"])) $databases["db_selected_index"]=0;
|
||||
if(!isset($databases["db_actual"]) && isset($databases["Name"])) $databases["db_actual"]=$databases["Name"][$databases["db_selected_index"]];
|
||||
if(!isset($databases["multisetting"])) $databases["multisetting"]="";
|
||||
|
||||
if($config["multi_dump"]==1) {
|
||||
if($databases["multisetting"]==""){
|
||||
$databases["multi"][0]=$databases["db_actual"];
|
||||
$databases["multi_praefix"][0]=(isset($databases["praefix"][0])) ? $databases["praefix"][0] : "";
|
||||
} else {
|
||||
$databases["multi"]=explode(";",$databases["multisetting"]);
|
||||
$flipped = array_flip($databases["Name"]);
|
||||
for($i=0;$i<count($databases["multi"]);$i++) {
|
||||
$ind=$flipped[$databases["multi"][$i]];
|
||||
$databases["multi_praefix"][$i]=(isset($databases["praefix"][$ind])) ? $databases["praefix"][$ind] : "";
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$databases["multi"][0]=(isset($databases["db_actual"])) ? $databases["db_actual"] : "";
|
||||
$databases["multi_praefix"][0]=(isset($databases["praefix"])) ? $databases["praefix"][$databases["db_selected_index"]] : "";
|
||||
}
|
||||
}
|
||||
|
||||
function DBDetailInfo($index)
|
||||
{
|
||||
global $databases,$config;
|
||||
|
||||
$databases["Detailinfo"]["tables"]=$databases["Detailinfo"]["records"]=$databases["Detailinfo"]["size"]=0;
|
||||
MSD_mysql_connect();
|
||||
mysql_select_db($databases["Name"][$index]);
|
||||
$databases["Detailinfo"]["Name"]=$databases["Name"][$index];
|
||||
$res=@mysql_query("SHOW TABLE STATUS FROM `".$databases["Name"][$index]."`");
|
||||
if($res) $databases["Detailinfo"]["tables"]=mysql_num_rows($res);
|
||||
if($databases["Detailinfo"]["tables"]>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 '<script language="JavaScript">WP("'.addslashes($txt).','.$object.'");</script>';
|
||||
}
|
||||
|
||||
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,$lang;
|
||||
$log=date("d.m.Y h:i:s").': '.$aktion."\n";
|
||||
|
||||
$logfile=($config["logcompression"]==1) ? $config["files"]["log"].".gz" : $config["files"]["log"];
|
||||
if(@filesize($logfile)+strlen($log)>$config["log_maxsize"]) @unlink($logfile);
|
||||
|
||||
//Datei öffnen und schreiben
|
||||
if($config["logcompression"]==1) {
|
||||
|
||||
$fp = @gzopen($logfile, "a");
|
||||
if($fp) {
|
||||
@gzwrite ($fp,$log) .'<br>';
|
||||
@gzclose ($fp);
|
||||
} else echo '<p class="warnung">'.$lang['logfilenotwritable'].' ('.$logfile.')</p>';
|
||||
} else {
|
||||
$fp = @fopen($logfile, "ab");
|
||||
if($fp) {
|
||||
@fwrite ($fp,$log);
|
||||
@fclose ($fp);
|
||||
} else echo '<p class="warnung">'.$lang['logfilenotwritable'].' ('.$logfile.')</p>';
|
||||
}
|
||||
}
|
||||
|
||||
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="<?$nl";
|
||||
if($aktion=="dump") {
|
||||
$datei="dump.tmp";
|
||||
foreach($dump as $var => $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;
|
||||
if(strlen($sql)>100) $sql=substr($sql,0,100)." ... (snip)";
|
||||
//Error-Zeile generieren
|
||||
$errormsg=date("d.m.Y h:i:s").': ';
|
||||
$errormsg.=($dest=="RESTORE") ? " Restore of db `$db`|:|" : " Dump of db `$db`|:|";
|
||||
$errormsg.="Error-Message: $error|:|";
|
||||
$errormsg.="SQL : ".$sql."\n";
|
||||
//Datei öffnen und schreiben
|
||||
if($config["logcompression"]==1) {
|
||||
$fp = @gzopen($config["paths"]["log"]."error.log.gz", "ab");
|
||||
if($fp) {
|
||||
@gzwrite ($fp,($errormsg));
|
||||
@gzclose ($fp);
|
||||
}
|
||||
} else {
|
||||
$fp = @fopen($config["paths"]["log"]."error.log", "ab");
|
||||
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! <a href="main.php?help=1&thema=path&dir=config"><img src="images/help16.gif" alt="" width="16" height="16" border="0"></a><br>';
|
||||
if($path=="" || $path=="backup") if(!is_writable($config["paths"]["backup"])) $warn.='Backuppath is not writable! <a href="main.php?help=1&thema=path&dir=backup"><img src="images/help16.gif" alt="" width="16" height="16" border="0"></a><br>';
|
||||
if($path=="" || $path=="structure") if(!is_writable($config["paths"]["structure"])) $warn.='Structurepath is not writable! <a href="main.php?help=1&thema=path&dir=structure"><img src="images/help16.gif" alt="" width="16" height="16" border="0"></a><br>';
|
||||
if($path=="" || $path=="log") if(!is_writable($config["paths"]["log"])) $warn.='Logpath is not writable! <a href="main.php?help=1&thema=path&dir=log"><img src="images/help16.gif" alt="" width="16" height="16" border="0"></a><br>';
|
||||
if($warn!="") $warn='<span class="warnung"><strong>ERROR !</strong><br>'.$warn.'</span>';
|
||||
return $warn;
|
||||
}
|
||||
|
||||
function TestWorkDir()
|
||||
{
|
||||
global $config;
|
||||
|
||||
//echo "work_chmod: $config["paths"]["work"]_chmod<br>";
|
||||
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(true);
|
||||
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)
|
||||
{
|
||||
global $config;
|
||||
//$res=mysql_query("DROP DATABASE `$dbn`") or die(mysql_error()."");
|
||||
//$res=mysql_query("CREATE DATABASE `$dbn`") or die(mysql_error()."");
|
||||
$t_sql=Array();
|
||||
$tabellen = mysql_list_tables($dbn,$config["dbconnection"]);
|
||||
$num_tables = mysql_num_rows($tabellen);
|
||||
for($i=0;$i<$num_tables;$i++) {
|
||||
$t=mysql_tablename($tabellen,$i);
|
||||
$t_sql[]="DROP TABLE `$t`;";
|
||||
}
|
||||
for($i=0;$i<count($t_sql);$i++) {
|
||||
$res=mysql_query($t_sql[$i]) 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<sizeof($files); $i++)
|
||||
{
|
||||
$delfile=explode("|",$files[$i]);
|
||||
$ts=substr($delfile[0],0,4)."-".substr($delfile[0],5,2)."-".substr($delfile[0],8,2);
|
||||
if(strtotime($ts)<$nowtime){
|
||||
$out.=DeleteFile($files[$i],"days");
|
||||
unset($files[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@rsort($files);
|
||||
if($config["max_backup_files"] > 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="<font color=\"red\">".$ll."<br>";
|
||||
$r.= $delfile[3]."<br>";
|
||||
WriteLog("autodeleted ($function) '$delfile[3]'.");
|
||||
unlink($config["paths"]["backup"].$delfile[3]);
|
||||
$r.= "</font>";
|
||||
return $r;
|
||||
}
|
||||
|
||||
function ReadStatusline($line)
|
||||
{
|
||||
//Format # Status:Tabellen:Datensätze:Multipart:DBname
|
||||
if(substr($line,0,8)!="# Status" && substr($line,0,9)!="-- 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= '<form action="main.php?action=senderror" method="post">';
|
||||
$r.='<div class="small"><table><tr><td align="center" colspan="2"><h4>'.$subject.'</h4></td></tr>';
|
||||
$r.='<tr><td>Absender</td><td><input type="text" name="error_absender" size="40" value="'.$config["email_recipient"].'"></td></tr>';
|
||||
$r.='<tr><td>Name</td><td><input type="text" name="error_name" size="40"></td></tr>';
|
||||
$r.='<tr><td>Art des Fehlers</td><td><input type="text" name="error_kind" value="'.$error_kind.'" size="40"></td></tr>';
|
||||
$r.='<tr><td valign="top">Anzeige des Fehlers</td><td><textarea name="error_aus" cols="30" rows="6">'.$error_aus.'</textarea></td></tr>';
|
||||
$r.='<tr><td valign="top">zusätzliche Bemerkungen</td><td><textarea name="error_zusatz" cols="30" rows="6"></textarea></td></tr>';
|
||||
|
||||
$vi= '<tr><td>MySQLDump-Version</td><td><b>'.MSD_VERSION.'</b></td></tr>';
|
||||
$vi.= '<tr><td>MySQL-Version</td><td><b>'.MSD_MYSQL_VERSION.'</b></td></tr>';
|
||||
$vi.= '<tr><td>PHP-Version</td><td><b>'.phpversion().'</b></td></tr>';
|
||||
//$vi.= '<tr><td>PHP-Extensions</td><td width="600"><b>'.implode(" ",get_loaded_extensions()).'</b></td></tr>';
|
||||
$vi.= '<tr><td>safe_mode</td><td width="600"><b>'.(($config["safe_mode"]==1) ? "on" : "off").'</b></td></tr>';
|
||||
$vi.= '<tr><td>magic_quotes</td><td width="600"><b>'.(($config["magic_quotes_gpc"]==1) ? "on" : "off").'</b></td></tr>';
|
||||
$vi.= '<tr><td>Variable rootdir</td><td width="600"><b>'.addslashes($config["paths"]["root"]).'</b></td></tr>';
|
||||
$vi.= '<tr><td>Server PHP_SELF</td><td width="600"><b>'.$_SERVER["PHP_SELF"].'</b></td></tr>';
|
||||
$vi.= '<tr><td>Server Path</td><td width="600"><b>'. addslashes($_SERVER["PATH"]).'</b></td></tr>';
|
||||
$vi.= '<tr><td>Server Script-Filename</td><td width="600"><b>'.$_SERVER["SCRIPT_FILENAME"].'</b></td></tr>';
|
||||
$vi.= '<tr><td>Server Script-Name</td><td width="600"><b>'.$_SERVER["SCRIPT_NAME"].'</b></td></tr>';
|
||||
$vi.= '<tr><td>Global PHP_SELF</td><td width="600"><b>'.$PHP_SELF.'</b></td></tr>';
|
||||
$vi.= '<tr><td>Global Path</td><td width="600"><b>'. addslashes($PATH).'</b></td></tr>';
|
||||
$vi.= '<tr><td>Global Path-Translated</td><td width="600"><b>'. addslashes($PATH_TRANSLATED).'</b></td></tr>';
|
||||
$vi.= '<tr><td>Global Script-Filename</td><td width="600"><b>'.addslashes($SCRIPT_FILENAME).'</b></td></tr>';
|
||||
$vi.= '<tr><td>Global Script-Name</td><td width="600"><b>'.addslashes($SCRIPT_NAME).'</b></td></tr>';
|
||||
|
||||
$evars=str_replace("<td>","",$vi);
|
||||
$evars=str_replace('<td width="600">',"",$evars);
|
||||
$evars=str_replace('<tr>',"",$evars);
|
||||
$evars=str_replace('</td>',"",$evars);
|
||||
$evars=str_replace('</tr>',"\n",$evars);
|
||||
|
||||
|
||||
|
||||
//Form-vars
|
||||
$r.=$vi.'<input type="hidden" name="error_vars" value="'.$evars.'">';
|
||||
$r.='<input type="hidden" name="error_subject" value="'.$subject.'">';
|
||||
$r.='<input type="hidden" name="error_mailfrom" value="'.$config["email_sender"].'">';
|
||||
|
||||
$r.= '<tr><td colspan="2" align="center"><input class="Formbutton_small" type="submit" name="error_submit" value="Fehlerbericht absenden"></td></tr>';
|
||||
|
||||
|
||||
$r.= "<tr><td><a href='main.php' class='ul'>Home</a></td></tr></table></div></form></body></html>";
|
||||
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='<meta http-equiv="Refresh" content="1">'."\n";
|
||||
$meta.='<meta http-equiv="Pragma" content="no-cache">'."\n";
|
||||
$meta.='<script language="JavaScript">
|
||||
function doReload() {
|
||||
document.loaction.href="";
|
||||
}
|
||||
setTimeout("doReload()", 400);
|
||||
</script>';
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
//Header für HTML
|
||||
$h="<html>\n<head>\n".$meta."\n<title>MySqlDumper</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../styles.css\">";
|
||||
$h.="\n</head>\n<body bgcolor=\"#F5F5F5\">\n";
|
||||
//Footer
|
||||
$f='</body></html>';
|
||||
$page=$h.$s.$f;
|
||||
|
||||
$f=fopen($tempDatei,"w");
|
||||
fwrite($f,$page);
|
||||
fclose($f);
|
||||
echo '<script type="text/javascript">parent.dump_visible.location.href='.$tempURL.';</script>';
|
||||
|
||||
/*echo "<pre>$page</pre>";
|
||||
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='<span class="smallwarnung">'.$lang['noftppossible'].'</span>';
|
||||
} else $pass=0;
|
||||
|
||||
if($pass==0) {
|
||||
if($ftp_server=="" || $ftp_user_name=="" || $ftp_user_pass=="") {
|
||||
$s='<span class="smallwarnung">'.$lang['wrongconnectionpars'].'</span>';
|
||||
} 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.='<span class="smallwarnung">'.$lang['conn_not_possible'].'</span>';
|
||||
} else $pass=2;
|
||||
}
|
||||
|
||||
if($pass==2) {
|
||||
$s.='<strong>ok, logged in</strong><br>'.$lang['changedir'].' `'.$ftp_dir.'` ... ';
|
||||
$dirc=@ftp_chdir($conn_id,$ftp_dir);
|
||||
if(!$dirc) {
|
||||
$s.='<br><span class="smallwarnung">'.$lang['changedirerror'].'</span>';
|
||||
} else $pass=3;
|
||||
@ftp_close($conn_id);
|
||||
}
|
||||
if($pass==3) $s.='<br><br><strong>'.$lang['ftp_ok'].'</strong>';
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
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.='<option value="'.$f.'" ';
|
||||
if($filename==$default) $r.=' SELECTED';
|
||||
$r.='> '.$f.' </option>'."\n";
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
function GetThemes() {
|
||||
global $config;
|
||||
$default=$config["theme"];
|
||||
$dh = opendir($config["paths"]["root"]."css/");
|
||||
$r="";
|
||||
while (false !== ($filename = readdir($dh)))
|
||||
{
|
||||
if ($filename != "." && $filename != ".." && is_dir($config["paths"]["root"]."css/".$filename)) {
|
||||
|
||||
$r.='<option value="'.$filename.'" ';
|
||||
if($filename==$default) $r.=' SELECTED';
|
||||
$r.='> '.$filename.' </option>'."\n";
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
function GetLanguageCombo($k="op",$class="",$name="",$start="",$end="") {
|
||||
global $config,$lang;
|
||||
$default=$config["language"];
|
||||
$dh = opendir($config["paths"]["root"]."language/");
|
||||
$r="";
|
||||
while (false !== ($filename = readdir($dh)))
|
||||
{
|
||||
if ($filename != "." && $filename != ".." && $filename != "flags" && is_dir($config["paths"]["root"]."language/".$filename)) {
|
||||
//echo $config["paths"]["root"]."language/".$filename."<br>";
|
||||
if($k=="op") {
|
||||
$r.=$start.'<option value="'.$filename.'" ';
|
||||
if($filename==$default) $r.=' SELECTED';
|
||||
$r.=' class="'.$class.'"> '.$lang[$filename].' </option>'.$end."\n";
|
||||
} elseif($k=="radio") {
|
||||
$r.=$start.'<input type="radio" class="'.$class.'" name="'.$name.'" value="'.$filename.'" '.(($filename==$default) ? "checked" : "").' onclick="show_tooldivs(\''.$filename.'\');"><img src="language/flags/'.$filename.'.gif" alt="" width="25" height="15" border="0"> '.$lang[$filename].$end."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function headline($title,$mainframe=1) {
|
||||
global $config;
|
||||
$s="";
|
||||
if($config["interface_server_caption"]==1 && $config["interface_server_caption_position"]==$mainframe)
|
||||
$s.='<div class="server"><a class="server" href="http://'.$_SERVER["SERVER_NAME"].'" target="_blank" title="'.$_SERVER["SERVER_NAME"].'">'.$_SERVER["SERVER_NAME"].'</a></div>';
|
||||
if ($mainframe==1) {
|
||||
$s.='<div class="pagetitle">'.$title.'</div>';
|
||||
$s.='<div class="content">';
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
function PicCache($rpath="./") {
|
||||
global $BrowserIcon;
|
||||
return '<div style="display:none"><img src="'.$rpath.'images/ardown.gif" width="12" height="13" alt=""><img src="'.$rpath.'images/arrowdown.gif" width="16" height="16" alt=""><img src="'.$rpath.'images/arrowleft.gif" width="16" height="16" alt=""><img src="'.$rpath.'images/arrowup.gif" width="16" height="16" alt=""><img src="'.$rpath.'images/arup.gif" width="12" height="13" alt=""><img src="'.$rpath.'images/close.gif" width="12" height="13" alt=""><img src="'.$rpath.'images/delete.gif" width="11" height="13" alt=""><img src="'.$rpath.'images/edit.gif" width="12" height="13" alt=""><img src="'.$rpath.'images/gz.gif" width="32" height="32" alt=""><img src="'.$rpath.'images/help16.gif" width="16" height="16" alt=""><img src="'.$rpath.'images/notok.gif" width="32" height="32" alt=""><img src="'.$rpath.'images/ok.gif" width="32" height="32" alt=""><img src="'.$rpath.'images/openfile.gif" width="16" height="16" alt=""><img src="'.$rpath.'images/blank.gif" width="1" height="1" alt=""><img src="'.$rpath.'images/cellpic.gif" width="9" height="37" alt=""><img src="'.$rpath.'images/fbd.gif" width="40" height="16" alt=""><img src="'.$rpath.'images/fbr.gif" width="40" height="16" alt=""><img src="'.$rpath.'images/fbs.gif" width="40" height="16" alt=""><img src="'.$rpath.'images/konqueror.png" width="10" height="14" alt=""><img src="'.$rpath.'images/mozilla.png" width="14" height="14" alt=""><img src="'.$rpath.'images/msie.png" width="14" height="14" alt=""><img src="'.$rpath.'images/omniweb.png" width="14" height="14" alt=""><img src="'.$rpath.'images/opera.png" width="14" height="14" alt=""><img src="'.$rpath.'images/safari.png" width="14" height="14" alt=""><img src="'.$rpath.$BrowserIcon.'" alt=""></div>';
|
||||
}
|
||||
|
||||
function MSDHeader($kind=0)
|
||||
{
|
||||
global $config, $databases,$lang;
|
||||
//kind 0=main 1=menu 2=help
|
||||
$d=($kind==2) ? "../../" : "./";
|
||||
$r='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>';
|
||||
if ($kind==1) $r.='<META HTTP-EQUIV="cache-control" CONTENT="public" />';
|
||||
else $r.='<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />';
|
||||
$r.='<META NAME="robots" CONTENT="none" />
|
||||
<META NAME="robots" CONTENT="noindex">
|
||||
<title>MySqlDumper</title>
|
||||
<link rel="stylesheet" type="text/css" href="'.$d.'css/'.$config["theme"].'/style.css">
|
||||
<script language="JavaScript" src="'.$d.'js/script.js"></script>';
|
||||
$r.='<script language="JavaScript">
|
||||
var params="";
|
||||
if(document.URL.indexOf("/") != -1)
|
||||
{
|
||||
var stringArray = document.URL.split("/");
|
||||
params = stringArray.pop();
|
||||
}
|
||||
if (parent.frames.length == 0) { parent.location.href="index.php?page="+params; }
|
||||
</script>';
|
||||
$r.='
|
||||
</head>
|
||||
<body '.(($kind==1) ? 'class="menu"' : '').'>
|
||||
';
|
||||
|
||||
return $r;
|
||||
}
|
||||
function MSDFooter($rfoot="",$enddiv=1)
|
||||
{
|
||||
global $config, $databases,$dump,$restore,$lang;
|
||||
|
||||
$svice=(isset($_GET["svice"])) ? $_GET["svice"] : 0;
|
||||
$config_array=(isset($config)) ? "<strong>CONFIG</strong><pre>".@print_r($config,true)."</pre>": "";
|
||||
$database_array=(isset($databases)) ? "<strong>DATABASE</strong><pre>".@print_r($databases,true)."</pre>": "";
|
||||
$dump_array=(isset($dump)) ? "<strong>DUMP</strong><pre>".@print_r($dump,true)."</pre>": "";
|
||||
$restore_array=(isset($restore)) ? "<strong>RESTORE</strong><pre>".@print_r($restore,true)."</pre>" : "";
|
||||
$f= '<p align="center" class="small">'.$lang['authors'].':
|
||||
<a class="small" href="http://www.daniel-schlichtholz.de" target="_new">
|
||||
Daniel Schlichtholz & Steffen Kamper</a> - Infoboard:
|
||||
<a class="small" href="'.$config["homepage"].'" target="_blanc">'.
|
||||
$config["homepage"].'</a></p>';
|
||||
|
||||
if($svice==1) $f.= '<table width="100%"><tr bgcolor="#808080"><td>'.$config_array.'</td></tr><tr bgcolor="#808080"><td>'.$database_array.'</td></tr><tr bgcolor="#808080"><td>'.$dump_array.'</td></tr><tr bgcolor="#808080"><td>'.$restore_array.'</td></tr></table>';
|
||||
if($enddiv==1) $f.= '</div>';
|
||||
|
||||
$f.=$rfoot.'</body></html>';
|
||||
|
||||
return $f;
|
||||
}
|
||||
|
||||
function DownGrade($s,$show=true)
|
||||
{
|
||||
if (MSD_NEW_VERSION && strpos(strtolower($s),"collate ") && ($show) ) {
|
||||
return $s;
|
||||
} else {
|
||||
$tmp=explode(",",$s);
|
||||
for($i=0;$i<count($tmp);$i++) {
|
||||
$t=strtolower($tmp[$i]);
|
||||
if(strpos($t,"collate ")) {
|
||||
$tmp2=explode(" ",$tmp[$i]);
|
||||
for($j=0;$j<count($tmp2);$j++) {
|
||||
if(strtolower($tmp2[$j])=="collate") {$tmp2[$j]="";$tmp2[$j+1]="";$j++;}
|
||||
}
|
||||
$tmp[$i]=implode(" ",$tmp2);
|
||||
}
|
||||
if(strpos($t,"engine=")) {
|
||||
$tmp2=explode(" ",$tmp[$i]);
|
||||
for($j=0;$j<count($tmp2);$j++) {
|
||||
//echo $j.": ".$tmp2[$j]."<br>";
|
||||
if(substr(strtoupper($tmp2[$j]),0,7)=="ENGINE=") $tmp2[$j]="TYPE=".substr($tmp2[$j],7);
|
||||
if(substr(strtoupper($tmp2[$j]),0,8)=="COLLATE=") $tmp2[$j]="";
|
||||
if(substr(strtoupper($tmp2[$j]),0,8)=="CHARSET=" && strtoupper($tmp2[$j-1])=="DEFAULT") {$tmp2[$j-1]="";$tmp2[$j]="";}
|
||||
}
|
||||
$tmp[$i]=implode(" ",$tmp2);
|
||||
}
|
||||
|
||||
}
|
||||
$t=implode(",",$tmp);
|
||||
if(substr(rtrim($t),-1)!=";") $t=rtrim($t).";";
|
||||
return $t;
|
||||
}
|
||||
}
|
||||
?>
|
332
inc/functions_restore.php
Normale Datei
|
@ -0,0 +1,332 @@
|
|||
<?php
|
||||
include_once("inc/functions_global.php");
|
||||
include_once("inc/runtime.php");
|
||||
|
||||
function get_sqlbefehl()
|
||||
{
|
||||
global $restore,$config,$databases;
|
||||
|
||||
//Init
|
||||
$restore["fileEOF"]=false;
|
||||
$complete_sql="";
|
||||
$sqlparser_status=0;
|
||||
if(!isset($restore["eintraege_ready"])) $restore["eintraege_ready"]=0;
|
||||
//Parsen
|
||||
WHILE ($sqlparser_status!=100 && !$restore["fileEOF"] && !isset($restore["EOB"]) )
|
||||
{
|
||||
//Zeile lesen
|
||||
$zeile= ($restore["compressed"]) ? gzgets($restore["filehandle"]) : fgets($restore["filehandle"]);
|
||||
if($sqlparser_status==0)
|
||||
{
|
||||
//hier folgt der Anfang eines SQL-Befehls
|
||||
if(substr($zeile,0,1)=="#" or substr($zeile,0,2)=="--")
|
||||
{
|
||||
// Ende ?
|
||||
if(substr($zeile,0,6)=="-- EOB" || substr($zeile,0,5)=="# EOB") {
|
||||
$restore["EOB"]=1;
|
||||
}
|
||||
//Kommentar
|
||||
$zeile="";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// was beginnt hier ?
|
||||
if(strtoupper(substr($zeile,0,10))=="DROP TABLE")
|
||||
{
|
||||
$sqlparser_status=1; //Löschaktion
|
||||
//Neue Tabelle beginnt - überprüfen, obs gewünscht ist
|
||||
$restore["do_it"]=false;
|
||||
//prüfen ob gewünscht
|
||||
if(isset($tbl_sel))
|
||||
{
|
||||
if(in_array($tbl_name,$tblArray)) $restore["do_it"]=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$restore["do_it"]=true;
|
||||
}
|
||||
}
|
||||
|
||||
if(strtoupper(substr($zeile,0,12))=="CREATE TABLE") $sqlparser_status=2; //Createaktion
|
||||
if(strtoupper(substr($zeile,0,12))=="CREATE INDEX") $sqlparser_status=4; //Createaktion
|
||||
if(substr($zeile,0,3)=="/*!") $sqlparser_status=5; //Anweisung
|
||||
if(strtoupper(substr($zeile,0,11))=="LOCK TABLES") $sqlparser_status=5; //Anweisung
|
||||
if(strtoupper(substr($zeile,0,13))=="UNLOCK TABLES") $sqlparser_status=5; //Anweisung
|
||||
if(strtoupper(substr($zeile,0,6))=="INSERT" || ($restore["erweiterte_inserts"]==1 && substr($zeile,0,1)=="("))
|
||||
{
|
||||
$sqlparser_status=3; //Datensatzaktion
|
||||
$restore["eintraege_ready"]++;
|
||||
if($restore["erweiterte_inserts"]==0 || ($restore["erweiterte_inserts"]==1 && strtoupper(substr($zeile,0,11))=="INSERT INTO")) {
|
||||
$restore["actual_table"]=strtolower(get_tablename_aus_insert($zeile)); // aktuellen Tabellennamen aus der INSERT-Anweisung extrahieren
|
||||
if(!isset($restore["num_table_fields"][$restore["actual_table"]])) {
|
||||
$restore["num_table_fields"][$restore["actual_table"]]=$restore["actual_fieldcount"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$last_char=substr(rtrim($zeile),-1);
|
||||
$complete_sql.=$zeile;
|
||||
$complete_sql=trim(rtrim($complete_sql));
|
||||
|
||||
if($sqlparser_status==1)
|
||||
{ //Löschaktion
|
||||
if($last_char==";" ) $sqlparser_status=100; //Befehl komplett
|
||||
}
|
||||
|
||||
if($sqlparser_status==2)
|
||||
{ //Createaktion
|
||||
if($last_char==";" )
|
||||
{
|
||||
if($config["minspeed"]>0) {$restore["anzahl_zeilen"]=$config["minspeed"];}
|
||||
$restore["actual_table"]=strtolower(get_tablename($complete_sql));
|
||||
//Tabellenfelderanzahl ermitteln
|
||||
$restore["actual_fieldcount"]=AnzahlTabellenfelder($complete_sql);
|
||||
$restore["num_table_fields"][$restore["actual_table"]]=$restore["actual_fieldcount"];
|
||||
//DEFAULT CHARSET HACK
|
||||
if((GetMySQLVersion()-4.1)<0) {
|
||||
$ll=strpos(strtoupper($complete_sql)," DEFAULT CHARSET");
|
||||
if($ll) {
|
||||
$ll2=strpos($complete_sql," ",$ll+12);
|
||||
if($ll2)
|
||||
$complete_sql=substr($complete_sql,0,$ll).substr($complete_sql,$ll2);
|
||||
else
|
||||
$complete_sql=substr($complete_sql,0,$ll).';';
|
||||
}
|
||||
}
|
||||
//Hack für Import MySQL>4.1 auf kleineren Versionen
|
||||
$complete_sql=DownGrade($complete_sql);
|
||||
|
||||
$restore["table_create"][$restore["actual_table"]]=$complete_sql;
|
||||
$sqlparser_status=100; //Befehl komplett
|
||||
}
|
||||
}
|
||||
|
||||
if($sqlparser_status==3)
|
||||
{ //Datensatzaktion
|
||||
if(!isset($restore["num_table_fields"][$restore["actual_table"]]))
|
||||
$restore["num_table_fields"][$restore["actual_table"]]=$restore["actual_fieldcount"];
|
||||
|
||||
if($zeile!="" && (substr(rtrim($zeile),-2)==");" || substr(rtrim($zeile),-2)=="),"))
|
||||
{
|
||||
if($restore["flag"]==-1 && substr(rtrim($zeile),-2)=="),") {
|
||||
$restore["erweiterte_inserts"]=1;
|
||||
$restore["flag"]=1;
|
||||
} elseif($restore["flag"]==-1 && substr(rtrim($zeile),-2)==");") {
|
||||
$restore["flag"]=0;
|
||||
}
|
||||
//scheinbar ein Ende erreicht
|
||||
$AnzahlFelder=SQL_Is_Complete($complete_sql,$restore["num_table_fields"][$restore["actual_table"]]);
|
||||
if($AnzahlFelder==$restore["num_table_fields"][$restore["actual_table"]])
|
||||
{
|
||||
$sqlparser_status=100;
|
||||
if(substr(rtrim($zeile),-2)==")," || ($restore["erweiterte_inserts"]==1 && substr(rtrim($zeile),-2)==");")) {
|
||||
if($complete_sql!="" && substr($complete_sql,0,1)=="(") {
|
||||
$complete_sql="INSERT INTO `".$restore["actual_table"]."` VALUES ".$complete_sql;
|
||||
}
|
||||
if(substr($complete_sql,-1)==",") $complete_sql=substr($complete_sql,0,strlen($complete_sql)-1);
|
||||
}
|
||||
|
||||
}
|
||||
if($AnzahlFelder>$restore["num_table_fields"][$restore["actual_table"]] && $restore["erweiterte_inserts"]==0)
|
||||
{
|
||||
if(!isset($restore["table_create"][$restore["actual_table"]])) {
|
||||
include("inc/functions_sql.php");
|
||||
$restore["table_create"][$restore["actual_table"]]=GetCreateTable($databases["db_actual"],$restore["actual_table"]);
|
||||
}
|
||||
echo '<form action="main.php?action=extinfo" method="post">';
|
||||
echo '<p class="warnung">Parser-Fehler : zuviele gezählt in Tabelle '.$restore["actual_table"].' ('.$AnzahlFelder.' statt '.$restore["num_table_fields"][$restore["actual_table"]].')';
|
||||
echo '<h4>CREATE-Anweisung</h4><textarea name="create_sql" style="width:90%;height:200px;">'.$restore["table_create"][$restore["actual_table"]].'</textarea>';
|
||||
echo '<h4>INSERT-Anweisung</h4><textarea name="insert_sql" style="width:90%;height:200px;">'.$complete_sql.'</textarea></p><br>';
|
||||
echo '<br><br><input type="submit" name="tell_error" value="Fehlerbericht"></form>'.$zeile;
|
||||
die;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($sqlparser_status==4)
|
||||
{ //Createindex
|
||||
if($last_char==";" )
|
||||
{
|
||||
if($config["minspeed"]>0) {$restore["anzahl_zeilen"]=$config["minspeed"];}
|
||||
$sqlparser_status=100; //Befehl komplett
|
||||
}
|
||||
}
|
||||
if($sqlparser_status==5)
|
||||
{ //Anweisung
|
||||
if($last_char==";" )
|
||||
{
|
||||
if($config["minspeed"]>0) {$restore["anzahl_zeilen"]=$config["minspeed"];}
|
||||
$sqlparser_status=100; //Befehl komplett
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($restore["compressed"]) && (gzeof($restore["filehandle"])) ) $restore["fileEOF"]=true;
|
||||
if ( (!$restore["compressed"]) && (feof($restore["filehandle"])) ) $restore["fileEOF"]=true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $complete_sql ;
|
||||
}
|
||||
|
||||
function lock_table()
|
||||
{
|
||||
global $config,$restore;
|
||||
if ($config["lock_tables"]==1 && (isset($restore["actual_table"])) && ($restore["actual_table"]<>"unbekannt") )
|
||||
{
|
||||
$sql="LOCK TABLES `".$restore["actual_table"]."` WRITE";
|
||||
$res=MSD_query($sql) || die(SQLError("Kein Lock ausgeführt!",mysql_error()));
|
||||
}
|
||||
}
|
||||
|
||||
// extrahiert auf einfache Art den Tabellennamen aus dem "Create"-Befehl
|
||||
function get_tablename($t)
|
||||
{
|
||||
global $restore;
|
||||
$t=trim(str_replace("CREATE TABLE","",strtoupper($t)));
|
||||
$t=trim(str_replace("("," ",$t));
|
||||
$w=explode(" ",$t);
|
||||
$tn=$w[0];
|
||||
$restore["table_ready"]++;
|
||||
if(substr($tn,0,1)=="`") $tn=substr($tn,1,strlen($tn)-2);
|
||||
return $tn;
|
||||
}
|
||||
|
||||
// extrahiert auf einfache Art den Tabellennamen aus dem "Create"-Befehl
|
||||
function get_tablename_aus_insert($t)
|
||||
{
|
||||
$t=substr(strtolower($t),strpos(strtolower($t), "into ")+5);
|
||||
$w=explode(" ",$t);
|
||||
$tn=$w[0];
|
||||
if(substr($tn,0,1)=="`") $tn=substr($tn,1,strlen($tn)-2);
|
||||
return $tn;
|
||||
}
|
||||
|
||||
function AnzahlTabellenfelder($s,$debug=0)
|
||||
{
|
||||
// ermittelt die Anzahl der Spalten einer Tabelle aus einer CREATE-Anweisung
|
||||
$anz=$anz_delimter=$rit=$klammerstart=$klammerauf=$klammerzu=0;
|
||||
$s=strtoupper($s);
|
||||
$i=strpos($s,"(")+1;
|
||||
$s=substr($s,$i);
|
||||
$tb=explode(",",$s);
|
||||
|
||||
$defaultstart=false;
|
||||
for ($i=0;$i<count($tb);$i++){
|
||||
$tb[$i]=trim($tb[$i]);
|
||||
$klammerstart+=substr_count($tb[$i], "(")-substr_count($tb[$i], ")");
|
||||
if($i==count($tb)-1) $klammerstart+=1;
|
||||
$anz_delimter+=substr_count($tb[$i], "'");
|
||||
if($anz_delimter % 2 ==0) $anz_delimter=0;
|
||||
//kommt ein Index???
|
||||
if(substr($tb[$i],0,4)=="KEY " ||
|
||||
substr($tb[$i],0,7)=="UNIQUE " ||
|
||||
substr($tb[$i],0,12)=="PRIMARY KEY " ||
|
||||
substr($tb[$i],0,13)=="FULLTEXT KEY "
|
||||
) {
|
||||
$rit=1;
|
||||
} else {
|
||||
if($klammerstart==0 && $anz_delimter==0) {
|
||||
if($rit==0) $anz++;
|
||||
$rit=0;
|
||||
}
|
||||
}
|
||||
if($debug==1) echo "$i: $tb[$i]".' <font color="#0000FF">'.$anz."</font> [offene Klammern: $klammerstart] --$rit<br>";
|
||||
|
||||
}
|
||||
return $anz;
|
||||
}
|
||||
|
||||
function SQL_Is_Complete($s,$expected=0,$debug=0)
|
||||
{
|
||||
global $restore;
|
||||
$anz=$f_begin=$f_end=$restore["erw_anz"]=0;
|
||||
$Backslash=chr(92);
|
||||
$s=trim(strtoupper(($s)));
|
||||
if(substr($s,-2)==");" || substr($s,-2)=="),") $s=substr($s,0,strlen($s)-2);
|
||||
if(substr($s,-1)==")") $s=substr($s,0,strlen($s)-1);
|
||||
if(strpos($s," VALUES")) {
|
||||
$i=strpos($s," VALUES")+7;
|
||||
$s=substr($s,$i);
|
||||
}
|
||||
$i=strpos($s,"(")+1;
|
||||
$s=substr($s,$i);
|
||||
|
||||
$tb=explode(",",$s);
|
||||
for ($i=0;$i<count($tb);$i++){
|
||||
$first=$B_Esc=$B_Ticks=$B_Dashes=0;
|
||||
$v=trim(rtrim($tb[$i]));
|
||||
|
||||
//erweitert ?
|
||||
if($anz==0 && $restore["erweiterte_inserts"]==1 && substr($v,0,1)=="(") $v=substr($v,1);
|
||||
if($expected>0 && $anz==$expected-1 && substr($v,-1)==")") {
|
||||
$v=substr($v,0,strlen($v)-1); // ) entfernen
|
||||
//if($i+1<count($tb)) $tb[$i+1]=substr(trim(rtrim($tb[$i+1])),1);
|
||||
if($restore["erweiterte_inserts"]==0) {
|
||||
$restore["erweiterte_inserts"]=1;
|
||||
$restore["flag"]=1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Ticks + Dashes zählen
|
||||
for($cpos=2;$cpos<=strlen($v);$cpos++)
|
||||
{if(substr($v,(-1*$cpos),1)=="'") {$B_Ticks++;} else {break;}}
|
||||
for($cpos=2;$cpos<=strlen($v);$cpos++)
|
||||
{if(substr($v,(-1*$cpos),1)=='"') {$B_Dashes++;} else {break;}}
|
||||
|
||||
//Backslashes zählen
|
||||
for($cpos=2+$B_Ticks;$cpos<=strlen($v);$cpos++)
|
||||
{if(substr($v,(-1*$cpos),1)=="\\") {$B_Esc++;} else {break;}}
|
||||
|
||||
|
||||
|
||||
if($v=="NULL" && $f_begin==0){$f_begin=1;$f_end=1;}
|
||||
if($f_begin==0 && is_numeric($v)){$f_begin=1;$f_end=1;}
|
||||
//blob fix von PHPMyAdmin Dump
|
||||
if($f_begin==0 && substr($v,0,2)=="0X" && strpos($v," ")==false){$f_begin=1;$f_end=1;}
|
||||
if($f_begin==0 && is_object($v)){$f_begin=1;$f_end=1;}
|
||||
|
||||
if(substr($v,0,1)=="'" && $f_begin==0) {$f_begin=1;if(strlen($v)==1)$first=1;$DELIMITER="'";}
|
||||
if(substr($v,0,1)=='"' && $f_begin==0) {$f_begin=1;if(strlen($v)==1)$first=1;$DELIMITER='"';}
|
||||
if($f_begin==1 && $f_end!=1 && $first==0){
|
||||
if (substr($v,-1)==$DELIMITER){
|
||||
$B_Delimiter=($DELIMITER=="'") ? $B_Ticks : $B_Dashes;
|
||||
//ist Delimiter maskiert?
|
||||
if (($B_Esc % 2)==1 && ($B_Delimiter % 2)==1 && strlen($v)>2) {
|
||||
|
||||
$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 "<font color='#0000FF'>$f_begin/$f_end</font> Feld $i: ".htmlspecialchars($tb[$i])."<font color=#008000>- $anz ($B_Ticks / $B_Esc)</font><br>";
|
||||
if($f_begin==1 && $f_end==1) {
|
||||
$anz++;
|
||||
$f_begin=$f_end=0;
|
||||
if($anz==$expected) {
|
||||
$restore["erw_anz"]++;
|
||||
if($debug==1) echo "<h5>".$restore["erw_anz"].".Insert - (".$anz." Felder)</h5>";
|
||||
$anz=0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if($anz==0 && $expected>0 && $restore["erw_anz"]>0) $anz=$expected;
|
||||
|
||||
return $anz;
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
947
inc/functions_sql.php
Normale Datei
|
@ -0,0 +1,947 @@
|
|||
<?php
|
||||
|
||||
//SQL-Library laden
|
||||
include("inc/sqllib.php");
|
||||
|
||||
|
||||
if(!isset($config["sql_limit"])) $config["sql_limit"]=30;
|
||||
if(!isset($config["bb_width"])) $config["bb_width"]=300;
|
||||
if(!isset($config["bb_textcolor"])) $config["bb_textcolor"]="#990033";
|
||||
|
||||
|
||||
function ReadSQL()
|
||||
{
|
||||
global $SQL_ARRAY,$config;
|
||||
$sf=$config["paths"]["config"].'sql_statements';
|
||||
if(!is_file($sf)){
|
||||
$fp=fopen($sf,"w+");
|
||||
fclose($fp);
|
||||
@chmod($sf,0775);
|
||||
}
|
||||
if(count($SQL_ARRAY)==0 && filesize($sf)>0) {
|
||||
$SQL_ARRAY=file($sf);
|
||||
}
|
||||
}
|
||||
function WriteSQL()
|
||||
{
|
||||
global $SQL_ARRAY,$config;
|
||||
$sf=$config["paths"]["config"].'sql_statements';
|
||||
$str="";
|
||||
for($i=0;$i<count($SQL_ARRAY);$i++) {
|
||||
$str.=$SQL_ARRAY[$i];
|
||||
if(substr($str,-1)!="\n" && $i!=(count($SQL_ARRAY)-1)) $str.="\n";
|
||||
|
||||
}
|
||||
$fp=fopen($sf,"wb");
|
||||
fwrite($fp,$str);
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
function SQL_Name($index)
|
||||
{
|
||||
global $SQL_ARRAY;
|
||||
$s=explode("|",$SQL_ARRAY[$index]);
|
||||
return $s[0];
|
||||
}
|
||||
function SQL_String($index)
|
||||
{
|
||||
global $SQL_ARRAY;
|
||||
if(isset($SQL_ARRAY[$index]) && !empty($SQL_ARRAY[$index])) {
|
||||
$s=explode("|",$SQL_ARRAY[$index]);
|
||||
return (isset($s[1])) ? $s[1] : "";
|
||||
}
|
||||
}
|
||||
function SQL_ComboBox()
|
||||
{
|
||||
global $SQL_ARRAY,$tablename,$nl;
|
||||
$s=$nl.$nl.'<select class="SQLCombo" name="sqlcombo" onchange="this.form.tb_sql.value=this.options[this.selectedIndex].value;">'.$nl;
|
||||
$s.='<option value="" selected> </option>'.$nl;
|
||||
if(count($SQL_ARRAY)>0) {
|
||||
for($i=0;$i<count($SQL_ARRAY);$i++) {
|
||||
$s.='<option value="'.stripslashes(SQL_String($i)).'">'.SQL_Name($i).'</option>'.$nl;
|
||||
}
|
||||
}
|
||||
$s.='</select>'.$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.'<select class="SQLCombo" name="tablecombo" onchange="this.form.tb_sql.value=this.options[this.selectedIndex].value;this.form.execsql.click();">'.$nl.'<option value="" selected> </option>'.$nl;
|
||||
for($i=0;$i<$num_tables;$i++) {
|
||||
$t=mysql_tablename($tabellen,$i);
|
||||
$s.='<option value="SELECT * FROM `'.$t.'`">'.$lang['table'].' `'.$t.'`</option>'.$nl;
|
||||
}
|
||||
$s.='</select>'.$nl.$nl;
|
||||
return $s;
|
||||
}
|
||||
function TableComboBox($default="")
|
||||
{
|
||||
global $db,$config,$lang,$nl;
|
||||
$tabellen = mysql_list_tables($db,$config["dbconnection"]);
|
||||
$num_tables = mysql_num_rows($tabellen);
|
||||
$s='<option value="" '.(($default=="") ? 'selected' : '').'> </option>'.$nl;
|
||||
for($i=0;$i<$num_tables;$i++) {
|
||||
$t=mysql_tablename($tabellen,$i);
|
||||
$s.='<option value="`'.$t.'`"'.(($default=='`'.$t.'`') ? 'selected' : '').'>`'.$t.'`</option>'.$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 "<h5>$SQL_Array</h5>";
|
||||
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;$i<count($tb);$i++){
|
||||
$first=$B_Esc=$B_Ticks=$B_Dashes=0;
|
||||
$v=trim($tb[$i]);
|
||||
//Ticks + Dashes z<>hlen
|
||||
for($cpos=2;$cpos<=strlen($v);$cpos++)
|
||||
{if(substr($v,(-1*$cpos),1)=="'") {$B_Ticks++;} else {break;}}
|
||||
for($cpos=2;$cpos<=strlen($v);$cpos++)
|
||||
{if(substr($v,(-1*$cpos),1)=='"') {$B_Dashes++;} else {break;}}
|
||||
|
||||
//Backslashes z<>hlen
|
||||
for($cpos=2+$B_Ticks;$cpos<=strlen($v);$cpos++)
|
||||
{if(substr($v,(-1*$cpos),1)=="\\") {$B_Esc++;} else {break;}}
|
||||
|
||||
if($v=="NULL" && $sql["parser"]["start"]==0){$sql["parser"]["start"]=1;$sql["parser"]["end"]=1;}
|
||||
if($sql["parser"]["start"]==0 && is_numeric($v)){$sql["parser"]["start"]=1;$sql["parser"]["end"]=1;}
|
||||
if($sql["parser"]["start"]==0 && substr($v,0,2)=="0X" && strpos($v," ")==false){$sql["parser"]["start"]=1;$sql["parser"]["end"]=1;}
|
||||
if($sql["parser"]["start"]==0 && is_object($v)){$sql["parser"]["start"]=1;$sql["parser"]["end"]=1;}
|
||||
|
||||
if(substr($v,0,1)=="'" && $sql["parser"]["start"]==0) {$sql["parser"]["start"]=1;if(strlen($v)==1)$first=1;$DELIMITER="'";}
|
||||
if(substr($v,0,1)=='"' && $sql["parser"]["start"]==0) {$sql["parser"]["start"]=1;if(strlen($v)==1)$first=1;$DELIMITER='"';}
|
||||
if($sql["parser"]["start"]==1 && $sql["parser"]["end"]!=1 && $first==0){
|
||||
if (substr($v,-1)==$DELIMITER){
|
||||
$B_Delimiter=($DELIMITER=="'") ? $B_Ticks : $B_Dashes;
|
||||
//ist Delimiter maskiert?
|
||||
if (($B_Esc % 2)==1 && ($B_Delimiter % 2)==1 && strlen($v)>2) {
|
||||
|
||||
$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 "<font color='#0000FF'>".$sql["parser"]["start"]."/".$sql["parser"]["end"]."</font> Feld $i: ".htmlspecialchars($tb[$i])."<font color=#008000>- ".$sql["parser"]["sqlparts"]." ($B_Ticks / $B_Esc)</font><br>";
|
||||
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= '<div align="left" class="sqloutbox" style="font-size: 11px;width:90%;padding=6px;">';
|
||||
if($meldung!="") $s.='<p class="success" align="left">'.$meldung.'</p>';
|
||||
$s.='<h5 align="center">'.$lang['sql_output'].'</h5>';
|
||||
$s.='<strong>'.$sql["parser"]["sql_commands"].'</strong>'.$lang['sql_commands_in'].round($sql["parser"]["time_used"],4).$lang['sql_commands_in2'].'<br><br>';
|
||||
$s.=$lang['sql_out1'].'<strong>'.$sql["parser"]["drop"].'</strong> <span style="color:#990099;font-weight:bold;">DROP</span>-, ';
|
||||
$s.='<strong>'.$sql["parser"]["create"].'</strong> <span style="color:#990099;font-weight:bold;">CREATE</span>-, ';
|
||||
$s.='<strong>'.$sql["parser"]["insert"].'</strong> <span style="color:#990099;font-weight:bold;">INSERT</span>-, ';
|
||||
$s.='<strong>'.$sql["parser"]["update"].'</strong> <span style="color:#990099;font-weight:bold;">UPDATE</span>-'.$lang['sql_out2'].'<br>';
|
||||
$s.=$lang['sql_out3'].'<strong>'.$sql["parser"]["comment"].'</strong> '.$lang['sql_out4'].'<br>';
|
||||
if($sql["parser"]["sql_commands"]<5000)
|
||||
$s.='<pre style="line-height: 60%;">'.highlight_sql($sqlcommand).'</pre></div>';
|
||||
else $s.=$lang['sql_out5']."</div>";
|
||||
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,$lang;
|
||||
|
||||
if(count($SQL_ARRAY)==0) {
|
||||
$r='<a href="sql.php?context=1" class="uls">'.$lang["sql_befehle"].'</a>';
|
||||
if($when==0)
|
||||
$r.='<input type="hidden" name="command_before_'.$index.'" value="">';
|
||||
else
|
||||
$r.='<input type="hidden" name="command_after_'.$index.'" value="">';
|
||||
} else {
|
||||
if($when==0) {
|
||||
$r='<select class="SQLCombo" name="command_before_'.$index.'">';
|
||||
$csql=$databases["command_before_dump"][$index];
|
||||
} else {
|
||||
$r='<select class="SQLCombo" name="command_after_'.$index.'">';
|
||||
$csql=$databases["command_after_dump"][$index];
|
||||
}
|
||||
|
||||
$r.='<option value="" '.(($csql=="") ? "selected" : "").'> </option>';
|
||||
if(count($SQL_ARRAY)>0) {
|
||||
for($i=0;$i<count($SQL_ARRAY);$i++) {
|
||||
$s=str_replace('"',"'",SQL_String($i));
|
||||
$r.='<option value="'.$s.'" '.(($csql==$s) ? "selected" : "").'>'.SQL_Name($i).'</option>'.$nl;
|
||||
}
|
||||
}
|
||||
|
||||
$r.='</select>';
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function EngineCombo($default="")
|
||||
{
|
||||
global $config;
|
||||
if(!$config["dbconnection"]) MSD_mysql_connect();
|
||||
|
||||
$r='<option value="" '.(($default=="") ? "selected" : "").'></option>';
|
||||
if(!MSD_NEW_VERSION) {
|
||||
//BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM
|
||||
$r.='<option value="BDB" '.(("BDB"==$default) ? "selected" : "").'>BDB</option>';
|
||||
$r.='<option value="HEAP" '.(("HEAP"==$default) ? "selected" : "").'>HEAP</option>';
|
||||
$r.='<option value="ISAM" '.(("ISAM"==$default) ? "selected" : "").'>ISAM</option>';
|
||||
$r.='<option value="InnoDB" '.(("InnoDB"==$default) ? "selected" : "").'>InnoDB</option>';
|
||||
$r.='<option value="MERGE" '.(("MERGE"==$default) ? "selected" : "").'>MERGE</option>';
|
||||
$r.='<option value="MRG_MYISAM" '.(("MRG_MYISAM"==$default) ? "selected" : "").'>MRG_MYISAM</option>';
|
||||
$r.='<option value="MYISAM" '.(("MyISAM"==$default) ? "selected" : "").'>MyISAM</option>';
|
||||
} else {
|
||||
$res=mysql_query("SHOW ENGINES");
|
||||
$num = mysql_num_rows($res);
|
||||
for($i=0;$i<$num;$i++) {
|
||||
$row=mysql_fetch_array($res);
|
||||
$r.='<option value="'.$row["Engine"].'" '.(($row["Engine"]==$default) ? "selected" : "").'>'.$row["Engine"].'</option>';
|
||||
}
|
||||
}
|
||||
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='<option value="" '.(($default=="") ? "selected" : "").'></option>';
|
||||
for($i=0;$i<$num;$i++) {
|
||||
$row=mysql_fetch_array($res);
|
||||
$r.='<option value="'.$row["Charset"].'" '.(($row["Charset"]==$default) ? "selected" : "").'>'.$row["Charset"].'</option>';
|
||||
}
|
||||
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="",$withcharset=0)
|
||||
{
|
||||
if(!MSD_NEW_VERSION) {
|
||||
return "";
|
||||
} else {
|
||||
$r=GetCollationArray();
|
||||
sort($r);
|
||||
$s="";
|
||||
$s='<option value="" '.(($default=="") ? "selected" : "").'></option>';
|
||||
$group="";
|
||||
for($i=0;$i<count($r);$i++) {
|
||||
$gc=$r[$i]["Charset"];
|
||||
if($gc!=$group) {
|
||||
$group=$gc;
|
||||
$s.='<optgroup label="'.$group.'">';
|
||||
}
|
||||
$s.='<option value="'.(($withcharset==1) ? $group.'|' : '').$r[$i]["Collation"].'" '.(($r[$i]["Collation"]==$default) ? "selected" : "").'>'.$r[$i]["Collation"].'</option>';
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
}
|
||||
function AttributeCombo($default="")
|
||||
{
|
||||
$s='<option value="" '.(($default=="") ? "selected" : "").'></option>';
|
||||
$s.='<option value="unsigned" '.(($default=="unsigned") ? "selected" : "").'>unsigned</option>';
|
||||
$s.='<option value="unsigned zerofill" '.(($default=="unsigned zerofill") ? "selected" : "").'>unsigned zerofill</option>';
|
||||
return $s;
|
||||
|
||||
}
|
||||
|
||||
function simple_bbcode_conversion($a)
|
||||
{
|
||||
global $config;
|
||||
$tag_start='<div style="color:'.$config["bb_textcolor"].';width:'.$config["bb_width"].'px;">';
|
||||
$tag_end='</div>';
|
||||
|
||||
//replacements
|
||||
$a=nl2br($a);
|
||||
|
||||
$a=preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/si","<a class=\"small\" href=\"$1\" target=\"blank\">$2</a>",$a);
|
||||
$a=preg_replace("/\[urltargetself=(.*?)\](.*?)\[\/urltargetself\]/si","<a class=\"small\" href=\"$1\" target=\"blank\">$2</a>",$a);
|
||||
$a=preg_replace("/\[url\](.*?)\[\/url\]/si","<a class=\"small\" href=\"$1\" target=\"blank\">$1</a>",$a);
|
||||
$a=preg_replace("/\[ed2k=\+(.*?)\](.*?)\[\/ed2k\]/si","<a class=\"small\" href=\"$1\" target=\"blank\">$2</a>",$a);
|
||||
$a=preg_replace("/\[ed2k=(.*?)\](.*?)\[\/ed2k\]/si","<a class=\"small\" href=\"$1\" target=\"blank\">$2</a>",$a);
|
||||
|
||||
$a=preg_replace("/\[center\](.*?)\[\/center\]/si", "<div align=\"center\">$1</div>", $a);
|
||||
$a=preg_replace("/\[size=([1-2]?[0-9])\](.*?)\[\/size\]/si", "<span style=\"font-size=$1px;\">$2</span>", $a);
|
||||
$a=preg_replace("/\[size=([1-2]?[0-9]):(.*?)\](.*?)\[\/size(.*?)\]/si", "<span style=\"font-size=$1px;\">$3</span>", $a);
|
||||
$a=preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/si", "<span style=\"font-family:$1;\">$2</span>", $a);
|
||||
$a=preg_replace("/\[color=(.*?)\](.*?)\[\/color\]/si", "<span style=\"color=$1;\">$2</span>", $a);
|
||||
$a=preg_replace("/\[color=(.*?):(.*?)\](.*?)\[\/color(.*?)\]/si", "<span style=\"color=$1;\">$3</span>", $a);
|
||||
$a=preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"$1\" vspace=4 hspace=4>", $a);
|
||||
$a=preg_replace("/\[b\](.*?)\[\/b\]/si", "<strong>$1</strong>", $a);
|
||||
$a=preg_replace("/\[b(.*?)\](.*?)\[\/b(.*?)\]/si", "<strong>$2</strong>", $a);
|
||||
$a=preg_replace("/\[u\](.*?)\[\/u\]/si", "<u>$1</u>", $a);
|
||||
$a=preg_replace("/\[u(.*?)\](.*?)\[\/u(.*?)\]/si", "<u>$2</u>", $a);
|
||||
$a=preg_replace("/\[i\](.*?)\[\/i\]/si", "<em>$1</em>", $a);
|
||||
$a=preg_replace("/\[i(.*?)\](.*?)\[\/i(.*?)\]/si", "<em>$2</em>", $a);
|
||||
$a=preg_replace("/\[quote\](.*?)\[\/quote\]/si", "<p align=\"left\" style=\"border: 2px solid silver;padding:4px;\">$1</p>", $a);
|
||||
$a=preg_replace("/\[quote:(.*?)\](.*?)\[\/quote(.*?)\]/si", "<p align=\"left\" style=\"border: 2px solid silver;padding:4px;\">$2</p>", $a);
|
||||
$a=preg_replace("/\[code:(.*?)\](.*?)\[\/code(.*?)\]/si", "<p align=\"left\" style=\"border: 2px solid red;color:green;padding:4px;\">$2</p>", $a);
|
||||
$a=preg_replace("/\[hide\](.*?)\[\/hide\]/si", "<div style=\"background-color:#ccffcc;\">$1</div>", $a);
|
||||
|
||||
$a=preg_replace("/[[:space:]]http:\/\/(.*?)[[:space:]]/si","<a class=\"small\" href=\"http://$1\" target=\"blank\">$1</a>",$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<br>";
|
||||
}
|
||||
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.='<option value="'.$s.'" '.((strtoupper($default)==strtoupper($s)) ? "selected" : "" ).'>'.$s.'</option>'."\n";
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
function FillFieldinfos($db,$tabelle)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$fields_infos=Array();
|
||||
|
||||
$t=GetCreateTable($db,$tabelle);
|
||||
$sqlf="SHOW FULL FIELDS FROM `$db`.`$tabelle`;";
|
||||
$res=MSD_query($sqlf) or die(SQLError($sqlf,mysql_error()));
|
||||
$anz_fields=mysql_num_rows($res);
|
||||
|
||||
for($i=0;$i<$anz_fields;$i++) {
|
||||
$row=mysql_fetch_array($res);
|
||||
if(MSD_NEW_VERSION) $fields_infos[$i]["collate"]=$row["Collation"];
|
||||
if(MSD_NEW_VERSION) $fields_infos[$i]["comment"]=$row["Comment"];
|
||||
$fields_infos[$i]["privileges"]=$row["Privileges"];
|
||||
}
|
||||
$fields_infos["_primarykey_"]="";
|
||||
$flds=$keys=$ukeys=$fkeys=0;
|
||||
$fields_infos["_createtable_"]=$t;
|
||||
$tmp=explode("\n",$t);
|
||||
for($i=1;$i<count($tmp)-1;$i++) {
|
||||
$t=trim($tmp[$i]);
|
||||
if(substr($t,-1)==",") $t=substr($t,0,strlen($t)-1);
|
||||
//echo $t."<br>";
|
||||
|
||||
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<count($att);$i++) {
|
||||
if(substr($att[$ii],-1)!="`") {
|
||||
$fields_infos[$flds]["name"].=$att[$ii];
|
||||
} else {
|
||||
$fields_infos[$flds]["name"].=str_replace("`","",$att[$ii]);
|
||||
$s=$ii+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fields_infos[$flds]["type"]=(strpos($att[$s],"(")) ? substr($att[$s],0,strpos($att[$s],"(")) : $att[$s];
|
||||
$fields_infos[$flds]["size"]=(strpos($att[$s],"(")) ? substr($att[$s],strpos($att[$s],"(")+1,strpos($att[$s],")")-strpos($att[$s],"(")-1) : "";
|
||||
$fields_infos[$flds]["default"]="";
|
||||
$fields_infos[$flds]["null"]="";
|
||||
$fields_infos[$flds]["extra"]="";
|
||||
$fields_infos[$flds]["attribut"]="";
|
||||
|
||||
$s++;
|
||||
while($s<count($att)) {
|
||||
if(isset($att[$s+1]) && strtolower($att[$s].$att[$s+1])=="unsignedzerofill") {
|
||||
$fields_infos[$flds]["attribut"]="unsigned zerofill";
|
||||
$s+=2;
|
||||
} elseif(strtolower($att[$s])=="unsigned") {
|
||||
$fields_infos[$flds]["attribut"]="unsigned";
|
||||
$s++;
|
||||
} elseif(isset($att[$s+1]) && strtolower($att[$s].$att[$s+1])=="notnull") {
|
||||
$fields_infos[$flds]["null"]="NOT NULL";
|
||||
$s+=2;
|
||||
} elseif(strtolower($att[$s])=="null") {
|
||||
$fields_infos[$flds]["null"]="NULL";
|
||||
$s++;
|
||||
} elseif(strtolower($att[$s])=="auto_increment") {
|
||||
$fields_infos[$flds]["extra"]="auto_increment";
|
||||
$s++;
|
||||
} elseif(strtolower($att[$s])=="collate") {
|
||||
$fields_infos[$flds]["collate"]=$att[$s+1];
|
||||
$s+=2;
|
||||
} elseif(strtolower($att[$s])=="character") {
|
||||
$fields_infos[$flds]["character set"]=$att[$s+2];
|
||||
$s+=3;
|
||||
} elseif(strtolower($att[$s])=="default") {
|
||||
//if(strpos(strtolower($fields_infos[$flds]["type"]),"text")===false && strtolower($fields_infos[$flds]["type"])!="varchar")
|
||||
$d="";$ii=$s+1;
|
||||
if(substr($att[$ii],0,1)=="'" && substr($att[$ii],-1)=="'") {
|
||||
$fields_infos[$flds]["default"]=$att[$ii];
|
||||
$s+=2;
|
||||
} else {
|
||||
if(substr($att[$ii],0,1)=="'") {
|
||||
$fields_infos[$flds]["default"]=$att[$ii]." ".$att[$ii+1];
|
||||
$s+=3;
|
||||
} else {
|
||||
$fields_infos[$flds]["default"]=$att[$ii];
|
||||
$s+=2;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//echo "not identified: $att[$s]<br>";
|
||||
$s++;
|
||||
}
|
||||
}
|
||||
|
||||
$flds++;
|
||||
}
|
||||
}
|
||||
//echo substr($tmp[count($tmp)-1],2)."<br>";
|
||||
$ext=explode(" ",substr($tmp[count($tmp)-1],2));
|
||||
$s="";$haltchar="=";
|
||||
for($i=0;$i<count($ext);$i++) {
|
||||
if(!strpos($ext[$i],$haltchar)) {
|
||||
$s.=$ext[$i]." ";
|
||||
} else {
|
||||
if($haltchar=="'") {
|
||||
$fields_infos["_tableinfo_"]["COMMENT"]=$s.$ext[$i];
|
||||
$s="";$haltchar="=";
|
||||
} else {
|
||||
$s.=substr($ext[$i],0,strpos($ext[$i],$haltchar));
|
||||
if(strtoupper($s)=="COMMENT") {
|
||||
$s=substr($ext[$i],strpos($ext[$i],$haltchar)+1);
|
||||
if(substr($s,-1)=="'") {
|
||||
$fields_infos["_tableinfo_"]["COMMENT"]=$s;
|
||||
$s="";
|
||||
} else {
|
||||
$s.=" ";
|
||||
$haltchar="'";
|
||||
}
|
||||
} else {
|
||||
$fields_infos["_tableinfo_"][strtoupper($s)]=substr($ext[$i],strpos($ext[$i],$haltchar)+1);
|
||||
$s="";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $fields_infos;
|
||||
}
|
||||
|
||||
function ChangeKeys($ok,$nk,$fld,$size,$restriction="")
|
||||
{
|
||||
if($ok[0]==$nk[0] && $ok[1]==$nk[1] && $ok[2]==$nk[2] && $ok[3]==$nk[3])
|
||||
return "";
|
||||
else {
|
||||
$s=""; //"$ok[0] | $ok[1] | $ok[2] | $ok[3] *** $nk[0] | $nk[1] |$nk[2] | $nk[3]<br>";
|
||||
|
||||
if($ok[0]==0 && $nk[0]==1) {
|
||||
if($restriction!="drop_only") $s.="ADD PRIMARY KEY (`$fld`), ";
|
||||
} elseif ($ok[0]==1 && $nk[0]==0) {
|
||||
$s.="DROP PRIMARY KEY, ";
|
||||
}
|
||||
if($ok[1]==0 && $nk[1]==1) {
|
||||
if($restriction!="drop_only") $s.="ADD UNIQUE INDEX `$fld` (`$fld`), ";
|
||||
} elseif ($ok[1]==1 && $nk[1]==0) {
|
||||
$s.="DROP INDEX `$fld`, ";
|
||||
}
|
||||
if($ok[2]==0 && $nk[2]==1) {
|
||||
if($restriction!="drop_only") $s.="ADD INDEX `$fld` (`$fld`), ";
|
||||
} elseif ($ok[2]==1 && $nk[2]==0) {
|
||||
$s.="DROP INDEX `$fld`, ";
|
||||
}
|
||||
if($ok[3]==0 && $nk[3]==1) {
|
||||
if($restriction!="drop_only") $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;
|
||||
}
|
||||
|
||||
function CheckCSVOptions()
|
||||
{
|
||||
global $sql;
|
||||
if(!isset($sql["export"]["trenn"])) $sql["export"]["trenn"]=";";
|
||||
if(!isset($sql["export"]["enc"])) $sql["export"]["enc"]="\"";
|
||||
if(!isset($sql["export"]["esc"])) $sql["export"]["esc"]="\\";
|
||||
if(!isset($sql["export"]["ztrenn"])) $sql["export"]["ztrenn"]="\\r\\n";
|
||||
if(!isset($sql["export"]["null"])) $sql["export"]["null"]="NULL";
|
||||
if(!isset($sql["export"]["namefirstline"])) $sql["export"]["namefirstline"]=0;
|
||||
if(!isset($sql["export"]["format"])) $sql["export"]["format"]=0;
|
||||
if(!isset($sql["export"]["sendfile"])) $sql["export"]["sendfile"]=0;
|
||||
if(!isset($sql["export"]["tables"])) $sql["export"]["tables"]=Array();
|
||||
if(!isset($sql["export"]["compressed"])) $sql["export"]["compressed"]=0;
|
||||
|
||||
if(!isset($sql["import"]["trenn"])) $sql["import"]["trenn"]=";";
|
||||
if(!isset($sql["import"]["enc"])) $sql["import"]["enc"]="\"";
|
||||
if(!isset($sql["import"]["esc"])) $sql["import"]["esc"]="\\";
|
||||
if(!isset($sql["import"]["ztrenn"])) $sql["import"]["ztrenn"]="\\r\\n";
|
||||
if(!isset($sql["import"]["null"])) $sql["import"]["null"]="NULL";
|
||||
if(!isset($sql["import"]["namefirstline"])) $sql["import"]["namefirstline"]=0;
|
||||
if(!isset($sql["import"]["format"])) $sql["import"]["format"]=0;
|
||||
|
||||
}
|
||||
|
||||
function ExportCSV() {
|
||||
global $sql,$config;
|
||||
$t="";
|
||||
$time_start = time();
|
||||
if(!isset($config["dbconnection"])) MSD_mysql_connect();
|
||||
for($table=0;$table<count($sql["export"]["tables"]);$table++) {
|
||||
$sqlt="SHOW Fields FROM `".$sql["export"]["db"]."`.`".$sql["export"]["tables"][$table]."`;";
|
||||
$res=MSD_query($sqlt) or die(SQLError($sqlt,mysql_error()));
|
||||
if($res) {
|
||||
$numfields=mysql_numrows($res);
|
||||
if($sql["export"]["namefirstline"]==1) {
|
||||
for($feld=0;$feld<$numfields;$feld++) {
|
||||
$row=mysql_fetch_row($res);
|
||||
if($sql["export"]["enc"]!="")
|
||||
$t.=$sql["export"]["enc"].$row[0].$sql["export"]["enc"].(($feld+1<$numfields) ? $sql["export"]["trenn"] : '');
|
||||
else
|
||||
$t.=$row[0].(($feld+1<$numfields) ? $sql["export"]["trenn"] : '');
|
||||
}
|
||||
$t.=$sql["export"]["endline"];
|
||||
$sql["export"]["lines"]++;
|
||||
}
|
||||
}
|
||||
$sqlt="SELECT * FROM `".$sql["export"]["db"]."`.`".$sql["export"]["tables"][$table]."`;";
|
||||
$res=MSD_query($sqlt) or die(SQLError($sqlt,mysql_error()));
|
||||
if($res) {
|
||||
$numrows=mysql_numrows($res);
|
||||
for($data=0;$data<$numrows;$data++) {
|
||||
$row=mysql_fetch_row($res);
|
||||
for($feld=0;$feld<$numfields;$feld++) {
|
||||
if(!isset($row[$feld]) || is_null($row[$feld])) {
|
||||
$t.=$sql["export"]["null"];
|
||||
} elseif($row[$feld]=='0' || $row[$feld]!='') {
|
||||
if($sql["export"]["enc"]!="")
|
||||
$t.=$sql["export"]["enc"].str_replace($sql["export"]["enc"],$sql["export"]["esc"].$sql["export"]["enc"],$row[$feld]).$sql["export"]["enc"];
|
||||
else
|
||||
$t.=$row[$feld];
|
||||
} else {
|
||||
$t.='';
|
||||
}
|
||||
$t.=($feld+1<$numfields) ? $sql["export"]["trenn"] : '';
|
||||
}
|
||||
$t.=$sql["export"]["endline"];
|
||||
$sql["export"]["lines"]++;
|
||||
if(strlen($t)>$config["memory_limit"]) {
|
||||
CSVOutput($t);
|
||||
$t="";
|
||||
}
|
||||
$time_now = time();
|
||||
if ($time_start >= $time_now + 30) {
|
||||
$time_start = $time_now;
|
||||
header('X-MSDPing: Pong');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CSVOutput($t,1);
|
||||
}
|
||||
|
||||
function CSVOutput($str,$last=0)
|
||||
{
|
||||
global $sql,$config;
|
||||
if($sql["export"]["sendfile"]==0) {
|
||||
//Display
|
||||
echo $str;
|
||||
} else {
|
||||
if($sql["export"]["header_sent"]=="") {
|
||||
if($sql["export"]["compressed"]==1 & !function_exists('gzencode')) $sql["export"]["compressed"]=0;
|
||||
$file=$sql["export"]["db"].(($sql["export"]["compressed"]==1) ? ".csv.gz" : ".csv");
|
||||
$mime=($sql["export"]["compressed"]==0) ? "text/x-csv" : "application/x-gzip";
|
||||
header('Content-Type: '.$mime);
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
if (MSD_BROWSER_AGENT == 'IE') {
|
||||
header('Content-Disposition: inline; filename="' . $file . '"');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
} else {
|
||||
header('Content-Disposition: attachment; filename="' . $file . '"');
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
$sql["export"]["header_sent"]=="1";
|
||||
}
|
||||
if($sql["export"]["compressed"]==1)
|
||||
echo gzencode($str);
|
||||
else
|
||||
echo $str;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function DoImport() {
|
||||
global $sql,$lang;
|
||||
$r='<span class="swarnung">';
|
||||
$zeilen=count($sql["import"]["csv"])-$sql["import"]["namefirstline"];
|
||||
$sql["import"]["first_zeile"]=explode($sql["import"]["trenn"],$sql["import"]["csv"][0]);
|
||||
$importfelder=count($sql["import"]["first_zeile"]);
|
||||
|
||||
if($sql["import"]["tablecreate"]==0) {
|
||||
$res=MSD_query("show fields FROM ".$sql["import"]["table"]);
|
||||
$tabellenfelder=mysql_num_rows($res);
|
||||
if($importfelder!=$tabellenfelder) {
|
||||
$r.='<br>'.sprintf($lang["csv_fieldcount_nomatch"],$tabellenfelder,$importfelder);
|
||||
} else {
|
||||
$ok=GetImportFields();
|
||||
}
|
||||
} else {
|
||||
$ok=ImportCreateTable();
|
||||
if($ok==0) {
|
||||
$r.='<br>'.sprintf($lang["csv_errorcreatetable"],$sql["import"]["table"]);
|
||||
}
|
||||
}
|
||||
if($ok==1) {
|
||||
$insert="";
|
||||
if($sql["import"]["emptydb"]==1 && $sql["import"]["tablecreate"]==0) {
|
||||
MSD_DoSQL("TRUNCATE ".$sql["import"]["table"].";");
|
||||
}
|
||||
$sql["import"]["lines_imported"]=0;
|
||||
for($i=$sql["import"]["namefirstline"];$i<$zeilen+$sql["import"]["namefirstline"];$i++) {
|
||||
//Importieren
|
||||
$insert="INSERT INTO ".$sql["import"]["table"]." VALUES(";
|
||||
if($sql["import"]["createindex"]==1) $insert .="'', ";
|
||||
$zc=trim(rtrim($sql["import"]["csv"][$i]));
|
||||
if($zc!="") {
|
||||
$zeile=explode($sql["import"]["trenn"],$zc);
|
||||
$enc=($sql["import"]["enc"]=="") ? "'" : "";
|
||||
for($j=0;$j<$importfelder;$j++) {
|
||||
$a=($zeile[$j]=="" && $enc=="") ? $zeile[$j] : "''";
|
||||
$insert.=$enc.$a.$enc.(($j==$importfelder-1) ? ");\n" : ",");
|
||||
}
|
||||
MSD_DoSQL($insert);
|
||||
$sql["import"]["lines_imported"]++;
|
||||
}
|
||||
}
|
||||
$r.=sprintf($lang["csv_fieldslines"],$importfelder,$sql["import"]["lines_imported"]);
|
||||
}
|
||||
|
||||
$r.='</span>';
|
||||
return $r;
|
||||
|
||||
}
|
||||
|
||||
function ImportCreateTable() {
|
||||
global $sql,$lang,$db,$config;
|
||||
$tbl=Array();
|
||||
$tabellen = mysql_list_tables($db,$config["dbconnection"]);
|
||||
$num_tables = mysql_num_rows($tabellen);
|
||||
for($i=0;$i<$num_tables;$i++) {
|
||||
$tbl[]=strtolower(mysql_tablename($tabellen,$i));
|
||||
}
|
||||
$i=0;
|
||||
$sql["import"]["table"]=$sql["import"]["table"].$i;
|
||||
while(in_array($sql["import"]["table"],$tbl)) {
|
||||
$sql["import"]["table"]=substr($sql["import"]["table"],0,strlen($sql["import"]["table"])-1).++$i;
|
||||
}
|
||||
$create="CREATE TABLE `".$sql["import"]["table"]."` (".(($sql["import"]["createindex"]==1) ? '`import_id` int(11) unsigned NOT NULL auto_increment, ' : '');
|
||||
if($sql["import"]["namefirstline"]) {
|
||||
for($i=0;$i<count($sql["import"]["first_zeile"]);$i++) {
|
||||
$create.='`'.$sql["import"]["first_zeile"][$i].'` VARCHAR(250) NOT NULL, ';
|
||||
}
|
||||
} else {
|
||||
for($i=0;$i<count($sql["import"]["first_zeile"]);$i++) {
|
||||
$create.='`FIELD_'.$i.'` VARCHAR(250) NOT NULL, ';
|
||||
}
|
||||
}
|
||||
if($sql["import"]["createindex"]==1)
|
||||
$create.='PRIMARY KEY (`import_id`) ';
|
||||
else
|
||||
$create=substr($create,0,strlen($create)-2);
|
||||
|
||||
$create.=') '.((MSD_NEW_VERSION) ? 'ENGINE' : 'TYPE')."=MyISAM COMMENT='imported at ".date("l dS of F Y h:i:s A")."'";
|
||||
$res=mysql_query($create,$config["dbconnection"]) || die(SQLError($create,mysql_error()));
|
||||
return 1;
|
||||
}
|
||||
|
||||
function GetImportFields() {
|
||||
global $sql,$lang;
|
||||
|
||||
}
|
||||
?>
|
9
inc/header.php
Normale Datei
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
include_once("inc/functions.php");
|
||||
include_once("inc/mysql.php");
|
||||
|
||||
if(!file_exists($config["files"]["parameter"])) TestWorkDir();
|
||||
include($config["files"]["parameter"]);
|
||||
include("language/lang_list.php");
|
||||
SelectDB($databases["db_selected_index"]);
|
||||
?>
|
100
inc/mysql.php
Normale Datei
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
|
||||
|
||||
//Feldspezifikationen
|
||||
$feldtypen=Array("VARCHAR","TINYINT","TEXT","DATE","SMALLINT","MEDIUMINT","INT","BIGINT","FLOAT","DOUBLE","DECIMAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","TINYBLOB","TINYTEXT","BLOB","MEDIUMBLOB","MEDIUMTEXT","LONGBLOB","LONGTEXT","ENUM","SET");
|
||||
$feldattribute=ARRAY("","BINARY","UNSIGNED","UNSIGNED ZEROFILL");
|
||||
$feldnulls=Array("NOT NULL","NULL");
|
||||
$feldextras=Array("","AUTO_INCREMENT");
|
||||
$feldkeys=Array("","PRIMARY KEY","UNIQUE KEY", "FULLTEXT");
|
||||
$feldrowformat=Array("","FIXED","DYNAMIC","COMPRESSED");
|
||||
|
||||
$rechte_daten=Array("SELECT","INSERT","UPDATE","DELETE","FILE");
|
||||
$rechte_struktur=Array("CREATE","ALTER","INDEX","DROP","CREATE TEMPORARY TABLES");
|
||||
$rechte_admin=Array("GRANT","SUPER","PROCESS","RELOAD","SHUTDOWN","SHOW DATABASES","LOCK TABLES","REFERENCES","EXECUTE","REPLICATION CLIENT","REPLICATION SLAVE");
|
||||
$rechte_resourcen=Array("MAX QUERIES PER HOUR","MAX UPDATES PER HOUR","MAX CONNECTIONS PER HOUR");
|
||||
|
||||
$sql_keywords=array( 'ALTER', 'AND', 'ADD', 'AUTO_INCREMENT','BETWEEN', 'BINARY', 'BOTH', 'BY', 'BOOLEAN','CHANGE', 'CHARSET','CHECK','COLLATE', 'COLUMNS', 'COLUMN', 'CROSS','CREATE', 'DATABASES', 'DATABASE', 'DATA', 'DELAYED', 'DESCRIBE', 'DESC', 'DISTINCT', 'DELETE', 'DROP', 'DEFAULT','ENCLOSED', 'ENGINE','ESCAPED', 'EXISTS', 'EXPLAIN','FIELDS', 'FIELD', 'FLUSH', 'FOR', 'FOREIGN', 'FUNCTION', 'FROM','GROUP', 'GRANT','HAVING','IGNORE', 'INDEX', 'INFILE', 'INSERT', 'INNER', 'INTO', 'IDENTIFIED','JOIN','KEYS', 'KILL','KEY','LEADING', 'LIKE', 'LIMIT', 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LEFT', 'LANGUAGE', 'MEDIUMINT', 'MODIFY','MyISAM','NATURAL', 'NOT', 'NULL', 'NEXTVAL','OPTIMIZE', 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTFILE', 'OR', 'OUTER', 'ON','PROCEEDURE','PROCEDURAL', 'PRIMARY','READ', 'REFERENCES', 'REGEXP', 'RENAME', 'REPLACE', 'RETURN', 'REVOKE', 'RLIKE', 'RIGHT','SHOW', 'SONAME', 'STATUS', 'STRAIGHT_JOIN', 'SELECT', 'SETVAL', 'TABLES', 'TEMINATED', 'TO', 'TRAILING','TRUNCATE', 'TABLE', 'TEMPORARY', 'TRIGGER', 'TRUSTED','UNIQUE', 'UNLOCK', 'USE', 'USING', 'UPDATE', 'UNSIGNED','VALUES', 'VARIABLES', 'VIEW','WITH', 'WRITE', 'WHERE','ZEROFILL','XOR','ALL', 'ASC', 'AS','SET','IN', 'IS', 'IF');
|
||||
$mysql_doc=Array("Feldtypen" => "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();
|
||||
return true;
|
||||
}
|
||||
|
||||
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,$mysql_errorhelp_ref;
|
||||
echo '<div align="center"><table border="1" bordercolor="#ff0000" cellspacing="0">
|
||||
<tr bgcolor="#ff0000"><td style="color:white;font-size:16px;"><strong>MySQL-ERROR</strong> <a href="'.$mysql_errorhelp_ref.'" target="_blank"><img src="images/help16.gif" alt="'.$lang["MySQLErrorDoc"].'" title="'.$lang["MySQLErrorDoc"].'" width="16" height="16" border="0"></a></td></tr>
|
||||
<tr><td style="width:80%;overflow: auto;">'.$lang['sql_error1'].'<br><br><pre>'.highlight_sql($sql).'</pre></td></tr>
|
||||
<tr><td width="600">'.$lang['sql_error2'].'<br><br><span style="color:red;">'.$error.'</span></td></tr>
|
||||
</table>
|
||||
</div>';
|
||||
|
||||
}
|
||||
|
||||
function Highlight_SQL($sql)
|
||||
{
|
||||
global $sql_keywords;
|
||||
$tmp="/".implode("/ /",$sql_keywords)."/";
|
||||
$tmp_array=explode(" ",$tmp);
|
||||
$tmp="<span style=\"color:#990099;font-weight:bold;\">".implode("</span>###<span style=\"color:#990099;font-weight:bold;\">",$sql_keywords)."</span>";
|
||||
$tmp_replace=explode("###",$tmp);
|
||||
|
||||
$sql=nl2br(htmlentities($sql));
|
||||
$sql=preg_replace("/`(.*?)`/si", "<span style=\"color:red;\">`$1`</span>", $sql);
|
||||
str_replace("{","{<ul>",$sql);
|
||||
str_replace("}","}</ul>",$sql);
|
||||
str_replace("*","<span style=\"color:red;\">*</span>",$sql);
|
||||
$sql=preg_replace($tmp_array, $tmp_replace, $sql);
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
function Fieldlist($db,$tbl)
|
||||
{
|
||||
$fl="";
|
||||
$res=MSD_query("SHOW FIELDS FROM `$db`.`$tbl`;");
|
||||
if($res) {
|
||||
$fl="(";
|
||||
for($i=0;$i<mysql_num_rows($res);$i++) {
|
||||
$row=mysql_fetch_row($res);
|
||||
$fl.="`$row[0]`,";
|
||||
}
|
||||
$fl=substr($fl,0,strlen($fl)-1).")";
|
||||
}
|
||||
return $fl;
|
||||
}
|
||||
?>
|
136
inc/runtime.php
Normale Datei
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
//error_reporting(E_ALL);
|
||||
error_reporting(E_ERROR);
|
||||
|
||||
//Konstanten
|
||||
if (!defined('MSD_VERSION')) define('MSD_VERSION', '1.20');
|
||||
if (!defined('MSD_VERSION_ADD')) define('MSD_VERSION_ADD', '\'TNG\'');
|
||||
|
||||
|
||||
if (!defined('MSD_OS')) define('MSD_OS', PHP_OS);
|
||||
if (!defined('MSD_OS_EXT')) define('MSD_OS_EXT', php_uname());
|
||||
if (!defined('MSD_IS_WINDOWS')) {
|
||||
if (stristr(PHP_OS, 'win')) {
|
||||
define('MSD_IS_WINDOWS', 1);
|
||||
} else {
|
||||
define('MSD_IS_WINDOWS', 0);
|
||||
}
|
||||
}
|
||||
if (!defined('MSD_USER_OS')) {
|
||||
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
|
||||
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
|
||||
} else if (!isset($HTTP_USER_AGENT)) {
|
||||
$HTTP_USER_AGENT = '';
|
||||
}
|
||||
|
||||
// 1. Platform
|
||||
if (strstr($HTTP_USER_AGENT, 'Win')) {
|
||||
define('MSD_USER_OS', 'Win');
|
||||
} else if (strstr($HTTP_USER_AGENT, 'Mac')) {
|
||||
define('MSD_USER_OS', 'Mac');
|
||||
} else if (strstr($HTTP_USER_AGENT, 'Linux')) {
|
||||
define('MSD_USER_OS', 'Linux');
|
||||
} else if (strstr($HTTP_USER_AGENT, 'Unix')) {
|
||||
define('MSD_USER_OS', 'Unix');
|
||||
} else if (strstr($HTTP_USER_AGENT, 'OS/2')) {
|
||||
define('MSD_USER_OS', 'OS/2');
|
||||
} else {
|
||||
define('MSD_USER_OS', 'Other');
|
||||
}
|
||||
|
||||
// 2. browser and version
|
||||
// (must check everything else before Mozilla)
|
||||
|
||||
if (preg_match('@Opera(/| )([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) {
|
||||
define('MSD_BROWSER_VERSION', $log_version[2]);
|
||||
define('MSD_BROWSER_AGENT', 'OPERA');
|
||||
$BrowserIcon="images/opera.png";
|
||||
} else if (preg_match('@MSIE ([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) {
|
||||
define('MSD_BROWSER_VERSION', $log_version[1]);
|
||||
define('MSD_BROWSER_AGENT', 'IE');
|
||||
$BrowserIcon="images/msie.png";
|
||||
} else if (preg_match('@OmniWeb/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) {
|
||||
define('MSD_BROWSER_VERSION', $log_version[1]);
|
||||
define('MSD_BROWSER_AGENT', 'OMNIWEB');
|
||||
$BrowserIcon="images/omniweb.png";
|
||||
} else if (preg_match('@(Konqueror/)(.*)(;)@', $HTTP_USER_AGENT, $log_version)) {
|
||||
define('MSD_BROWSER_VERSION', $log_version[2]);
|
||||
define('MSD_BROWSER_AGENT', 'KONQUEROR');
|
||||
$BrowserIcon="images/konqueror.png";
|
||||
} else if (preg_match('@Mozilla/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)
|
||||
&& preg_match('@Safari/([0-9]*)@', $HTTP_USER_AGENT, $log_version2)) {
|
||||
define('MSD_BROWSER_VERSION', $log_version[1] . '.' . $log_version2[1]);
|
||||
define('MSD_BROWSER_AGENT', 'SAFARI');
|
||||
$BrowserIcon="images/safari.png";
|
||||
} else if (preg_match('@Mozilla/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) {
|
||||
define('MSD_BROWSER_VERSION', $log_version[1]);
|
||||
define('MSD_BROWSER_AGENT', 'MOZILLA');
|
||||
$BrowserIcon="images/mozilla.png";
|
||||
} else {
|
||||
define('MSD_BROWSER_VERSION', 0);
|
||||
define('MSD_BROWSER_AGENT', 'OTHER');
|
||||
$BrowserIcon="images/blanc.gif";
|
||||
}
|
||||
}
|
||||
|
||||
//feste Variabeln
|
||||
$config["lock_tables"]=0;
|
||||
|
||||
//Pfade und Files
|
||||
$config["paths"]["root"]=Realpfad("./");
|
||||
$config["paths"]["work"]="work/";
|
||||
$config["paths"]["backup"]=$config["paths"]["work"]."backup/";
|
||||
$config["paths"]["structure"]=$config["paths"]["work"]."structure/";
|
||||
$config["paths"]["log"]=$config["paths"]["work"]."log/";
|
||||
$config["paths"]["config"]=$config["paths"]["work"]."config/";
|
||||
$config["paths"]["perlexec"]="msd_cron/";
|
||||
$config["cron_configurationfile"]="mysqldumper.conf";
|
||||
$config["files"]["log"]=$config["paths"]["log"]."mysqldump.log";
|
||||
$config["files"]["perllog"]=$config["paths"]["log"]."mysqldump_perl.log";
|
||||
$config["files"]["perllogcomplete"]=$config["paths"]["log"]."mysqldump_perl.complete.log";
|
||||
$config["files"]["parameter"]=$config["paths"]["config"]."parameter.php";
|
||||
|
||||
//Ini-Parameter
|
||||
$config["max_execution_time"]=ini_get("max_execution_time");
|
||||
$config["safe_mode"]=ini_get('safe_mode');
|
||||
$config["magic_quotes_gpc"]=ini_get('magic_quotes_gpc');
|
||||
$config["disabled"]=ini_get("disable_functions");
|
||||
$config["phpextensions"]=implode(" ",get_loaded_extensions());
|
||||
$m=str_replace("M","",get_cfg_var("memory_limit"));
|
||||
$config["ram"]=(empty($m)) ? 0 : $m;
|
||||
|
||||
//Ist zlib möglich?
|
||||
$p1=explode(" ",$config["phpextensions"]);
|
||||
$p2=explode(",",str_replace(" ","",$config["disabled"]));
|
||||
//Buggy PHP-Version ?
|
||||
$p3=explode(".",PHP_VERSION);
|
||||
$buggy=($p3[0]==4 && $p3[1]==3 && $p3[2]<3);
|
||||
$config["zlib"]=(!$buggy) && (in_array("zlib",$p1) && (!in_array("gzopen",$p2) || !in_array("gzwrite",$p2) || !in_array("gzgets",$p2) || !in_array("gzseek",$p2) || !in_array("gztell",$p2)));
|
||||
//echo '<pre>'.print_r($p3,true).'</pre>';
|
||||
//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().'<meta http-equiv="expires" content="3600"> '.br().'<META HTTP-EQUIV="Pragma" CONTENT="no-cache">'.br(2);
|
||||
$preload_restore='<script language="JavaScript">Preload(2)</script>';
|
||||
$preload_dump='<script language="JavaScript">Preload(1)</script>';
|
||||
$config["homepage"]="http://www.mysqldumper.de/board/";
|
||||
$languagepacks_ref="http://www.mysqldumper.de/board/viewforum.php?f=24";
|
||||
$stylepacks_ref="http://www.mysqldumper.de/board/viewforum.php?f=25";
|
||||
|
||||
|
||||
|
||||
$nl="\n";
|
||||
$mysql_commentstring="--";
|
||||
|
||||
//Initialisierungen
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
64
inc/sqllib.php
Normale Datei
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
//SQL-Library
|
||||
|
||||
/*
|
||||
Template
|
||||
if $sqllib[$i]["sql"]=trenn, Then it is a Heading
|
||||
$sqllib[$i]["name"]="";
|
||||
$sqllib[$i]["sql"]="";
|
||||
$i++;
|
||||
*/
|
||||
$i=0;
|
||||
|
||||
$sqllib[$i]["name"]=$lang["sqllib_generalfunctions"];
|
||||
$sqllib[$i]["sql"]="trenn";
|
||||
$i++;
|
||||
|
||||
|
||||
$sqllib[$i]["name"]=$lang["sqllib_resetauto"];
|
||||
$sqllib[$i]["sql"]="ALTER TABLE `table` AUTO_INCREMENT=1;";
|
||||
$i++;
|
||||
|
||||
/********* phpBB-Boards *********************************/
|
||||
$sqllib[$i]["name"]="phpBB-".$lang["sqllib_boards"];
|
||||
$sqllib[$i]["sql"]="trenn";
|
||||
$i++;
|
||||
|
||||
// Bord de-/aktivieren
|
||||
$sqllib[$i]["name"]=$lang["sqllib_deactivateboard"].' [phpBB]';
|
||||
$sqllib[$i]["sql"]="UPDATE `phpbb_config` set config_value=1 where config_name='board_disable'";
|
||||
$i++;
|
||||
|
||||
$sqllib[$i]["name"]=$lang["sqllib_activateboard"].' [phpBB]';
|
||||
$sqllib[$i]["sql"]="UPDATE `phpbb_config` set config_value=0 where config_name='board_disable'";
|
||||
$i++;
|
||||
|
||||
$sqllib[$i]["name"]="WBB-".$lang["sqllib_boards"];
|
||||
$sqllib[$i]["sql"]="trenn";
|
||||
$i++;
|
||||
|
||||
// Bord de-/aktivieren
|
||||
$sqllib[$i]["name"]=$lang["sqllib_boardoffline"].' [WBB]';
|
||||
$sqllib[$i]["sql"]="UPDATE `bb1_options` set value=1 where varname='offline'";
|
||||
$i++;
|
||||
|
||||
$sqllib[$i]["name"]=$lang["sqllib_boardonline"].' [WBB]';
|
||||
$sqllib[$i]["sql"]="UPDATE `phpbb_config` set value=0 where varname='offline'";
|
||||
$i++;
|
||||
|
||||
$sqllib[$i]["name"]="vBulletin-".$lang["sqllib_boards"];
|
||||
$sqllib[$i]["sql"]="trenn";
|
||||
$i++;
|
||||
|
||||
// Bord de-/aktivieren
|
||||
$sqllib[$i]["name"]=$lang["sqllib_deactivateboard"].' [vBulletin]';
|
||||
$sqllib[$i]["sql"]="UPDATE forum SET options = options - 1 WHERE options & 1";
|
||||
$i++;
|
||||
|
||||
$sqllib[$i]["name"]=$lang["sqllib_activateboard"].' [vBulletin]';
|
||||
$sqllib[$i]["sql"]="UPDATE forum SET options = options + 1 WHERE NOT (options & 1)";
|
||||
$i++;
|
||||
|
||||
|
||||
|
||||
?>
|
73
inc/tabellenabfrage.php
Normale Datei
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
include_once("language/".$config["language"]."/lang.php");
|
||||
include_once("language/".$config["language"]."/lang_dump.php");
|
||||
|
||||
$tblr=($tblfrage_refer=="dump") ? "Backup" : $tblr="Restore";
|
||||
$filename=(isset($_GET['filename'])) ? $_GET['filename'] : "";
|
||||
|
||||
//Informationen zusammenstellen
|
||||
if($tblr=="Backup") {
|
||||
//Info aus der Datenbank lesen
|
||||
MSD_mysql_connect();
|
||||
$res=mysql_query("SHOW TABLE STATUS FROM `".$databases["db_actual"]."`");
|
||||
$numrows=mysql_num_rows($res);
|
||||
$button_name='dump_tbl';
|
||||
$button_caption=$lang['startdump'];
|
||||
$tbl_zeile="";
|
||||
for($i=0;$i<$numrows;$i++) {
|
||||
$row=mysql_fetch_array($res);
|
||||
|
||||
$tbl_zeile.='<tr><td class="sm"><input type="checkbox" class="checkbox" name="chk_tbl" value="'.$row["Name"].'">'.$row["Name"].'</td>';
|
||||
$tbl_zeile.='<td class="sm"><strong>'.$row["Rows"].'</strong> '.$lang['datawith'].' <strong>'.byte_output($row["Data_length"]+$row["Index_length"]).'</strong>, '.$lang['lastbufrom'].' '.$row["Update_time"].'</td></tr>';
|
||||
}
|
||||
} 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.='<tr><td class="sm" colspan="2">'.$lang['not_supported'].'</td>';
|
||||
} 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.='<tr><td class="sm"><input type="checkbox" class="checkbox" name="chk_tbl" value="'.$s[1].'">'.$s[1].'</td>';
|
||||
$tbl_zeile.='<td class="sm"><strong>'.$s[2].'</strong> '.$lang['datawith'].' <strong>'.byte_output($s[3]).'</strong>, '.$lang['lastbufrom'].' '.$s[4].'</td></tr>';
|
||||
}
|
||||
if($gz) gzclose ($fp); else fclose ($fp);
|
||||
}
|
||||
}
|
||||
echo '<div class="pagetitle">'.$tblr.' - '.$lang['tableselection'].'</div><h6>'.$lang['db'].': '.$databases["db_actual"].'</h6><div align="center">';
|
||||
echo '<form name="frm_tbl" action="filemanagement.php" method="post" onSubmit="return chkFormular()"><table width="90%" border="1">';
|
||||
echo '<tr><td colspan="2" class="hd"> <input type="Button" class="Formbutton_small" onclick="Sel(true);" value="'.$lang['deselectall'].'"> <input type="Button" class="Formbutton_small" onclick="Sel(false);" value="'.$lang['selectall'].'">';
|
||||
echo '<img src="images/blank.gif" alt="" width="80" height="1" border="0"><input type="submit" class="Formbutton" style="width:180px;" name="'.$button_name.'" value="'.$button_caption.'"></td></tr>';
|
||||
echo $tbl_zeile;
|
||||
echo '</table><input type="hidden" name="tbl_array" value=""><input type="hidden" name="filename" value="'.$filename.'"></form></div>';
|
||||
|
||||
|
||||
?>
|
46
index.php
Normale Datei
|
@ -0,0 +1,46 @@
|
|||
<?
|
||||
$force=(isset($_GET["force"])) ? $_GET["force"] : 0;
|
||||
$svice=(isset($_GET["svice"])) ? $_GET["svice"] : 0;
|
||||
$page=(isset($_GET["page"])) ? $_GET["page"] : 'main.php';
|
||||
$msv='';
|
||||
if($svive!=0) {
|
||||
if($page='main.php') {
|
||||
$page.='?svice=1';
|
||||
} else {
|
||||
$page.='&svice=1';
|
||||
}
|
||||
$msv='?svice=1';
|
||||
}
|
||||
include_once("inc/functions.php");
|
||||
if(!file_exists("work/config/parameter.php") && $force!=1) {
|
||||
header("location: install.php");
|
||||
die;
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
"http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="Author" content="Daniel Schlichtholz und Steffen Kamper">
|
||||
<title>MySQL Dumper</title>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
if (self != top) {
|
||||
parent.location.href=self.location.href;
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<frameset cols="190,*" frameborder="0" framespacing="0" border="0">
|
||||
<frame name="MySQL_Dumper_menu" src="menu.php<?php echo $msv;?>" scrolling="no" noresize frameborder="0">
|
||||
<frame name="MySQL_Dumper_content" src="<?php echo $page;?>" scrolling="auto" frameborder="0">
|
||||
</frameset>
|
||||
<noframes>
|
||||
<body>
|
||||
You need to get a newer browser!
|
||||
</body>
|
||||
</noframes>
|
||||
</html>
|
832
install.php
Normale Datei
|
@ -0,0 +1,832 @@
|
|||
<?php
|
||||
|
||||
$install_ftp_server=$install_ftp_user_name=$install_ftp_user_pass=$install_ftp_path="";
|
||||
|
||||
foreach($_GET as $getvar => $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;
|
||||
|
||||
|
||||
}
|
||||
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;
|
||||
$connstr="$dbhost|$dbuser|$dbpass|$dbonly|$dbport|$dbsocket";
|
||||
$delfiles=Array();
|
||||
|
||||
include_once("inc/functions.php");
|
||||
include_once("inc/mysql.php");
|
||||
require("inc/runtime.php");
|
||||
|
||||
$config['language']=$language;
|
||||
include("language/lang_list.php");
|
||||
include("language/".$language."/lang_install.php");
|
||||
$img_ok='<img src="images/ok.gif" width="16" height="16" alt="ok">';
|
||||
$img_failed='<img src="images/notok.gif" width="16" height="16" alt="failed">';
|
||||
$href="install.php?language=$language&phase=$phase&connstr=$connstr";
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<meta http-equiv="cache-control" content="must-revalidate">
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
|
||||
<title>MySQLDumper - Installation</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/classic/style.css">
|
||||
<script language="JavaScript" src="js/script.js"></script>
|
||||
<style>
|
||||
a {text-decoration:underline;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script language="JavaScript">
|
||||
function hide_tooldivs() {
|
||||
<?php foreach($lang['languages'] as $key) {
|
||||
echo 'document.getElementById("'.$key.'").style.display = \'none\';'."\n";
|
||||
}?>
|
||||
}
|
||||
|
||||
function show_tooldivs(lab) {
|
||||
hide_tooldivs();
|
||||
switch(lab) {
|
||||
<?php foreach($lang['languages'] as $key) {
|
||||
echo 'case "'.$key.'":'."\n".'document.getElementById("'.$key.'").style.display = \'block\';'."\n".'break;'."\n";
|
||||
}?>
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<?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 '<div align="center"><br>
|
||||
<a href="install.php"><img src="images/logo.gif" width="160" height="53" alt="'.$lang['install_tomenu'].'" border="0"></a><br>
|
||||
<span class="small"><strong>Version '.MSD_VERSION.' '.MSD_VERSION_ADD.'</strong><br><a href="index.php?force=1" class="small">'.$lang['install_forcescript'].'</a></span>
|
||||
';
|
||||
|
||||
echo '<h3>'.$Anzeige.'</h3>';
|
||||
|
||||
|
||||
switch ($phase) {
|
||||
|
||||
case 0: // Anfang - Sprachauswahl
|
||||
if(file_exists("config.php") && file_exists($config["paths"]["config"]."parameter.php"))zipConfig();
|
||||
|
||||
echo '<form action="install.php" method="get"><table width="95%"><input type="hidden" name="phase" value="1">';
|
||||
echo '<tr class="hd"><td align="left">Language</td><td align="left">Tools</td></tr>';
|
||||
echo '<tr><td valign="top" width="300"><table>';
|
||||
echo GetLanguageCombo("radio","radio","language","<tr><td>","</td></tr>");
|
||||
echo '</table></td><td valign="top">';
|
||||
|
||||
|
||||
foreach($lang['languages'] as $key) {
|
||||
echo("\n<div id=\"".$key.'"><a href="install.php?language='.$key.'&phase=100">'.$lang['tools1'][$key].'</a><br><br>');
|
||||
if(file_exists($config["paths"]["config"]."config.gz")) echo '<a href="install.php?language='.$key.'&phase=20">'.$lang['tools2'][$key].'</a><br><br>';
|
||||
if(file_exists($config["paths"]["config"]."parameter.php")) echo '<a href="install.php?language='.$key.'&phase=21">'.$lang['tools3'][$key].'</a><br><br>';
|
||||
if(file_exists("config.php") && file_exists($config["paths"]["config"]."parameter.php")) echo '<a href="'.$config["paths"]["config"].'config.gz">'.$lang['tools4'][$key].'</a>';
|
||||
echo("</div>");
|
||||
}
|
||||
|
||||
echo("\n</td></tr><tr><td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Installation\"></td></tr></table></form>");
|
||||
echo '<script language="JavaScript">show_tooldivs("'.$language.'");</script>';
|
||||
break;
|
||||
case 1: // checken
|
||||
if(isset($trychmod) && $trychmod==1) @chmod("config.php","0777");
|
||||
echo '<h4>'.$lang['dbparameter'].'</h4>';
|
||||
if(!is_writable("config.php")) {
|
||||
echo '<p class="warning">'.$lang['confignotwritable'].'</p>';
|
||||
echo '<a href="'.$href.'">'.$lang['tryagain'].'</a>';
|
||||
echo ' <a href="install.php">'.$lang['install_tomenu'].'</a>';
|
||||
} else {
|
||||
$tmp=file("config.php");
|
||||
$stored=0;
|
||||
if(!(isset($dbhost) && isset($dbuser) && isset($dbpass))) {
|
||||
//lese aus config
|
||||
for($i=0;$i<count($tmp);$i++) {
|
||||
if(substr($tmp[$i],0,17)=='$config["dbhost"]') {
|
||||
$config["dbhost"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbport"]') {
|
||||
$config["dbport"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,19)=='$config["dbsocket"]') {
|
||||
$config["dbsocket"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbuser"]') {
|
||||
$config["dbuser"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbpass"]') {
|
||||
$config["dbpass"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbonly"]') {
|
||||
$config["dbonly"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,19)=='$config["language"]') {
|
||||
$config["dbonly"] = extractValue($tmp[$i]);
|
||||
$stored++;
|
||||
}
|
||||
|
||||
if($stored==7) break;
|
||||
}
|
||||
}
|
||||
if(!isset($config["dbport"])) $config["dbport"]="";
|
||||
if(!isset($config["dbsocket"])) $config["dbsocket"]="";
|
||||
|
||||
$exp=(!isset($expert)) ? '<div align="right"><a href="'.$href.'&expert=1" class="uls">'.$lang['expert'].'</a></div>' : '';
|
||||
echo '<table><tr><td class="hd" colspan="2">'.$lang['dbparameter'].$exp.'</td></tr>';
|
||||
echo '<form action="install.php?language='.$language.'&phase='.$phase.'" method="post">';
|
||||
echo '<tr><td>'.$lang['db_host'].':</td><td><input type="text" name="dbhost" value="'.$config["dbhost"].'" size="60" maxlength="100"></td></tr>';
|
||||
echo '<tr><td>'.$lang['db_user'].':</td><td><input type="text" name="dbuser" value="'.$config["dbuser"].'" size="60" maxlength="100"></td></tr>';
|
||||
echo '<tr><td>'.$lang['db_pass'].':</td><td><input type="password" name="dbpass" value="'.$config["dbpass"].'" size="60" maxlength="100"></td></tr>';
|
||||
if(isset($expert)) {
|
||||
echo '<tr><td><input type="hidden" name="expert" value="1">'.$lang['db_only'].':</td><td><input type="text" name="dbonly" value="'.$config["dbonly"].'" size="60" maxlength="100"></td></tr>';
|
||||
echo '<tr><td>'.$lang['port'].':</td><td><input type="text" name="dbport" value="'.$config["dbport"].'" size="5" maxlength="5"> '.$lang['install_help_port'].'</td></tr>';
|
||||
echo '<tr><td>'.$lang['socket'].':</td><td><input type="text" name="dbsocket" value="'.$config["dbsocket"].'" size="5" maxlength="5"> '.$lang['install_help_socket'].'</td></tr>';
|
||||
}
|
||||
|
||||
echo '<tr><td>'.$lang['testconnection'].':</td><td><input type="submit" name="dbconnect" value="'.$lang['connecttomysql'].'"></td></tr>';
|
||||
if(isset($dbconnect)) {
|
||||
|
||||
echo '<tr><td class="hd" colspan="2">'.$lang['dbconnection'].'</td></tr>';
|
||||
echo '<tr><td colspan="2">';
|
||||
MSD_mysql_connect();
|
||||
|
||||
if(!$config["dbconnection"]) {
|
||||
echo '<h5 style="color:red;">'.$lang['connectionerror'].'</h5><span> ';
|
||||
} else {
|
||||
echo '<h5>'.$lang['connection_ok'].'</h5><span class="smallgrey">';
|
||||
$connection="ok";
|
||||
$connstr="$dbhost|$dbuser|$dbpass|$dbonly|$dbport|$dbsocket";
|
||||
echo '<input type="hidden" name="connstr" value="'.$connstr.'">';
|
||||
SearchDatabases(1);
|
||||
if(empty($databases["Name"])) echo '<input type="hidden" name="expert" value="1">';
|
||||
}
|
||||
echo '</span></td></tr>';
|
||||
}
|
||||
echo '</form></table><br>';
|
||||
|
||||
if(isset($connection) && $connection=="ok" && !empty($databases["Name"])) {
|
||||
|
||||
echo '<form action="install.php?language='.$language.'&phase='.($phase+1).'" method="post">';
|
||||
echo '<input type="hidden" name="dbhost" value="'.$config["dbhost"].'">
|
||||
<input type="hidden" name="dbuser" value="'.$config["dbuser"].'">
|
||||
<input type="hidden" name="dbpass" value="'.$config["dbpass"].'">
|
||||
<input type="hidden" name="dbonly" value="'.$config["dbonly"].'">';
|
||||
echo '<input type="hidden" name="connstr" value="'.$connstr.'">';
|
||||
echo '<input type="submit" name="submit" value=" '.$lang['saveandcontinue'].' "></form>';
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: //
|
||||
echo '<h4>MySQLDumper - '.$lang['confbasic'].'</h4>';
|
||||
$tmp=file("config.php");
|
||||
$stored=0;
|
||||
for($i=0;$i<count($tmp);$i++) {
|
||||
if(substr($tmp[$i],0,17)=='$config["dbhost"]') {
|
||||
$tmp[$i]='$config["dbhost"] = \''.$config["dbhost"].'\';'."\n";
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbport"]') {
|
||||
$tmp[$i]='$config["dbport"] = \''.$config["dbport"].'\';'."\n";
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,19)=='$config["dbsocket"]') {
|
||||
$tmp[$i]='$config["dbsocket"] = \''.$config["dbsocket"].'\';'."\n";
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbuser"]') {
|
||||
$tmp[$i]='$config["dbuser"] = \''.$config["dbuser"].'\';'."\n";
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbpass"]') {
|
||||
$tmp[$i]='$config["dbpass"] = \''.$config["dbpass"].'\';'."\n";
|
||||
$stored++;
|
||||
}
|
||||
if(substr($tmp[$i],0,17)=='$config["dbonly"]') {
|
||||
$tmp[$i]='$config["dbonly"] = \''.$config["dbonly"].'\';'."\n";
|
||||
$stored++;
|
||||
}
|
||||
if($stored==6) break;
|
||||
}
|
||||
$ret=true;
|
||||
if ($fp=fopen("config.php", "wb"))
|
||||
{
|
||||
if (!fwrite($fp,implode($tmp,""))) $ret=false;
|
||||
if (!fclose($fp)) $ret=false;
|
||||
}
|
||||
if(!$ret) {
|
||||
echo '<p class="warnung">'.$lang['import12'].'</p>';
|
||||
} else {
|
||||
if(ini_get('safe_mode')==1) {
|
||||
$nextphase=(extension_loaded("ftp")) ? 10 : 9;
|
||||
} else $nextphase=$phase+2;
|
||||
echo $lang['install_step2finished'];
|
||||
echo '<br /><hr width="60%" /><br />';
|
||||
echo '<form action="install.php?language='.$language.'&phase='.$nextphase.'" method="post"><input type="hidden" name="connstr" value="'.$connstr.'"><input type="submit" name="continue2" value=" '.$lang['install_step2_1'].' "></form>';
|
||||
echo '<br /><hr width="60%" /><br />';
|
||||
echo '<form action="install.php?language='.$language.'&phase='.($phase+1).'" method="post"><input type="hidden" name="connstr" value="'.$connstr.'"><input type="submit" name="continue1" value=" '.$lang['editconf'].' "></form>';
|
||||
}
|
||||
|
||||
break;
|
||||
case 3: //
|
||||
if(ini_get('safe_mode')==1) $nextphase=10; else $nextphase=$phase+1;
|
||||
echo '<h4>'.$lang['editconf'].'</h4>';
|
||||
// if($config["language"]=="en") echo '<strong>important!</strong> change the line $config["language"]=\'de\' to $config["language"]=\'en\'<br>';
|
||||
echo '<form action="install.php?language='.$language.'&phase='.$nextphase.'" method="post">
|
||||
<textarea name="configfile" style="font-size:11px;color:blue;width:700px;height:300px;overflow:scroll;">';
|
||||
$f=file("config.php");
|
||||
for($i=0;$i<count($f);$i++) { echo stripslashes($f[$i]);}
|
||||
echo '</textarea><br><input type="reset" name="reset" value="'.$lang["reset"].'">
|
||||
<input type="submit" name="submit" value="'.$lang["save"].'">
|
||||
<input type="submit" name="nosave" value="'.$lang["osweiter"].'">';
|
||||
echo '<input type="hidden" name="connstr" value="'.$connstr.'">';
|
||||
echo '</form>';
|
||||
|
||||
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 '<br><strong>'.$lang['errorman'].' config.php '.$lang['manuell'].'.';
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<h4>'.$lang['createdirs'].'</h4>';
|
||||
|
||||
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 '<form action="install.php?language='.$language.'&phase=4" method="post"><table><tr>';
|
||||
echo '<tr><td class="hd2">'.$lang['dir'].'</td><td class="hd2">'.$lang['rechte'].'</td><td class="hd2">'.$lang['status'].'</td></tr>';
|
||||
echo '<tr><td><strong>work</strong></td><td>'.Rechte("work").'</td><td>'.(($iw[0]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/config</strong></td><td>'.Rechte("work/config").'</td><td>'.(($iw[1]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/log</strong></td><td>'.Rechte("work/log").'</td><td>'.(($iw[2]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/backup</strong></td><td>'.Rechte("work/backup").'</td><td>'.(($iw[3]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/structure</strong></td><td>'.Rechte("work/structure").'</td><td>'.(($iw[4]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td colspan="3" align="right"><input type="hidden" name="connstr" value="'.$connstr.'"><input type="submit" name="dir_check" value=" '.$lang['check'].' "></td></tr>';
|
||||
if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4])
|
||||
echo '<tr><td colspan="2">'.$lang['dirs_created'].'<br><br><input type="Button" value=" '.$lang['install_continue'].' " onclick="location.href=\'install.php?language='.$language.'&phase=5&connstr='.$connstr.'\'"></td></tr>';
|
||||
echo '</table>';
|
||||
break;
|
||||
case 5:
|
||||
echo '<h4>'.$lang['laststep'].'</h4>';
|
||||
|
||||
echo '<br>'.$lang['installfinished'];
|
||||
|
||||
SetDefault(true);
|
||||
include("language/".$language."/lang_install.php");
|
||||
|
||||
if(file_exists($config["paths"]["config"]."config.gz")) {
|
||||
echo '<br><br><a href="install.php?language='.$language.'&phase=20">'.$lang['import1'].'</a>';
|
||||
}
|
||||
echo '<br><br><a href="install.php?language='.$language.'&phase=21">'.$lang['import2'].'</a>';
|
||||
|
||||
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 '<h4>'.$lang['ftpmode'].'</h4>';
|
||||
echo '<p align="left" style="padding-left:100px; padding-right:100px;">'.$lang['safemodedesc'].'</p>';
|
||||
|
||||
echo '<form action="install.php?language='.$language.'&phase=9" method="post"><input type="hidden" name="connstr" value="'.$connstr.'"><table>';
|
||||
echo '<tr><td class="hd2" colspan="2">'.$lang['idomanual'].'</td></tr>';
|
||||
echo '<tr><td colspan="2">'.$lang['dofrom'].'<br><div class="small">'.Realpfad('./').'</div></td></tr>';
|
||||
echo '<tr><td><strong>work</strong></td><td>'.(($iw[0]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/config</strong></td><td>'.(($iw[1]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/log</strong></td><td>'.(($iw[2]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/backup</strong></td><td>'.(($iw[3]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/structure</strong></td><td>'.(($iw[4]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td colspan="3" align="right"><input type="submit" name="dir_check" value=" '.$lang['check'].' "></td></tr>';
|
||||
if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4])
|
||||
echo '<tr><td colspan="2">'.$lang['dirs_created'].'<br><input type="Button" value=" '.$lang['install_continue'].' " onclick="location.href=\'install.php?language='.$language.'&phase=4&connstr='.$connstr.'\'"></td></tr>';
|
||||
echo '</table>';
|
||||
|
||||
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 '<h4>'.$lang['ftpmode'].'</h4>';
|
||||
echo '<p align="left" style="padding-left:100px; padding-right:100px;">'.$lang['safemodedesc'].'</p>';
|
||||
|
||||
echo '<form action="install.php?language='.$language.'&phase=10" method="post"><input type="hidden" name="connstr" value="'.$connstr.'"><table width="80%"><tr><td width="50%" valign="top"><table>';
|
||||
echo '<tr><td class="hd2" colspan="2">'.$lang['idomanual'].'</td></tr>';
|
||||
echo '<tr><td colspan="2">'.$lang['dofrom'].'<br><div class="small">'.Realpfad('./').'</div></td></tr>';
|
||||
echo '<tr><td><strong>work</strong></td><td>'.(($iw[0]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/config</strong></td><td>'.(($iw[1]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/log</strong></td><td>'.(($iw[2]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/backup</strong></td><td>'.(($iw[3]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td><strong>work/structure</strong></td><td>'.(($iw[4]) ? $img_ok : $img_failed).'</td></tr>';
|
||||
echo '<tr><td colspan="3" align="right"><input type="submit" name="dir_check" value=" '.$lang['check'].' "></td></tr>';
|
||||
if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4])
|
||||
echo '<tr><td colspan="2">'.$lang['dirs_created'].'<br><input type="Button" value=" '.$lang['install_continue'].' " onclick="location.href=\'install.php?language='.$language.'&phase=4&connstr='.$connstr.'\'"></td></tr>';
|
||||
echo '</table></td><td width="50%" valign="top">';
|
||||
echo '<table><tr><td class="hd2" colspan="2">'.$lang['ftpmode2'].'</td></tr>';
|
||||
echo '<tr><td>FTP-Server</td><td><input type="text" name="install_ftp_server" value="'.$install_ftp_server.'"></td></tr>';
|
||||
echo '<tr><td>FTP-Port</td><td><input type="text" name="install_ftp_port" value="'.$install_ftp_port.'" size="4"></td></tr>';
|
||||
echo '<tr><td>FTP-User</td><td><input type="text" name="install_ftp_user_name" value="'.$install_ftp_user_name.'"></td></tr>';
|
||||
echo '<tr><td>FTP-'.$lang['db_pass'].'</td><td><input type="text" name="install_ftp_user_pass" value="'.$install_ftp_user_pass.'"></td></tr>';
|
||||
echo '<tr><td>'.$lang['info_scriptdir'].'</td><td><input type="text" name="install_ftp_path" value="'.$install_ftp_path.'"></td></tr>';
|
||||
echo '<tr><td colspan="2" align="right"><input type="submit" name="ftp_connect" value="'.$lang['connect'].'"></td></tr></form>';
|
||||
if(isset($ftp_connect)) {
|
||||
echo '<tr><td class="smallgrey">'.$lang['connect_to'].' `'.$install_ftp_server.'` Port '.$install_ftp_port.' ... <br>';
|
||||
$tftp=TesteFTP($install_ftp_server,$install_ftp_port,$install_ftp_user_name,$install_ftp_user_pass,$install_ftp_path);
|
||||
echo $tftp;
|
||||
echo '</td><td colspan="2" align="right"> ';
|
||||
if(substr($tftp,-5)=="</strong>") {
|
||||
echo '<form action="install.php?language='.$language.'&phase=11" method="post"><input type="hidden" name="connstr" value="'.$connstr.'">';
|
||||
echo '<input type="hidden" name="install_ftp_server" value="'.$install_ftp_server.'"><input type="hidden" name="install_ftp_port" value="'.$install_ftp_port.'"><input type="hidden" name="install_ftp_user_name" value="'.$install_ftp_user_name.'"><input type="hidden" name="install_ftp_user_pass" value="'.$install_ftp_user_pass.'"><input type="hidden" name="install_ftp_path" value="'.$install_ftp_path.'">';
|
||||
echo '<input type="submit" name="submit" value=" '.$lang['createdirs2'].' "></form>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '</table></td></tr>';
|
||||
|
||||
echo '</table>';
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 11: //FTP-Create Dirs
|
||||
echo '<h4>'.$lang['ftpmode'].'</h4>';
|
||||
if(CreateDirsFTP()==1) {
|
||||
SetDefault(true);
|
||||
echo DirectoryWarnings();
|
||||
echo '<br>'.$lang['installfinished'];
|
||||
|
||||
if(is_writable($config["paths"]["config"])) {
|
||||
if(file_exists($config["paths"]["config"]."config.gz")) {
|
||||
echo '<br><br><a href="install.php?language='.$language.'&phase=20&connstr='.$connstr.'">'.$lang['import1'].'</a>';
|
||||
}
|
||||
echo '<br><a href="install.php?language='.$language.'&phase=21&connstr='.$connstr.'">'.$lang['import2'].'</a>';
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 20: //import
|
||||
echo '<h4>'.$lang['import'].'</h4>';
|
||||
|
||||
$import=importConfig($config["paths"]["config"]."config.gz");
|
||||
if($import==0) {
|
||||
echo '<h5>'.$lang['import3'].'</h5>';
|
||||
SetDefault(true);
|
||||
echo '<h5>'.$lang['import4'].'</h5>';
|
||||
echo '<a href="index.php">'.$lang['import5'].'</a> <a href="install.php">'.$lang['import6'].'</a>';
|
||||
} elseif($import==1) {
|
||||
echo '<p class="warnung">'.$lang['import11'].'</p>';
|
||||
} elseif($import==2) {
|
||||
echo '<p class="warnung">'.$lang['import12'].'</p>';
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
break;
|
||||
case 21: //upload + import
|
||||
echo '<h4>'.$lang['import2'].'</h4>';
|
||||
echo '<form action="install.php?language='.$language.'&phase=22" method="POST" enctype="multipart/form-data">';
|
||||
echo '<table><tr><td align="center" colspan="2">';
|
||||
echo '<input type="file" name="upfile"></td><td align="center"><input type="submit" name="upload" value="'.$lang["fm_fileupload"].'">';
|
||||
echo '</td></tr></table></form>';
|
||||
|
||||
break;
|
||||
case 22: //posting from upload
|
||||
echo '<h4>'.$lang['import7'].'</h4>';
|
||||
$backlink='<a href=install.php?language='.$language.'&phase=21">'.$lang['import8'].'</a>';
|
||||
if (isset($_POST["upload"]))
|
||||
{
|
||||
$error=false;
|
||||
if (!($_FILES["upfile"]["name"])) {
|
||||
echo "<font color=\"red\">".$lang["fm_uploadfilerequest"].'</font><br><br>'.$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 "<font color=\"red\">".$lang["import9"]."</font><br><br>".$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 "<font color=\"red\">".$lang["fm_uploadmoveerror"]."<br>".$backlink;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
echo '<h5>'.$lang['import10'].'</h5>';
|
||||
$import=importConfig($config["paths"]["config"]."config.gz");
|
||||
if($import==0) {
|
||||
echo '<h5>'.$lang['import3'].'</h5>';
|
||||
SetDefault(true);
|
||||
echo '<h5>'.$lang['import4'].'</h5>';
|
||||
echo '<a href="index.php">'.$lang['import5'].'</a> <a href="install.php">'.$lang['import6'].'</a>';
|
||||
} elseif($import==1) {
|
||||
echo '<p class="warnung">'.$lang['import11'].'</p>';
|
||||
} elseif($import==2) {
|
||||
echo '<p class="warnung">'.$lang['import12'].'</p>';
|
||||
}
|
||||
break;
|
||||
case 100: //uninstall
|
||||
echo $lang['ui1'].'<br><br>';
|
||||
echo zipConfig().'<br><br>';
|
||||
echo $lang['ui2']."<br><br>";
|
||||
echo '<a href="install.php">'.$lang['ui3'].'</a> ';
|
||||
echo '<a href="install.php?language='.$language.'&phase=101">'.$lang['ui4'].'</a>';
|
||||
break;
|
||||
case 101:
|
||||
echo '<h4>'.$lang['ui5'].'</h4>';
|
||||
$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 '<p>'.$lang['ui6'].'</p>';
|
||||
echo $lang['ui7']."<br>\"".Realpfad("./")."\"<br> ".$lang['manuell'].".<br><br>";
|
||||
echo '<a href="../">'.$lang['ui8'].'</a>';
|
||||
|
||||
}else {
|
||||
echo '<p class="Warnung">'.$lang['ui9'].'"'.$paths[count($paths)-1].'"';
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<?
|
||||
//eigene Funktionen
|
||||
// rec_rmdir - loesche ein Verzeichnis rekursiv
|
||||
// Rueckgabewerte:
|
||||
// 0 - alles ok
|
||||
// -1 - kein Verzeichnis
|
||||
// -2 - Fehler beim Loeschen
|
||||
// -3 - Ein Eintrag eines Verzeichnisses war keine Datei und kein Verzeichnis und
|
||||
// kein Link
|
||||
function rec_rmdir ($path) {
|
||||
global $paths;
|
||||
$paths[]=$path;
|
||||
// schau' nach, ob das ueberhaupt ein Verzeichnis ist
|
||||
if (!is_dir ($path)) {
|
||||
return -1;
|
||||
}
|
||||
// oeffne das Verzeichnis
|
||||
$dir = @opendir ($path);
|
||||
// Fehler?
|
||||
if (!$dir) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
// gehe durch das Verzeichnis
|
||||
while ($entry = @readdir($dir)) {
|
||||
// wenn der Eintrag das aktuelle Verzeichnis oder das Elternverzeichnis
|
||||
// ist, ignoriere es
|
||||
if ($entry == '.' || $entry == '..') continue;
|
||||
// wenn der Eintrag ein Verzeichnis ist, dann
|
||||
if (is_dir ($path.'/'.$entry)) {
|
||||
// rufe mich selbst auf
|
||||
$res = rec_rmdir ($path.'/'.$entry);
|
||||
// wenn ein Fehler aufgetreten ist
|
||||
if ($res == -1) { // dies duerfte gar nicht passieren
|
||||
@closedir ($dir); // Verzeichnis schliessen
|
||||
return -2; // normalen Fehler melden
|
||||
} else if ($res == -2) { // Fehler?
|
||||
@closedir ($dir); // Verzeichnis schliessen
|
||||
return -2; // Fehler weitergeben
|
||||
} else if ($res == -3) { // nicht unterstuetzer Dateityp?
|
||||
@closedir ($dir); // Verzeichnis schliessen
|
||||
return -3; // Fehler weitergeben
|
||||
} else if ($res != 0) { // das duerfe auch nicht passieren...
|
||||
@closedir ($dir); // Verzeichnis schliessen
|
||||
return -2; // Fehler zurueck
|
||||
}
|
||||
} else if (is_file ($path.'/'.$entry) || is_link ($path.'/'.$entry)) {
|
||||
// ansonsten loesche diese Datei / diesen Link
|
||||
$res = @unlink ($path.'/'.$entry);
|
||||
// Fehler?
|
||||
if (!$res) {
|
||||
@closedir ($dir); // Verzeichnis schliessen
|
||||
return -2; // melde ihn
|
||||
}
|
||||
} else {
|
||||
// ein nicht unterstuetzer Dateityp
|
||||
@closedir ($dir); // Verzeichnis schliessen
|
||||
return -3; // tut mir schrecklich leid...
|
||||
}
|
||||
}
|
||||
|
||||
// schliesse nun das Verzeichnis
|
||||
@closedir ($dir);
|
||||
|
||||
// versuche nun, das Verzeichnis zu loeschen
|
||||
$res = @rmdir ($path);
|
||||
|
||||
// gab's einen Fehler?
|
||||
if (!$res) {
|
||||
return -2; // melde ihn
|
||||
}
|
||||
|
||||
// alles ok
|
||||
return 0;
|
||||
}
|
||||
|
||||
function Rechte($file)
|
||||
{
|
||||
clearstatcache();
|
||||
return @substr(decoct(fileperms($file)),-3);
|
||||
}
|
||||
|
||||
function zipConfig()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$cfname=$config["paths"]["config"]."config.gz";
|
||||
if(file_exists($cfname)) unlink($cfname);
|
||||
|
||||
$h1="### Configuration Summary - MySQLDumper ".MSD_VERSION."\n\n";
|
||||
$h2="###FILE_config.php\n";
|
||||
$h3="###FILE_".$config["paths"]["config"]."sql_statements\n";
|
||||
|
||||
$cf=$h1.$h2;
|
||||
$tmp=file("config.php");
|
||||
while(substr($tmp[0],0,18)!='$config["direct_connection"]') {
|
||||
array_shift($tmp);
|
||||
if(count($tmp)==0) break;
|
||||
}
|
||||
|
||||
array_shift($tmp);
|
||||
$cf.=implode($tmp,"")."\n".$h3;
|
||||
if(file_exists($config["paths"]["config"]."sql_statements")) {
|
||||
$tmp=file($config["paths"]["config"]."sql_statements");
|
||||
$cf.=implode($tmp,"")."\n";
|
||||
}
|
||||
if($config["zlib"]) {
|
||||
$fp = gzopen ($cfname,"ab");
|
||||
gzwrite ($fp,$cf);
|
||||
gzclose ($fp);
|
||||
} else {
|
||||
$fp = fopen ($cfname,"ab");
|
||||
fwrite ($fp,$cf);
|
||||
fclose ($fp);
|
||||
}
|
||||
|
||||
//return '<a href="'.$cfname.'">Download Config from '.$config["paths"]["config"].'</a>';
|
||||
|
||||
}
|
||||
|
||||
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<count($tmp);$i++) {
|
||||
$cf1[]=$tmp[$i];
|
||||
if(substr($tmp[$i],0,18)=='$config["direct_connection"]') break;
|
||||
}
|
||||
|
||||
|
||||
for($i=3;$i<count($imp);$i++) {
|
||||
|
||||
if(substr($imp[$i],0,8)!="###FILE_") {
|
||||
$imp1[]=$imp[$i];
|
||||
} else {
|
||||
$last=$i+1;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
for($i=$last;$i<count($imp);$i++) {
|
||||
$sql1[]=$imp[$i];
|
||||
}
|
||||
$cf=array_merge($cf1,$imp1);
|
||||
|
||||
//jetzt schreiben
|
||||
$ret=true;
|
||||
if(file_exists($config["paths"]["config"])) {
|
||||
if ($fp=fopen($config["paths"]["config"]."sql_statements", "wb"))
|
||||
{
|
||||
if (!fwrite($fp,implode($sql1,""))) $ret=false;
|
||||
if (!fclose($fp)) $ret=false;
|
||||
}
|
||||
}
|
||||
if($ret==false){
|
||||
return 1;
|
||||
} else {
|
||||
if ($fp=fopen("config.php", "wb"))
|
||||
{
|
||||
if (!fwrite($fp,implode($cf,""))) $ret=false;
|
||||
if (!fclose($fp)) $ret=false;
|
||||
}
|
||||
}
|
||||
if($ret==false){
|
||||
return 2;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function extractValue($s)
|
||||
{
|
||||
$r=trim(substr($s, strpos($s,"=")+1));
|
||||
$r=substr($r,0,strlen($r)-1);
|
||||
if(substr($r,-1)=="'")$r=substr($r,0,strlen($r)-1);
|
||||
if(substr($r,0,1)=="'")$r=substr($r,1);
|
||||
return $r;
|
||||
}
|
||||
|
||||
function CreateDirsFTP() {
|
||||
|
||||
global $install_ftp_server,$install_ftp_port,$install_ftp_user_name, $install_ftp_user_pass,$install_ftp_path,$l;
|
||||
|
||||
// Herstellen der Basis-Verbindung
|
||||
echo '<hr>'.$lang['connect_to'].' `'.$install_ftp_server.'` Port '.$install_ftp_port.' ...<br>';
|
||||
$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.'` ...<br>';
|
||||
ftp_chdir($conn_id,$install_ftp_path);
|
||||
// Erstellen der Verzeichnisse
|
||||
echo $lang['dircr1'].' ...<br>';
|
||||
ftp_mkdir($conn_id,"work");
|
||||
ftp_site($conn_id, "CHMOD 0777 work");
|
||||
echo $lang['changedir'].' `work` ...<br>';
|
||||
ftp_chdir($conn_id,"work");
|
||||
echo $lang['indir'].' `'.ftp_pwd($conn_id).'`<br>';
|
||||
echo $lang['dircr5'].' ...<br>';
|
||||
ftp_mkdir($conn_id,"config");
|
||||
ftp_site($conn_id, "CHMOD 0777 config");
|
||||
echo $lang['dircr2'].' ...<br>';
|
||||
ftp_mkdir($conn_id,"backup");
|
||||
ftp_site($conn_id, "CHMOD 0777 backup");
|
||||
echo $lang['dircr3'].' ...<br>';
|
||||
ftp_mkdir($conn_id,"structure");
|
||||
ftp_site($conn_id, "CHMOD 0777 structure");
|
||||
echo $lang['dircr4'].' ...<br>';
|
||||
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<count($dir)-1;$i++)
|
||||
{
|
||||
$path.=$dir[$i]."/";
|
||||
@ftp_mkdir($config["dbconnection"],$path);
|
||||
}
|
||||
if (@ftp_mkdir($config["dbconnection"],$dirname))
|
||||
return 1;
|
||||
}
|
||||
|
||||
function IsWritable($dir)
|
||||
{
|
||||
$testfile=$dir . "/.writetest";
|
||||
if ($writable = @fopen ($testfile, 'w')) {
|
||||
@fclose ($writable);
|
||||
@unlink ($testfile);
|
||||
}
|
||||
return $writable;
|
||||
}
|
||||
|
||||
function SearchDatabases($printout)
|
||||
{
|
||||
global $databases,$config,$lang;
|
||||
|
||||
if(!isset($config["dbconnection"])) MSD_mysql_connect();
|
||||
if(isset($config["dbonly"]) && $config["dbonly"]!='') {
|
||||
$success=@mysql_select_db($config["dbonly"],$config["dbconnection"]);
|
||||
if($success) {
|
||||
$databases["db_actual"]=$config["dbonly"];
|
||||
$databases["Name"][0]=$config["dbonly"];
|
||||
$databases["praefix"][0] = "";
|
||||
$databases["command_before_dump"][0] = "";
|
||||
$databases["command_after_dump"][0] = "";
|
||||
$databases["db_selected_index"]=0;
|
||||
if($printout==1) echo "... ".$lang["found_db"]." `".$config["dbonly"]."`<br />";
|
||||
} else echo '<div style="color:red;">'.$lang["found_no_db"].' `'.$config["dbonly"]."` !</div>";
|
||||
} 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 "... ".$lang["found_db"]." `$row->Database`<br />";
|
||||
}
|
||||
$databases["db_actual"]=$databases["Name"][0];
|
||||
$databases["db_selected_index"]=0;
|
||||
} else {
|
||||
if($printout==1) echo $lang['dbonlyneed'].'<br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
237
js/script.js
Normale Datei
|
@ -0,0 +1,237 @@
|
|||
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; i<obj.length; i++)
|
||||
{
|
||||
if(obj[i].checked){a=obj[i].value;anz++;}
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
function Check(i,k)
|
||||
{
|
||||
var anz=0;
|
||||
var s="";
|
||||
var smp;
|
||||
|
||||
|
||||
var ids=document.getElementsByName("file[]");
|
||||
var mp=document.getElementsByName("multipart[]");
|
||||
|
||||
for(var j=0; j<ids.length; j++) {
|
||||
if(ids[j].checked)
|
||||
{ s=ids[j].value;
|
||||
smp= (mp[j].value==0) ? "" : " (Multipart: "+mp[j].value+" files)";
|
||||
anz++;
|
||||
if(k==0) break;
|
||||
}
|
||||
}
|
||||
if(anz==0) {
|
||||
WP("","gd");
|
||||
} else if (anz==1) {
|
||||
WP(s+smp,"gd");
|
||||
} else {WP("more than 1 file selected","gd");}
|
||||
|
||||
}
|
||||
//config
|
||||
|
||||
function SelectMD(v,anz)
|
||||
{
|
||||
for (i = 0; i < anz; i++) {
|
||||
n="db_multidump_" + i;
|
||||
obj=document.getElementsByName(n)[0];
|
||||
if(obj) {
|
||||
obj.checked=v;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//tabellenabfrage
|
||||
function Sel(v)
|
||||
{
|
||||
var a=document.frm_tbl;
|
||||
if(!a.chk_tbl.length)
|
||||
{
|
||||
a.chk_tbl.checked = v;
|
||||
} else {
|
||||
for (i = 0; i < a.chk_tbl.length; i++) {
|
||||
a.chk_tbl[i].checked = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ConfDBSel(v,adb)
|
||||
{
|
||||
for (i = 0; i < adb; i++) {
|
||||
var a=document.getElementsByName("db_multidump["+i+"]");
|
||||
if(a) a.checked = v;
|
||||
}
|
||||
}
|
||||
|
||||
function chkFormular()
|
||||
{
|
||||
var a=document.frm_tbl;
|
||||
a.tbl_array.value="";
|
||||
|
||||
if(!a.chk_tbl.length)
|
||||
{
|
||||
if(a.chk_tbl.checked==true)
|
||||
a.tbl_array.value += a.chk_tbl.value + "|";
|
||||
} else {
|
||||
for (i = 0; i < a.chk_tbl.length; i++) {
|
||||
if(a.chk_tbl[i].checked==true)
|
||||
a.tbl_array.value += a.chk_tbl[i].value + "|";
|
||||
}
|
||||
}
|
||||
if(a.tbl_array.value==""){
|
||||
alert("Ohne Tabellen geht es nicht :)");
|
||||
return false;
|
||||
} else {
|
||||
//alert(a.tbl_array.value);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function insertHTA(s,tb)
|
||||
{
|
||||
if(s==1) ins="AddHandler php-fastcgi .php .php4\nAddhandler cgi-script .cgi .pl\nOptions +ExecCGI";
|
||||
|
||||
if(s==101) ins="DirectoryIndex /cgi-bin/script.pl"
|
||||
if(s==102) ins="AddHandler cgi-script .extension";
|
||||
if(s==103) ins="Options +ExecCGI";
|
||||
if(s==104) ins="Options +Indexes";
|
||||
if(s==105) ins="ErrorDocument 400 /errordocument.html";
|
||||
if(s==106) ins="# (macht aus http://domain.de/xyz.html ein\n# http://domain.de/main.php?xyz)\nRewriteEngine on\nRewriteBase /\nRewriteRule ^([a-z]+)\.html$ /main.php?$1 [R,L]";
|
||||
if(s==107) ins="Deny from IPADRESS\nAllow from IPADRESS";
|
||||
if(s==108) ins="Redirect /service http://foo2.bar.com/service";
|
||||
if(s==109) ins="ErrorLog /path/logfile"
|
||||
tb.value+="\n"+ins;
|
||||
}
|
||||
|
||||
|
||||
//restore
|
||||
function WP(s,obj) {
|
||||
//if(IE)
|
||||
//alert(obj);
|
||||
document.getElementById(obj).innerHTML=s;
|
||||
/*else
|
||||
document.layers[obj].document.open();
|
||||
document.layers[obj].document.write s;
|
||||
document.layers[obj].document.close();
|
||||
*/
|
||||
}
|
||||
|
||||
function resizeSQL(i){
|
||||
|
||||
var obj=document.getElementById("tb_sql");
|
||||
|
||||
if(IE) {
|
||||
//alert("IE");
|
||||
if(i==0) obj.style.pixelHeight=4;
|
||||
if(i==1 && obj.style.pixelHeight>23) 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getObj(element,docname){
|
||||
if(document.layers){
|
||||
docname=(docname) ? docname : self;
|
||||
if(f.document.layers[element]) {
|
||||
return f.document.layers[element];
|
||||
}
|
||||
for(W=0;i<f.document.layers.length;W++) {
|
||||
return(getElement(element,fdocument.layers[W]));
|
||||
}
|
||||
}
|
||||
if(document.all) {
|
||||
return document.all[element];
|
||||
}
|
||||
return document.getElementById(element);
|
||||
}
|
||||
|
||||
function InsertLib(i) {
|
||||
var obj=document.getElementsByName('sqllib')[0];
|
||||
if(obj.selectedIndex>0) {
|
||||
document.getElementById('sqlstring'+i).value = obj.options[obj.selectedIndex].value;
|
||||
document.getElementById('sqlname'+i).value = obj.options[obj.selectedIndex].text;
|
||||
}
|
||||
}
|
||||
|
||||
function DisplayExport(s) {
|
||||
document.getElementById("export_working").InnerHTML=s;
|
||||
}
|
||||
function SelectedTableCount() {
|
||||
var obj=document.getElementsByName('f_export_tables[]')[0];
|
||||
var anz=0;
|
||||
for (var i=0; i<obj.options.length; i++)
|
||||
{
|
||||
if(obj.options[i].selected){anz++;}
|
||||
}
|
||||
return anz;
|
||||
}
|
||||
|
||||
function SelectTableList(s) {
|
||||
var obj=document.getElementsByName('f_export_tables[]')[0];
|
||||
for (var i=0; i<obj.options.length; i++) {
|
||||
obj.options[i].selected=s;
|
||||
}
|
||||
}
|
||||
function hide_csvdivs(i) {
|
||||
document.getElementById("csv0").style.display = 'none';
|
||||
if(i==0) {
|
||||
document.getElementById("csv1").style.display = 'none';
|
||||
document.getElementById("csv3").style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function check_csvdivs(i) {
|
||||
hide_csvdivs(i);
|
||||
if (document.getElementById("radio_csv0").checked) {
|
||||
document.getElementById("csv0").style.display = 'block';
|
||||
}
|
||||
if(i==0) {
|
||||
if (document.getElementById("radio_csv1").checked) {
|
||||
document.getElementById("csv1").style.display = 'block';
|
||||
} else if (document.getElementById("radio_csv2").checked) {
|
||||
document.getElementById("csv1").style.display = 'block';
|
||||
}
|
||||
if (document.getElementById("radio_csv3").checked) {
|
||||
document.getElementById("csv3").style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
153
language/de/help.php
Normale Datei
|
@ -0,0 +1,153 @@
|
|||
<?php
|
||||
if(file_exists("../../work/config/parameter.php")){
|
||||
@include("../../work/config/parameter.php");
|
||||
}
|
||||
@include("../../inc/functions_global.php");
|
||||
@include("../../language/".$config["language"]."/lang.php");
|
||||
@include("../../language/".$config["language"]."/lang_help.php");
|
||||
echo MSDHeader(2);
|
||||
echo headline($lang['credits']);
|
||||
?>
|
||||
<h3>Über dieses Projekt</h3>
|
||||
Die Idee für dieses Projekt kam von Daniel Schlichtholz.<p>Er eröffnete 2004 das Forum <a href="http://www.mysqldumper.de/board" target="_blank">MySQLDumper</a> und schon bald fanden sich Hobby-Programmierer, die neue Skripte schrieben und die von Daniel erweiterten.<br>Innerhalb kürzester Zeit enstand aus dem kleine Backupskript ein stattliches Projekt.<p>Wenn Du Vorschläge zur Verbesserung hast, dann wende ich an das MySQLDumper-Forum <a href="http://www.mysqldumper.de/board" target="_blank">http://www.daniel-schlichtholz.de/board</a>.<p>Wir wünschen Dir viel Vergnügen mit diesem Projekt.<br><p><h4>Das MySQLDumper-Team</h4>
|
||||
|
||||
<table><tr><td><img src="../../images/logo.gif" alt="MySQLDumper" width="160" height="42" border="1"></td><td valign="top">
|
||||
Daniel Schlichtholz - Steffen Kamper<br>
|
||||
Perlscript mit Unterstützung von Detlev Richter<br>
|
||||
</td></tr></table>
|
||||
<br>
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>MySQLDumper Hilfe</h3>
|
||||
|
||||
|
||||
<h4>Download</h4>
|
||||
Dieses Script erhaltet ihr auf der Homepage von MySQLDumper.<br>
|
||||
Es empfielt sich, die Homepage regelmäßig zu besuchen, um Updates und
|
||||
Hilfestellungen zu erlangen.<br>
|
||||
Die Adresse lautet: <a href="http://www.mysqldumper.de/board" target="_blank">
|
||||
http://www.mysqldumper.de/board
|
||||
</a>
|
||||
|
||||
<h4>Systemvoraussetzung</h4>
|
||||
Das Script arbeitet auf jedem Server (Windows, Linux, ...) <br>
|
||||
mit PHP >= Version 4.3.4 mit GZip-Unterstützung, MySQL (ab Version 3.23), JavaScript (muss aktiviert sein).
|
||||
|
||||
<a href="../../install.php?language=de" target="_top"><h4>Installation</h4></a>
|
||||
Die Installation geht einfach von statten.
|
||||
Entpackt das Archiv in einen beliebigen Ordner.<br>
|
||||
Ladet alle Dateien auf Euren Webserver hoch. (z.B. in die unterste Ebene in [Server Webverzeichnis/]MySQLDumper)<br>
|
||||
... fertig!<br>
|
||||
Ihr könnt MySQLDumper nun im Webbrowser aufrufen durch "http://mein-webserver/MySQLDumper"<br>
|
||||
um die Installation abzuschliessen. Folgt einfach den Instruktionen.<br>
|
||||
<br><b>Hinweis:</b><br><i>Falls auf Eurem Server der PHP-Safemode eingeschaltet ist, darf das Script keine
|
||||
Verzeichnisse erstellen.<br>
|
||||
Dies müsst ihr dann von Hand nachholen, da MySqlDump die Daten geordnet in
|
||||
Verzeichnissen ablegt.<br>
|
||||
Das Script bricht mit einer entsprechenden Anweisung ab!<br>
|
||||
Nachdem ihr die Verzeichnisse (dem Hinweis entsprechend) erstellt habt, läuft es normal und ohne Einschränkung.</i>
|
||||
|
||||
<a name="perl"></a><h4>Perlskript Anleitung</h4>
|
||||
Die meisten haben ein cgi-bin Verzeichnis, in dem Perl ausgeführt werden kann. <br>
|
||||
Dies ist meist per Browser über http://www.domain.de/cgi-bin/ erreichbar. <br>
|
||||
<br>
|
||||
Für diesen Fall bitte folgende Schritte durchführen:<br><br>
|
||||
|
||||
1. Rufe im MySQLDumper die Seite Backup auf. <br>
|
||||
2. Kopiere den Pfad, der hinter Eintrag in crondump.pl für $absolute_path_of_configdir: steht. <br>
|
||||
3. öffne die Datei "crondump.pl" im Editor <br>
|
||||
4. trage den kopierten Pfad dort bei absolute_path_of_configdir ein (keine Leerzeichen) <br>
|
||||
5. Speicher crondump.pl <br>
|
||||
6. kopiere crondump.pl, sowie perltest.pl und simpletest.pl ins cgi-bin-Verzeichnis (Ascii-Modus im FTP) <br>
|
||||
7. gebe den Datein die Rechte 755 <br>
|
||||
7b. Wenn die Endung cgi gewünscht ist, ändere bei allen 3 Dateien die Endung von pl -> cgi (umbenennen) <br>
|
||||
8. Rufe die Konfiguration im MySQLDumper auf<br>
|
||||
9. wähle Seite Cronscript <br>
|
||||
10. ändere Perl Ausführungspfad in /cgi-bin/ <br>
|
||||
10b. wenn die Scripte .cgi haben, ändere die Dateiendung auf .cgi <br>
|
||||
11. speicher die Konfiuguration <br><br>
|
||||
|
||||
fertig, die Skripte lassen sich nun von der Backupseite aufrufen .<br><br>
|
||||
|
||||
Wer Perl in allen Verzeichnissen ausführen kann, dem reichen folgende Schritte:<br><br>
|
||||
|
||||
1. Rufe im MySQLDumper die Seite Backup auf. <br>
|
||||
2. Kopiere den Pfad, der hinter Eintrag in crondump.pl für $absolute_path_of_configdir: steht. <br>
|
||||
3. öffne die Datei "crondump.pl" im Editor <br>
|
||||
4. trage den kopierten Pfad dort bei absolute_path_of_configdir ein (keine Leerzeichen) <br>
|
||||
5. Speicher crondump.pl <br>
|
||||
6. gebe den Datein die Rechte 755 <br>
|
||||
6b. Wenn die Endung cgi gewünscht ist, ändere bei allen 3 Dateien die Endung von pl -> cgi (umbenennen) <br>
|
||||
(ev. 10b+11 von oben)<br>
|
||||
<br>
|
||||
|
||||
Windowsuser müssen bei allen Scripten die erste Zeile ändern, dort steht der Pfad von Perl. Beispiel: <br>
|
||||
statt: #!/usr/bin/perl -w <br>
|
||||
jetzt #!C:\perl\bin\perl.exe -w <br>
|
||||
|
||||
<h4>Bedienung</h4><ul>
|
||||
|
||||
<h6>Menü</h6>
|
||||
In der obigen Auswahlliste stellt ihr die Datenbank ein.<br>
|
||||
Alle Aktionen beziehen sich auf die hier eingestellte Datenbank.
|
||||
|
||||
<h6>Startseite</h6>
|
||||
Hier erfahrt ihr einiges über euer System, die verschiedenen installierten
|
||||
Versionen und Details über die konfigurierten Datenbanken.<br>
|
||||
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.
|
||||
|
||||
<h6>Konfiguration</h6>
|
||||
Hier könnt ihr eure Konfiguration bearbeiten, abspeichern oder die Ausgabgskonfiguration
|
||||
wieder herstellen.
|
||||
<ul><br>
|
||||
<li><a name="conf1"></a><strong>Konfigurierte Datenbanken:</strong> die Auflistung der konfigurierten Datenbanken. Die aktive Datenbank wird in <b>bold</b> gelistet. </li>
|
||||
<li><a name="conf2"></a><strong>Tabellen-Präfix:</strong> hier könnt ihr (für jede Datenbank) einen Präfix angeben. Dies ist ein Filter, der bei Dumps nur die Tabellen berücksichtigt, die mit diesem Präfix beginnen (z.B. alle Tabellen, die mit "phpBB_" beginnen). Wenn alle Tabellen dieser Datenbank gespeichert werden sollen,
|
||||
so lasst das Feld einfach leer.</li>
|
||||
<li><a name="conf3"></a><strong>GZip-Kompression:</strong> Hier kann die Kompression aktiviert werden. Empfehlenswert ist die Aktivierung, da die Dateien doch wesentlich kleiner werden und Speicherplatz immer rar ist.</li>
|
||||
<li><a name="conf5"></a><strong>Email mit Dumpfile:</strong> Ist diese Option aktiviert, so wird nach abgeschlossenem Backup eine Email mit dem Dump als Anhang verschickt (Vorsicht, Kompression sollte unbedingt an sein, sonst wird der Anhang zu gross und kann ev. nicht versandt werden!)</li>
|
||||
<li><a name="conf6"></a><strong>Email-Adresse:</strong> Empfängeradresse für die Email</li>
|
||||
<li><a name="conf7"></a><strong>Absender der Email:</strong> diese Adresse taucht als Absender in der Email auf</li>
|
||||
<li><a name="conf13"><strong>FTP-Transfer: </strong>Ist diese Option aktiviert, so wird nach abgeschlossenem Backup die Backupdatei per FTP versandt.</li>
|
||||
<li><a name="conf14"><strong>FTP Server: </strong>die Adresse des FTP-Servers (z.B. ftp.mybackups.de)</li>
|
||||
<li><a name="conf15"><strong>FTP Server Port: </strong>der Port des FTP-Servers (in der Regel 21)</li>
|
||||
<li><a name="conf16"><strong>FTP User: </strong>der Benutzername des FTP-Accounts </li>
|
||||
<li><a name="conf17"><strong>FTP Passwort: </strong>das Passwort des FTP-Accounts </li>
|
||||
<li><a name="conf18"><strong>FTP Upload-Ordner: </strong>das Verzeichnis, in das die Backupdatei soll (es müssen Upload-Berechtigungen bestehen!)</li>
|
||||
<li><a name="conf8"></a><strong>automatisches Löschen der Backups:</strong> Wenn diese Option aktiviert ist, werden ältere Backups nach den folgenden Regeln automatisch gelöscht. Kombinationen sind möglich.</li>
|
||||
<li><a name="conf9"></a><strong>Alter der Dateien (in Tagen):</strong> Ein Wert > 0 löscht alle Backupdateien, die älter als diese Angabe sind.</li>
|
||||
<li><a name="conf10"></a><strong>Anzahl von Backupdateien:</strong> Ein Wert > 0 löscht alle Backupdateien, bis auf die hier angegeben Zahl</li>
|
||||
<li><a name="conf11"></a><strong>Sprache:</strong> hier legst du die Sprache für das Interface fest.</li>
|
||||
<li><a name="conf12"></a><strong>Zeitlimit für Cronjob:</strong> diese Angabe in Sekunden erhöht das erlaubte Zeitlimit des Prozesses um die angegebenen Sekunden, wenn der Provider dies erlaubt.</li>
|
||||
</ul>
|
||||
|
||||
<h6>Verwaltung</h6>
|
||||
Hier werden die eigenlichen Aktionen durchgeführt.<br>
|
||||
Es werden dir alle Dateien im Backup-Verzeichnis angezeigt.
|
||||
Für die Aktionen "Restore" und "Delete" muss eine Datei selektiert sein.
|
||||
<UL>
|
||||
<li><strong>Restore:</strong> hiermit wird die Datenbank mit der ausgewählten Backupdatei aktualisiert.</li>
|
||||
<li><strong>Delete:</strong> hiermit kannst du die selektierte Backupdatei löschen.</li>
|
||||
<li><strong>Neues Backup starten:</strong> hier startest du ein neues Backup (Dump) nach den in der Konfiguration eingestellten Parametern.</li>
|
||||
</UL>
|
||||
|
||||
<h6>Log</h6>
|
||||
Hier kannst du die Logeinträge sehen und löschen.
|
||||
<h6>Credits / Hilfe</h6>
|
||||
diese Seite.
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>Unsere Sponsoren</h3>
|
||||
Die Sponsoren finden Sie auch auf der <a class="ul" href="http://www.mysqldumper.de/de/index.php?m=7" target="_blank">Sponsorenseite</a><br>
|
||||
<p class="verysmall" style="color:green;">Wir sind nicht verantwortlich für den Inhalt der folgenden Seiten.</p>
|
||||
|
||||
<?php
|
||||
if ($sponsors = @file("http://www.mysqldumper.de/sponsors.php?lang=en")) {
|
||||
echo implode("\n",$sponsors);
|
||||
} else echo "Seite nicht verfügbar.<br><br>Du must online sein !";
|
||||
|
||||
echo '<br>';
|
||||
echo MSDFooter();
|
||||
|
||||
?>
|
123
language/de/lang.php
Normale Datei
|
@ -0,0 +1,123 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['yes']="ja";
|
||||
$lang['to']="bis";
|
||||
$lang['activated']="aktiviert";
|
||||
$lang['not_activated']="nicht aktiviert";
|
||||
$lang['error']="Fehler";
|
||||
$lang['of']=" von ";
|
||||
$lang['added']="hinzugefügt";
|
||||
$lang['first_run']="Datenbanken gefunden:";
|
||||
$lang['dbrefresh']="Datenbanken neu laden";
|
||||
$lang['db']="Datenbank";
|
||||
$lang['dbs']="Datenbanken";
|
||||
$lang['onlinehelp']="Online-Hilfe";
|
||||
$lang['tables']="Tabellen";
|
||||
$lang['table']="Tabelle";
|
||||
$lang['records']="Datensätze";
|
||||
$lang['compressed']="komprimiert (gz)";
|
||||
$lang['notcompressed']="normal (unkomprimiert)";
|
||||
$lang['general']="allgemein";
|
||||
$lang['comment']="Kommentar";
|
||||
$lang['filesize']="Dateigrösse";
|
||||
$lang['all']="alle";
|
||||
$lang['none']="keine";
|
||||
$lang['with']=" mit ";
|
||||
$lang['dir']="Verzeichnis";
|
||||
$lang['rechte']="Rechte";
|
||||
$lang['status']="Status";
|
||||
$lang['never']="nie";
|
||||
$lang['finished']="fertig";
|
||||
$lang['file']="Datei";
|
||||
$lang['field']="Feld";
|
||||
$lang['fields']="Felder";
|
||||
$lang['was']="wurde";
|
||||
$lang['new']="neu";
|
||||
$lang['charset']="Zeichensatz";
|
||||
$lang['collation']="Sortierung";
|
||||
$lang['change']="ändern";
|
||||
$lang['in']="in";
|
||||
$lang['do']="ausführen";
|
||||
$lang['errors_occured']="Es sind Fehler aufgetreten";
|
||||
$lang['view']="ansehen";
|
||||
$lang['existing']="vorhanden";
|
||||
$lang['authors']="Autoren";
|
||||
$lang['back']="zurück";
|
||||
$lang['normal']="normal";
|
||||
$lang['db_host']="Datenbank-Hostname";
|
||||
$lang['db_user']="Datenbank-Benutzer";
|
||||
$lang['db_pass']="Datenbank-Passwort";
|
||||
$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['useconnection']="Benutze Verbindung";
|
||||
$lang['wrongconnectionpars']="Falsche oder keine Verbindungs-parameter !";
|
||||
$lang['conn_not_possible']="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['save']="Speichern";
|
||||
$lang['reset']="zurücksetzen";
|
||||
$lang['praefix']="Tabellen-Präfix";
|
||||
$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['saving_db_form']="Datenbank";
|
||||
$lang['testconnection']="Verbindung testen";
|
||||
$lang['back_to_minisql']="Datenbank bearbeiten";
|
||||
$lang['critical_safemode']="<h3>Achtung: Fortsetzung im Safe-Modus nicht möglich!</h3>Folgende Verzeichnisse müssen manuell im Scriptverzeichnisses angelegt werden:<br><div style=\"padding-left:20px;\"><br>work<br>work/backup<br>work/config<br>work/log<br>work/structure</div><br>Geben sie all diesen Verzeichnissen die vollen Rechte (chmod 777).<br>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']="<em>nicht verfügbar</em>";
|
||||
$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";
|
||||
$lang['fm_freespace']="Freier Speicher auf Server";
|
||||
$lang['lang_de']="Deutsch";
|
||||
$lang['lang_en']="Englisch";
|
||||
$lang['load_database']="Datenbanken neu laden";
|
||||
$lang['home']="Home";
|
||||
$lang['config']="Konfiguration";
|
||||
$lang['dump']="Backup";
|
||||
$lang['restore']="Wiederherstellung";
|
||||
$lang['file_manage']="Verwaltung";
|
||||
$lang['log']="Log";
|
||||
$lang['project']="Über das Projekt";
|
||||
$lang['choose_db']="Datenbank wählen";
|
||||
$lang['credits']="Credits / Hilfe";
|
||||
$lang['logfilenotwritable']="Log-File kann nicht geschrieben werden!";
|
||||
$lang['sql_error1']="Fehler bei der Anfrage:";
|
||||
$lang['sql_error2']="MySQL meldet:";
|
||||
$lang['unknown']="unknown";
|
||||
$lang['unknown_number_of_records']="unbekannt";
|
||||
$lang['cron_completelog']="Komplette Ausgabe loggen";
|
||||
$lang['no']="nein";
|
||||
$lang['MySQLErrorDoc']="MySQL Dokumentation der Fehler";
|
||||
$lang['downgrade']="Downgrade (MySQL 4.x => 3.x)";
|
||||
$lang['create_database']="neue Datenbank anlegen";
|
||||
$lang['exportfinished']="Export beendet.";
|
||||
|
||||
|
||||
?>
|
107
language/de/lang_config_overview.php
Normale Datei
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['config_headline']="Konfiguration";
|
||||
$lang['sql_trenn']="Trennzeichen";
|
||||
$lang['no_send_mail']="Die fertige Backupdatei wird <b>nicht</b> 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['config_askload']="Sollen die Einstellungen wirklich mit den Anfangseinstellungen überschrieben werden?";
|
||||
$lang['load']="Anfangseinstellungen \nladen";
|
||||
$lang['load_success']="Die Anfangseinstellungen wurden geladen.";
|
||||
$lang['cron_samedb']="Aktuelle Datenbank benutzen";
|
||||
$lang['cron_crondbindex']="Datenbank und Tabellen-Präfix<br> 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_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['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.\nDies 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";
|
||||
$lang['wrong_connectionpars']="Verbindungsparameter stimmen nicht !";
|
||||
$lang['connectionpars']="Verbindungs-Parameter";
|
||||
$lang['extendedpars']="erweiterte Parameter";
|
||||
$lang['dbonly']="Nur diese Datenbank";
|
||||
$lang['fade_in_out']="ein/-ausblenden";
|
||||
$lang['db_backuppars']="Datenbanken Backup-Einstellungen";
|
||||
$lang['general']="allgemein";
|
||||
$lang['maxsize']="max. Grösse";
|
||||
$lang['backup_format']="Backup-Format";
|
||||
$lang['inserts_complete']="vollständige Inserts";
|
||||
$lang['inserts_extended']="erweiterte Inserts";
|
||||
$lang['inserts_delayed']="verzögerte Inserts";
|
||||
$lang['inserts_ignore']="Fehlerübergehende Inserts";
|
||||
$lang['lock_tables']="Tabellen sperren";
|
||||
$lang['errorhandling_restore']="Fehlerbehandlung bei Wiederherstellung";
|
||||
$lang['ehrestore_continue']="fortfahren und Fehler protokollieren";
|
||||
$lang['ehrestore_stop']="anhalten";
|
||||
$lang['automatic']="automatisch";
|
||||
$lang['in_mainframe']="im Hauptframe";
|
||||
$lang['in_leftframe']="im linken Frame";
|
||||
$lang['width']="Breite";
|
||||
$lang['sql_befehle']="SQL-Befehle";
|
||||
$lang['download_languages']="andere Sprachen herunterladen";
|
||||
$lang['download_styles']="andere Themen herunterladen";
|
||||
|
||||
|
||||
?>
|
59
language/de/lang_dump.php
Normale Datei
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$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['back_to_overview']="Datenbank-Übersicht";
|
||||
$lang['dump_filename']="Backup-Datei: ";
|
||||
$lang['withpraefix']="mit Praefix";
|
||||
$lang['dump_notables']="Ich konnte keine Tabellen in der Datenbank `<b>%s</b>` finden.";
|
||||
$lang['dump_endergebnis']="Es wurden <b>%s</b> Tabellen mit insgesamt <b>%s</b> Datensätzen gesichert.<br>";
|
||||
$lang['mailerror']="Leider ist beim Verschicken der Email ein Fehler aufgetreten!";
|
||||
$lang['emailbody_attach']="In der Anlage findest Du die Sicherung Deiner MySQL-Datenbank.<br>Sicherung der Datenbank `%s`
|
||||
<br><br>Folgene Datei wurde erzeugt:<br><br>%s <br><br>Viele Grüsse<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_mp_noattach']="Es wurde eine Multipart-Sicherung erstellt.<br>Die Sicherungen werden nicht als Anhang mitgeliefert!<br>Sicherung der Datenbank `%s`
|
||||
<br><br>Folgene Dateien wurden erzeugt:<br><br>%s<br><br><br>Viele Grüsse<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_mp_attach']="Es wurde eine Multipart-Sicherung erstellt.<br>Die Sicherungen werden in seperaten Mails als Anhang geliefert!<br>Sicherung der Datenbank `%s`
|
||||
<br><br>Folgene Dateien wurden erzeugt:<br><br>%s<br><br><br>Viele Grüsse<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_footer']="<br><br><br>Viele Grüsse<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_toobig']="Die Sicherung überschreitet die Maximalgrösse von %s und wurde daher nicht angehängt.<br>Sicherung der Datenbank `%s`
|
||||
<br><br>Folgene Datei wurde erzeugt:<br><br>%s
|
||||
<br><br>Viele Grüsse<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_noattach']="Das Backup wurde nicht angehängt.<br>Sicherung der Datenbank `%s`
|
||||
<br><br>Folgene Datei wurde erzeugt:<br><br>%s
|
||||
<br><br>Viele Grüsse<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['email_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['multidump']="Multidump: Es wurden <b>%d</b> 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";
|
||||
|
||||
|
||||
?>
|
78
language/de/lang_filemanagement.php
Normale Datei
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['convert_title']="Konvertiere Dump ins MSD-Format";
|
||||
$lang['convert_wrong_parameters']="Falsche Parameter! Konvertierung ist nicht möglich.";
|
||||
$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 aller 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_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']="ausgewählte Dateien\nLö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\nmanuell ausführen";
|
||||
$lang['fm_deleteall']="alle Backupdateien\nlöschen";
|
||||
$lang['fm_deleteallfilter']="alle löschen mit\n";
|
||||
$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 <strong>\"";
|
||||
$lang['fm_restore_header2']="\"</strong>";
|
||||
$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. <br>Das Script liegt unter ";
|
||||
$lang['perloutput1']="Eintrag in crondump.pl für absolute_path_of_configdir";
|
||||
$lang['perloutput2']="Aufruf im Browser oder für externen Cronjob";
|
||||
$lang['perloutput3']="Aufruf in der Shell oder für die Crontab";
|
||||
$lang['converter']="Backup-Konverter";
|
||||
$lang['convert_file']="zu konvertierendes File";
|
||||
$lang['convert_filename']="Name des Zielfiles (ohne Endung)";
|
||||
$lang['converting']="Konvertierung";
|
||||
$lang['convert_fileread']="Datei '%s' wird eingelesen";
|
||||
$lang['convert_finished']="Konvertierung abgeschlossen, '%s' wurde erzeugt.";
|
||||
|
||||
|
||||
?>
|
51
language/de/lang_help.php
Normale Datei
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$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\n0 = 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)\n0 = deaktiviert";
|
||||
$lang['help_ad3']="die maximale Anzahl von Dateien, die im Backupverzeichnis sein dürfen (für Autodelete)\n0 = 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.\nIn 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']="Wenn die Textausgabe abgeschaltet ist, wird kein Text mehr ausgegeben.
|
||||
Diese Funktion ist unabhängig von der Logausgabe.";
|
||||
$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.\nAchtung: benutze nicht den Internet Explorer mit der Einstellung 'andere Browser' !";
|
||||
$lang['help_croncompletelog']="Wenn die Funktion aktiviert ist, wird die komplette Ausgabe im complete_log geschrieben.
|
||||
Diese Funktion ist unabhängig von der Textausgabe.";
|
||||
|
||||
|
||||
?>
|
100
language/de/lang_install.php
Normale Datei
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['installfinished']="<br>die Installation ist abgeschlossen --> <a href=\"index.php\">starte MySQLDumper</a><br>";
|
||||
$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!</strong><br>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['connecttomysql']=" zu MySQL verbinden ";
|
||||
$lang['dbparameter']="Datenbank-Parameter";
|
||||
$lang['confignotwritable']="Das File \"config.php\" ist nicht schreibbar. Bitte die entsprechenden Rechte ändern !";
|
||||
$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.<br><br>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.<br>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</p>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']="<strong>Fehler: </strong>Es gab Probleme beim Schreiben der sql_statements";
|
||||
$lang['import12']="<strong>Fehler: </strong>Es gab Probleme beim Schreiben der config.php";
|
||||
$lang['expert']="erweitert";
|
||||
$lang['dbonlyneed']="... keine Database gefunden : <br>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";
|
||||
$lang['socket']="Socket";
|
||||
$lang['db_only']="Einschranken zum Datenbank";
|
||||
$lang['port']="Port";
|
||||
$lang['found_no_db']="FEHLER: nicht gefundenes Datenbank:";
|
||||
$lang['found_db']="Gefundenes DB: ";
|
||||
$lang['cron_completelog']="";
|
||||
|
||||
|
||||
?>
|
11
language/de/lang_log.php
Normale Datei
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['log_delete']="Log löschen";
|
||||
$lang['logfileformat']="Logfileformat";
|
||||
$lang['logfilenotwritable']="Log-File kann nicht geschrieben werden!";
|
||||
$lang['noreverse']="ältester Eintrag zuerst";
|
||||
$lang['reverse']="neuester Eintrag zuerst";
|
||||
|
||||
|
||||
?>
|
72
language/de/lang_main.php
Normale Datei
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$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['button_create_database']="anlegen";
|
||||
$lang['info_created']="angelegt";
|
||||
$lang['info_cleared']="wurde geleert";
|
||||
$lang['info_deleted']="wurde gelöscht";
|
||||
$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!<br>";
|
||||
$lang['htaccess10']="Die Passwörter sind nicht identisch oder leer!<br>";
|
||||
$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!<br>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.<br>Bei falscher Anwendung sind die Seiten nicht mehr erreichbar.";
|
||||
$lang['phpbug']="Bug in zlib ! Keine Kompression möglich";
|
||||
|
||||
|
||||
?>
|
22
language/de/lang_restore.php
Normale Datei
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['restore_tables_completed0']="Es wurden bisher <b>%d</b> Tabellen angelegt.";
|
||||
$lang['restore_db']="Datenbank '<b>%s</b>' auf Server '<b>%s</b>'.";
|
||||
$lang['restore_complete']="<b>%s</b> Tabellen wurden angelegt.";
|
||||
$lang['restore_run1']="<br>Es wurden bisher <b>%s</b> von <b>%s</b> Datensätzen erfolgreich eingetragen.";
|
||||
$lang['restore_run2']="<br>Momentan wird die Tabelle '<b>%s</b>' mit Datensätzen gefüllt.<br><br>";
|
||||
$lang['restore_complete2']="<b>%s</b> Datensätze wurden eingetragen.";
|
||||
$lang['restore_tables_completed']="Es wurden bisher <b>%d</b> von <b>%d</b> Tabellen angelegt.";
|
||||
$lang['restore_total_complete']="<br><b>Herzlichen Glückwunsch.</b><br><br>Die Datenbank wurde komplett wiederhergestellt.<br>Alle Daten aus der Backupdatei wurden erfolgreich in die Datenbank eingetragen.<br><br>Alles fertig. :-)";
|
||||
$lang['db_no_connection']="Keine Verbindung zur Datenbank möglich!";
|
||||
$lang['db_select_error']="<br>Fehler:<br>Auswahl der Datenbank '<b>";
|
||||
$lang['db_select_error2']="</b>' fehlgeschlagen!";
|
||||
$lang['file_open_error']="Fehler: Ich konnte die Datei nicht öffnen.";
|
||||
$lang['restore_entryerror']="Fehler beim Eintrag des Befehls:";
|
||||
$lang['progress_over_all']="Fortschritt gesamt";
|
||||
$lang['back_to_overview']="Datenbank-Übersicht";
|
||||
$lang['restore_run0']="<br>Es wurden bisher <b>%s</b> Datensätze erfolgreich eingetragen.";
|
||||
|
||||
|
||||
?>
|
159
language/de/lang_sql.php
Normale Datei
|
@ -0,0 +1,159 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['import_notable']="Es ist keine Tabelle für den Import ausgewählt!";
|
||||
$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_tabledeleted']="Tabelle `%s` wurde gelöscht.";
|
||||
$lang['asktableempty']="Soll die Tabelle `%s` geleert werden?";
|
||||
$lang['sql_recordedit']="edititere Datensatz";
|
||||
$lang['sql_recordnew']="Datensatz einfügen";
|
||||
$lang['askdeleterecord']="Soll der Datensatz gelöscht werden?";
|
||||
$lang['askdeletetable']="Soll die Tabelle `%s` 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['askdbdelete']="Möchtest Du die Datenbank `%s` samt Inhalt wirklich löschen?";
|
||||
$lang['askdbempty']="Möchtest Du die Datenbank `%s` wirklich leeren?";
|
||||
$lang['askdbcopy']="Möchtest Du den Inhalt der Datenbank `%s` in die Datenbank `%s` 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['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_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_scopy']="Tabellenstruktur von `%s` wurde in Tabelle `%s` kopiert.";
|
||||
$lang['sql_tcopy']="Tabelle `%s` wurde mit Daten in Tabelle `%s` kopiert.";
|
||||
$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_dbcopy']="Der Inhalt der Datenbank `%s` wurde in die Datenbank `%s` kopiert.";
|
||||
$lang['sql_dbscopy']="Die Struktur der Datenbank `%s` wurde in die Datenbank `%s` kopiert.";
|
||||
$lang['sql_wascreated']="wurde erzeugt";
|
||||
$lang['sql_renamedb']="Datenbank umbenennen";
|
||||
$lang['sql_actions']="Aktionen";
|
||||
$lang['sql_chooseaction']="Aktion wählen";
|
||||
$lang['sql_deletedb']="Datenbank löschen";
|
||||
$lang['sql_emptydb']="Datenbank leeren";
|
||||
$lang['sql_copydatadb']="Inhalt in Datenbank kopieren";
|
||||
$lang['sql_copysdb']="Struktur in Datenbank kopieren";
|
||||
$lang['sql_imexport']="Im-/Export";
|
||||
$lang['info_records']="Datensätze";
|
||||
$lang['asktableemptykeys']="Soll die Tabelle `%s` geleert werden und die Indizes zurückgesetzt werden?";
|
||||
$lang['edit']="editiern";
|
||||
$lang['delete']="löschen";
|
||||
$lang['empty']="leeren";
|
||||
$lang['emptykeys']="leeren und Indizes zurücksetzen";
|
||||
$lang['sql_tableemptied']="Tabelle `%s` wurde geleert.";
|
||||
$lang['sql_tableemptiedkeys']="Tabelle `%s` wurde geleert und die Indizes wurden zurückgesetzt.";
|
||||
$lang['sql_library']="SQL-Bibliothek";
|
||||
$lang['sql_attributes']="Attribute";
|
||||
$lang['sql_enumsethelp']="Bei Feldtypen ENUM und SET bitte bei Size die Werteliste eingeben.\n
|
||||
Die Werte müssen in Hochkommas und mit Kommas getrennt sein.\n
|
||||
Bei Benutzung von Sonderzeichen müssen diese mit \\ maskiert werden.\n\n
|
||||
Beispiele:\n
|
||||
'a','b','c'\n
|
||||
'ja','nein'\n
|
||||
'\\x','\\y'";
|
||||
$lang['sql_uploadedfile']="geladenes File: ";
|
||||
$lang['sql_import']="Import in Datenbank `%s`";
|
||||
$lang['export']="Export";
|
||||
$lang['import']="Import";
|
||||
$lang['importoptions']="Import-Optionen";
|
||||
$lang['csvoptions']="CSV-Optionen";
|
||||
$lang['importtable']="Import in Tabelle";
|
||||
$lang['newtable']="neue Tabelle";
|
||||
$lang['importsource']="Import-Quelle";
|
||||
$lang['fromtextbox']="aus Textfeld";
|
||||
$lang['fromfile']="aus Datei";
|
||||
$lang['emptytablebefore']="Tabelle vorher leeren";
|
||||
$lang['createautoindex']="Auto-Index erzeugen";
|
||||
$lang['csv_namefirstline']="Feldnamen in die erste Zeile";
|
||||
$lang['csv_fieldseperate']="Felder getrennt mit";
|
||||
$lang['csv_fieldsenclosed']="Felder eingeschlossen von";
|
||||
$lang['csv_fieldsescape']="Felder escaped von";
|
||||
$lang['csv_eol']="Zeilen getrennt mit";
|
||||
$lang['csv_null']="Ersetze NULL durch";
|
||||
$lang['csv_fileopen']="CSV-File öffnen";
|
||||
$lang['importieren']="importieren";
|
||||
$lang['sql_export']="Export aus Datenbank `%s`";
|
||||
$lang['exportoptions']="Export-Optionen";
|
||||
$lang['excel2003']="Excel ab 2003";
|
||||
$lang['showresult']="Ergebnis anzeigen";
|
||||
$lang['sendresultasfile']="Ergebnis als Datei senden";
|
||||
$lang['exportlines']="<strong>%s</strong> Zeilen exportiert";
|
||||
$lang['csv_fieldcount_nomatch']="Die Anzahl der Tabellenfelder stimmen nicht mit den zu importierenden Daten überein (%d statt %d).";
|
||||
$lang['csv_fieldslines']="%d Felder ermittelt, insgesamt %d Zeilen";
|
||||
$lang['csv_errorcreatetable']="Fehler beim Erstellen der Tabelle `%s` !";
|
||||
$lang['fm_uploadfilerequest']="Bitte gib eine Datei an.";
|
||||
$lang['csv_nodata']="Keine Daten zum importieren gefunden!";
|
||||
$lang['sqllib_generalfunctions']="allgemeine Funktionen";
|
||||
$lang['sqllib_resetauto']="Auto-Wert zurücksetzen";
|
||||
$lang['sqllib_boards']="Boards";
|
||||
$lang['sqllib_deactivateboard']="Board deaktivieren";
|
||||
$lang['sqllib_activateboard']="Board aktivieren";
|
||||
$lang['sqllib_boardoffline']="Board offline setzen";
|
||||
$lang['sqllib_boardonline']="Board online setzen";
|
||||
$lang['sql_notablesselected']="Es sind keine Tabellen selektiert !";
|
||||
$lang['tools']="Tools";
|
||||
$lang['tools_toolbox']="Datenbank auswählen / Datenbankfunktionen / Im- und Export ";
|
||||
|
||||
|
||||
?>
|
158
language/en/help.php
Normale Datei
|
@ -0,0 +1,158 @@
|
|||
<?php
|
||||
if(file_exists("../../work/config/parameter.php")){
|
||||
@include("../../work/config/parameter.php");
|
||||
}
|
||||
@include("../../inc/functions_global.php");
|
||||
@include("../../language/".$config["language"]."/lang.php");
|
||||
@include("../../language/".$config["language"]."/lang_help.php");
|
||||
echo MSDHeader(2);
|
||||
echo headline($lang['credits']);
|
||||
?>
|
||||
<h3>About this project</h3>
|
||||
The idea for this project comes from Daniel Schlichtholz.<p>In 2004 he created a forum called <a href="http://www.daniel-schlichtholz.de/board" target="_blank">MySQLDumper</a> and soon, programmers who wrote new scripts, supplemented Daniel's scripts.<br>After a short time the small backup-script developed into a stately project.<p>If you have any improvement suggestions you can visit the MySQLDumper-Forum: <a href="http://www.mysqldumper.de/board" target="_blank">http://www.mysqldumper.de</a>.<p>We wish you a lot of fun with this project.<br><br><h4>The MySQLDumper-Team</h4>
|
||||
<table><tr><td><img src="../../images/logo.gif" alt="MySQLDumper" width="160" height="42" border="1"></td><td valign="top">
|
||||
Daniel Schlichtholz - Steffen Kamper<br>
|
||||
Perlscript with Support from Detlev Richter<br>
|
||||
</td></tr></table>
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>MySQLDumper Help</h3>
|
||||
|
||||
|
||||
<h4>Download</h4>
|
||||
This Script is available on the Homepage of MySQLDumper.<br>
|
||||
It is recommanded to visit the Homepage frequently to get the latest information, updates and help.<br>
|
||||
The address is <a href="http://www.mysqldumper.de/board" target="_blank">
|
||||
http://www.mysqldumper.de/board
|
||||
</a>
|
||||
|
||||
<h4>System Mandatories</h4>
|
||||
The Script works with nearly any server (Windows, Linux, ...) <br>
|
||||
and PHP >= Version 4.3.4 with GZip-Library, MySQL (>= 3.23), JavaScript (must be enabled).
|
||||
|
||||
<a href="../../install.php?language=de" target="_top"><h4>Installation</h4></a>
|
||||
The installation is very easy.
|
||||
Unpack the archive in any folder,
|
||||
which is accessible from the Webserver<br>
|
||||
(e.g. in the root directory [Server rootdir/]MySQLDumper)<br>
|
||||
change config.php to chmod 777<br>
|
||||
... all done!<br>
|
||||
you can start MySQLDumper in your Browser by typing "http://webserver/MySQLDumper"
|
||||
to complete the setup, just follow the instructions.
|
||||
|
||||
<br><b>Note:</b><br><i>If your webserver runs with the option safemode=ON MySqlDump mustn't create directories.<br>
|
||||
You will have to do that yourself.<br>
|
||||
MySqlDump breaks in that case and tells you what to do.<br>
|
||||
After you created the directories MySqlDump will function normally.</i><br>
|
||||
|
||||
<a name="perl"></a><h4>Guidance for the Perl script</h4>
|
||||
|
||||
Most have a cgi-bin directory, in which Perl can be executed. <br>
|
||||
This is usually by Browser over http://www.domain.de/cgi-bin/ available. <br><br>
|
||||
|
||||
Make the following steps for this case please. <br><br>
|
||||
|
||||
1. Call in MySQLDumper the page Backup <br>
|
||||
2. Copy the path, that stands behind entry in crondump.pl for $absolute_path_of_configdir: <br>
|
||||
3. open the file "crondump.pl" in the editor <br>
|
||||
4. paste the copied path there with absolute_path_of_configdir (no blanks) <br>
|
||||
5. Save crondump.pl <br>
|
||||
6. copy crondump.pl, as well as perltest.pl and simpletest.pl to the cgi-bin directory (ASCII mode in the ftp-client!) <br>
|
||||
7. chmod 755 to the scripts. <br>
|
||||
7b. If the ending cgi is desired, change the ending of all 3 files pl - > cgi (rename) <br>
|
||||
8. Call in the MySQLDumper the page Configuration<br>
|
||||
9. click on Cronscript <br>
|
||||
10. changes Perl execution path to /cgi-bin/<br>
|
||||
10b. if the Scripts are renamed to *.cgi , change Fileextension to cgi <br>
|
||||
11 save the Configuration <br><br>
|
||||
|
||||
Ready ! The scripts are available from the Page "Backup" <br><br>
|
||||
|
||||
When you can execute Perl anywhere, only following step are needed: <br><br>
|
||||
|
||||
1. Call in MySQLDumper the page Backup. <br>
|
||||
2. Copy the path, that stands behind entry in crondump.pl for $absolute_path_of_configdir: <br>
|
||||
3. open the file "crondump.pl" in the editor <br>
|
||||
4. paste the copied path there with absolute_path_of_configdir (no blanks) <br>
|
||||
5. Save crondump.pl <br>
|
||||
|
||||
6. chmod 755 to the scripts. <br>
|
||||
6b. If the ending cgi is desired, change the ending of all 3 files pl - > cgi (rename) <br>
|
||||
(ev. 10b+11 from above) <br><br>
|
||||
|
||||
|
||||
Windowsuser must change the first line of all Perlscripts, to the path of Perl. <br><br>
|
||||
|
||||
Example: <br>
|
||||
|
||||
instead of: #!/usr/bin/perl w <br>
|
||||
now #!C:\perl\bin\perl.exe w<br>
|
||||
|
||||
<h4>Operating</h4><ul>
|
||||
|
||||
<h6>Menu</h6>
|
||||
In the select box above you choose your database.<br>
|
||||
All actions refer to this database.
|
||||
|
||||
<h6>Home</h6>
|
||||
Here you get information about your system, the version numbers and details about the configured databases.<br>
|
||||
If you click on a database in the table, you get a list of tables with record counts, size and last update stamp.
|
||||
|
||||
<h6>Configuration</h6>
|
||||
Here you can edit your configuration, save it or load the default settings.
|
||||
<ul>
|
||||
<li><a name="conf1"><strong>Configured Databases:</strong> list of configured databases. The active database is in bold.</li>
|
||||
<li><a name="conf2"><strong>Table-Prefix:</strong> you can choose a prefix for each database seperated. The prefix is a filter, which only handle the tables in a dump, that start with this prefix (e.g. all tables starting with "phpBB_"). If you don't want to use it, leave this field empty.</li>
|
||||
<li><a name="conf3"><strong>GZip-Compression:</strong> Here you can activate the compression. It is recommended to work with compression because of the smaller size of files, netherless disk space is ever rarely.</li>
|
||||
<li><a name="conf19"></a><strong>Records count for backup:</strong> These are the number of records which are being read simultaneously while the backup, before the script makes the callback. For slow server you can reduce this parameter to prevent timeouts.</li>
|
||||
<li><a name="conf20"></a><strong>Records count for restore:</strong> These are the number of records which are being read simultaneously while the backup, before the script makes the callback. For slow server you can reduce this parameter to prevent timeouts.</li>
|
||||
<li><a name="conf4"><strong>Directory for Backup files:</strong> choose your directory for the backup files. If you choose a new one, the script will create it for you. You can use relative or absolute paths.</li>
|
||||
<li><a name="conf5"><strong>Send dumpfile as email:</strong> When this option is enabled, the script will automatically send the finished backup file as an email with an attachment (be careful!, you should use compression with this option because the dumpfile may be too large for email!)</li>
|
||||
<li><a name="conf6"><strong>Email address:</strong> Recipient's email address</li>
|
||||
<li><a name="conf7"><strong>Email subject:</strong> The subject of the email</li>
|
||||
<li><a name="conf13"><strong>FTP-Transfer: </strong>When this option is enabled, the script will automatically send the finished backup file via FTP.</li>
|
||||
<li><a name="conf14"><strong>FTP Server: </strong>the Address of the FTP-Servers (e.g. ftp.mybackups.de)</li>
|
||||
<li><a name="conf15"><strong>FTP Server Port: </strong>the Port for the FTP-Server (normally 21)</li>
|
||||
<li><a name="conf16"><strong>FTP User: </strong>the username for the FTP-Account</li>
|
||||
<li><a name="conf17"><strong>FTP Passwort: </strong>the password for the FTP-Account</li>
|
||||
<li><a name="conf18"><strong>FTP Upload-Ordner: </strong>the folder for saving the backup file (there must be Upload-Rights!)</li>
|
||||
|
||||
<li><a name="conf8"><strong>automatic deletion of backups:</strong> When you activate this options, backup files will be deleted automatically by the following rules. Combinations are possible.</li>
|
||||
<li><a name="conf9"><strong>Delete by age of files (in days):</strong> A Value > 0 deletes all files older than the value in days</li>
|
||||
<li><a name="conf10"><strong>Delete by number of files:</strong> A Value > 0 deletes all files except the given value</li>
|
||||
<li><a name="conf11"><strong>Langauge:</strong> choose your language for the interface.</li>
|
||||
<li><a name="conf12"><strong>Time limit for Cronjob:</strong> this value in seconds increases the allowed time limit of the process in seconds when your ISP allows that.</li>
|
||||
</ul>
|
||||
|
||||
<h6>Management</h6>
|
||||
All the actions are listed here.<br>
|
||||
You see all files in the backup directory.
|
||||
For the actions "Restore" and "Delete" you have to select a file first.
|
||||
<UL>
|
||||
<li><strong>Restore:</strong> you restore the database with the records of the selected backupfile.</li>
|
||||
<li><strong>Delete:</strong> you can delete the selected backup file.</li>
|
||||
<li><strong>Start new Dump:</strong> here you start a new backup (dump) with your configured parameters.</li>
|
||||
</UL>
|
||||
|
||||
<h6>Log</h6>
|
||||
You can read the Log entries and delete them.
|
||||
|
||||
<h6>Credits / Help</h6>
|
||||
This page.
|
||||
|
||||
|
||||
</ul>
|
||||
<hr>
|
||||
<h3>Our Sponsores</h3>
|
||||
The Sponsores can be found also at our <a href="http://www.mysqldumper.de/en/index.php?m=7" target="_blank">Sponsorepage</a><br>
|
||||
<p class="verysmall" style="color:green;">We are not responsable for contents of the following pages.</p>
|
||||
|
||||
<?php
|
||||
if ($sponsors = @file("http://www.mysqldumper.de/sponsors.php?lang=en")) {
|
||||
echo implode("\n",$sponsors);
|
||||
} else echo "sorry, not available.<br><br>You must go online !";
|
||||
echo '<br>';
|
||||
echo MSDFooter();
|
||||
?>
|
||||
|
123
language/en/lang.php
Normale Datei
|
@ -0,0 +1,123 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['yes']="yes";
|
||||
$lang['to']="to";
|
||||
$lang['activated']="activated";
|
||||
$lang['not_activated']="not activated";
|
||||
$lang['error']="Error";
|
||||
$lang['of']=" of ";
|
||||
$lang['added']="added";
|
||||
$lang['first_run']="Database found:";
|
||||
$lang['dbrefresh']="refresh Database list";
|
||||
$lang['db']="Database";
|
||||
$lang['dbs']="Databases";
|
||||
$lang['onlinehelp']="Online-Help";
|
||||
$lang['tables']="Tables";
|
||||
$lang['table']="Table";
|
||||
$lang['records']="Records";
|
||||
$lang['compressed']="compressed (gz)";
|
||||
$lang['notcompressed']="normal (uncompressed)";
|
||||
$lang['general']="general";
|
||||
$lang['comment']="Comment";
|
||||
$lang['filesize']="Filesize";
|
||||
$lang['all']="all";
|
||||
$lang['none']="none";
|
||||
$lang['with']=" with ";
|
||||
$lang['dir']="Directory";
|
||||
$lang['rechte']="Permissions";
|
||||
$lang['status']="State";
|
||||
$lang['never']="never";
|
||||
$lang['finished']="finished";
|
||||
$lang['file']="File";
|
||||
$lang['field']="Field";
|
||||
$lang['fields']="Fields";
|
||||
$lang['was']="was";
|
||||
$lang['new']="new";
|
||||
$lang['charset']="Charset";
|
||||
$lang['collation']="Collation";
|
||||
$lang['change']="change";
|
||||
$lang['in']="in";
|
||||
$lang['do']="execute";
|
||||
$lang['errors_occured']="Errors occured";
|
||||
$lang['view']="view";
|
||||
$lang['existing']="existing";
|
||||
$lang['authors']="Authors";
|
||||
$lang['back']="back";
|
||||
$lang['normal']="normal";
|
||||
$lang['db_host']="Hostname";
|
||||
$lang['db_user']="User";
|
||||
$lang['db_pass']="Password";
|
||||
$lang['info_scriptdir']="Directory of MySQLDumper";
|
||||
$lang['info_workdir']="Workdirectory";
|
||||
$lang['info_backupdir']="Backupdirectory";
|
||||
$lang['info_cgidir']="CGI-Bin-Directory";
|
||||
$lang['info_cginr']="not existing or no Permission";
|
||||
$lang['info_actdb']="Actual Database";
|
||||
$lang['useconnection']="Use Connection";
|
||||
$lang['wrongconnectionpars']="Wrong or no Connectionparameter !";
|
||||
$lang['conn_not_possible']="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['save']="Speichern";
|
||||
$lang['reset']="zurücksetzen";
|
||||
$lang['praefix']="Table-Prefix";
|
||||
$lang['autodelete']="Delete backups automatically";
|
||||
$lang['max_backup_files_each1']="For all databases";
|
||||
$lang['max_backup_files_each2']="For each database";
|
||||
$lang['saving_db_form']="Database";
|
||||
$lang['testconnection']="test Connection";
|
||||
$lang['back_to_minisql']="Edit Database";
|
||||
$lang['critical_safemode']="<h3>Attention:Program can't continue in Safe-Mode!</h3>Create the following directories manually in the Scriptdirectory:<br><div style=\"padding-left:20px;\"><br>work<br>work/backup<br>work/config<br>work/log<br>work/structure</div><br>Give full permissions to the directories (chmod 777).<br>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']="automatically 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 are ";
|
||||
$lang['lastbackup']="Last Backup";
|
||||
$lang['notavail']="<em>not available</em>";
|
||||
$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";
|
||||
$lang['fm_freespace']="Free Space on Server";
|
||||
$lang['lang_de']="";
|
||||
$lang['lang_en']="";
|
||||
$lang['load_database']="Reload databases";
|
||||
$lang['home']="Home";
|
||||
$lang['config']="Config";
|
||||
$lang['dump']="Backup";
|
||||
$lang['restore']="Wiederherstellung";
|
||||
$lang['file_manage']="File Administration";
|
||||
$lang['log']="Log";
|
||||
$lang['project']="About this project";
|
||||
$lang['choose_db']="choose Database";
|
||||
$lang['credits']="Credits / Help";
|
||||
$lang['logfilenotwritable']="Can't! write Logfile !";
|
||||
$lang['sql_error1']="Error in Query:";
|
||||
$lang['sql_error2']="MySQL says:";
|
||||
$lang['unknown']="";
|
||||
$lang['unknown_number_of_records']="unknown";
|
||||
$lang['cron_completelog']="Log complete output";
|
||||
$lang['no']="no";
|
||||
$lang['MySQLErrorDoc']="MySQL Documentation of Errors";
|
||||
$lang['downgrade']="Downgrade (MySQL 4.x => 3.x)";
|
||||
$lang['create_database']="Create new database";
|
||||
$lang['exportfinished']="Export finalized.";
|
||||
|
||||
|
||||
?>
|
107
language/en/lang_config_overview.php
Normale Datei
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$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 output on screen.";
|
||||
$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['config_askload']="Do you want to override the actual settings with the default settings?";
|
||||
$lang['load']="load default\nsettings";
|
||||
$lang['load_success']="The default settings were loaded.";
|
||||
$lang['cron_samedb']="use actual database";
|
||||
$lang['cron_crondbindex']="Database and Table-Prefix<br> 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_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['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.\nThis 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";
|
||||
$lang['wrong_connectionpars']="Connection-Parameters are wrong !";
|
||||
$lang['connectionpars']="Connection-Parameter";
|
||||
$lang['extendedpars']="extended Parameter";
|
||||
$lang['dbonly']="Only this Database";
|
||||
$lang['fade_in_out']="fade in/out";
|
||||
$lang['db_backuppars']="Database Backup-Parameter";
|
||||
$lang['general']="general";
|
||||
$lang['maxsize']="max. Size";
|
||||
$lang['backup_format']="Backup-Format";
|
||||
$lang['inserts_complete']="complete Inserts";
|
||||
$lang['inserts_extended']="extended Inserts";
|
||||
$lang['inserts_delayed']="delayed Inserts";
|
||||
$lang['inserts_ignore']="Error ignoring Inserts";
|
||||
$lang['lock_tables']="Lock Tables";
|
||||
$lang['errorhandling_restore']="Error Handling while restoring";
|
||||
$lang['ehrestore_continue']="continue and log errors";
|
||||
$lang['ehrestore_stop']="stop";
|
||||
$lang['automatic']="automatic";
|
||||
$lang['in_mainframe']="in main frame";
|
||||
$lang['in_leftframe']="in left Frame";
|
||||
$lang['width']="Width";
|
||||
$lang['sql_befehle']="SQL-Commands";
|
||||
$lang['download_languages']="download other languages";
|
||||
$lang['download_styles']="download other themes";
|
||||
|
||||
|
||||
?>
|
60
language/en/lang_dump.php
Normale Datei
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$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['back_to_overview']="Database-Overview";
|
||||
$lang['dump_filename']="Backup-File: ";
|
||||
$lang['withpraefix']="with praefix";
|
||||
$lang['dump_notables']="No tables found in database `<b>%s</b>` ";
|
||||
$lang['dump_endergebnis']="The file contains <b>%s</b> tables with <b>%s</b> records.<br>";
|
||||
$lang['mailerror']="Sending of email failed!";
|
||||
$lang['emailbody_attach']="The Attachment contains the backup of your MySQL-Database.<br>Backup of Database `%s`
|
||||
<br><br>Following File was created:<br><br>%s <br><br>Kind regards<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper";
|
||||
$lang['emailbody_mp_noattach']="A Multipart-Backup was created.<br>The Backupfiles are not attached to this email!<br>Backup of Database `%s`
|
||||
<br><br>Following Files were created:<br><br>%s
|
||||
<br><br>Kind regards<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_mp_attach']="A Multipart-Backup was created.<br>The Backupfiles are attached to seperate emails!<br>Backup of Database `%s`
|
||||
<br><br>Following Files were created:<br><br>%s <br><br>Kind regards<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_footer']="`<br><br>Kind regards<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_toobig']="The Backupfile exceeded the maximum size of %s and was not attached to this email.<br>Backup of Database `%s`
|
||||
<br><br>Following File was created:<br><br>%s
|
||||
<br><br>Kind regards<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper.de/\">www.mysqldumper.de</a>";
|
||||
$lang['emailbody_noattach']="Files are not attached to this email!<br>Backup of Database `%s`
|
||||
<br><br>Following File was created:<br><br>%s
|
||||
<br><br>Kind regards<br><br>MySQLDumper<br><a href=\"http://www.mysqldumper";
|
||||
$lang['email_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['multidump']="Multidump: Backup of <b>%d</b> 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";
|
||||
|
||||
|
||||
?>
|
78
language/en/lang_filemanagement.php
Normale Datei
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['convert_title']="Convert Dump to MSD-Format";
|
||||
$lang['convert_wrong_parameters']="Wrong parameters! Conversion is not possible.";
|
||||
$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_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 Perl-Cronscript";
|
||||
$lang['fm_dumpsettings_cron']="";
|
||||
$lang['fm_oldbackup']="(unknown)";
|
||||
$lang['fm_restore_header']="Restore of Database <strong>\"";
|
||||
$lang['fm_restore_header2']="\"</strong>";
|
||||
$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 <br>The address of the script is ";
|
||||
$lang['perloutput1']="Entry in crondump.pl for absolute_path_of_configdir";
|
||||
$lang['perloutput2']="Url for the Browser or for external Cronjob";
|
||||
$lang['perloutput3']="Commandline in the Shell or for the Crontab";
|
||||
$lang['converter']="Backup-Converter";
|
||||
$lang['convert_file']="file to be converted";
|
||||
$lang['convert_filename']="Name of destination file (without extension)";
|
||||
$lang['converting']="Converting";
|
||||
$lang['convert_fileread']="Read file '%s'";
|
||||
$lang['convert_finished']="Conversion finished, '%s' was written successfully.";
|
||||
|
||||
|
||||
?>
|
51
language/en/lang_help.php
Normale Datei
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$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\n0 = 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)\n0 = deactivated";
|
||||
$lang['help_ad3']="the maximum number of backup files (for autodelete)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.\nDefault 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 deactivated the output will not be printed on screen.
|
||||
It is independant from the printing in the logfile.";
|
||||
$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.\nAttention: don't use Internet Explorer with the setting 'other Browser' !";
|
||||
$lang['help_croncompletelog']="When activated the complete output is written in the complete_log-file.
|
||||
This is independent from text printing";
|
||||
|
||||
|
||||
?>
|
100
language/en/lang_install.php
Normale Datei
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['installfinished']="<br>Installation completed --> <a href=\"index.php\">start MySQLDumper</a><br>";
|
||||
$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!</strong><br>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['connecttomysql']=" connect to MySQL ";
|
||||
$lang['dbparameter']="Database-Parameter";
|
||||
$lang['confignotwritable']="The file \"config.php\" is not writable. Please CHMOD fie to 777!";
|
||||
$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.<br><br>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.<br>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</p>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']="<strong>Error: </strong>There were problems writing sql_statements";
|
||||
$lang['import12']="<strong>Error: </strong>There were problems writing config.php";
|
||||
$lang['expert']="extended";
|
||||
$lang['dbonlyneed']="... no Database found : <br>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";
|
||||
$lang['socket']="Socket";
|
||||
$lang['db_only']="Limit to database";
|
||||
$lang['port']="Port";
|
||||
$lang['found_no_db']="ERROR: the following DB was not found:";
|
||||
$lang['found_db']="found db";
|
||||
$lang['cron_completelog']="";
|
||||
|
||||
|
||||
?>
|
11
language/en/lang_log.php
Normale Datei
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
//generated at 28.02.2005
|
||||
|
||||
$lang['log_delete']="delete Log";
|
||||
$lang['logfileformat']="Logfileformat";
|
||||
$lang['logfilenotwritable']="Can't! write Logfile !";
|
||||
$lang['noreverse']="oldest Entry first";
|
||||
$lang['reverse']="last Entry first";
|
||||
|
||||
|
||||
?>
|