<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view(TPL_FOLDER."header");?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="30"><table width="100%" border="0" cellpadding="0" cellspacing="0" >
        <tr>
          <td width="71%" height="30"><a href="<?php echo site_url(CTL_FOLDER."mysql_manage/database_backup");?>" class="o14"><img src="{tpl_path}images/317.gif" border="0"/> 备份当前数据</a> </td>
          <td width="29%">空间占用：<font color="#FF0000"><?php echo $folder_size;?></font></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<form method="post" name="list_form" id="list_form">
  <table class="widefat" cellspacing="0">
    <thead>
      <tr>
        <th ><input type="checkbox" onclick="check_box(this.form.rd_id)" /></th>
        <th>备份文件名</th>
        <th>备份时间</th>
        <th>数据库大小</th>
        <th>操作</th>
      </tr>
    </thead>
    <tfoot>
    </tfoot>
    <tbody  id="check_box_id">
      <?php foreach($file_list as $f_item) {?>
      <tr>
        <th><input name="rd_id[]" type="checkbox" id="rd_id" value="<?php echo $f_item['name'];?>"></th>
        <td><?php echo $f_item['name'];?></td>
        <td><?php echo date("Y-m-d H:i:s",$f_item['date']);?></td>
        <td><?php echo byte_format($f_item['size']);?></td>
        <td><a href="<?php echo site_url(CTL_FOLDER."mysql_manage/download_database/".$f_item['name']);?>">下载数据库</a></td>
      </tr>
      <?php }?>
    </tbody>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td style="padding-top:5px"><select name="action_url" id="action_url">
          <option value="" style="color:#FF0000">-选择操作-</option>
          <option value="<?php echo site_url(CTL_FOLDER."mysql_manage/delete_backup");?>">删除</option>
        </select>
        &nbsp;
      <input name="submit_list_button" type="button" class="button-style2" id="submit_list_button" onclick="submit_list_form(this.form,this)" value="执行操作" />  <img src="{tpl_path}images/notice.gif" class="tooltips" title="操作步骤：在左边勾选要操作的记录-->选择需要执行的操作-->点击“执行操作”按钮-->完成" /></td>
    </tr>
  </table>
</form>
<br>
<?php $this->load->view(TPL_FOLDER."footer");?>