{include file="header.tpl" page_name=$page_name sys_name=$sys_name}
<div align="center">
{$admin_nav}
{if $do == 'backup' || $do == 'optimize' || $do == 'repair'}
<form action="admincp.php?action=deal&type=db&do={$do}" method="post" name="myform">
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="tableborder tableborder_line">
<tr class="header">
<td width="50">选择</td>
<td>数据库表</td>
</tr>
<tbody>
{section name=i loop=$tb_arr}
	<tr>
	<td><input type="checkbox" class="checkbox" name="tb_arr[]" value="{$tb_arr[i]}" /></td>
	<td>{$tb_arr[i]}</td>
	</tr>
{/section}
<tr>
<td colspan="2"><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkall('prefix', this.form, 'tb_arr')" />
<label for="chkall">全选</label></td>
</tr>
{if $do == 'backup'}<tr>
<td colspan="2">
<strong>分卷备份：</strong><input name="sizelimit" type=text class="txt" value="2048" size="5"> KB
</td>
</tr>{/if}
<tr>
<td colspan="2">
{if $do == 'backup'}<input type="submit" name="submit" value=" 执行备份 "  />{/if}
{if $do == 'optimize'}<input type="submit" name="submit" value=" 执行优化 "  />{/if}
{if $do == 'repair'}<input type="submit" name="submit" value=" 执行修复 "  />{/if}
</td>
</tr>
</tbody>
</table>
{/if}
{if $do == 'recover'}
<form action="admincp.php?action=deal&type=db&do=del" method="post">
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="tableborder tableborder_line">

<tr class="header">
<td width="30">删</td>
<td width="30%">备份名</td>
<td width="10%">文件数</td>
<td width="25%">版本</td>
<td width="20%">备份时间</td>
<td width="*">操作</td>
</tr>
<tbody>
{if !$tb_arr}
<tr><td colspan="7">没有备份文件</td></tr>
{else}
{section name=i loop=$tb_arr}
	<tr>
	<td><input type="checkbox" class="checkbox" name="delete[]" value="{$tb_arr[i].pre}" /></td>
	<td>{$tb_arr[i].name}</td>
	<td>{$tb_arr[i].count}</td>
	<td>{$tb_arr[i].version}</td>
	<td>{$tb_arr[i].time}</td>
	<td><a href="admincp.php?action=db&do=backincheck&pre={$tb_arr[i].pre}">导入</a></td>
	</tr>
{/section}
{/if}
<tr>
<td colspan="7">
<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkall('prefix', this.form, 'delete')" />
<label for="chkall">全选</label>
</td>
</tr>
<tr>
<td colspan="7"><input type="submit" class="btn" name="forumlinksubmit" value="提交"  /></td>
</tr>
</tbody>
</table>
{/if}
{if $do == 'backincheck'}
<form action="admincp.php?action=deal&type=db&do=recover&pre={$pre}" method="post">
<table width="100%" border="0" cellpadding="2" cellspacing="6"><tr><td><br /><br /><br /><br /><br /><br />
<table width="500" border="0" cellpadding="0" cellspacing="0" align="center" class="tableborder">
<tr class="header"><td>系统信息提示</td></tr><tr><td class="altbg2"><div align="center">
<br /><br /><br /><font color="red">备份恢复功能将覆盖原来的数据,您确认要导入备份数据?</font><br /><br /><br />

<input type="submit" name="submit" value="确认导入备份"  />&nbsp;
<input type='button' value='返回继续操作' onclick='javascript:history.go(-1);' />
</form>
<br /><br /></div><br /><br />
</td></tr></table>
<br /><br /><br /><br /><br />
</td></tr></table>
{/if}

</div>
{include file="footer.tpl"}