| 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.| +--------------------------------------------------------------------------+ */ require_once "login.php"; // print html header echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n \"http://www.w3.org/TR/html4/loose.dtd\">\n<html" . ARABIC_HTML . ">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">\n<link rel=\"stylesheet\" href=\"" . PMBP_STYLESHEET_DIR . $CONF['stylesheet'] . ".css\" type=\"text/css\">\n<title>LugrawibeBackup - " . INF_INFO . "</title>\n</head>\n<body>\n<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\" width=\"100%\">\n\n<tr><th colspan=\"2\" class=\"active\">\n"; echo PMBP_image_tag("logo.png", "LugrawibeBackup PMBP_WEBSITE", PMBP_WEBSITE); echo "\n</th></tr>\n"; // get and print the informations about the $_GET['file'] backup file if ($_GET['file']) { echo "<tr><td><div class=\"bold_left\"><br><br>" . INF_DATE . ":</div></td><td><br><br>" . strftime($CONF['date'], PMBP_file_info("time", PMBP_EXPORT_DIR . $_GET['file'])) . "</td></tr>\n"; echo "<tr><td><div class=\"bold_left\">" . INF_DB . ":</div></td><td>" . PMBP_file_info("db", PMBP_EXPORT_DIR . $_GET['file']) . "</td></tr>\n"; $size = PMBP_size_type(PMBP_file_info("size", PMBP_EXPORT_DIR . $_GET['file'])); echo "<tr><td><div class=\"bold_left\">" . INF_SIZE . ":</div></td><td>" . $size['value'] . " " . $size['type'] . "</td></tr>\n"; echo "<tr><td><div class=\"bold_left\">" . INF_COMP . ":</div></td><td>" . PMBP_file_info("comp", PMBP_EXPORT_DIR . $_GET['file']) . "</td></tr>\n"; echo "<tr><td><div class=\"bold_left\">" . INF_DROP . ":</div></td><td>" . PMBP_file_info("drop", PMBP_EXPORT_DIR . $_GET['file']) . "</td></tr>\n"; echo "<tr><td><div class=\"bold_left\">" . INF_TABLES . ":</div></td><td>" . PMBP_file_info("tables", PMBP_EXPORT_DIR . $_GET['file']) . "</td></tr>\n"; echo "<tr><td><div class=\"bold_left\">" . INF_DATA . ":</div></td><td>" . PMBP_file_info("data", PMBP_EXPORT_DIR . $_GET['file']) . "</td></tr>\n"; echo "<tr><td colspan=\"2\"><br><div class=\"bold_left\">" . INF_COMMENT . ":</div></td></tr>\n"; echo "<tr><td colspan=\"2\">" . PMBP_file_info("comment", PMBP_EXPORT_DIR . $_GET['file']) . "</td></tr>\n"; } else { // return error message if no file was selected echo "<tr><td><div class=\"bold\">" . INF_NO_FILE . "!</div></td></tr>\n"; } echo "</table>\n</body>\n</html>";
} else { $mysql_c = @mysql_get_client_info(); } // calculate size of all backups and last backup date $all_files = PMBP_get_backup_files(); if (is_array($all_files)) { $last_backup = 0; $size_sum = 0; foreach ($all_files as $filename) { $file = "./" . PMBP_EXPORT_DIR . $filename; $size_sum += PMBP_file_info("size", $file); if (($time = PMBP_file_info("time", $file)) > $last_backup) { $last_backup = $time; } } $size_sum = PMBP_size_type($size_sum); $size = $size_sum['value'] . " " . $size_sum['type']; $time = strftime($CONF['date'], $last_backup); } else { $size = "0 kb"; $time = "?"; } $scheduled_time = $PMBP_SYS_VAR['last_scheduled']; foreach ($PMBP_SYS_VAR as $key => $value) { if (substr($key, 0, 15) == "last_scheduled_" && $value > $scheduled_time) { $scheduled_time = $value; } } if ($scheduled_time) { $scheduled_time = strftime($CONF['date'], $scheduled_time); } else {
$all_dbs = PMBP_get_db_list(); if (count($all_dbs)) { natsort($all_dbs); echo "<tr>\n<th class=\"active\">" . DB_NAME . "</th>\n<th class=\"active\">" . DB_NUM_TABLES . "</th>\n<th class=\"active\">" . DB_NUM_ROWS . "</th>\n<th class=\"active\">" . DB_SIZE . "</th>\n</tr>\n"; // print html table foreach ($all_dbs as $db_name) { // select the db mysql_select_db($db_name, $con); $num_tables = $num_rows = $data_size = 0; // get number of rows and size of tables $stati = mysql_query("show table status", $con); while ($status = @mysql_fetch_array($stati)) { $data_size += $status['Data_length'] + $status['Index_length']; $num_rows += $status['Rows']; } $size = PMBP_size_type($data_size); // get number of tables $num_tables = mysql_affected_rows($con); // first field for the db name echo "<tr " . PMBP_change_color("#FFFFFF", "#000000") . ">"; echo "\n<th class=\"active\">\n" . $db_name; if ($num_tables > 0) { echo "<span class=\"standard\">" . PMBP_pop_up("db_info.php?table=" . $db_name, " [" . DB_TABLES . "]", "view") . "</span>"; } elseif ($num_tables < 0) { $num_tables = "<span class=\"red\">" . C_WRONG_DB . "</span>"; } echo "\n</th>\n"; echo "<td class=\"list\">" . $num_tables . "</td>\n"; echo "<td class=\"list\">" . $num_rows . "</td>\n"; echo "<td class=\"list\">" . $size['value'] . " " . $size['type'] . "</td>\n"; }