📄 data_backup.php
字号:
<?php
include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/backup.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 72 );
$step = $_REQUEST['step'];
if ( $step == "2" )
{
$now = date( "Ymd", time( ) );
$SqlName = "data_".$now;
header( "Content-disposition: filename=".$SqlName.".sql" );
header( "Content-type: application/octetstream" );
header( "Pragma: no-cache" );
header( "Expires: 0" );
$client = getenv( "HTTP_USER_AGENT" );
if ( ereg( "[^(]*\\((.*)\\)[^)]*", $client, $regs ) )
{
$os = $regs[1];
if ( eregi( "Win", $os ) )
{
$crlf = "\r\n";
}
}
$connect = @mysql_connect( $dbHost, $dbUser, $dbPass );
if ( $connect )
{
$table = mysql_list_tables( $dbName, $connect );
$rows = mysql_num_rows( $table );
$i = 0;
while ( $i < $rows )
{
$table_name = mysql_tablename( $table, $i );
$creatables .= get_table_def( $ShowDbName, $table_name, "\n" ).";\n\n";
$creatables .= get_table_content_fast( $ShowDbName, $table_name, "", "my_handler" )."\n\n";
$i++;
}
}
echo $creatables;
exit( );
}
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n\r\n</head>\r\n\r\n<body class=\"NormalPage\">\r\n<div align=\"center\"> \r\n <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td width=\"120\" > <img src=\"images/bar.gif\" > ";
echo $strDateBackup;
echo "</td>\r\n <td > </td>\r\n <td width=\"100\" > </td>\r\n </tr>\r\n </table>\r\n <br>\r\n <br>\r\n <table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"22\">\r\n <tr> \r\n <td class=title align=\"left\" height=\"22\" valign=\"top\" width=\"3\"><img src=\"images/menubg16.gif\" width=\"3\" height=\"30\"></td>\r\n <td class=title align=\"center\" height=\"22\" colspan=\"2\">";
echo $strDateBackup;
echo "</td>\r\n <td class=title align=\"right\" height=\"22\" width=\"3\" valign=\"top\"><img src=\"images/menubg17.gif\" width=\"3\" height=\"30\"></td>\r\n </tr>\r\n </table>\r\n <table width=\"300\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" align=\"center\">\r\n <form method=\"post\" action=\"\">\r\n <tr> \r\n <td colspan=\"2\" class=\"title\"> \r\n <div align=\"center\"> \r\n <input type=\"submit\" name=\"backupst";
echo "art\" value=\"";
echo $strDateStart;
echo "\" class=\"button\">\r\n <input type=\"hidden\" name=\"step\" value=\"2\">\r\n </div>\r\n </td>\r\n </tr>\r\n </form>\r\n </table>\r\n</div>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -