<%template _header%>
<script type="text/javascript" src="{forumpath}javascript/ajax.js"></script>
<%if {page_err}==0%>
	<script type="text/javascript">
	var templatepath = "{templatepath}";
	var fid = parseInt({forum.fid});
	var postminchars = parseInt({config.minpostsize});
	var postmaxchars = parseInt({config.maxpostsize});
	var disablepostctrl = parseInt({disablepostctrl});
	var forumurl = "{forumpath}";
	</script>
<%/if%>
<script type="text/javascript" src="{forumpath}javascript/template_showforum.js"></script>
<div id="foruminfo"  style="margin-bottom:0;">
	<div id="headsearch">
		<%if {page_err}==0%>
		<p style="margin-bottom:15px; padding:3px;">
		   <%if {ismoder}%><a href="{forumurl}modcp.aspx?operation=auditpost&forumid={forumid}" target="_blank">管理面板</a><%/if%>
			<a href="{forumpath}showtopiclist.aspx?type=digest&amp;forums={forum.fid}">精华帖区</a>
			<%if {config.rssstatus}!=0%>		
			<%set {aspxrewriteurl} = this.RssAspxRewrite({forum.fid})%>		
			<a href="{forumpath}tools/{aspxrewriteurl}" target="_blank"><img src="{forumpath}templates/{templatepath}/images/rss.gif" alt="Rss"/></a>
			<%/if%>
		</p>
		<%/if%>
		<%if {usergroupinfo.allowsearch}>0%>
		<div id="search">
			<%template _quicksearch%>
		</div>
		<%/if%>
	</div>
	<div id="nav">
		<div class="userinfolist">
			<p><a id="forumlist" href="{forumpath}forumindex.aspx" <%if {config.forumjump}==1%>onmouseover="showMenu(this.id);" onmouseout="showMenu(this.id);"<%/if%>
			>{config.forumtitle}</a> &raquo; {forumnav} </p>
			<%if {page_err}==0%>
			<p class="firstchild"> 版主: 
			<em>
			<%if {forum.moderators}!=""%>
				{forum.moderators}
			<%else%>
				*空缺中*
			<%/if%>
			</em>
			</p>
			<%/if%>
		</div>
	</div>
</div>
<%if {page_err}==0%>
<%if {config.forumjump}==1%>
	{navhomemenu}
<%/if%>
<%if {showforumlogin}==1%>
	<div class="mainbox formbox">
		<h3>本版块已经被管理员设置了密码</h3>
		<form id="forumlogin" name="forumlogin" method="post" action="">
			<table cellpadding="0" cellspacing="0" border="0">
				<tbody>
				<tr>
					<th>请输入密码:</th>
					<td><input name="forumpassword" type="password" id="forumpassword" size="20"/></td>
				</tr>
				</tbody>
			<%if {isseccode}%>	
				<tbody>
				<tr>
					<th>输入验证码:</th>
					<td><%template _vcode%></td>
				</tr>
				</tbody>
			<%/if%>
				<tbody>
				<tr>
					<th>&nbsp;</th>
					<td>
						<input type="submit"  value="确定"/>
					</td>
				</tr>
				</tbody>
			</table>
		</form>
	</div>
<%else%>

<%template _pagewordadlist%>

<%if {forum.rules}!=""%>
<div class="box" id="rules">
	<span class="headactions"><img id="rules_img" title="收起" onclick="$('rules_link').style.display = '';toggle_collapse('rules', 1);" alt="收起" src="{forumpath}templates/{templatepath}/images/collapsed_no.gif" /></span>
	<h4>本版规则</h4>
	<div id="rules_link">{forum.rules}</div>
</div>
<%/if%>

<%template _newpmmsgbox%>

<%if {subforumcount}>0%>
	<%template _subforum%>
<%/if%>

<%if {forum.layer}!=0%>
<div class="pages_btns">
	<div class="pages">
		<em>{pageid}/{pagecount}页</em>{pagenumbers}
		<kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) { if(parseInt('{config.aspxrewrite}')==1) {window.location='{forumpath}showforum-{forumid}-' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1) + '{config.extname}';}else{window.location='{forumpath}showforum.aspx?forumid={forumid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1)}}" size="4" maxlength="9" />页</kbd>
	</div>
<%if {userid<0}||{canposttopic}%>
	<span onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);" id="newspecial" class="postbtn"><a title="发新话题" id="newtopic" href="{forumpath}posttopic.aspx?forumid={forum.fid}&forumpage={pageid}" onmouseover="if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);"><img alt="发新话题" src="{forumpath}templates/{templatepath}/images/newtopic.gif"/></a></span>
<%/if%>
</div>
<div id="headfilter">
	<ul>
	    <li <%if {filter}==""%>class="current"<%/if%> ><a href="{forumpath}{ShowForumAspxRewrite(forumid,0)}">全部</a></li>
		<li <%if {filter}=="digest"%>class="current"<%/if%> ><a href="{forumpath}showforum.aspx?forumid={forumid}&filter=digest">精华</a></li>
		<%set (int){specialpost} = {forum.allowpostspecial}&1 %>
		<%if {specialpost}==1%>
		<li <%if {filter}=="poll"%>class="current"<%/if%> ><a href="{forumpath}showforum.aspx?forumid={forumid}&filter=poll">投票</a></li>
		<%/if%>
		<%set {specialpost} = {forum.allowpostspecial}&4 %>
	    <%if {specialpost}==4%>
		<li id="rewardmenu" class="<%if {filter}=="reward" || {filter}=="rewarding"%>current<%else%><%if {filter}=="rewarded"%>current<%/if%><%/if%> dropmenu" onMouseOver="showMenu(this.id);"><a href="{forumpath}showforum.aspx?forumid={forumid}&filter=reward">悬赏</a></li>
		<%/if%>
		<%set {specialpost} = {forum.allowpostspecial}&16 %>
	    <%if {specialpost}==16%>
		<li <%if {filter}=="debate"%>class="current"<%/if%> ><a href="{forumpath}showforum.aspx?forumid={forumid}&filter=debate">辩论</a></li>
		<%/if%>
	</ul>
</div>

<ul class="popupmenu_popup headermenu_popup" id="rewardmenu_menu" style="display: none">
	<li><a href="{forumpath}showforum.aspx?forumid={forumid}&filter=rewarding">进行中的悬赏</a></li>
	<li><a href="{forumpath}showforum.aspx?forumid={forumid}&filter=rewarded">已结束的悬赏</a></li>
</ul>

<form id="moderate" name="moderate" method="post" action="{forumpath}topicadmin.aspx?action=moderate&forumid={forumid}">
<div class="mainbox threadlist">
	<div id="custominfoarea" class="custominfoarea">
		<div class="sitenote" id="infoicon_menu" style="opacity: 1;">
			<div class="cornerlayer">键盘左右键可以进行前后翻页操作</div>
			<div class="minicorner"></div>
		</div>
		<a id="infoicon" onblur="$('infoicon_menu').style.display = 'none'" onclick="display('infoicon_menu')" href="javascript:;">
		<img alt="帮助" src="{forumpath}templates/{templatepath}/images/info.gif" /></a>
		<script type="text/javascript">setBubble('infoicon', 'quickjumppage')</script>
	</div>
	<span class="headactions">
	<%if {forum.applytopictype}==1 && {forum.viewbytopictype}==1%>
		{topictypeselectlink}
	<%/if%>
	</span>
	<h1>
	<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({forum.fid},0)%>
		<a href="{aspxrewriteurl}">{forum.name}</a>
		<!--<em>(主题:{topiccount}篇 帖子:{forum.Posts}个 今日帖子:{forum.Todayposts}个)</em>-->
	</h1>
	<table summary="{forum.fid}" id="{forum.fid}" cellspacing="0" cellpadding="0">
		<thead class="category">
			<tr>
				<td class="folder">&nbsp;</td>
				<td class="icon">&nbsp;</td>
				<th>标题</th>
				<td class="author">作者</td>
				<td class="nums">回复/查看</td>
				<td class="lastpost">最后发表</td>
			</tr>
		</thead>
		<!--announcement start-->
		<%loop announcement announcementlist%>
		<tbody>
		<tr>
			<td><img src="{forumpath}templates/{templatepath}/images/announcement.gif" alt="announcement" /></td>
			<td>&nbsp;</td>
			<th>
				<a href="{forumpath}announcement.aspx#{announcement[id]}">{announcement[title]}</a>
			</th>
			<td>
				<cite><%if {strtoint({announcement[posterid]})}==-1%>
					游客
				<%else%>
				   <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({announcement[posterid]})%>
					<a href="{forumpath}{aspxrewriteurl}">{announcement[poster]}</a>
				<%/if%>
				</cite>
			</td>
			<td>-</td>
			<td>-</td>
		</tr>
		</tbody>
		<%/loop%>
		<!--announcement end-->
		<!--NtForumList start-->
		<%loop (ShowforumPageTopicInfo) toptopic toptopiclist%>			
		<tbody>
			<tr>
				<td class="folder">
				    <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({toptopic.tid},0)%>
					<a href="{aspxrewriteurl}" target="_blank"><img src="{forumpath}templates/{templatepath}/images/t_top{toptopic.displayorder}.gif"/></a>
				</td>
				<td class="icon">
					<%if {toptopic.special}==0%>
						<%if {toptopic.iconid}!=0%>
								<img src="{forumpath}images/posticons/{toptopic.iconid}.gif" alt="listicon" />
						<%else%>
								&nbsp;
						<%/if%>
					<%/if%>
					<%csharp%>//特殊贴图标<%/csharp%>
					<%if {toptopic.special}==1%>
						<img src="{forumpath}templates/{templatepath}/images/pollsmall.gif" alt="投票" />
					<%/if%>
					<%if {toptopic.special}==2%>
						<img src="{forumpath}templates/{templatepath}/images/bonus.gif" alt="悬赏"/>
					<%/if%>
					<%if {toptopic.special}==3%>
						<img src="{forumpath}templates/{templatepath}/images/rewardsmallend.gif" alt="悬赏已结束"/>
					<%/if%>
					<%if {toptopic.special}==4%>
						<img src="{forumpath}templates/{templatepath}/images/debatesmall.gif" alt="辩论"/>
					<%/if%>
				</td>
				<th class="common">
					<label>
					<%if {toptopic.digest}>0%>
						<img src="{forumpath}templates/{templatepath}/images/digest{toptopic.digest}.gif" alt="digtest"/>
					<%/if%>
					<%if {toptopic.attachment}>0%>
						<img src="{forumpath}templates/{templatepath}/images/attachment.gif" alt="附件"/>
					<%/if%>
					<%if {toptopic.rate}>0%>
						<img src="{forumpath}templates/{templatepath}/images/agree.gif" alt="正分"/>
					<%/if%>
					<%if {toptopic.rate}<0%>
						<img src="{forumpath}templates/{templatepath}/images/disagree.gif" alt="负分"/>
					<%/if%>
					</label>
					<%if {useradminid}>0 && {ismoder}%>
						<%if {toptopic.fid}=={forum.fid} && {toptopic.closed}<=1%>
						<input type="checkbox" name="topicid" value="{toptopic.tid}" />
						<%else%>
						<input type="checkbox" disabled />
						<%/if%>				
					<%/if%>
					<%if {toptopic.replies}>0%>
						<img src="{forumpath}templates/{templatepath}/images/topItem_exp.gif" id="imgButton_{toptopic.tid}" onclick="showtree({toptopic.tid},{ppp},{config.aspxrewrite});" class="cursor" alt="展开帖子列表" title="展开帖子列表" />
					<%else%>
						<img src="{forumpath}templates/{templatepath}/images/no-sublist.gif" id="imgButton_{toptopic.tid}" alt="闭合帖子列表"/>
					<%/if%>
					<%if {forum.applytopictype}==1 && {forum.topictypeprefix}==1%>
							<em>
							<%if {forum.viewbytopictype}==1 && {toptopic.topictypename}!=""%>
							[<a href="{forumpath}showforum.aspx?forumid={toptopic.fid}&typeid={toptopic.typeid}" >{toptopic.topictypename}</a>]
							<%else if {toptopic.topictypename}!=""%>
							[{toptopic.topictypename}]
							<%/if%>
							</em>
					<%/if%>
					<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({toptopic.tid},0)%>
					<%if {toptopic.special}==3%>
						<%set {aspxrewriteurl} = this.ShowBonusAspxRewrite({toptopic.tid},0)%>
					<%/if%>
					<%if {toptopic.special}==4%>
						<%set {aspxrewriteurl} = this.ShowDebateAspxRewrite({toptopic.tid})%>
					<%/if%>
					<%set (int){ishtmltitle} = Topics.GetMagicValue(toptopic.Magic, MagicType.HtmlTitle)%>
					<%if {ishtmltitle}==1%>
						<a href="{forumpath}{aspxrewriteurl}">{Topics.GetHtmlTitle(toptopic.Tid)}</a>
					<%else%>
						<a href="{forumpath}{aspxrewriteurl}">{toptopic.title}</a>
					<%/if%>
					<%if {toptopic.special}==2%>
						- [悬赏 {bonusextcreditsinfo.name} <span class="bold">{toptopic.price}</span> {bonusextcreditsinfo.unit}] 
					<%else if {toptopic.special}==3%>
						- [悬赏已结束]
					<%else if {toptopic.special}==0%>
						<%if {toptopic.price}>0%>
							- [售价 {topicextcreditsinfo.name} <span class="bold">{toptopic.price}</span> {topicextcreditsinfo.unit}] 
						<%/if%>
					<%/if%>					
					<%if {toptopic.readperm}>0%>
						- [阅读权限 <span class="bold">{toptopic.readperm}</span>] 
					<%/if%>
					<%if {toptopic.replies}/{ppp}>0%>					
							<span class="threadpages"><script type="text/javascript">getpagenumbers("{config.extname}",{toptopic.replies},{ppp},0,"",{toptopic.tid},1, "{forumpath}");</script></span>				
					<%/if%>
				</th>
				<td class="author">
					<cite>
					<%if {toptopic.posterid}==-1%>
						游客
					<%else%>
						<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({toptopic.posterid})%>
						<a href="{forumpath}{aspxrewriteurl}">{toptopic.poster}</a>
					<%/if%></cite>
					<em><%datetostr({toptopic.postdatetime}, "yyyy-MM-dd HH:mm")%></em>
				</td>
				<td class="nums"><strong>{toptopic.replies}</strong> / <em>{toptopic.views}</em></td>
				<td class="lastpost">
					<em><a href="{forumpath}showtopic.aspx?topicid={toptopic.tid}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>&page=end#lastpost"><%datetostr({toptopic.lastpost}, "yyyy-MM-dd HH:mm")%></a></em>
					<cite>by
						<%if {toptopic.lastposterid}==-1%>
							游客
						<%else%>
							<a href="{forumpath}{UserInfoAspxRewrite(toptopic.lastposterid)}" target="_blank">{toptopic.lastposter}</a>
						<%/if%>
					</cite>
				</td>
			</tr>
			<tr><td colspan="7" id="divTopic{toptopic.tid}" style="border:0; padding:0;"></td></tr>
		</tbody>
		<%/loop%>
	</table>
	<table cellpadding="0" cellspacing="0" border="0">
	<%if showsplitter%>
		<thead class="separation">
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td colspan="4">版块主题</td>
			</tr>
		</thead>
    <%/if%>
		<%loop (ShowforumPageTopicInfo) topic topiclist%>
		<tbody>
			<tr>
				<td class="folder">
				<%if {topic.folder}!=""%>
				    <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
					<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>" target="_blank"><img src="{forumpath}templates/{templatepath}/images/folder_{topic.folder}.gif" alt="topicicon" /></a>
				<%/if%>
				</td>
				<td class="icon">
					<%if {topic.special}==0%>
						<%if {topic.iconid}!=0%>
							<img src="{forumpath}images/posticons/{topic.iconid}.gif" alt="listicon" />
						<%else%>
							&nbsp;
						<%/if%>
					<%/if%>
					<%csharp%>/*特殊贴图标*/<%/csharp%>
					<%if {topic.special}==1%>
						<img src="{forumpath}templates/{templatepath}/images/pollsmall.gif" alt="投票" />
					<%/if%>
					<%if {topic.special}==2%>
						<img src="{forumpath}templates/{templatepath}/images/bonus.gif" alt="悬赏"/>
					<%/if%>
					<%if {topic.special}==3%>
						<img src="{forumpath}templates/{templatepath}/images/rewardsmallend.gif" alt="悬赏已结束"/>
					<%/if%>
					<%if {topic.special}==4%>
						<img src="{forumpath}templates/{templatepath}/images/debatesmall.gif" alt="辩论"/>
					<%/if%>
				</td>
				<th class="common">
					<label>
					<%if {topic.digest}>0%>
						<img src="{forumpath}templates/{templatepath}/images/digest{topic.digest}.gif" alt="精华"/>
					<%/if%>
					<%if {topic.attachment}>0%>
						<img src="{forumpath}templates/{templatepath}/images/attachment.gif" alt="附件"/>
					<%/if%>
					<%if {topic.rate}>0%>
						<img src="{forumpath}templates/{templatepath}/images/agree.gif" alt="正分"/>
					<%/if%>
					<%if {topic.rate}<0%>
						<img src="{forumpath}templates/{templatepath}/images/disagree.gif" alt="负分"/>
					<%/if%>
					</label>
					<%if {useradminid}>0 && {ismoder}%>
					    <%if {topic.closed}<=1%>
						<input type="checkbox" name="topicid" value="{topic.tid}" />
						<%else%>
						<input type="checkbox" disabled />
					    <%/if%>
					<%/if%>
					
					<%if {topic.replies}>0%>
						<img src="{forumpath}templates/{templatepath}/images/topItem_exp.gif" id="imgButton_{topic.tid}" onclick="showtree({topic.tid},{ppp},{config.aspxrewrite});" class="cursor" alt="展开帖子列表" title="展开帖子列表" />
					<%else%>
						<img src="{forumpath}templates/{templatepath}/images/no-sublist.gif" id="imgButton_{topic.tid}" alt="闭合帖子列表" />
					<%/if%>
					<%if {pageid}==1 && {forum.Allowthumbnail}==1%>
						<%if {topic.attachment}==2%>
							<span id="t_thumbnail_{topic.tid}" onmouseover="showMenu(this.id, 0, 0, 1, 0)">
							<%if {forum.applytopictype}==1 && {forum.topictypeprefix}==1%>
								<em>
								<%if {forum.viewbytopictype}==1 && {topic.topictypename}!=""%>
								[<a href="{forumpath}showforum.aspx?forumid={forumid}&typeid={topic.typeid}" >{topic.topictypename}</a>]
								<%else if {topic.topictypename}!=""%>
								[{topic.topictypename}]
								<%/if%>
								</em>
							<%/if%>	
							<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
							<%if {topic.special}==3%>
								<%set {aspxrewriteurl} = this.ShowBonusAspxRewrite({topic.tid},0)%>
							<%/if%>
							<%if {topic.special}==4%>
								<%set {aspxrewriteurl} = this.ShowDebateAspxRewrite({topic.tid})%>
							<%/if%>
							<%set (int){ishtmltitle} = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle)%>
							<%if {ishtmltitle}==1%>
								<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>">{Topics.GetHtmlTitle(topic.Tid)}</a>
							<%else%>
								<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>">{topic.title}</a>
							<%/if%>
							<%if {topic.folder}=="new"%>
								<img src="{forumpath}templates/{templatepath}/images/posts_new.gif" />
							<%/if%>
							</span>
						<%else%>
						   <%if {forum.applytopictype}==1 && {forum.topictypeprefix}==1%>
								<em>
								<%if {forum.viewbytopictype}==1 && {topic.topictypename}!=""%>
								[<a href="{forumpath}showforum.aspx?forumid={forumid}&typeid={topic.typeid}" >{topic.topictypename}</a>]
								<%else if {topic.topictypename}!=""%>
								[{topic.topictypename}]
								<%/if%>
								</em>
							<%/if%>	
							<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
							<%if {topic.special}==3%>
								<%set {aspxrewriteurl} = this.ShowBonusAspxRewrite({topic.tid},0)%>
							<%/if%>
							<%if {topic.special}==4%>
								<%set {aspxrewriteurl} = this.ShowDebateAspxRewrite({topic.tid})%>
							<%/if%>
							<%set (int){ishtmltitle} = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle)%>
							<%if {ishtmltitle}==1%>
								<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>">{Topics.GetHtmlTitle(topic.Tid)}</a>
							<%else%>
								<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>">{topic.title}</a>
							<%/if%>
						   <%if {topic.folder}=="new"%>
								<img src="{forumpath}templates/{templatepath}/images/posts_new.gif"/>
							<%/if%>
						<%/if%>
					<%else%>
						<%if {forum.applytopictype}==1 && {forum.topictypeprefix}==1%>
								<em>
								<%if {forum.viewbytopictype}==1 && {topic.topictypename}!=""%>
								[<a href="{forumpath}showforum.aspx?forumid={forumid}&typeid={topic.typeid}" >{topic.topictypename}</a>]
								<%else if {topic.topictypename}!=""%>
								[{topic.topictypename}]
								<%/if%>
								</em>
						<%/if%>	

						<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
						<%if {topic.special}==3%>
							<%set {aspxrewriteurl} = this.ShowBonusAspxRewrite({topic.tid},0)%>
						<%/if%>
						<%if {topic.special}==4%>
							<%set {aspxrewriteurl} = this.ShowDebateAspxRewrite({topic.tid})%>
						<%/if%>
						<%set (int){ishtmltitle} = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle)%>
						<%if {ishtmltitle}==1%>
							<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>">{Topics.GetHtmlTitle(topic.Tid)}</a>
						<%else%>
							<a href="{forumpath}{aspxrewriteurl}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>">{topic.title}</a>
						<%/if%>
						<%if {topic.folder}=="new"%>
							<img src="{forumpath}templates/{templatepath}/images/posts_new.gif"/>
						<%/if%>
					<%/if%>
					
					<%if {topic.special}==2%>
						- [悬赏 {bonusextcreditsinfo.name} <span class="bold">{topic.price}</span> {bonusextcreditsinfo.unit}] 
					<%else if {topic.special}==3%>
						- [悬赏已结束]
					<%else if {topic.special}==0%>
						<%if {topic.price}>0%>
							- [售价 {topicextcreditsinfo.name} <span class="bold">{topic.price}</span> {topicextcreditsinfo.unit}] 
						<%/if%>
					<%/if%>
					<%if {topic.readperm}>0%>
						- [阅读权限 <span class="bold">{topic.readperm}</span>] 
					<%/if%>
					<%if {topic.replies}/{ppp}>0%>
						<span class="threadpages"><script type="text/javascript">getpagenumbers("{config.extname}", {topic.replies},{ppp},0,"",{topic.tid},1, "{forumpath}");</script></span>
					<%/if%>
				</th>
				<td class="author">
					<cite>
						<%if {topic.posterid}==-1%>
							游客
						<%else%>
						    <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({topic.posterid})%>
							<a href="{forumpath}{aspxrewriteurl}">{topic.poster}</a>
						<%/if%>
					</cite>
					<em><%datetostr({topic.postdatetime}, "yyyy-MM-dd HH:mm")%></em>
				</td>
				<td class="nums"><strong>{topic.replies}</strong> / <em>{topic.views}</em></td>
				<td class="lastpost">							
							<em><a href="{forumpath}showtopic.aspx?topicid={topic.tid}<%if {config.Aspxrewrite}!=1%>&forumpage={pageid}<%/if%>&page=end#lastpost"><%datetostr({topic.lastpost}, "yyyy-MM-dd HH:mm")%></a></em>
							<cite>by
							<%if {topic.lastposterid}==-1%>
								游客
							<%else%>
								<a href="{forumpath}{UserInfoAspxRewrite(topic.lastposterid)}" target="_blank">{topic.lastposter}</a>
							<%/if%>
							</cite>
				</td>
			</tr>
			<%if {pageid}==1 && {forum.Allowthumbnail}==1%>
				<%if {topic.attachment}==2%>
					<%set (string){timg} = Attachments.GetThumbnailByTid({topic.tid},160,ThumbnailType.Thumbnail)%>
					<%if {timg}!=""%>
						<div id="t_thumbnail_{topic.tid}_menu" style="display: none;" class="popupmenu_popup"><img src="{timg}" /></div>
					<%/if%>
				<%/if%>
			<%/if%>
			<tr><td colspan="6" id="divTopic{topic.tid}" style=" border:0;padding:0;"></td></tr>
		</tbody>
		<%/loop%>
		<!--NtForumList end-->
	</table>
	<%if {useradminid}>0 && {ismoder}%>
	<div class="footoperation"><strong>批量管理选项</strong> &nbsp;
		<input class="radio" name="operat" type="hidden" />
		<input class="checkbox" name="chkall" onclick="checkall(this.form, 'topicid')" type="checkbox" />全选
		<button onclick="document.moderate.operat.value = 'delete';document.moderate.submit()"/>删除主题</button>
		<button onclick="document.moderate.operat.value = 'move';document.moderate.submit()" />移动主题</button>
		<button onclick="document.moderate.operat.value = 'highlight';document.moderate.submit()" />高亮显示</button>
		<button onclick="document.moderate.operat.value = 'type';document.moderate.submit()" />主题分类</button>
		<button onclick="document.moderate.operat.value = 'identify';document.moderate.submit()" />鉴定主题</button>
		<button onclick="document.moderate.operat.value = 'close';document.moderate.submit()" />关闭/打开主题</button>
		<button onclick="document.moderate.operat.value = 'displayorder';document.moderate.submit()" />置顶/解除置顶</button>
		<button onclick="document.moderate.operat.value = 'digest';document.moderate.submit()" />加入/解除精华</button>
		<button onclick="document.moderate.operat.value = 'bump';document.moderate.submit()" />提升/下沉主题</button>
	</div>
	<%/if%>
</div>
</form>

<div class="pages_btns">
	<div class="pages">
		<em>{pageid}/{pagecount}页</em>{pagenumbers}
		<kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) { if(parseInt('{config.aspxrewrite}')==1) {window.location='{forumpath}showforum-{forumid}-' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1) + '{config.extname}';}else{window.location='{forumpath}showforum.aspx?forumid={forumid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1)}}" size="4" maxlength="9" />页</kbd>
	</div>
<%if {userid<0}||{canposttopic}%>
	<span onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial'; if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);" id="Span1" class="postbtn"><a title="发新话题" id="A1" href="{forumpath}posttopic.aspx?forumid={forum.fid}&forumpage={pageid}" onmouseover="if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);"><img alt="发新话题" src="{forumpath}templates/{templatepath}/images/newtopic.gif"/></a></span>
<%/if%>
</div>


<%if {canquickpost}%>
	<%template _quickpost%>
<%/if%>

<%if {userid<0}||{canposttopic}%>
	<ul class="popupmenu_popup newspecialmenu" id="newspecial_menu" style="display: none">
	<%if {forum.allowspecialonly}<=0%>
	<li><a href="{forumpath}posttopic.aspx?forumid={forum.fid}&forumpage={pageid}">发新主题</a></li>
	<%/if%>
	<%set {specialpost} = {forum.allowpostspecial}&1 %>
	<%if {specialpost}==1 && {usergroupinfo.allowpostpoll}==1%>
	<li class="poll"><a href="{forumpath}posttopic.aspx?forumid={forum.fid}&type=poll&forumpage={pageid}">发布投票</a></li>
	<%/if%>
	<%set {specialpost} = {forum.allowpostspecial}&4 %>
	<%if {specialpost}==4 && {usergroupinfo.allowbonus}==1%>
		<li class="reward"><a href="{forumpath}posttopic.aspx?forumid={forum.fid}&type=bonus&forumpage={pageid}">发布悬赏</a></li>
	<%/if%>
	<%set {specialpost} = {forum.allowpostspecial}&16 %>
	<%if {specialpost}==16 && {usergroupinfo.allowdebate}==1%>
		<li class="debate"><a href="{forumpath}posttopic.aspx?forumid={forum.fid}&type=debate&forumpage={pageid}">发起辩论</a></li>
	<%/if%>
	</ul>
<%/if%>

<div id="footfilter" class="box">
	<form name="LookBySearch" method="post" action="{forumpath}showforum.aspx?search=1&forumid={forumid}&typeid={topictypeid}&filter={filter}">
		<%if {topictypeid}==0%>  
		查看
		<select name="cond" id="cond">
		  <option value="0" <%if {cond}==0%>selected<%/if%>>全部主题</option>
		  <option value="1" <%if {cond}==1%>selected<%/if%>>1 天以来主题</option>
		  <option value="2" <%if {cond}==2%>selected<%/if%>>2 天以来主题</option>
		  <option value="7" <%if {cond}==7%>selected<%/if%>>1 周以来主题</option>
		  <option value="30" <%if {cond}==30%>selected<%/if%>>1 个月以来主题</option>
		  <option value="90" <%if {cond}==90%>selected<%/if%>>3 个月以来主题</option>
		  <option value="180" <%if {cond}==180%>selected<%/if%>>6 个月以来主题</option>
		  <option value="365" <%if {cond}==365%>selected<%/if%>>1 年以来主题</option>
		</select>
	<%/if%>
		排序方式
		<select name="order" id="order">
		  <option value="1" <%if {order}==1%>selected<%/if%>>最后回复时间</option>
		  <option value="2" <%if {order}==2%>selected<%/if%>>发布时间</option>
		</select>
		<select name="direct" id="direct">
		  <option value="0" <%if {direct}==0%>selected<%/if%>>按升序排列</option>
		  <option value="1" <%if {direct}==1%>selected<%/if%>>按降序排列</option>
		</select>
		<button type="submit">提交</button>
	</form>
	<%if {config.forumjump}==1%>
    <select onchange="if(this.options[this.selectedIndex].value != '') { jumpurl(this.options[this.selectedIndex].value,{config.aspxrewrite},'{config.extname}');}">
		<option>论坛跳转...</option>
		{forumlistboxoptions}
		</select>
	<%/if%>
	<%if {config.visitedforums}>0%>
    <select name="select2" onchange="if(this.options[this.selectedIndex].value != '') {jumpurl(this.options[this.selectedIndex].value,{config.aspxrewrite},'{config.extname}');}">
		<option>最近访问...</option>{visitedforumsoptions}
	</select>
	<%/if%>		
	<script type="text/javascript">
	var categorydata = {goodscategoryfid};		
	function jumpurl(fid, aspxrewrite, extname) {
		for(var i in categorydata) {
		   if(categorydata[i].fid == fid) {
			   if(aspxrewrite) {
				   window.location='{forumpath}showgoodslist-' +categorydata[i].categoryid + extname;
			   }
			   else {
				   window.location='{forumpath}showgoodslist.aspx?categoryid=' +categorydata[i].categoryid;
			   }
			   return;
		       } 
		    }
		    
		if(aspxrewrite) {
			window.location='{forumpath}showforum-' + fid + extname;
		}
		else {
			window.location='{forumpath}showforum.aspx?forumid=' + fid ;
		}
	}
	</script>

</div>
<%/if%>

<%if {config.whosonlinestatus}!=0 && {config.whosonlinestatus}!=1%>
<div class="box" id="online">
	<span class="headactions">
		<%if {request[showonline]}=="no"%>
			<a href="?showonline=yes#online"><img src="{forumpath}templates/{templatepath}/images/collapsed_yes.gif" alt="展开/收起" />
		<%else%>
			<a href="?showonline=no#online"><img src="{forumpath}templates/{templatepath}/images/collapsed_no.gif" alt="展开/收起" />
		<%/if%>
		</a>
	</span>
	<h4>
		<strong>在线用户</strong>- <em>{forumtotalonline}</em> 人在线<span id="invisible"></span>
	</h4>
	<dl id="onlinelist">
		<dt>{onlineiconlist}</dt>
		<dd>
			<ul class="userlist">
				<%if {showforumonline}%>
				<%set (int){invisiblecount} = 0%>
				<%loop (OnlineUserInfo) onlineuser onlineuserlist%>
					<%if {onlineuser.invisible}==1%>
						<%set {invisiblecount} = {invisiblecount} + 1%>
						<%if {useradminid}==1%>
				<li>{onlineuser.olimg}
						   <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({onlineuser.userid})%>
							<a href="{forumpath}{aspxrewriteurl}" target="_blank">{onlineuser.username}</a>
				</li>
						<%else%>
				<li>(隐身会员)</li>
						<%/if%>
					<%else%>
				<li>{onlineuser.olimg}
						<%if {onlineuser.userid}==-1%>
							{onlineuser.username}
						<%else%>
						   <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({onlineuser.userid})%>
							<a href="{forumpath}{aspxrewriteurl}" target="_blank">{onlineuser.username}</a>
						<%/if%>
				</li>
					<%/if%>
				<%/loop%>
				<%if {invisiblecount}>0%>
					<script type="text/javascript">$('invisible').innerHTML = '({invisiblecount}' + " 隐身)";</script>
				<%/if%>
			<%else%>
				<li style="width: auto"><a href="?showonline=yes#online">点击查看在线列表</a></li>
			<%/if%>
			</ul>
		</dd>
	</dl>
</div>
<%/if%>

<%if {forum.layer}!=0%>
<div class="legend">
	<label><img src="{forumpath}templates/{templatepath}/images/folder_new.gif" alt="有新的回复"/>有新回复</label>
	<label><img src="{forumpath}templates/{templatepath}/images/folder_old.gif" alt="无新回复"/>无新回复</label>
	<label><img src="{forumpath}templates/{templatepath}/images/folder_newhot.gif" alt="多于15篇回复"/>热门主题</label>
	<label><img src="{forumpath}templates/{templatepath}/images/folder_closed.gif" alt="关闭的主题"/>关闭主题</label>
</div>
<%/if%>

		</div>
		<script type="text/javascript">
			var maxpage = parseInt('{pagecount}');
			var pageid = parseInt('{pageid}');
			if(maxpage > 1) {
				document.onkeyup = function(e){
					e = e ? e : window.event;
					var tagname = is_ie ? e.srcElement.tagName : e.target.tagName;
					if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;
					actualCode = e.keyCode ? e.keyCode : e.charCode;
					if(pageid < maxpage && actualCode == 39) {
					window.location = '{forumpath}{nexturl}';
					}
					if(pageid > 1 && actualCode == 37) {
					window.location = '{forumpath}{prevurl}';
					}
				}
			}
		</script>

	<%/if%>
<%else%>
	<%if {needlogin}%>
		<%template _login%>
	<%else%>
		<%template _errmsgbox%>
	<%/if%>
	</div>
<%/if%>
<%template _adlist%>
<%template _copyright%>
{mediaad}
<%template _footer%>