<!-- #include file="../../themes/admin/~css.php" -->
<form action="<?=url(RPGM.'sqlbackup/?ajax')?>" method="get" id="form" onsubmit="return yun_submit(this.id,'确定要备份吗?')">
<h3 class="title">备份数据</h3>
<div class="in">
<input name="mod" type="hidden" value="admin" />
<input name="action" type="hidden" value="sqlbackup" />
<input name="c_tabid" type="hidden" value="0" />
<input name="rid" type="hidden" value="0" />
<input name="sumfile" type="hidden" value="1" />
<input name="dir" type="hidden" value="<?=$arg_0?>" />

<div class="fieldwrapper">
	<label for="" class="styled">分卷大小</label>
	<div class="thefield">
     <input name="size"  value="1024" /> K
    <a href="###" onclick="$('#tablists').toggle(200)"> [自选数据表]</a>
    <table width="100%" id="tablists" style="display:none">
    <thead>
      <tr>
        <th width="24"></th>
        <th>表名</th>
        <th>大小</th>
        <th width="70">记录数</th>
        <th width="110">整理</th>
      </tr>
    </thead>
    <tbody>
      <?php foreach($arg_2 as $v){?>
      <tr id="us_<?=$id?>">
        <td class="a-center"><input name="tabs[]" type="checkbox" value="<?=$v[0]?>" checked="checked" /></td>
        <td><?=$v[0]?></td>
        <td><?=$v[8]?> 字节</td>
        <td><?=$v[4]?></td>
        <td><?=$v[14]?></td>
      </tr>
      <?php }?>
    </tbody>
  </table>
    </div>
</div>

<div align="center" >
    <input type="submit" value="备份所选" class="button"/>
    <input type="checkbox" checked="checked" onclick="CheckAll(this.form)" name="chkall"/>全选
  </div>
  
  </div>
</form>

<br />

<form action="<?=url(RPGM.'sqldel/?ajax')?>" method="get" id="form2" onsubmit="return yun_submit(this.id,'要删除选中的备份吗?')">
<h3 class="title">备份列表</h3>
<div class="in">
  <table width="100%">
    <thead>
      <tr>
        <th width="24"></th>
        <th>名称</th>
        <th width="70">分卷数量</th>
        <th width="110">备份时间</th>
        <th width="60">应用</th>
      </tr>
    </thead>
    <tbody>
      <?php foreach($arg_1 as $v){?>
      <tr id="bak_<?=$v[0]?>">
        <td class="a-center"><input name="ids[]" type="checkbox" value="<?=$v[0]?>" /></td>
        <td>SQL_<?=$v[0]?></td>
        <td><?=$v[1]?></td>
        <td><?=$v[2]?></td>
        <td><a href="javascript:void(0)" onclick="yun_send('<?=url(RPGM.'sqlimport/?ajax&id='.$v[0])?>','确定要导入该备份吗?');return false;"><img height="16" width="16" src="<?=THEMEPATH?>images/icons/user_edit.png" title="导入"/></a><a href="javascript:void(0)" onclick="yun_send('<?=url(RPGM.'sqldel/?ajax&ids='.$v[0])?>','确定要删除该备份吗?');return false;"><img height="16" width="16" src="<?=THEMEPATH?>images/icons/user_delete.png" title="删除"/></a></td>
      </tr>
      <?php }?>
    </tbody>
  </table>
    <div align="center" >
	      <input type="submit" value="删除所选" class="button"/>
      <input type="checkbox" onclick="CheckAll(this.form)" name="chkall" /> 全选
  </div>
  </div>
</form>
<script type="text/javascript">
</script>
