<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>系统后台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/public.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/style.css" />
<link href="../../images/admin/public.css" rel="stylesheet" type="text/css" />
<link href="../../images/admin/style.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->basedir;?>js/jquery.js" language="javascript"></script>
<script src="<?php echo $this->basedir;?>js/calendar.js" language="javascript"></script>
<script language="javascript">
$(document).ready(function() {
     $("#ta tr").mouseover(function(){
      $(this).addClass("over");
     });
     $("#ta tr").mouseout(function(){
      $(this).removeClass("over");
     });
	 $("#ta tr:even").addClass("double");
	 $('#mostrar').click(function(){$('#sh').toggle();});
	 /*全选*/
	 $("#checkall").click(function() {
	 	$("input[@name='table[]']").each(function() {
			$(this).attr("checked", $('#checkall').attr('checked'));
		});
	});
	 $("#all").click(function() {
	 	$("input[@name='table[]']").each(function() {
			$(this).attr("checked", $('#all').attr('checked'));
		});
	});
});
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr align="center" valign="top">
    <td width="*" align="center" valign="top">
	<!-- ######### begin ######### -->
      <div class="Block">
		<div class="BlockBar">数据库表优化</div><form id="form1" name="form1" method="post" action="">
        <table width="100%" border="0" cellpadding="4" cellspacing="1" class="tab">
          <tr class="sub">
            <td width="16%" class="align-center">表名称</td>
            <td width="16%" class="align-center">表类型</td>
            <td width="19%" class="align-center">记录修改时间</td>
            <td width="11%" class="align-center">记录</td>
            <td width="14%" class="align-center">占用空间</td>
            <td width="11%" class="align-center">碎片大小</td>
            <td width="13%" class="align-center"><input name="checkall" type="checkbox" class="checkbox" id="checkall" value="checkbox" />
              全选中</td>
          </tr>

		  <?php
		  if (is_array($this->tableStat))
		  foreach($this->tableStat as $row){?>
          <tr class="row">
            <td class="align-center"><?php echo $row['Name'];?></td>
            <td align="left" class="align-left"><?php echo $row['Engine'];?></td>
            <td align="left" class="align-left"><?php echo $row['Update_time'];?></td>
            <td class="align-center"><?php echo $row['Rows'];?></td>
            <td class="align-center"><?php echo round(($row['Data_length'] + $row['Index_length'])  / 1024,1);?> KB</td>
            <td class="align-center"><?php echo $row['Data_free'];?></td>
            <td class="align-center"><input name="table[]" type="checkbox" class="checkbox" value="<?php echo $row['Name'];?>" /> <a href="<?php echo $this->installdir;?>vodcms/backup/table/<?php echo $row['Name'];?>/">备份表</a></td>
          </tr>
		  <?php
		  }?>
        </table>
		
        <table width="100%" border="0" cellpadding="0" cellspacing="3" >
          <tr class="align-right">
            <td><div class="form-handle">
	          <input name="checkbox2" type="checkbox" class="checkbox" value="checkbox" id="all" />
	          全选
	          <select name="select" id="select">
	            <option value="optimize">优化表</option>
	            <option value="repair">修复表</option>
	          </select>
		    <input type="submit" name="op" value="操作" />
		  </div></td>
          </tr>
        </table></form>
      </div>
      <div id="App-Version-Prompt" style="display:none;">
        <div class="space"></div>
        <div class="Block">
          <div class="BlockBar">版本更新信息</div>
          <div class="BlockContent" id="App-Version-Prompt-Body" style="padding:20px 5px 20px 5px; text-align:center; background:#FFFFCC;">loading...</div>
        </div>
      </div>
      <!-- ########## end ########## -->
    </td>
    <td width="5"></td>
    <td width="150" align="center" valign="top">
    <?php
	echo $this->render('menu');
	?>
     </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>

