<%@ Page language="c#" Codebehind="showtopiclist.aspx.cs" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.ForumPage.showtopiclist" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="Discuz.Common" %>
<%@ Import namespace="Discuz.Forum" %>
<%@ Import namespace="Discuz.Entity" %>

<script runat="server">
override protected void OnInit(EventArgs e)
{

	/* 
		This page was created by Discuz!NT Template Engine at 2007-11-15 11:15:56.
		本页面代码由Discuz!NT模板引擎生成于 2007-11-15 11:15:56. 
	*/

	base.OnInit(e);


	templateBuilder.Append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
	templateBuilder.Append("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
	templateBuilder.Append("<head>\r\n");
	templateBuilder.Append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n");
	templateBuilder.Append("" + meta.ToString() + "\r\n");
	templateBuilder.Append("<title>" + pagetitle.ToString() + " " + config.Seotitle.ToString().Trim() + " - " + config.Forumtitle.ToString().Trim() + " - Powered by Discuz!NT</title>\r\n");
	templateBuilder.Append("<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\r\n");
	templateBuilder.Append("<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\r\n");
	templateBuilder.Append("<!-- 调用样式表 -->\r\n");
	templateBuilder.Append("<link rel=\"stylesheet\" href=\"templates/" + templatepath.ToString() + "/dnt.css\" type=\"text/css\" media=\"all\"  />\r\n");
	templateBuilder.Append("" + link.ToString() + "\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/report.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/common.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"editor/common.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"editor/menu.js\"></" + "script>\r\n");
	templateBuilder.Append("" + script.ToString() + "\r\n");
	templateBuilder.Append("</head>\r\n");


	templateBuilder.Append("<body>\r\n");
	templateBuilder.Append("<div id=\"append_parent\"></div>\r\n");
	templateBuilder.Append("<!--header start-->\r\n");
	templateBuilder.Append("<div id=\"headerbody\">\r\n");
	templateBuilder.Append("<div id=\"nthead\">\r\n");
	templateBuilder.Append("<div id=\"header\">\r\n");
	templateBuilder.Append("		<h2><a href=\"" + config.Forumurl.ToString().Trim() + "\" title=\"Discuz!NT|BBS|论坛 - Powered by Discuz!NT\"><img src=\"templates/" + templatepath.ToString() + "/images/logo.jpg\" alt=\"Discuz! Board NT|BBS|论坛\"/></a>\r\n");
	templateBuilder.Append("		</h2>\r\n");

	if (pagename=="forumindex.aspx")
	{

	templateBuilder.Append("	<ul id=\"iconmenu\">\r\n");

	if (config.Enablespace==1 || config.Enablealbum==1)
	{

	templateBuilder.Append("		<li>\r\n");
	templateBuilder.Append("					<a href=\"" + config.Forumurl.ToString().Trim() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/Headforum.jpg\" alt=\"论坛\"/></a>\r\n");
	templateBuilder.Append("			<h3><a href=\"" + config.Forumurl.ToString().Trim() + "\">论坛</a></h3>\r\n");
	templateBuilder.Append("		</li>\r\n");

	}	//end if


	if (config.Enablespace==1)
	{

	templateBuilder.Append("				<li>\r\n");
	templateBuilder.Append("					<a href=\"" + config.Spaceurl.ToString().Trim() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/headspace.jpg\"  alt=\"个人空间\"/></a>\r\n");
	templateBuilder.Append("			<h3><a href=\"" + config.Spaceurl.ToString().Trim() + "\">" + config.Spacename.ToString().Trim() + "</a></h3>\r\n");
	templateBuilder.Append("		</li>\r\n");

	}	//end if


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("				<li>\r\n");
	templateBuilder.Append("			<a href=\"" + config.Albumurl.ToString().Trim() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/headphoto.jpg\" alt=\"相册\"/></a>\r\n");
	templateBuilder.Append("			<h3><a href=\"" + config.Albumurl.ToString().Trim() + "\">" + config.Albumname.ToString().Trim() + "</a></h3>\r\n");
	templateBuilder.Append("		</li>\r\n");

	}	//end if

	templateBuilder.Append("	</ul>\r\n");

	}	//end if

	templateBuilder.Append("	<p id=\"topmenu\">\r\n");

	if (userid==-1)
	{

	templateBuilder.Append("			<a href=\"" + forumurl.ToString() + "login.aspx\" class=\"reg\">登录</a>\r\n");
	templateBuilder.Append("			<a href=\"" + forumurl.ToString() + "register.aspx\" class=\"reg\">注册</a>\r\n");

	}
	else
	{

	templateBuilder.Append("			欢迎: " + username.ToString() + "&nbsp;\r\n");
	templateBuilder.Append("			<a href=\"" + forumurl.ToString() + "logout.aspx?userkey=" + userkey.ToString() + "\" class=\"reg\">退出</a>\r\n");
	templateBuilder.Append("			<a href=\"" + forumurl.ToString() + "usercp.aspx\" class=\"reg\">用户中心</a>\r\n");

	if (useradminid==1)
	{

	templateBuilder.Append("				<a href=\"" + forumurl.ToString() + "admin/index.aspx\" target=\"_blank\"  class=\"reg\">系统设置</a>\r\n");

	}	//end if


	}	//end if


	if (pagename!="forumindex.aspx")
	{


	if (config.Enablespace==1 || config.Enablealbum==1)
	{

	templateBuilder.Append("			<a href=\"" + config.Forumurl.ToString().Trim() + "\">论坛</a>\r\n");

	}	//end if


	if (config.Enablespace==1)
	{

	templateBuilder.Append("			<a href=\"" + config.Spaceurl.ToString().Trim() + "\">" + config.Spacename.ToString().Trim() + "</a>\r\n");

	}	//end if


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("			<a href=\"" + config.Albumurl.ToString().Trim() + "\">" + config.Albumname.ToString().Trim() + "</a>\r\n");

	}	//end if


	}	//end if


	if (usergroupinfo.Allowsearch>0)
	{

	templateBuilder.Append("			<a href=\"" + forumurl.ToString() + "search.aspx\">搜索</a>\r\n");

	}	//end if

	templateBuilder.Append("		<a href=\"" + forumurl.ToString() + "help.aspx\" target=\"_blank\">帮助</a>	\r\n");
	templateBuilder.Append("	</p>\r\n");

	if (headerad!="")
	{

	templateBuilder.Append("		<div id=\"ad\">" + headerad.ToString() + "</div>\r\n");

	}	//end if

	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("	<div id=\"menubar\">\r\n");
	templateBuilder.Append("		<div class=\"selectmode\">\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			if(top == self) {\r\n");
	templateBuilder.Append("				document.write('<a href=\"frame.aspx?f=1\" target=\"_top\">分栏模式<\\/a>');\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("		</" + "script>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<ul id=\"navigation\">\r\n");

	if (userid!=-1)
	{

	templateBuilder.Append("			<li><a href=\"" + forumurl.ToString() + "usercpinbox.aspx\">短消息</a></li>\r\n");

	}	//end if

	templateBuilder.Append("			<li><a href=\"" + forumurl.ToString() + "showuser.aspx\">会员</a></li>\r\n");

	if (userid!=-1)
	{

	templateBuilder.Append("			<li id=\"my\" onMouseOver=\"showMenu(this.id);\" onMouseOut=\"showMenu(this.id);\"><a href=\"###\" class=\"mycontent\">我的</a></li>\r\n");

	}	//end if

	templateBuilder.Append("			<li><a href=\"" + forumurl.ToString() + "showtemplate.aspx\">界面</a></li>\r\n");
	templateBuilder.Append("			<li><a href=\"" + forumurl.ToString() + "archiver/index.aspx\">简洁版本</a></li>\r\n");
	templateBuilder.Append("			<li class=\"noground\"><a href=\"" + forumurl.ToString() + "onlineuser.aspx\">在线</a></li>\r\n");
	templateBuilder.Append("		</ul>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div id=\"container\">\r\n");
	templateBuilder.Append("<div id=\"wraper\">\r\n");



	if (page_err==0)
	{

	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/ajax.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("var templatepath = \"" + templatepath.ToString() + "\";\r\n");
	templateBuilder.Append("var fid = parseInt(" + forum.Fid.ToString().Trim() + ");\r\n");
	templateBuilder.Append("</" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/showforum.js\"></" + "script>\r\n");
	templateBuilder.Append("<!--TheCurrent start-->\r\n");
	templateBuilder.Append("<div id=\"foruminfo\">\r\n");
	templateBuilder.Append("	<div class=\"userinfo\">\r\n");
	templateBuilder.Append("		<h2><a href=\"" + config.Forumurl.ToString().Trim() + "\">" + config.Forumtitle.ToString().Trim() + "</a>" + forumnav.ToString() + "</h2>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"forumstats focusstats\" style=\"width:500px;\">\r\n");
	templateBuilder.Append("		<ul id=\"submenu\">\r\n");

	if (usergroupinfo.Allowsearch>0)
	{

	templateBuilder.Append("			<li  class=\"lastitem\" style=\"width:230px;\">\r\n");

	templateBuilder.Append("			<form method=\"post\" action=\"search.aspx\" target=\"_blank\" onsubmit=\"bind_keyword(this);\">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" name=\"poster\" />\r\n");
	templateBuilder.Append("			<input type=\"hidden\" name=\"keyword\" />\r\n");
	templateBuilder.Append("			<input type=\"hidden\" name=\"type\" value=\"\" />\r\n");
	templateBuilder.Append("			<input id=\"keywordtype\" type=\"hidden\" name=\"keywordtype\" value=\"0\"/>\r\n");
	templateBuilder.Append("			<div id=\"searchbar\">\r\n");
	templateBuilder.Append("				<dl>\r\n");
	templateBuilder.Append("					<dt id=\"quicksearch\" class=\"s2\" onclick=\"showMenu(this.id, false);\" onmouseover=\"MouseCursor(this);\">帖子标题</dt>\r\n");
	templateBuilder.Append("					<dd class=\"textinput\"><input type=\"text\" name=\"keywordf\" value=\"\" class=\"text\"/></dd>\r\n");
	templateBuilder.Append("					<dd><input name=\"searchsubmit\" type=\"submit\" value=\"\" class=\"s3\"/></dd>\r\n");
	templateBuilder.Append("				</dl>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("			<script type=\"text/javascript\">function bind_keyword(form){if(form.keywordtype.value=='8'){form.keyword.value='';form.poster.value=form.keywordf.value; } else { form.poster.value=''; form.keyword.value=form.keywordf.value;if(form.keywordtype.value == '2')form.type.value = 'spacepost';if(form.keywordtype.value == '3')form.type.value = 'album';}}</" + "script>\r\n");


	templateBuilder.Append("			</li>\r\n");

	}	//end if


	if (forumid==-1)
	{

	templateBuilder.Append("			<li><a href=\"forumindex.aspx\">全部</a></li>\r\n");
	templateBuilder.Append("			<li><a href=\"showtopiclist.aspx?type=digest&amp;forums=" + forums.ToString() + "\">精华帖区</a></li>\r\n");

	}
	else
	{

	 aspxrewriteurl = this.ShowForumAspxRewrite(forumid,0);
	
	templateBuilder.Append("			<li><a href=\"" + aspxrewriteurl.ToString() + "\">全部</a></li>\r\n");
	templateBuilder.Append("			<li><a href=\"showtopiclist.aspx?forumid=" + forumid.ToString() + "&type=digest\">精华帖区</a></li>\r\n");

	}	//end if


	if (config.Rssstatus!=0)
	{

	templateBuilder.Append("			<li class=\"lastitem\"><a href=\"tools/rss.aspx\" target=\"_blank\"><img src=\"templates/" + templatepath.ToString() + "/images/rss.gif\" alt=\"Rss\"/></a></li>\r\n");

	}	//end if

	templateBuilder.Append("		</ul>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--TheCurrent end-->\r\n");

	if (showforumlogin==1)
	{

	templateBuilder.Append("	<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("		<div class=\"titlebar\">\r\n");
	templateBuilder.Append("			<h2>本版块已经被管理员设置了密码</h2>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"NtTopicList\">\r\n");
	templateBuilder.Append("			<div class=\"NtForumPassword\">\r\n");
	templateBuilder.Append("				<form id=\"forumlogin\" name=\"forumlogin\" method=\"post\" action=\"\">\r\n");
	templateBuilder.Append("						<label for=\"password\">请输入密码:</label><input name=\"forumpassword\" type=\"password\" id=\"forumpassword\" size=\"20\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" />\r\n");

	if (isseccode)
	{

	templateBuilder.Append("							<br />				\r\n");
	templateBuilder.Append("							<label for=\"code\">输入验证码:</label>\r\n");

	templateBuilder.Append("<!-- onkeydown=\"return (event.keyCode ? event.keyCode : event.which ? event.which : event.charCode) != 13\"-->\r\n");
	templateBuilder.Append("<input size=\"10\"  style=\"width:50px;\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" onkeyup=\"changevcode(this.form, this.value);\" />\r\n");
	templateBuilder.Append("&nbsp;\r\n");
	templateBuilder.Append("<img src=\"tools/VerifyImagePage.aspx?time=" + Processtime.ToString() + "\" class=\"cursor\" id=\"vcodeimg\"  width=\"90\" height=\"50\" onclick=\"this.src='tools/VerifyImagePage.aspx?id=" + olid.ToString() + "&time=' + Math.random();\" />\r\n");
	templateBuilder.Append("<input name=\"reloadvcade\" type=\"button\" class=\"colorblue\" id=\"reloadvcade\" value=\"刷新验证码\"  onclick=\"document.getElementById('vcodeimg').src='tools/VerifyImagePage.aspx?time=' + Math.random();\" tabindex=\"-1\"  style=\"color:#99cc00; width:75px;\" />\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	$('vcodeimg').src='tools/VerifyImagePage.aspx?time=' + Math.random();\r\n");
	templateBuilder.Append("	//document.getElementById('vcode').value = \"\";\r\n");
	templateBuilder.Append("	function changevcode(form, value)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		if (!$('vcode'))\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			var vcode = document.createElement('input');\r\n");
	templateBuilder.Append("			vcode.id = 'vcode';\r\n");
	templateBuilder.Append("			vcode.name = 'vcode';\r\n");
	templateBuilder.Append("			vcode.type = 'hidden';\r\n");
	templateBuilder.Append("			vcode.value = value;\r\n");
	templateBuilder.Append("			form.appendChild(vcode);\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		else\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			$('vcode').value = value;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</" + "script>\r\n");



	}	//end if

	templateBuilder.Append("						<br />\r\n");
	templateBuilder.Append("						<input type=\"submit\"  value=\"确定\" class=\"sbutton\"/><br />\r\n");
	templateBuilder.Append("				</form>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	</div>\r\n");

	}
	else
	{

	templateBuilder.Append("<div class=\"forumpages\">\r\n");
	templateBuilder.Append("  <div class=\"forumpagesnumbers\">\r\n");
	templateBuilder.Append("				   <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:8px;\">\r\n");
	templateBuilder.Append("				   <tr>\r\n");
	templateBuilder.Append("					<td class=\"forumallpages\"><strong>" + pageid.ToString() + "</strong>/&nbsp;&nbsp;" + pagecount.ToString() + "页</td>\r\n");
	templateBuilder.Append("					<td width=\"10\">&nbsp;</td>\r\n");
	templateBuilder.Append("					<td class=\"forumallpages\">" + pagenumbers.ToString() + "</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				  </table>\r\n");
	templateBuilder.Append("  </div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<h2>\r\n");

	if (forumid>0)
	{

	 aspxrewriteurl = this.ShowForumAspxRewrite(forum.Fid,0);
	
	templateBuilder.Append("		<a href=\"" + aspxrewriteurl.ToString() + "\">" + forum.Name.ToString().Trim() + "</a>\r\n");

	}
	else if (type=="digest")
	{

	templateBuilder.Append("			精华帖\r\n");

	}
	else
	{

	templateBuilder.Append("			新帖\r\n");

	}	//end if

	templateBuilder.Append("		</h2>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"ntforumplate\">\r\n");
	templateBuilder.Append("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n");
	templateBuilder.Append("				<thead>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("						<td>&nbsp;</td>\r\n");
	templateBuilder.Append("						<th>标题</th>\r\n");
	templateBuilder.Append("						<th>作者</th>\r\n");
	templateBuilder.Append("						<th class=\"ntnumbers\">回复/查看</th>\r\n");
	templateBuilder.Append("						<th>最后发布</th>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</thead>\r\n");
	templateBuilder.Append("		<!--announcement area start-->\r\n");

	int announcement__loop__id=0;
	foreach(DataRow announcement in announcementlist.Rows)
	{
		announcement__loop__id++;

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr class=\"list\" onmouseover=\"this.className='liston'\" onmouseout=\"this.className='list'\">\r\n");
	templateBuilder.Append("					<td class=\"topicicon\" style=\"height:32px;\"><img src=\"templates/" + templatepath.ToString() + "/images/announcement.gif\" alt=\"announcement\"/></td>\r\n");
	templateBuilder.Append("					<th class=\"forumlisttitle\"><a href=\"announcement.aspx#" + announcement["id"].ToString().Trim() + "\">" + announcement["title"].ToString().Trim() + "</a></th>\r\n");
	templateBuilder.Append("					<td colspan=\"3\">\r\n");

	if (Utils.StrToInt(announcement["posterid"].ToString().Trim(), 0)==-1)
	{

	templateBuilder.Append("							游客\r\n");

	}
	else
	{

	 aspxrewriteurl = this.UserInfoAspxRewrite(announcement["posterid"].ToString().Trim());
	
	templateBuilder.Append("							<a href=\"" + aspxrewriteurl.ToString() + "\">" + announcement["poster"].ToString().Trim() + "</a>\r\n");

	}	//end if

	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");

	}	//end loop

	templateBuilder.Append("		<!--announcement area end-->\r\n");
	templateBuilder.Append("		<!--NtForumList start-->\r\n");

	int topic__loop__id=0;
	foreach(ShowforumPageTopicInfo topic in topiclist)
	{
		topic__loop__id++;

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr class=\"list\" onmouseover=\"this.className='liston'\" onmouseout=\"this.className='list'\">\r\n");
	templateBuilder.Append("				<td class=\"topicicon\">\r\n");

	if (topic.Folder!="")
	{

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	
	templateBuilder.Append("					<a href=\"" + aspxrewriteurl.ToString() + "\" target=\"_blank\"><img src=\"templates/" + templatepath.ToString() + "/images/folder_" + topic.Folder.ToString().Trim() + ".gif\" alt=\"主题图标\"/></a>\r\n");

	}
	else
	{

	templateBuilder.Append("					&nbsp;\r\n");

	}	//end if

	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<th class=\"forumlisttitle\">\r\n");

	if (topic.Iconid!=0)
	{

	templateBuilder.Append("						<img src=\"images/posticons/" + topic.Iconid.ToString().Trim() + ".gif\" alt=\"示图\"/>\r\n");

	}
	else
	{

	templateBuilder.Append("						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n");

	}	//end if


	if (topic.Replies>0)
	{

	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/topItem_exp.gif\" id=\"imgButton_" + topic.Tid.ToString().Trim() + "\" onclick=\"showtree(" + topic.Tid.ToString().Trim() + "," + config.Ppp.ToString().Trim() + ");\" class=\"cursor\" alt=\"展开帖子列表\" title=\"展开帖子列表\" />\r\n");

	}
	else
	{

	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/no-sublist.gif\" id=\"imgButton_" + topic.Tid.ToString().Trim() + "\"/>\r\n");

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	
	templateBuilder.Append("					<a href=\"" + aspxrewriteurl.ToString() + "\">" + topic.Title.ToString().Trim() + "</a>\r\n");

	if (topic.Digest>0)
	{

	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/digest" + topic.Digest.ToString().Trim() + ".gif\" />\r\n");

	}	//end if


	if (topic.Poll>0)
	{

	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/pollsmall.gif\"/>\r\n");

	}	//end if


	if (topic.Attachment>0)
	{

	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/attachment.gif\"/>\r\n");

	}	//end if


	if (topic.Replies/config.Ppp>0)
	{

	templateBuilder.Append("						<script type=\"text/javascript\">getpagenumbers(\"" + config.Extname.ToString().Trim() + "\", " + topic.Replies.ToString().Trim() + "," + config.Ppp.ToString().Trim() + ",0,\"\"," + topic.Tid.ToString().Trim() + ",\"\",\"\"," + config.Aspxrewrite.ToString().Trim() + ");</" + "script>\r\n");

	}	//end if

	templateBuilder.Append("				</th>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("						<h3>\r\n");

	if (topic.Posterid==-1)
	{

	templateBuilder.Append("							游客\r\n");

	}
	else
	{

	 aspxrewriteurl = this.UserInfoAspxRewrite(topic.Posterid);
	
	templateBuilder.Append("							<a href=\"" + aspxrewriteurl.ToString() + "\">" + topic.Poster.ToString().Trim() + "</a>\r\n");

	}	//end if

	templateBuilder.Append("</h3>\r\n");
	templateBuilder.Append("						<p>\r\n");
templateBuilder.Append(Convert.ToDateTime(topic.Postdatetime).ToString("yy.MM.dd HH:mm"));
	templateBuilder.Append("</p>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<td class=\"ntnumbers\"><em>" + topic.Replies.ToString().Trim() + "</em> / " + topic.Views.ToString().Trim() + "</td>\r\n");
	templateBuilder.Append("				<td>\r\n");

	if (topic.Replies>0)
	{

	templateBuilder.Append("							<h4>\r\n");

	if (topic.Lastposterid==-1)
	{

	templateBuilder.Append("								游客\r\n");

	}
	else
	{

	 aspxrewriteurl = this.UserInfoAspxRewrite(topic.Lastposterid);
	
	templateBuilder.Append("								<a href=\"" + aspxrewriteurl.ToString() + "\" target=\"_blank\">" + topic.Lastposter.ToString().Trim() + "</a>\r\n");

	}	//end if

	templateBuilder.Append("							<a href=\"showtopic.aspx?topicid=" + topic.Tid.ToString().Trim() + "&page=end\"><img src=\"templates/" + templatepath.ToString() + "/images/writer2.gif\" alt=\"发布者\"/></a>\r\n");
	templateBuilder.Append("							</h4>\r\n");
	templateBuilder.Append("							<p>\r\n");
templateBuilder.Append(Convert.ToDateTime(topic.Lastpost).ToString("yy.MM.dd HH:mm"));
	templateBuilder.Append("</p>\r\n");

	}
	else
	{

	templateBuilder.Append("							从未\r\n");

	}	//end if

	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("			</tbody>\r\n");
	templateBuilder.Append("			</tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td colspan=\"5\"><div id=\"divTopic" + topic.Tid.ToString().Trim() + "\"></div></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("			</tbody>\r\n");

	}	//end loop

	templateBuilder.Append("		<!--NtForumList end-->\r\n");
	templateBuilder.Append("	</table>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div class=\"forumpages\">\r\n");
	templateBuilder.Append("  <div class=\"forumpagesnumbers\">\r\n");
	templateBuilder.Append("		<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:8px;\">\r\n");
	templateBuilder.Append("				   <tr>\r\n");
	templateBuilder.Append("					<td class=\"forumallpages\"><strong>" + pageid.ToString() + "</strong>/&nbsp;&nbsp;" + pagecount.ToString() + "页</td>\r\n");
	templateBuilder.Append("					<td width=\"10\">&nbsp;</td>\r\n");
	templateBuilder.Append("					<td class=\"forumallpages\">" + pagenumbers.ToString() + "</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("		</table>\r\n");
	templateBuilder.Append("  </div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("function CheckAll(form)\r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("	for (var i = 0; i < form.elements.length; i++)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		var e = form.elements[i];\r\n");
	templateBuilder.Append("		if (e.id == \"fidlist\"){\r\n");
	templateBuilder.Append("		   e.checked = form.chkall.checked;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("function SH_SelectOne(obj)\r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("	for (var i = 0; i < document.getElementById(\"LookBySearch\").elements.length; i++)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		var e = document.getElementById(\"LookBySearch\").elements[i];\r\n");
	templateBuilder.Append("		if (e.id == \"fidlist\"){\r\n");
	templateBuilder.Append("		   if (!e.checked){\r\n");
	templateBuilder.Append("			document.getElementById(\"chkall\").checked = false;\r\n");
	templateBuilder.Append("			return;\r\n");
	templateBuilder.Append("		   }\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	document.getElementById(\"chkall\").checked = true;\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("function ShowDetailGrid(tid)\r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("   if(" + config.Aspxrewrite.ToString().Trim() + ")\r\n");
	templateBuilder.Append("   {\r\n");
	templateBuilder.Append("       window.location.href = \"showforum-\" + tid + \"" + config.Extname.ToString().Trim() + "\";\r\n");
	templateBuilder.Append("   }\r\n");
	templateBuilder.Append("   else\r\n");
	templateBuilder.Append("   {\r\n");
	templateBuilder.Append("       window.location.href = \"showforum.aspx?forumid=\" + tid ;\r\n");
	templateBuilder.Append("   }\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("</" + "script>\r\n");

	if (forumid==-1)
	{

	templateBuilder.Append("<form name=\"LookBySearch\" method=\"post\" action=\"showtopiclist.aspx?search=1&forumid=" + forumid.ToString() + "&type=" + type.ToString() + "&newtopic=" + newtopic.ToString() + "&forums=" + forums.ToString() + "\" ID=\"LookBySearch\">\r\n");
	templateBuilder.Append("	<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("		<div class=\"titlebar\">\r\n");
	templateBuilder.Append("			<h3>以下论坛版块:</h3>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div style=\"clear:both;\">\r\n");
	templateBuilder.Append("		<table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\" style=\"text-align:left;\">\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				 " + forumcheckboxlist.ToString() + "\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</table>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"framelistselect\">\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td style=\"width:50%;text-align:left;padding-left:15px;\">\r\n");
	templateBuilder.Append("					 <input checked=\"checked\" title=\"选中/取消选中 本页所有Case\" onclick=\"CheckAll(this.form)\" type=\"checkbox\" name=\"chkall\" ID=\"chkall\">全选/取消全选\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<td style=\"width:50%;text-align:right;\">\r\n");
	templateBuilder.Append("						 排序方式\r\n");
	templateBuilder.Append("					<select name=\"order\" id=\"order\">\r\n");
	templateBuilder.Append("					  <option value=\"1\"\r\n");

	if (order==1)
	{

	templateBuilder.Append("								selected\r\n");

	}	//end if

	templateBuilder.Append("							  >最后回复时间</option>\r\n");
	templateBuilder.Append("					  <option value=\"2\"\r\n");

	if (order==2)
	{

	templateBuilder.Append("								selected\r\n");

	}	//end if

	templateBuilder.Append("							  >发布时间</option>\r\n");
	templateBuilder.Append("					</select>\r\n");
	templateBuilder.Append("					<select name=\"direct\" id=\"direct\">\r\n");
	templateBuilder.Append("					  <option value=\"0\"\r\n");

	if (direct==0)
	{

	templateBuilder.Append("								selected\r\n");

	}	//end if

	templateBuilder.Append("							  >按升序排列</option>\r\n");
	templateBuilder.Append("					  <option value=\"1\"\r\n");

	if (direct==1)
	{

	templateBuilder.Append("								selected\r\n");

	}	//end if

	templateBuilder.Append("							  >按降序排列</option>\r\n");
	templateBuilder.Append("					</select>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("					<td style=\"width:120px;\"><input type=\"image\" src=\"templates/" + templatepath.ToString() + "/images/button_true.gif\" onclick=\"document.LookBySearch.submit();\"/></td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</table>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("</form>\r\n");
	templateBuilder.Append("<div id=\"forumjumping\">\r\n");
	templateBuilder.Append("		<div class=\"jumpmodule\">\r\n");

	if (config.Forumjump==1)
	{

	templateBuilder.Append("    <select onchange=\"if(this.options[this.selectedIndex].value != '') {\r\n");
	templateBuilder.Append("            if(" + config.Aspxrewrite.ToString().Trim() + ")\r\n");
	templateBuilder.Append("            {\r\n");
	templateBuilder.Append("			    window.location='showforum-' + this.options[this.selectedIndex].value + '" + config.Extname.ToString().Trim() + "';\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			else\r\n");
	templateBuilder.Append("			{\r\n");
	templateBuilder.Append("			    window.location='showforum.aspx?forumid=' + this.options[this.selectedIndex].value;\r\n");
	templateBuilder.Append("			}}\">\r\n");
	templateBuilder.Append("      <option>论坛跳转...</option>\r\n");
	templateBuilder.Append("				" + forumlistboxoptions.ToString() + "\r\n");
	templateBuilder.Append("    </select>\r\n");

	}	//end if


	if (config.Visitedforums>0)
	{

	templateBuilder.Append("    <select name=\"select2\" onchange=\"if(this.options[this.selectedIndex].value != '') {\r\n");
	templateBuilder.Append("            if(" + config.Aspxrewrite.ToString().Trim() + ")\r\n");
	templateBuilder.Append("            {\r\n");
	templateBuilder.Append("		        window.location='showforum-'+this.options[this.selectedIndex].value+'" + config.Extname.ToString().Trim() + "'; \r\n");
	templateBuilder.Append("		    }\r\n");
	templateBuilder.Append("		    else\r\n");
	templateBuilder.Append("		    {\r\n");
	templateBuilder.Append("		        window.location='showforum.aspx?forumid='+this.options[this.selectedIndex].value; \r\n");
	templateBuilder.Append("		    }}\">\r\n");
	templateBuilder.Append("      <option>最近访问...</option>" + visitedforumsoptions.ToString() + "\r\n");
	templateBuilder.Append("    </select>\r\n");

	}	//end if

	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("</div>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("</div>\r\n");


	if (footerad!="")
	{

	templateBuilder.Append("<!--底部广告显示-->\r\n");
	templateBuilder.Append("<div id=\"bottomad\">" + footerad.ToString() + "</div>\r\n");
	templateBuilder.Append("<!--底部广告结束-->\r\n");

	}	//end if

	templateBuilder.Append("<div id=\"forumfooter\">\r\n");
	templateBuilder.Append("	<div class=\"footercopy\">\r\n");
	templateBuilder.Append("	 	<p>\r\n");
	templateBuilder.Append("			版权所有 <a href=\"" + config.Weburl.ToString().Trim() + "\" target=\"_blank\">" + config.Webtitle.ToString().Trim() + "</a>&nbsp; " + config.Linktext.ToString().Trim() + "\r\n");

	if (config.Sitemapstatus==1)
	{

	templateBuilder.Append("&nbsp;<a href=\"tools/sitemap.aspx\" target=\"_blank\" title=\"百度论坛收录协议\">Sitemap</a>\r\n");

	}	//end if

	templateBuilder.Append("		</p>\r\n");
	templateBuilder.Append("		<span>Powered by <a href=\"http://nt.discuz.net\" target=\"_blank\" title=\"Discuz!NT 2.0 (.net Framework 1.1)\"><em>Discuz!NT</em></a>&nbsp;<em>2.0.1115 \r\n");

	if (config.Licensed==1)
	{

	templateBuilder.Append("				(<a href=\"\" onclick=\"this.href='http://nt.discuz.net/certificate/?host='+location.href.substring(0, location.href.lastIndexOf('/'))\" target=\"_blank\">Licensed</a>)\r\n");

	}	//end if

	templateBuilder.Append("				&nbsp;&nbsp; " + config.Forumcopyright.ToString().Trim() + "</em>\r\n");

	if (config.Debug!=0)
	{

	templateBuilder.Append("<br/>\r\n");
	templateBuilder.Append("				Processed in " + this.Processtime.ToString().Trim() + " second(s)\r\n");

	if (isguestcachepage==1)
	{

	templateBuilder.Append("						(Cached).\r\n");

	}
	else if (querycount>1)
	{

	templateBuilder.Append("				        , " + querycount.ToString() + " queries.\r\n");

	}
	else
	{

	templateBuilder.Append("				        , " + querycount.ToString() + " query.\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("				" + config.Icp.ToString().Trim() + "\r\n");
	templateBuilder.Append("		 </span>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"footergoto\">\r\n");
	templateBuilder.Append("		<span><img src=\"templates/" + templatepath.ToString() + "/images/gototop2.gif\" alt=\"返顶部\" onclick=\"window.scrollTo(0,0)\" /></span>\r\n");

	if (config.Stylejump==1)
	{


	if (userid!=-1 || config.Guestcachepagetimeout<=0)
	{

	templateBuilder.Append("		<select onchange=\"if(this.options[this.selectedIndex].value != '') {window.location=('showtemplate.aspx?templateid='+this.options[this.selectedIndex].value) }\">\r\n");
	templateBuilder.Append("			<option selected>切换界面...</option>\r\n");
	templateBuilder.Append("			" + templatelistboxoptions.ToString() + "\r\n");
	templateBuilder.Append("		</select>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div id=\"my_menu\" class=\"ntdropmenu\" style=\"display: none;\">\r\n");
	templateBuilder.Append("		<a href=\"mytopics.aspx\">我的主题</a>\r\n");
	templateBuilder.Append("		<a href=\"myposts.aspx\">我的帖子</a>\r\n");
	templateBuilder.Append("		<a href=\"search.aspx?posterid=" + userid.ToString() + "&amp;type=digest\">我的精华</a>\r\n");

	if (config.Enablespace==1)
	{

	templateBuilder.Append("		<a href=\"" + spaceurl.ToString() + "space/\">我的空间</a>\r\n");

	}	//end if


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("		<a href=\"showalbumlist.aspx?uid=" + userid.ToString() + "\">我的相册</a>\r\n");

	}	//end if

	templateBuilder.Append("		<script type=\"text/javascript\" src=\"javascript/mymenu.js\"></" + "script>\r\n");
	templateBuilder.Append("</div>\r\n");



	}
	else
	{


	templateBuilder.Append("<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<h3>出现了" + page_err.ToString() + "个错误</h3>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"forumerror\">\r\n");
	templateBuilder.Append("				" + msgbox_text.ToString() + "\r\n");
	templateBuilder.Append("				<p class=\"errorback\">\r\n");
	templateBuilder.Append("						<script language=\"javascript\">\r\n");
	templateBuilder.Append("							if(" + msgbox_showbacklink.ToString() + ")\r\n");
	templateBuilder.Append("							{\r\n");
	templateBuilder.Append("								document.write(\"<a href=\\\"" + msgbox_backlink.ToString() + "\\\">返回上一步</a> &nbsp; &nbsp;|&nbsp; &nbsp  \");\r\n");
	templateBuilder.Append("							}\r\n");
	templateBuilder.Append("						</" + "script>\r\n");
	templateBuilder.Append("						<a href=\"forumindex.aspx\">论坛首页</a>\r\n");

	if (usergroupid==7)
	{

	templateBuilder.Append("						 &nbsp; &nbsp|&nbsp; &nbsp; <a href=\"register.aspx\">注册</a>\r\n");

	}	//end if

	templateBuilder.Append("				</p>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");


	templateBuilder.Append("</div>\r\n");

	}	//end if


	templateBuilder.Append("<div id=\"quicksearch_menu\" class=\"searchmenu\" style=\"display: none;\">\r\n");
	templateBuilder.Append("				<div onclick=\"document.getElementById('keywordtype').value='0';document.getElementById('quicksearch').innerHTML='帖子标题';document.getElementById('quicksearch_menu').style.display='none';\" onmouseover=\"MouseCursor(this);\">帖子标题</div>\r\n");
	templateBuilder.Append("				<div onclick=\"document.getElementById('keywordtype').value='2';document.getElementById('quicksearch').innerHTML='空间日志';document.getElementById('quicksearch_menu').style.display='none';\" onmouseover=\"MouseCursor(this);\">空间日志</div>\r\n");
	templateBuilder.Append("				<div onclick=\"document.getElementById('keywordtype').value='3';document.getElementById('quicksearch').innerHTML='相册标题';document.getElementById('quicksearch_menu').style.display='none';\" onmouseover=\"MouseCursor(this);\">相册标题</div>\r\n");
	templateBuilder.Append("				<div onclick=\"document.getElementById('keywordtype').value='8';document.getElementById('quicksearch').innerHTML='作&nbsp;&nbsp;者';document.getElementById('quicksearch_menu').style.display='none';\" onmouseover=\"MouseCursor(this);\">作&nbsp;&nbsp;者</div>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("</body>\r\n");
	templateBuilder.Append("</html>\r\n");



	Response.Write(templateBuilder.ToString());
}
</script>
