<table width="100%" class="topmenu">
	<tr><td>
		<a href="tag.php"><em>TAG管理</em></a><span>|</span>
		<a href="javascript:doDialog('{?$saxue_url?}/tag/admin/tagop.php?action=add','新增TAG','550','100')"><em>新增TAG</em></a><span>|</span>
		<a href="tagop.php?action=clean" onclick="return confirm('此操作会删除文章为 0 的TAG，确定清理吗？')"><em>清理多余TAG</em></a>
	</td></tr>
</table>
<form name="frmsearch" method="post">
<input name="page" id="page" type="hidden" value="1">
<input name="pagesize" id="pagesize" type="hidden" value="{?$Saxue.request.pagesize?}">
<table width="100%" align="center" class="sgrid">
    <tr>
        <td>
			TAG：
			<input name="tagname" type="text" class="text" size="15" value="{?$Saxue.request.tagname?}">&nbsp;
			<select name="cid"><option value="">选择分类</option><option value="0"{?if '0'==$Saxue.request.cid?} selected{?/if?}>无分类</option>{?$cates?}</select>&nbsp;
			<label><input name="isgood" type="checkbox" value="1"{?if 1==$Saxue.request.isgood?} checked{?/if?}>&nbsp;推荐TAG</label>&nbsp;
            <input type="submit" name="btnsearch" class="button" value="搜 索">
        </td>
    </tr>
</table>
</form>
<br>
<form method="post" name="frmpost">
<input name="jumpurl" type="hidden" value="{?$saxue_thisurl?}">
<table width="100%" class="grid">
	<tr>
		<th><input type="checkbox" id="checkall" name="checkall" value="checkall" onclick="javascript: for (var i=0;i<this.form.elements.length;i++){ if (this.form.elements[i].name != 'checkkall') this.form.elements[i].checked = form.checkall.checked; }"></th>
		<th>TAGID</th>
		<th>TAG名称</th>
		<th>分类</th>
		<th>{?function saxue_getsort:'文章数':'counts':$Saxue.request.form_sort:$Saxue.request.form_order?}</th>
		<th>{?function saxue_getsort:'访问数':'views':$Saxue.request.form_sort:$Saxue.request.form_order?}</th>
		<th>推荐</th>
		<th>操作</th>
	</tr>
	<tbody>
	{?section name=i loop=$rows?}
	<tr class="rowbg">
		<td><input type="checkbox" name="ids[]" value="{?$rows[i].tagid?}"/></td>
		<td>{?$rows[i].tagid?}</td>
		<td><a href="{?$rows[i].url?}" target="_blank">{?$rows[i].tagname?}</a></td>
		<td>{?$rows[i].cname?}</td>
		<td>{?$rows[i].counts?}</td>
		<td>{?$rows[i].views?}</td>
		<td>{?if 1==$rows[i].isgood?}<strong class="red">是</strong>{?else?}否{?/if?}</td>
		<td>
			<a href="javascript:doDialog('{?$saxue_url?}/tag/admin/tagop.php?action=add&tagid={?$rows[i].tagid?}','修改TAG','550','100')">{?function saxue_geticon:'edit':'修改TAG'?}</a>
			<a href="tagop.php?action=delete&ids={?$rows[i].tagid?}" onclick="return confirm('你确定要删除TAG『{?$rows[i].tagname?}』吗？')">{?function saxue_geticon:'del':'删除TAG'?}</a>
		</td>
	</tr>
	{?/section?}
	<tr>
		<td colspan="12" class="foot">
			<select name="action" id="batchaction">
				<option value="">请选择批量操作</option>
				<option value="setgood">推荐</option>
				<option value="cacelgood">取消推荐</option>
				<option value="autocate">自动分类</option>
				<option value="movecate">分类移动</option>
				<option value="delete">删除</option>
				<option value="merge">合并</option>
				<option value="counts">统计文章数</option>
			</select>&nbsp;
			<select name="tocid" id="tocid"><option value="">选择分类</option><option value="0">不分类</option>{?$cates?}</select>&nbsp;
			合并到：<input name="totag" type="text" class="text" size="15">&nbsp;
			<input type="button" value="批量操作" class="button" onclick="batchctrl();">
			<span class="blue">注意：当TAG标签的文章数比较多时，『修改』『删除』『合并』会造成<span class="red">大量的数据库读写</span>，并重新生成文章HTML页，请谨慎操作</span>
		</td>
	</tr>
	</tbody>
</table>
</form>
<table width="100%"><tr><td width="100%">
	<div class="fl pages">
		<ul>
			<li><span class="fl">每页显示:</span></li>
			<li{?if $Saxue.request.pagesize==20?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(20)">20</a></li>
			<li{?if $Saxue.request.pagesize==30?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(30)">30</a></li>
			<li{?if $Saxue.request.pagesize==50?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(50)">50</a></li>
			<li{?if $Saxue.request.pagesize==100?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(100)">100</a></li>
		</ul>
	</div>
	<div class="fr pages"><ul>{?$url_jumppage?}</ul></div>
</td></tr></table>