<table class="grid" width="100%" align="center">
  <caption>提示</caption>
  <tr><td>
  <ul>
  <li>数据表优化可以去除数据库中的碎片，使记录排列紧密，提高读写速度。</li>
  <li>数据表修复可修复数据库在进行查询，删除，更新等操作时产生的错误。</li>
  </ul>
  </td></tr>
</table>
<br />
<form action="{?$url_action?}" method="post" name="checkform" id="checkform">
<table class="grid" width="100%" align="center">
<caption>数据表优化/修复</caption>
  <tr>
    <th width="5%"><input type="checkbox" name="checkall" value="checkall" onclick="for (var i=0;i<this.form.elements.length;i++){ if (this.form.elements[i].name != 'checkkall') this.form.elements[i].checked = this.form.checkall.checked; }"></th>
    <th width="30%">数据表</th>
    <th width="13%">类型</th>
    <th width="13%">记录数</th>
    <th width="13%">数据</th>
	<th width="13%">索引</th>
	<th width="13%">碎片</th>
  </tr>
{?section name=i loop=$tablerows?}
  <tr>
    <td>{?$tablerows[i].checkbox?}</td>
    <td>{?$tablerows[i].Name?}</td>
    <td>{?$tablerows[i].Type?}</td>
    <td>{?$tablerows[i].Rows?}</td>
    <td>{?$tablerows[i].Data_length?}</td>
	<td>{?$tablerows[i].Index_length?}</td>
    <td>{?$tablerows[i].Data_free?}</td>
  </tr>
{?/section?}
  <tr>
    <th></th>
    <th>{?$totaltable?}个表</th>
    <th></th>
    <th>{?$totalrows?}条记录</th>
    <th>{?$totalsize?}</th>
	<th>{?$totalindex?}</th>
    <th>{?$totalfree?}</th>
  </tr>
  <tr>
    <td colspan="7" class="foot">
	<input type="button" name="allcheck" value="全部选中" class="button" onclick="for (var i=0;i<this.form.elements.length;i++){ if(this.form.elements[i].type == 'checkbox') this.form.elements[i].checked = true; }">&nbsp;&nbsp;
	<input type="button" name="nocheck" value="全部取消" class="button" onclick="for (var i=0;i<this.form.elements.length;i++){ if(this.form.elements[i].type == 'checkbox') this.form.elements[i].checked = false; }">&nbsp;&nbsp;
	<label class="radio"><input name="act" type="radio" value="optimize"{?if $option == "optimize"?} checked="checked"{?/if?} />优化表</label> 
	<label class="radio"><input name="act" type="radio" value="repair"{?if $option == "repair"?} checked="checked"{?/if?} />修复表</label> &nbsp;&nbsp;&nbsp;
	<button type="submit" name="Submit" class="button"> 提 交 </button>
	{?$jieqi_token_input?}
	</td>
  </tr>
</table>
</form>
<br /><br />