<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>
			<select name="tbnum"><option value="">数据分表</option>{?section name=i loop=$tables?}<option value="{?$i['key']?}"{?if $i['key']==$Saxue.request.tbnum?} selected{?/if?}>{?$i['value']?}</option>{?/section?}</select>&nbsp;
			<select name="cid"><option value="">选择分类</option>{?$cates?}</select>&nbsp;
			<select name="keytype">
			  <option value="title"{?if "title" == $Saxue.request.keytype?} selected{?/if?}>文章标题</option>
			  <option value="author"{?if "author" == $Saxue.request.keytype?} selected{?/if?}>文章作者</option>
			  <option value="aid"{?if "aid" == $Saxue.request.keytype?} selected{?/if?}>文章ID</option>
			  <option value="uid"{?if "uid" == $Saxue.request.keytype?} selected{?/if?}>会员ID</option>
			</select>&nbsp;
			<input name="keyword" type="text" class="text" size="15" value="{?$Saxue.request.keyword?}">&nbsp;
			<select name="searchtype">
			  <option value="2"{?if '2' == $Saxue.request.searchtype?} selected{?/if?}>完整匹配</option>
			  <option value="1"{?if '1' == $Saxue.request.searchtype?} selected{?/if?}>半模糊匹配</option>
			  <option value="0"{?if '0' == $Saxue.request.searchtype?} selected{?/if?}>模糊匹配</option>
			</select>&nbsp;
            <input type="submit" name="btnsearch" class="button" value="搜 索">
        </td>
    </tr>
</table>
</form>
<br>
<form id="formAdd" method="post">
<input type="hidden" name="topicid" value="{?$Saxue.request.topicid?}">
<input type="hidden" name="dosubmit" value="1">
<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>分类</th>
		<th>标题</th>
		<th>作者</th>
		<th>会员</th>
		<th>浏览</th>
	</tr>
	<tbody>
	{?section name=i loop=$rows?}
	<tr class="rowbg">
		<td><input type="checkbox" name="ids[]" value="{?$rows[i].aid?}"/></td>
		<td>{?if $rows[i].pid!=$rows[i].cid?}<a href="{?$rows[i].purl?}" target="_blank">{?$rows[i].pname?}</a>&nbsp;>&nbsp;{?/if?}<a href="{?$rows[i].curl?}" target="_blank">{?$rows[i].cname?}</a></td>
		<td><div class="show_single">{?if $rows[i].isthumb==1?}<span class="c_pic">[图]</span>&nbsp;{?/if?}{?if $rows[i].level>0?}<span class="c_top">[L{?$rows[i].level?}]</span>&nbsp;{?/if?}<a href="{?$rows[i].url?}" target="_blank" title="{?$rows[i].title?}"><font color="{?$rows[i].style?}">{?$rows[i].title?}</font></a></div></td>
		<td>{?$rows[i].author?}</td>
		<td><a href="?topicid={?$Saxue.request.topicid?}&action=add&keytype=uid&keyword={?$rows[i].uid?}">{?if $rows[i].uid==0?}管理员{?else?}{?$rows[i].uname?}{?/if?}</a></td>
		<td>{?$rows[i].views?}</td>
	</tr>
	{?/section?}
	</tbody>
</table>
<div><input type="submit" name="submit" id="submit" class="button dodialog" value="提 交"/></div>
</form>
<div class="fr pages"><ul>{?$url_jumppage?}</ul></div>
<script type="text/javascript">
$(function(){
	$("#formAdd").ajaxForm({
		beforeSubmit : function(){
			if (!confirm('您确认要添加选择的文章到此专题吗？')) {
				return false;
			} 
		},
        dataType: "json",
        success : function(data){
			if(data.flag == 0){
				doTip(data.msg);
			}else{
				location.reload();
				doTip('添加专题文章成功');
			}
        }
    });
})
</script>
<style>.show_single{max-width:350px;}</style>