<%@Page Language="C#" Inherits="IWMS.Pages.Posts" EnableSessionState="false" EnableViewState="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<!--#include file="inc/html_head.inc"-->
</head>
<body>
<!--#include file="head.inc" -->
<div id="navbar">
<div class="l"></div>
<div class="r"></div>
<div class="m">
	<!--#include file="inc/navclass.inc"-->
</div>
</div>

<div id="navsub">
<div class="l"></div>
<div class="r"></div>
<div class="m">

</div>
</div>

<table id="middle" width="100%" cellspacing="0" cellpadding="0" style="table-layout:fixed">
<tr><td valign="top">
	<div class="psIntro mR"><div class="sName" onclick="post.dispIntro()">
	<%=htmlTitle%>
	</div><div class="sBlank"><%if(verify){%><a href="<%=config.UrlRewrite?"ps.aspx":"posts.aspx"%>" class="psSelList2">返回讨论区</a><%}else{%>
	<a href="#" onclick="post.listType()" <%=config.PostListType==1?"class='psSelList'>显示内容":"class='psSelList2'>列表标题"%></a><%}%></div><div class="sIntro"></div></div><br/>
	<div class="psFrm mR">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
		<div class="psR">帖子数：<asp:Literal id="ltPostNum" runat="server"/></div>
		<span class="tt">› <%=verify?"帖子审核":"帖子列表"%></span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<asp:PlaceHolder id="plList1" Visible="false" runat="server">
		<div class="psCont" id="psContainer">
		<asp:Repeater id="myRepeater" runat="server" >
		<ItemTemplate>
			<div id="ps<%#Eval("id")%>"<%#(int)Eval("fixed")==1 ? " class='psFix'" : ""%>>
			<div class="psTitle"><a href="<%#GetUrlThread((int)Eval("id"))%>"><%#Eval("title")%></a></div>
			<div style="text-align:right">
			<span class="psName<%#Eval("memberid").ToString()=="0" ? " gray\"" : "\" title=\""+Eval("memberid")+"\""%>><%#Eval("membername").ToString().Length==0 ? "游客" : Eval("membername")%></span> 
			<span class="psDate" title="<%#((DateTime)Eval("postDate")).ToString("r")%>"></span>
			<span class="psSort"><%#Eval("sortid")%></span>
			</div>
			<div class="psBody">
			<%#Eval("content")%>
			</div>
			<div class="psFun"><div class="psR"><span class="psHits">阅读：<%#Eval("hits")%></span><span class="psReply">跟帖：<%#Eval("replyNum")%></span></div>
				<a href="###" onclick="post.disp(this,<%#Eval("id")%>)">回复</a> <a href="###" onclick="post.vote(this,<%#Eval("id")%>,1)">支持</a><span> (<%#Eval("support")%>)</span> <a href="###" onclick="post.vote(this,<%#Eval("id")%>,0)">反对</a><span> (<%#Eval("discourage")%>)</span>
				<span class="psJson" title="{'id':<%#Eval("id")%>,'pid':<%#Eval("pid")%>}"></span>
			</div>
			</div>
		</ItemTemplate>
		</asp:Repeater>
		</div>
		</asp:PlaceHolder>
		
		<asp:PlaceHolder id="plList2" Visible="false" runat="server">
		<table width="100%" cellspacing="0" class="psCont psCont2">
		<thead><tr><td>标 题</td><td width="80">作者</td><td width="40">点击</td><td width="40">回复</td><td width="80">更新</td></tr></thead>
		<tbody id="psContainer">
		<asp:Repeater id="myRepeater2" runat="server" >
		<ItemTemplate>
			<tr id="ps<%#Eval("id")%>"<%#(int)Eval("fixed")==1 ? " class='psFix'" : ""%>>
			<td class="psTitle"><a href="<%#GetUrlThread((int)Eval("id"))%>"><%#Eval("title")%></a></td>
			<td class="psName"><%#Eval("membername")==DBNull.Value ? "游客" : Eval("membername")%></td> 
			<td class="psHits"><%#Eval("hits")%></td>
			<td class="psReply"><%#Eval("replyNum")%></td>
			<td class="psDate" title="<%#((DateTime)Eval("replyDate")).ToString("r")%>"></td>
			</tr>
		</ItemTemplate>
		</asp:Repeater>
		</tbody>
		</table>
		</asp:PlaceHolder>
		
		<asp:PlaceHolder id="plList3" Visible="false" runat="server">
		<div class="psCont" id="psContainer">
		<asp:Repeater id="myRepeater3" runat="server" >
		<ItemTemplate>
			<div id="ps<%#Eval("id")%>">
			<div class="psTitle"><a href="<%#GetUrlThread((int)Eval("id"))%>"><%#Eval("title")%></a></div>
			<div style="text-align:right">
			<span class="psName<%#Eval("memberid").ToString()=="0" ? " gray\"" : "\" title=\""+Eval("memberid")+"\""%>><%#Eval("membername").ToString().Length==0 ? "游客" : Eval("membername")%></span> 
			<span class="psDate" title="<%#((DateTime)Eval("postDate")).ToString("r")%>"></span>
			<span class="psSort"><%#Eval("sortid")%></span>
			</div>
			<div class="psBody">
			<%#Eval("content")%>
			</div>
			<div class="psFun">
				<a href="###" onclick="post.pass(<%#Eval("id")%>)">通过审核</a>　<a href="###" onclick="post.del(<%#Eval("id")%>)">删除</a>
				<span class="psJson" title="{'id':<%#Eval("id")%>,'pid':<%#Eval("pid")%>}"></span>
			</div>
			</div>
		</ItemTemplate>
		</asp:Repeater>
		</div>
		</asp:PlaceHolder>
		
		<asp:Literal id="ltPage" runat="server" />
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>

</td><td width="250" valign="top">
	<div class="<%=GetFrameCss(style.CssWeekHot,"lframe")%>">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
		<span class="tt">讨论类别</span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<ul class="sList">
		<asp:Repeater id="rpSorts"
			runat="server">
			<ItemTemplate>
				<li><a href="<%#GetUrlPosts((int)Eval("id"))%>"<%#(int)Eval("id")==sid ? " class='sOpen'" : ""%>><%#Eval("name")%></a></li>
			</ItemTemplate>
		</asp:Repeater>
		</ul>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
	
	<div class="lframe">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
		<span class="tt">帖子搜索</span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<form method="get" action="search.aspx" name="frmSearch" style="text-align:center">
			<input type="text" name="keyword" class="inputbg" size="20"/>
			<input type="hidden" name="where" value="title"/>
			<input type="hidden" name="type" value="post"/>
			<input type="hidden" name="sid" value="<%=sid%>"/>
			　<button type="submit">搜索</button>
		</form>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
	
	<div class="<%=GetFrameCss(style.CssWeekHot,"lframe")%>">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
		<span class="tt">一月最受支持</span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<%=TopPosts(sid, "support", true, 8, 30, 32)%>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
	
	<div class="<%=GetFrameCss(style.CssWeekHot,"lframe")%>">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
		<span class="tt">一周回复最多</span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<%=TopPosts(sid, "reply", true, 8, 7, 32)%>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
</td></tr>
</table>
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="inc/post.js"></script>

<script type="text/javascript">
post.maxLength=<%=config.PostMaxLength%>;
post.sid=<%=sid%>;
post.rewriteExt="<%=config.UrlRewrite?config.UrlRewriteExt:""%>";
post.userOnly=<%=config.PostMemberOnly.ToString().ToLower()%>;
post.verify=<%=verify?1:0%>;
post.ncNum=<%=sState.UncheckPostNum%>;
iwms.setTimeDiff("<%=DateTime.Now.ToString("r")%>");
iwms.vCode="<%=config.IwmsVcode%>";
</script>
<!--#include file="foot.inc" -->
</body>
</html>