<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="reporttype"><option value="">举报类型</option>{?section name=i loop=$reporttype?}<option value="{?$i['key']?}"{?if $i['key']==$Saxue.request.reporttype?} selected{?/if?}>{?$i['value']?}</option>{?/section?}</select>&nbsp;
			<select name="ishandle">
				<option value="">是否处理</option>
				<option value="0"{?if "0" == $Saxue.request.ishandle?} selected{?/if?}>未处理</option>
				<option value="1"{?if "1" == $Saxue.request.ishandle?} selected{?/if?}>仅标识处理</option>
				<option value="2"{?if "2" == $Saxue.request.ishandle?} selected{?/if?}>已删除文章</option>
			</select>&nbsp;文章ID：
			<input name="aid" type="text" class="text" size="15" value="{?$Saxue.request.aid?}">&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>文章ID</th>
		<th>举报类型</th>
		<th>举报时间</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><a href="{?$rows[i].url?}" target="_blank">{?$rows[i].aid?}</a></td>
		<td>{?$rows[i].reporttypename?}</td>
		<td>{?$rows[i].reporttime|date:"Y-m-d H:i"?}</td>
		<td>{?$rows[i].reporttimes?}</td>
		<td><div class="show_single" onclick="swapshow(this)">{?$rows[i].note|nl2br?}</div></td>
		<td>{?if $rows[i].ishandle==2?}<span class="green">文章已删除</span>{?elseif $rows[i].ishandle==1?}<span class="blue">仅标识处理</span>{?else?}<span class="red">未处理</span>{?/if?}</td>
		<td>{?if $rows[i].handletime==0?}--{?else?}{?$rows[i].handletime|date:"Y-m-d H:i"?}{?/if?}</td>
		<td>
			<a href="?action=delete&ids[]={?$rows[i].aid?}" onclick="return confirm('确定要删除该条举报记录吗？')">{?function saxue_geticon:'del':'删除举报记录'?}</a>{?if $rows[i].ishandle==0?}
			<a href="?action=delart&ids[]={?$rows[i].aid?}" onclick="return confirm('确定要删除被举报文章吗？')">{?function saxue_geticon:'cancel':'删除文章'?}</a>
			<a href="?action=sethandled&ids[]={?$rows[i].aid?}" onclick="return confirm('确定要仅标识已处理不删除文章吗？')">{?function saxue_geticon:'only':'标识已处理'?}</a>{?/if?}
		</td>
	</tr>
	{?/section?}
	<tr>
		<td colspan="12" class="foot">
			<select name="action" id="batchaction">
				<option value="">请选择批量操作</option>
				<option value="delete">删除举报记录</option>
				<option value="sethandled">仅标识已处理</option>
				<option value="delart">删除文章处理</option>
			</select>&nbsp;
			<input type="button" value="批量操作" class="button" onclick="batchctrl();">&nbsp;&nbsp;
		</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>
<style>
.show_single{width:500px;height:22px;line-height:22px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:help}
.show_all{width:500px;word-wrap:break-word;word-break:break-all;cursor:pointer}</style>
<script type="text/javascript">
function swapshow(obj){
	if (obj.className=='show_single') {
		obj.className='show_all';
	} else {
		obj.className='show_single';
	}
}
</script>