'.$lang['Statusinformationen'].'
';
$status.= DirectoryWarnings();
//Versionen
$status.='
'.$lang['Versionsinformationen'].'
';
$status.='MySQL Dumper-Version:
'.MSD_VERSION.' '.MSD_VERSION_ADD.'';
$status.='OS:
'.MSD_OS.' ('.MSD_OS_EXT.')
';
$status.='Browser:
'.MSD_BROWSER_AGENT.' Version '.MSD_BROWSER_VERSION.'';
$status.='MySQL-Version:
'.MSD_MYSQL_VERSION.'';
$status.='PHP-Version:
'.PHP_VERSION.' Speicher:
'.$config["ram"].' MB '.(($config["zlib"]) ? '': '
'.$lang["phpbug"].'. ').$sm.'
[Info] ';
$status.='
PHP-Extensions:
'.$config["phpextensions"].'';
if($config["disabled"]!="") $status.='
'.$lang['disabledfunctions'].':
'.$config["disabled"].'';
if(!extension_loaded("ftp")) $status.= '
'.$lang['noftppossible'].'';
if(!$config["zlib"]) $status.= '
'.$lang['nogzpossible'].'';
//MySQLDumper Informationen
$status.='
'.$lang['MySQL Dumper Informationen'].'
'.$lang["info_location"].' "
'.$_SERVER["SERVER_NAME"].'" ('.($config["paths"]["root"]).')
';
$status.=$lang["info_actdb"].":
".$databases["db_actual"]."";
$status.='
['.$lang['Fehlerbericht'].']';
if($config["no_htaccess"]==0) $status.='
'.$lang["htaccess1"].' '.(($is_htaccess) ? '' : '
'.$lang["htaccess15"].'');
if($is_htaccess) $status.='
*** '.$lang["htaccess16"].' ***';
else $status.='
+++ '.$lang["htaccess17"].' +++';
//History
$status.='
History
'.$lang['backupfilesanzahl'].'
'.$Sum_Files.' Backups (
'.byte_output($Sum_Size).')
';
$status.=$lang["fm_freespace"].':
'.MD_FreeDiskSpace().'';
if($Sum_Files>0) $status.=$lang['lastbackup'].' '.$lang["vom"].'
'.((isset($Last_BU[1])) ? $Last_BU[1] : " - ").'
'.((isset($Last_BU[1])) ? '
' : " - ").''.((isset($Last_BU[0])) ? $Last_BU[0] : " - ").'';
$status.='
';
echo $status;
} elseif($action=="db") {
//Datenbanken
echo ''.$lang["info_databases"].'
';
} elseif($action=="sys") {
$sysaction=(isset($_GET["dosys"])) ? $_GET["dosys"] : 0;
$msg="";
$res=@mysql_query("SHOW VARIABLES LIKE 'datadir'",$config["dbconnection"]);
if($res) {
$row = mysql_fetch_array($res);
$data_dir=$row[1];
}
switch($sysaction) {
case 1: //FLUSH PRIVILEGES
$msg="> operating FLUSH PRIVILEGES
";
$res=@mysql_query("FLUSH PRIVILEGES",$config["dbconnection"]);
$meldung=mysql_error($config["dbconnection"]);
if($meldung!="") {
$msg.='> MySQL-Error: '.$meldung;
} else {
$msg.="> Privileges were reloaded.";
}
break;
case 2: //FLUSH STATUS
$msg="> operating FLUSH STATUS
";
$res=@mysql_query("FLUSH STATUS",$config["dbconnection"]);
$meldung=mysql_error($config["dbconnection"]);
if($meldung!="") {
$msg.='> MySQL-Error: '.$meldung;
} else {
$msg.="> Status was reset.";
}
break;
case 3: //FLUSH HOSTS
$msg="> operating FLUSH HOSTS
";
$res=@mysql_query("FLUSH HOSTS",$config["dbconnection"]);
$meldung=mysql_error($config["dbconnection"]);
if($meldung!="") {
$msg.='> MySQL-Error: '.$meldung;
} else {
$msg.="> Hosts were reloaded.";;
}
break;
case 4: //SHOW MASTER LOGS
$msg="> operating SHOW MASTER LOGS
";
$res=@mysql_query("SHOW MASTER LOGS",$config["dbconnection"]);
$meldung=mysql_error($config["dbconnection"]);
if($meldung!="") {
$msg.='> MySQL-Error: '.$meldung;
} else {
$numrows=mysql_num_rows($res);
if($numrows==0) {
$msg.='> there are no master log-files';
}else{
$msg.='> there are '.$numrows.' logfiles
';
for($i=0;$i<$numrows;$i++) {
$row=mysql_fetch_row($res);
$msg.='> '.$row[0].' '.(($data_dir) ? byte_output(filesize($data_dir.$row[0])) : '').'
';
}
}
}
break;
case 5: //RESET MASTER
$msg="> operating RESET MASTER
";
$res=@mysql_query("RESET MASTER",$config["dbconnection"]);
$meldung=mysql_error($config["dbconnection"]);
if($meldung!="") {
$msg.='> MySQL-Error: '.$meldung;
} else {
$msg.="> All Masterlogs were deleted.";
}
break;
}
echo '
'.$lang['mysqlsys'].'
';
echo '';
echo '
';
echo '
';
echo '> MysSQL Dumper v'.MSD_VERSION.' - Output Console
';
echo ($msg!="") ? $msg : '> waiting for operation ...
';
echo '
';
} elseif($action=="vars") {
$var=(isset($_GET["var"])) ? $_GET["var"] : "prozesse";
$Titelausgabe=array("variables"=>$lang['Variabeln'],"status"=>$lang['Status'],"prozesse"=>$lang['Prozesse']);
echo '
'.$lang['mysqlvars'].'
';
echo ''.$Titelausgabe[$var].' ';
echo ''.$lang['Prozesse'].' ';
echo ''.$lang['Status'].' ';
echo ''.$lang['Variabeln'].' ';
echo ' |
';
echo '';
//Variabeln
switch($var) {
case "variables":
$res=@mysql_query("SHOW variables");
if($res) $numrows=mysql_num_rows($res);
if($numrows==0) {echo $lang["info_novars"];} else {
echo 'Name | '.$lang['Inhalt'].' | ';
for ($i = 0; $i < $numrows; $i++) {
$row = mysql_fetch_array($res);
echo "$row[0] | $row[1] | ";
}
}
echo ' ';
break;
case "status":
$res=@mysql_query("SHOW STATUS");
if($res) $numrows=mysql_num_rows($res);
if($numrows==0) {echo $lang["info_nostatus"];} else {
echo 'Name | '.$lang['Inhalt'].' | ';
for ($i = 0; $i < $numrows; $i++) {
$row = mysql_fetch_array($res);
echo "$row[0] | $row[1] | ";
}
}
echo ' ';
break;
case "prozesse":
if($config["processlist_refresh"]<1000)$config["processlist_refresh"]=2000;
if(isset($_GET["killid"]) && $_GET["killid"]>0) {
$killid=(isset($_GET["killid"])) ? $_GET["killid"] : 0;
$wait=(isset($_GET["wait"])) ? $_GET["wait"] : 0;
if($wait==0) {
$ret=mysql_query("KILL ".$_GET["killid"]);
$wait=2;
} else $wait+=2;
if($wait==0) {
echo ''.$lang["processkill1"].$_GET["killid"].$lang["processkill2"].$ret.' ';
} else {
echo ''.$lang["processkill3"].$wait.$lang["processkill4"].$_GET["killid"].$lang["processkill2"].$ret.' ';
}
}
$killid=$wait=0;
$res=@mysql_query("SHOW FULL PROCESSLIST ");
if($res) $numrows=mysql_num_rows($res);
if($numrows==0) {echo $lang["info_noprocesses"];} else {
echo 'ID | User | Host | DB | Command | Time | State | Info | RT: '.round($config["processlist_refresh"]/1000).' sec | ';
for ($i = 0; $i < $numrows; $i++) {
$row = mysql_fetch_array($res);
echo "$row[0] | $row[1] | $row[2] | $row[3] | $row[4] | $row[5] | $row[6] | $row[7] | kill | ";
if($row[0]==$killid && $row[4]=="Killed") {
$wait=$killid=0;
}
}
}
echo ' ';
echo '';
echo '';
break;
}
echo ' |
';
}
//Datenbankdetails
if (isset($_GET["dbid"]))
{
$dbid=$_GET["dbid"];
echo '
'.$lang["info_dbdetail"].'"'.$databases["Name"][$dbid].'"
';
//@mysql_query("USE ".$databases["Name"][$dbid]);
$res=@mysql_query("SHOW TABLE STATUS FROM `".$databases["Name"][$dbid]."`");
if($res) $numrows=mysql_num_rows($res);
if($numrows==0) {
echo $lang["info_dbempty"];
} else {
echo $numrows.' '.$lang["info_table1"];
echo ($numrows>1) ? $lang["info_table2"] : '';
echo '
Nr. | '.
$lang["info_table1"].' | '.
$lang["info_records"].' | '.
$lang["info_size"].' | '.
$lang["info_lastupdate"].' | '.
$lang["info_optimized"].' | Status | '.
'
';
$last_update="2000-01-01 00:00:00";
$s=$s1=$s2="";
for ($i = 0; $i < $numrows; $i++)
{
$row = mysql_fetch_array($res);
$akt_size=$row["Data_length"]+$row["Index_length"];
echo ''.($i+1).' | '.
$row["Name"].' | '.
number_format($row["Rows"],0,",",".").' | '.
number_format($akt_size,0,",",".").
' Bytes | '.
$row["Update_time"].' | ';
if ($row["Data_free"]==0) echo '';
else echo ' '.$lang["no"].' ';
echo ' | ';
if($checkit==$row["Name"] || $repair==1) {
$tmp_res=mysql_query("REPAIR TABLE `".$row["Name"]."`");
}
if(($checkit==$row["Name"] || $checkit=="ALL") && $akt_size>0) {
$tmp_res=mysql_query("CHECK TABLE `".$row["Name"]."`");
if($tmp_res) {
$tmp_row = mysql_fetch_row($tmp_res);
echo ($tmp_row[3]=="OK") ? '' : ' repair ';
} else echo "CHECK TABLE `".$row["Name"]."`";
} else {
if($akt_size>0) echo 'check';
else echo "-";
}
echo ' |
';
if(isset($row["Update_time"])) if(strtotime($row["Update_time"])>strtotime($last_update)) $last_update=$row["Update_time"];
$s1=$s1+$row["Rows"];
$s2=$s2+$row["Data_length"]+$row["Index_length"];
}
echo ''.$lang["info_sum"].' | '.number_format($s1,0,",",".").' | '.number_format($s2,0,",",".").' Bytes | '.$last_update.' | ';
echo ' |
';
}
$edb=$lang["info_emptydb1"].' `'.$databases["Name"][$dbid].'` '.$lang["info_emptydb2"];
$kdb=$lang["info_emptydb1"].' `'.$databases["Name"][$dbid].'` '.$lang["info_killdb"];
echo '