<table class="sgrid" width="100%" align="center">
	<tr><td>
		<ul>
			<li>当文章数据表过大时可以手动创建分表，提高读写速度。</li>
			<li>创建分表后，需手动设置当前数据分表。</li>
		</ul>
	</td></tr>
</table>
<br />
<form name="config" id="config" action="{?$saxue_admin_url?}/configs.php?do=submit" method="post">
<input type="hidden" name="gname" id="gname" value="article" />
<input type="hidden" name="define" id="define" value="0" />
<input type="hidden" name="action" id="action" value="update" />
<table class="grid" width="100%" align="center">
	<tr>
		<th></th>
		<th>分表状态</th>
		<th>设置数据分表</th>
		<th>记录数</th>
		<th>数据</th>
		<th>索引</th>
		<th>碎片</th>
		<th>操作</th>
	</tr>
	{?section name=i loop=$tablerows?}
	<tr class="rowbg">
		<td></td>
		<td>{?if $i['key']==$tbnum?}<span class="green">当前分表</span>{?else?}-{?/if?}</td>
		<td><label><input type="radio" name="tbnum" value="{?$i['key']?}"{?if $i['key']==$tbnum?} checked{?/if?}>&nbsp;{?$tablerows[i].Name?}</label></td>
		<td>{?$tablerows[i].Rows?}</td>
		<td>{?$tablerows[i].Data_length?}</td>
		<td>{?$tablerows[i].Index_length?}</td>
		<td>{?$tablerows[i].Data_free?}</td>
		<td>{?if $i['key']==1 || $i['key']==$tbnum || $tablerows[i].Rows>0?}
		{?function saxue_geticon:'del':'删除':0?}{?else?}<a href="?action=delete&tbnum={?$i['key']?}" onclick="return confirm('您确定要删除此数据表吗？')">{?function saxue_geticon:'del':'删除'?}</a>{?/if?}</td>
	</tr>
	{?/section?}
	<tr>
		<th colspan="2"></th>
		<th>{?$totaltable?}个表</th>
		<th>{?$totalrows?}条记录</th>
		<th>{?$totalsize?}</th>
		<th>{?$totalindex?}</th>
		<th>{?$totalfree?}</th>
		<th></th>
	</tr>
	<tr><td class="foot" colspan="2"></td><td colspan="8" class="foot"><input type="submit" name="Submit" class="button" value=" 设置数据分表 " />&nbsp;<input type="button" name="cache" class="button" value=" 更新缓存 " onclick="location.href='?action=cache'" /></td></tr>
</table>
</form>
<br><br><br>
<form method="post">
<input type="hidden" name="action" value="new">
<table width="100%" class="grid" cellspacing="1" align="center">
	<tr><th></th><th>创建分表</th></tr>
	<tr>
		<td width="120" class="tdleft">分表名称：</td>
		<td>{?$tablepre?}<input type="text" class="text" name="tbnum" id="tbnum" size="5" maxlength="2" value="{?$nexttable?}" onkeyup="value=value.replace(/[^0-9]/g,'');" /></td>
	</tr>
	<tr>
		<td width="120" class="tdleft">&nbsp;</td>
		<td><input type="submit" class="button" name="submit"  id="submit" value="创建分表" /></td>
	</tr>
</table>
</form>