<!--<?php print <<<EOT
-->
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<style>
td {font-size: 9pt;line-height: 1.5;}
body {font-size: 9pt;line-height: 1.5;}
a:link { font-size: 9pt; color: #000000; text-decoration: none }
a:visited{ font-size: 9pt; color: #000000; text-decoration: none }
a:hover {font-size: 9pt;color: red}
</style>
<table width="100%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#A5D0F1">
  <tr>
    <td background="images/wbg.gif" bgcolor="#F0F3F8" colspan="7"><b>数据库恢复</b></td>
  </tr>
  <tr height="30" style="padding-left:5px;" bgcolor="#FFFFFF"> 
    <td width="20%" colspan="2"><img src="images/rarrow.gif" border="0">&nbsp;<a href="ng_db.php?action=export"><b>数据库备份</b></a></td>
    <td width="20%"><img src="images/rarrow.gif" border="0">&nbsp;<a href="ng_db.php?action=import"><b>数据库恢复</b></a></td>
    <td width="15%"><img src="images/rarrow.gif" border="0">&nbsp;<a href="ng_db.php?action=repair"><b>数据库修复/优化</b></a></td>
	<td width="20%" colspan="2"><img src="images/rarrow.gif" border="0">&nbsp;<a href="ng_db.php?action=query"><b>执行SQL语句</b></a></td>
	<td width="20%"><img src="images/rarrow.gif" border="0">&nbsp;<a href="ng_db.php?action=phpinfo" target="_blank"><b>PHP INFO()</b></a></td>
  </tr>
    <tr style="padding-left:5px;" bgcolor="#FFFFFF">
	<td height="30" colspan="7">
	背景色相同的文件为同一次备份的文件,导入时只需要点导入任意一个文件,程序会自动导入剩余文件</td>
  </tr>
<form method="POST" name="restoreform"  action="">
  <tr align="center" bgcolor="#F0F3F8">
    <td width="8%"><input type="checkbox" name="checkbox" value="Check All" onClick="CheckAll(this.form)" /></td>
	<td width="8%">ID</td>
	<td width="20%">文件名</td>
	<td width="10%">文件大小</td>
	<td width="20%">备份时间</td>
	<td width="5%">卷号</td>
	<td width="20%">操作</td>
  </tr>
<!--
EOT;
$intsize = 0;
if(is_array($infos)){
	foreach($infos as $id => $info){
$id++;
print <<<EOT
-->
  <tr bgcolor="$info[bgcolor]"  align="center">
    <td><input type="checkbox" name="filenames[]" value="$info[filename]"></td>
    <td>$id</td>
    <td class="px10" align="left">&nbsp;<a href="./data/$info[filename]">$info[filename]</a></td>
    <td class="px10">$info[FILESize] M</td>
	<td class="px10">$info[maketime]</td>
    <td class="px10">$info[number]</td>
    <td><a href="?action=$action&pre=$info[pre]&dosubmit=1">导入</a> | <a href="?action=delete&filenames=$info[filename]">删除</a> | <a href="?action=down&filename=$info[filename]">下载</a>
	</td>
  </tr>
<!--
EOT;
$intsize = $intsize +  $info[FILESize];
}}print <<<EOT
-->
  <tr bgcolor="#FFFFFF">
	<td colspan="7" align="center"><input type="submit" name="delsql" value="删除选中的备份" onclick="document.restoreform.action='?action=delete'">
	备份文件总大小$intsize M</td>
  </tr>
</form>

<form name="upload" method="POST" action="?action=uploadsql" enctype="multipart/form-data">
  <tr bgcolor="#F0F3F8">
    <td colspan="2">上传数据库备份SQL文件:</td>
    <td height="30" colspan="5"><input name="uploadfile" type="file" size="25">
	<input type="hidden" name="max_file_size" value="4096000">
	<input type="submit" name="dosubmit" value=" 上传 "></td>
  </tr>
  </form>
</table>
<script language=javascript>
<!--
function CheckAll(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
-->
</script>
<!--
EOT;
?>-->