<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_commend" %>
<%@ Register tagPrefix="Dvbbs" namespace="Dvbbs.Controls" assembly="Dvbbs.Web"%>
<%@ Register tagPrefix="bbs" tagName="AdminHeader" src="controls/admin_header.ascx"%>
<%@ Register tagPrefix="bbs" tagName="AdminFooter" src="controls/admin_footer.ascx"%>
<bbs:AdminHeader title="帖子推荐管理" runat="server" ID="header" NAME="header" />
<form runat="server" ID="frmCommend">
	<script type="text/JavaScript">
// 执行动作
function doaction(flag)
{
	var url = frmCommend.action;
	if(url.indexOf("action")>0)
	{
		frmCommend.action = "?action="+ flag;
	}
	else
	{
		frmCommend.action += "?action="+ flag;
	}
	frmCommend.submit();	
}
	</script>
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table3">
		<tr>
			<td class="title">版主推荐帖子管理</td>
		</tr>
		<tr>
			<td><strong>设置管理</strong>：<a href="admin_commend.aspx">审核推荐帖子</a> | <a href="?action=view">
					查看推荐帖子</a>
			</td>
		</tr>
	</table>
	<br />
	<% if(Action == "" || "view" == Action){%>
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table4">
		<tr>
			<td colspan="5" class="title">
				审核推荐帖子
			</td>
		</tr>
		<tr>
			<td nowrap="nowrap" width="10%" align="center">选择</td>
			<td nowrap="nowrap" width="40%" align="center">标题</td>
			<td nowrap="nowrap" width="10%" align="center">作者</td>
			<td nowrap="nowrap" width="10%" align="center">审核状态</td>
			<td nowrap="nowrap" width="20%" align="center">发表时间</td>
		</tr>
		<asp:Repeater id="list" runat="server">
			<ItemTemplate>
				<tr onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor=''">
					<td align="left"><Dvbbs:Span id="CommendID" runat="server" />&nbsp;&nbsp;[<Dvbbs:Anchor id="Modify" runat="server" />]</td>
					<td align="left"><Dvbbs:Anchor id="Title" runat="server" /></td>
					<td align="center"><Dvbbs:Anchor id="PostUserName" runat="server" /></td>
					<td align="center"><Dvbbs:Span id="AuditStatu" runat="server" /></td>
					<td align="center"><Dvbbs:Span id="DateAndTime" runat="server" /></td>
				</tr>
			</ItemTemplate>
		</asp:Repeater>
		<tr>
			<td colspan="6" class="bottom" align="center">
				<input class="button" id="save" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" type="button"
					value="审核通过" onclick="doaction('audit');" /> <input class="button" id="delcommend" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" type="button" value="删除推荐" onclick="doaction('delete');" />
			</td>
		</tr>
		<tr>
			<td colspan="6" class="title"><Dvbbs:Pager id="pager" per="30" runat="server" /></td>
		<tr>
		<tr>
			<td colspan="6">
				→ 审核通过的帖子在前就可以有调用显示在指定地方<br />
				http://论坛地址/Recommendtopic.aspx (引用论坛所有推荐帖子)<br />
				http://论坛地址/Recommendtopic.aspx?boardid=8 (引用版块ID为8的推荐帖子)
			</td>
		<tr>
	</table>
	<%}else if("set" == Action){%>
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table5">
		<tr>
			<td colspan="2" class="title">修改推荐帖子</td>
		</tr>
		<tr>
			<td>原标题:</td>
			<td><Dvbbs:Span id="Title" runat="server" /><Dvbbs:Span id="CommendID" runat="server" /></td>
		</tr>
		<tr>
			<td>新标题</td>
			<td><asp:textbox id="AliasTitle" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)"
					onMouseOut="IEvent('mouseout',this)" runat="server" /></td>
		</tr>
		<tr>
			<td colspan="2" align="center" class="bottom">
				<input class="button" id="set" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" type="button"
					value=" 保 存 " onclick="doaction('saveset');" /></td>
		</tr>
		<tr>
			<td colspan="6">
				→ 审核通过的帖子在前就可以有调用显示在指定地方<br />
				http://论坛地址/Recommendtopic.aspx (引用论坛所有推荐帖子)<br />
				http://论坛地址/Recommendtopic.aspx?boardid=8 (引用版块ID为8的推荐帖子)
			</td>
		<tr>
	</table>
	<%}%>
</form>
<bbs:AdminFooter runat="server" ID="footer" NAME="footer" />
