<%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.Web.showforum" %>
<%@ 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 2009-2-24 15:05:20.
		本页面代码由Discuz!NT模板引擎生成于 2009-2-24 15:05:20. 
	*/

	base.OnInit(e);

	templateBuilder.Capacity = 220000;


	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 http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\r\n");
	templateBuilder.Append(meta.ToString());
	templateBuilder.Append("\r\n");

	if (pagetitle=="首页")
	{

	templateBuilder.Append("<title>");
	templateBuilder.Append(config.Forumtitle.ToString().Trim());
	templateBuilder.Append(" ");
	templateBuilder.Append(config.Seotitle.ToString().Trim());
	templateBuilder.Append(" - Powered by Discuz!NT</title>\r\n");

	}
	else
	{

	templateBuilder.Append("<title>");
	templateBuilder.Append(pagetitle.ToString());
	templateBuilder.Append(" - ");
	templateBuilder.Append(config.Forumtitle.ToString().Trim());
	templateBuilder.Append(" ");
	templateBuilder.Append(config.Seotitle.ToString().Trim());
	templateBuilder.Append(" - Powered by Discuz!NT</title>\r\n");

	}	//end if

	templateBuilder.Append("<link rel=\"icon\" href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("favicon.ico\" type=\"image/x-icon\" />\r\n");
	templateBuilder.Append("<link rel=\"shortcut icon\" href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("favicon.ico\" type=\"image/x-icon\" />\r\n");
	templateBuilder.Append("<!-- 调用样式表 -->\r\n");
	templateBuilder.Append("<link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/dnt.css\" type=\"text/css\" media=\"all\"  />\r\n");
	templateBuilder.Append(link.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("javascript/template_report.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("javascript/template_utils.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("javascript/common.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("javascript/menu.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	var aspxrewrite = ");
	templateBuilder.Append(config.Aspxrewrite.ToString().Trim());
	templateBuilder.Append(";\r\n");
	templateBuilder.Append("</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append(script.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("</head>\r\n");


	templateBuilder.Append("<body>\r\n");
	templateBuilder.Append("<div id=\"append_parent\"></div><div id=\"ajaxwaitid\"></div>\r\n");
	templateBuilder.Append("<div class=\"wrap\">\r\n");
	templateBuilder.Append("<div id=\"header\">\r\n");
	templateBuilder.Append("	<h2><a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("index.aspx\" title=\"Discuz!NT|BBS|论坛 - Powered by Discuz!NT\"><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/logo.gif\" alt=\"Discuz! Board NT|BBS|论坛\"/></a>\r\n");
	templateBuilder.Append("	</h2>\r\n");

	if (headerad!="")
	{

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

	}	//end if

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

	if (config.Isframeshow!=0)
	{

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

	}	//end if

	templateBuilder.Append("	<span class=\"avataonline\">\r\n");

	if (userid==-1)
	{

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

	}
	else
	{


	if (oluserinfo.Newpms>0)
	{

	templateBuilder.Append("			&nbsp;<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("usercpinbox.aspx\" class=\"new_info\"><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/message_1.gif\" alt=\"");
	templateBuilder.Append(oluserinfo.Newpms.ToString().Trim());
	templateBuilder.Append("条新短消息\"  title=\"");
	templateBuilder.Append(oluserinfo.Newpms.ToString().Trim());
	templateBuilder.Append("条新短消息\"/></a>&nbsp;\r\n");

	}	//end if

	templateBuilder.Append("			<cite>欢迎:<a class=\"dropmenu\" id=\"viewpro\" onMouseOver=\"showMenu(this.id)\">");
	templateBuilder.Append(username.ToString());
	templateBuilder.Append("</a></cite>\r\n");

	if (oluserinfo.Newnotices>0)
	{

	templateBuilder.Append("			&nbsp;<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("usercpnotice.aspx?filter=all\" class=\"new_info\">");
	templateBuilder.Append(oluserinfo.Newnotices.ToString().Trim());
	templateBuilder.Append("个新通知</a>&nbsp;\r\n");

	}	//end if

	templateBuilder.Append("			<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("logout.aspx?userkey=");
	templateBuilder.Append(userkey.ToString());
	templateBuilder.Append("\">退出</a>\r\n");

	}	//end if

	templateBuilder.Append("	</span>\r\n");
	templateBuilder.Append("	<ul>\r\n");
	templateBuilder.Append("		");
	templateBuilder.Append(mainnavigation.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("	</ul>\r\n");
	templateBuilder.Append("</div>\r\n");


	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("javascript/ajax.js\"></");
	templateBuilder.Append("script>\r\n");

	if (page_err==0)
	{

	templateBuilder.Append("	<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	var templatepath = \"");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("\";\r\n");
	templateBuilder.Append("	var fid = parseInt(");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append(");\r\n");
	templateBuilder.Append("	var postminchars = parseInt(");
	templateBuilder.Append(config.Minpostsize.ToString().Trim());
	templateBuilder.Append(");\r\n");
	templateBuilder.Append("	var postmaxchars = parseInt(");
	templateBuilder.Append(config.Maxpostsize.ToString().Trim());
	templateBuilder.Append(");\r\n");
	templateBuilder.Append("	var disablepostctrl = parseInt(");
	templateBuilder.Append(disablepostctrl.ToString());
	templateBuilder.Append(");\r\n");
	templateBuilder.Append("	var forumurl = \"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("\";\r\n");
	templateBuilder.Append("	</");
	templateBuilder.Append("script>\r\n");

	}	//end if

	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("javascript/template_showforum.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<div id=\"foruminfo\">\r\n");
	templateBuilder.Append("	<div id=\"headsearch\">\r\n");
	templateBuilder.Append("		<div id=\"search\">\r\n");

	if (usergroupinfo.Allowsearch>0)
	{


	templateBuilder.Append("			<form method=\"post\" action=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("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';}}</");
	templateBuilder.Append("script>\r\n");



	}	//end if

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

	if (page_err==0)
	{

	templateBuilder.Append("		<p class=\"msginfo\">\r\n");

	if (ismoder)
	{

	templateBuilder.Append("<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("modcp.aspx?operation=attention&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\" target=\"_blank\">管理面板</a>\r\n");

	}	//end if

	templateBuilder.Append("			<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showtopiclist.aspx?type=digest&amp;forums=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\">精华帖区</a>\r\n");

	if (config.Rssstatus!=0)
	{

	 aspxrewriteurl = this.RssAspxRewrite(forum.Fid);
	
	templateBuilder.Append("			<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("tools/");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\"><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/rss.gif\" alt=\"Rss\"/></a>\r\n");

	}	//end if

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

	}	//end if

	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div id=\"nav\">\r\n");
	templateBuilder.Append("		<div class=\"userinfolist\">\r\n");
	templateBuilder.Append("			<p><a id=\"forumlist\" href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("forumindex.aspx\" \r\n");

	if (config.Forumjump==1)
	{

	templateBuilder.Append("onmouseover=\"showMenu(this.id);\" onmouseout=\"showMenu(this.id);\"\r\n");

	}	//end if

	templateBuilder.Append("			>");
	templateBuilder.Append(config.Forumtitle.ToString().Trim());
	templateBuilder.Append("</a> &raquo; ");
	templateBuilder.Append(forumnav.ToString());
	templateBuilder.Append(" </p>\r\n");

	if (page_err==0)
	{

	templateBuilder.Append("			<p class=\"msginfo\"> 版主: \r\n");
	templateBuilder.Append("			<em>\r\n");

	if (forum.Moderators!="")
	{

	templateBuilder.Append("				");
	templateBuilder.Append(forum.Moderators.ToString().Trim());
	templateBuilder.Append("\r\n");

	}
	else
	{

	templateBuilder.Append("				*空缺中*\r\n");

	}	//end if

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

	}	//end if

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

	if (page_err==0)
	{


	if (config.Forumjump==1)
	{

	templateBuilder.Append("	");
	templateBuilder.Append(navhomemenu.ToString());
	templateBuilder.Append("\r\n");

	}	//end if


	if (showforumlogin==1)
	{

	templateBuilder.Append("	<div class=\"mainbox formbox\">\r\n");
	templateBuilder.Append("		<h3>本版块已经被管理员设置了密码</h3>\r\n");
	templateBuilder.Append("		<form id=\"forumlogin\" name=\"forumlogin\" method=\"post\" action=\"\">\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th>请输入密码:</th>\r\n");
	templateBuilder.Append("					<td><input name=\"forumpassword\" type=\"password\" id=\"forumpassword\" size=\"20\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");

	if (isseccode)
	{

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th>输入验证码:</th>\r\n");
	templateBuilder.Append("					<td>\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=");
	templateBuilder.Append(Processtime.ToString());
	templateBuilder.Append("\" class=\"cursor\" id=\"vcodeimg\" onclick=\"this.src='tools/VerifyImagePage.aspx?id=");
	templateBuilder.Append(olid.ToString());
	templateBuilder.Append("&time=' + Math.random();\" />\r\n");
	templateBuilder.Append("<!--<input name=\"reloadvcade\" type=\"button\" class=\"colorblue\" id=\"reloadvcade\" value=\"刷新验证码\" tabindex=\"-1\"  style=\"color:#99cc00; width:75px;\" />-->\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	if (typeof vcodeimgid == 'undefined'){\r\n");
	templateBuilder.Append("		var vcodeimgid = 1;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	var actualid = $('vcodeimg').id + vcodeimgid++;\r\n");
	templateBuilder.Append("	$('vcodeimg').id = actualid;\r\n");
	templateBuilder.Append("	var actualobject = $(actualid);\r\n");
	templateBuilder.Append("	actualobject.src='tools/VerifyImagePage.aspx?bgcolor=F5FAFE&time=' + Math.random();\r\n");
	templateBuilder.Append("	var btn = document.createElement(\"INPUT\");\r\n");
	templateBuilder.Append("	btn.type = \"button\";\r\n");
	templateBuilder.Append("	btn.className = \"colorblue\";\r\n");
	templateBuilder.Append("	btn.value=\"刷新验证码\";\r\n");
	templateBuilder.Append("	btn.style.color = \"#99cc00\";\r\n");
	templateBuilder.Append("	btn.style.width = \"75px\";\r\n");
	templateBuilder.Append("	btn.onclick =  function() {\r\n");
	templateBuilder.Append("		actualobject.src = 'tools/VerifyImagePage.aspx?time=' + Math.random();\r\n");
	templateBuilder.Append("	};\r\n");
	templateBuilder.Append("	actualobject.parentNode.appendChild(btn);\r\n");
	templateBuilder.Append("	function changevcode(form, value){\r\n");
	templateBuilder.Append("		if (!$('vcode')){\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("		}else{\r\n");
	templateBuilder.Append("			$('vcode').value = value;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</");
	templateBuilder.Append("script>\r\n");


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

	}	//end if

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th>&nbsp;</th>\r\n");
	templateBuilder.Append("					<td>\r\n");
	templateBuilder.Append("						<input type=\"submit\"  value=\"确定\"/>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("		</form>\r\n");
	templateBuilder.Append("	</div>\r\n");

	}
	else
	{



	if (pagewordad.Length>0)
	{

	templateBuilder.Append("<!--adtext-->\r\n");
	templateBuilder.Append("<div id=\"ad_text\" class=\"ad_text\">\r\n");
	templateBuilder.Append("	<table cellspacing=\"1\" cellpadding=\"0\" summary=\"Text Ad\">\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr>\r\n");
	int adindex = 0;
	

	int pageword__loop__id=0;
	foreach(string pageword in pagewordad)
	{
		pageword__loop__id++;


	if (adindex<4)
	{

	templateBuilder.Append("				<td>");
	templateBuilder.Append(pageword.ToString());
	templateBuilder.Append("</td>\r\n");
	 adindex = adindex+1;
	

	}
	else
	{

	templateBuilder.Append("				</tr><tr>\r\n");
	templateBuilder.Append("				<td>");
	templateBuilder.Append(pageword.ToString());
	templateBuilder.Append("</td>\r\n");
	 adindex = 1;
	

	}	//end if


	}	//end loop


	if (pagewordad.Length%4>0)
	{


					for (int j = 0; j < (4 - pagewordad.Length % 4); j++)
					{
				
	templateBuilder.Append("				<td>&nbsp;</td>\r\n");

					}
				

	}	//end if

	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");
	templateBuilder.Append("	</table>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--adtext-->\r\n");

	}	//end if




	if (forum.Rules!="")
	{

	templateBuilder.Append("<div class=\"box\" id=\"rules\">\r\n");
	templateBuilder.Append("	<span class=\"headactions\"><img id=\"rules_img\" title=\"收起\" onclick=\"$('rules_link').style.display = '';toggle_collapse('rules', 1);\" alt=\"收起\" src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/collapsed_no.gif\" /></span>\r\n");
	templateBuilder.Append("	<h4>本版规则</h4>\r\n");
	templateBuilder.Append("	<div id=\"rules_link\">");
	templateBuilder.Append(forum.Rules.ToString().Trim());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("</div>\r\n");

	}	//end if



	if (newpmcount>0 && showpmhint)
	{

	templateBuilder.Append("<!--短信息 area start-->\r\n");
	templateBuilder.Append("<div class=\"mainbox\">\r\n");

	if (pmsound>0)
	{

	templateBuilder.Append("		<bgsound src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("sound/pm");
	templateBuilder.Append(pmsound.ToString());
	templateBuilder.Append(".wav\" />\r\n");

	}	//end if

	templateBuilder.Append("	<span class=\"headactions\"><a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("usercpinbox.aspx\" target=\"_blank\">查看详情</a> <a href=\"###\" onclick=\"document.getElementById('frmnewpm').submit();\">不再提示</a></span>\r\n");
	templateBuilder.Append("	<h3>您有 ");
	templateBuilder.Append(newpmcount.ToString());
	templateBuilder.Append(" 条新的短消息</h3>\r\n");
	templateBuilder.Append("	<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n");

	int pm__loop__id=0;
	foreach(PrivateMessageInfo pm in pmlist)
	{
		pm__loop__id++;

	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr>\r\n");
	templateBuilder.Append("			<td style=\"width:53px;text-align:center; height:18px; line-height:18px; padding:2px 0;\"><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/message_");
	templateBuilder.Append(pm.New.ToString().Trim());
	templateBuilder.Append(".gif\" alt=\"短信息\"/></td>\r\n");
	templateBuilder.Append("			<th><a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("usercpshowpm.aspx?pmid=");
	templateBuilder.Append(pm.Pmid.ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(pm.Subject.ToString().Trim());
	templateBuilder.Append("</a></th>\r\n");
	templateBuilder.Append("			<td width=\"15%\">\r\n");

	if (pm.Msgfromid>0)
	{

	templateBuilder.Append("				    <a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("userinfo.aspx?userid=");
	templateBuilder.Append(pm.Msgfromid.ToString().Trim());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(pm.Msgfrom.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}
	else
	{

	templateBuilder.Append("				    ");
	templateBuilder.Append(pm.Msgfrom.ToString().Trim());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("			<td width=\"15%\">\r\n");
	templateBuilder.Append("				<span class=\"fontfamily\">");
	templateBuilder.Append(pm.Postdatetime.ToString().Trim());
	templateBuilder.Append("</span>\r\n");
	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");

	}	//end loop

	templateBuilder.Append("	</table>\r\n");
	templateBuilder.Append("	<form id=\"frmnewpm\" name=\"frmnewpm\" method=\"post\" action=\"#\">\r\n");
	templateBuilder.Append("		<input id=\"ignore\" name=\"ignore\" type=\"hidden\" value=\"yes\" />\r\n");
	templateBuilder.Append("	</form>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--短信息 area end-->\r\n");

	}	//end if




	if (subforumcount>0)
	{



	if (forum.Colcount==1)
	{

	templateBuilder.Append("<!--ntforumboxstart-->\r\n");
	templateBuilder.Append("<div class=\"mainbox forumlist\">\r\n");
	templateBuilder.Append("	<span class=\"headactions\">\r\n");
	templateBuilder.Append("		<img id=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("_img\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/collapsed_no.gif\" alt=\"展开/收起\" onclick=\"toggle_collapse('category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("');\"/>\r\n");
	templateBuilder.Append("	</span>\r\n");
	templateBuilder.Append("	<h3>子版块</h3>\r\n");
	templateBuilder.Append("	<table cellspacing=\"0\" cellpadding=\"0\" summary=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("		<thead class=\"category\">\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<th>版块</th>\r\n");
	templateBuilder.Append("				<td class=\"nums\">主题</td>\r\n");
	templateBuilder.Append("				<td class=\"nums\">帖子</td>\r\n");
	templateBuilder.Append("				<td class=\"lastpost\">最后发表</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</thead>\r\n");

	int subforum__loop__id=0;
	foreach(IndexPageForumInfo subforum in subforumlist)
	{
		subforum__loop__id++;

	templateBuilder.Append("		<tbody id=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("			<tr>\r\n");
	 aspxrewriteurl = this.ShowForumAspxRewrite(subforum.Fid,0);
	
	templateBuilder.Append("				<th \r\n");

	if (subforum.Havenew=="new")
	{

	templateBuilder.Append("class=\"new\"\r\n");

	}	//end if

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

	if (subforum.Icon!="")
	{

	templateBuilder.Append("							<img src=\"");
	templateBuilder.Append(subforum.Icon.ToString().Trim());
	templateBuilder.Append("\" border=\"0\" align=\"left\" hspace=\"5\" alt=\"");
	templateBuilder.Append(subforum.Name.ToString().Trim());
	templateBuilder.Append("\"/>\r\n");

	}	//end if


	if (subforum.Redirect=="")
	{

	 aspxrewriteurl = this.ShowForumAspxRewrite(subforum.Fid,0,subforum.Rewritename);
	
	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">\r\n");

	}
	else
	{

	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(subforum.Redirect.ToString().Trim());
	templateBuilder.Append("\" target=\"_blank\">\r\n");

	}	//end if

	templateBuilder.Append("						");
	templateBuilder.Append(subforum.Name.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	if (subforum.Todayposts>0)
	{

	templateBuilder.Append("<span class=\"today\">(");
	templateBuilder.Append(subforum.Todayposts.ToString().Trim());
	templateBuilder.Append(")</span>\r\n");

	}	//end if

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

	if (subforum.Description!="")
	{

	templateBuilder.Append("<p>");
	templateBuilder.Append(subforum.Description.ToString().Trim());
	templateBuilder.Append("</p>\r\n");

	}	//end if


	if (subforum.Moderators!="")
	{

	templateBuilder.Append("<p class=\"moderators\">版主:");
	templateBuilder.Append(subforum.Moderators.ToString().Trim());
	templateBuilder.Append("</p>\r\n");

	}	//end if

	templateBuilder.Append("				</th>\r\n");
	templateBuilder.Append("				<td class=\"nums\">");
	templateBuilder.Append(subforum.Topics.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				<td class=\"nums\">");
	templateBuilder.Append(subforum.Posts.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				<td class=\"lastposter\">\r\n");

	if (subforum.Status==-1)
	{

	templateBuilder.Append("						私密论坛\r\n");

	}
	else
	{


	if (subforum.Lasttid!=0)
	{

	templateBuilder.Append("						<p>\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(subforum.Lasttid,0);
	
	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(subforum.Lasttitle.ToString().Trim());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("						</p>\r\n");
	templateBuilder.Append("						<div class=\"topicbackwriter\">by\r\n");

	if (subforum.Lastposter!="")
	{


	if (subforum.Lastposterid==-1)
	{

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

	}
	else
	{

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

	}	//end if


	}
	else
	{

	templateBuilder.Append("								匿名\r\n");

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(subforum.Lasttid,0);
	
	templateBuilder.Append("						- 	<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("showtopic.aspx?topicid=");
	templateBuilder.Append(subforum.Lasttid.ToString().Trim());
	templateBuilder.Append("&page=end#lastpost\" title=\"");
	templateBuilder.Append(subforum.Lasttitle.ToString().Trim());
	templateBuilder.Append("\"><span>\r\n");
	templateBuilder.Append(Convert.ToDateTime(subforum.Lastpost).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</span></a>\r\n");
	templateBuilder.Append("						</div>\r\n");

	}
	else
	{

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

	}	//end if


	}	//end if

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

	}	//end loop

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

	}
	else
	{

	templateBuilder.Append("<!--ntforumbox start-->\r\n");
	templateBuilder.Append("<div class=\"mainbox forumlist\">\r\n");
	templateBuilder.Append("	<span class=\"headactions\">\r\n");

	if (forum.Moderators!="")
	{

	templateBuilder.Append("			分类版主: ");
	templateBuilder.Append(forum.Moderators.ToString().Trim());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("		<img id=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("_img\"  src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/collapsed_no.gif\" alt=\"展开/收起\" onclick=\"toggle_collapse('category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("');\"/>\r\n");
	templateBuilder.Append("	</span>\r\n");
	templateBuilder.Append("	<h3>子论坛</h3>\r\n");
	templateBuilder.Append("	<table id=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\"  cellspacing=\"0\" cellpadding=\"0\" summary=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\">	\r\n");
	int subforumindex = 0;
	
	double colwidth = 99.6 / forum.Colcount;
	

	int subforum__loop__id=0;
	foreach(IndexPageForumInfo subforum in subforumlist)
	{
		subforum__loop__id++;

	 subforumindex = subforumindex+1;
	

	if (subforumindex==1)
	{

	templateBuilder.Append("		<tbody id=\"category_");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("			<tr>\r\n");

	}	//end if

	templateBuilder.Append("			  <th style=\"width:");
	templateBuilder.Append(colwidth.ToString());
	templateBuilder.Append("%;\"\r\n");

	if (subforum.Havenew=="new")
	{

	templateBuilder.Append("class=\"new\"\r\n");

	}	//end if

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

	if (subforum.Icon!="")
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(subforum.Icon.ToString().Trim());
	templateBuilder.Append("\" alt=\"");
	templateBuilder.Append(subforum.Name.ToString().Trim());
	templateBuilder.Append("\" hspace=\"5\" />\r\n");

	}	//end if


	if (forum.Redirect=="")
	{

	 aspxrewriteurl = this.ShowForumAspxRewrite(subforum.Fid,0,subforum.Rewritename);
	
	templateBuilder.Append("						<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">\r\n");

	}
	else
	{

	templateBuilder.Append("						<a href=\"");
	templateBuilder.Append(subforum.Redirect.ToString().Trim());
	templateBuilder.Append("\" target=\"_blank\">\r\n");

	}	//end if

	templateBuilder.Append("					");
	templateBuilder.Append(subforum.Name.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	if (subforum.Todayposts>0)
	{

	templateBuilder.Append("					<span class=\"today\">(");
	templateBuilder.Append(subforum.Todayposts.ToString().Trim());
	templateBuilder.Append(")</span>\r\n");

	}	//end if

	templateBuilder.Append("					</h2>\r\n");
	templateBuilder.Append("					<p>主题:");
	templateBuilder.Append(subforum.Topics.ToString().Trim());
	templateBuilder.Append(", 帖数:");
	templateBuilder.Append(subforum.Posts.ToString().Trim());
	templateBuilder.Append("</p>\r\n");

	if (subforum.Status==-1)
	{

	templateBuilder.Append("					<p>私密版块</p>\r\n");

	}
	else
	{


	if (subforum.Lasttid!=0)
	{

	templateBuilder.Append("							<p>最后: <a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("showtopic.aspx?topicid=");
	templateBuilder.Append(subforum.Lasttid.ToString().Trim());
	templateBuilder.Append("&page=end#lastpost\" title=\"");
	templateBuilder.Append(subforum.Lasttitle.ToString().Trim());
	templateBuilder.Append("\"><span>\r\n");
	templateBuilder.Append(Convert.ToDateTime(subforum.Lastpost).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</span></a> by \r\n");

	if (subforum.Lastposter!="")
	{


	if (subforum.Lastposterid==-1)
	{

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

	}
	else
	{

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

	}	//end if


	}
	else
	{

	templateBuilder.Append("									匿名\r\n");

	}	//end if

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

	}	//end if


	}	//end if

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

	if (subforumindex==forum.Colcount)
	{

	templateBuilder.Append("			</tr>\r\n");
	 subforumindex = 0;
	

	}	//end if


	}	//end loop


	if (subforumindex!=0)
	{

	for (int i = 0; i < forum.Colcount-subforumindex; i++)
	{
		templateBuilder.Append("<td>&nbsp;</td>");
	}

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

	}	//end if

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

	}	//end if




	}	//end if


	if (forum.Layer!=0)
	{

	templateBuilder.Append("<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("	<div class=\"pages\">\r\n");
	templateBuilder.Append("		<em>");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("/");
	templateBuilder.Append(pagecount.ToString());
	templateBuilder.Append("页</em>");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("		<kbd>跳转<input name=\"gopage\" type=\"text\" id=\"gopage\" onKeyDown=\"if(event.keyCode==13) { if(parseInt('");
	templateBuilder.Append(config.Aspxrewrite.ToString().Trim());
	templateBuilder.Append("')==1) {window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum-");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("-' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1) + '");
	templateBuilder.Append(config.Extname.ToString().Trim());
	templateBuilder.Append("';}else{window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1)}}\" size=\"4\" maxlength=\"9\" />页</kbd>\r\n");
	templateBuilder.Append("	</div>\r\n");

	if (userid<0||canposttopic)
	{

	templateBuilder.Append("	<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=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\" onmouseover=\"if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);\"><img alt=\"发新话题\" src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/newtopic.gif\"/></a></span>\r\n");

	}	//end if

	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div id=\"headfilter\">\r\n");
	templateBuilder.Append("	<ul class=\"tabs\">\r\n");
	templateBuilder.Append("	    <li \r\n");

	if (filter=="")
	{

	templateBuilder.Append("class=\"current\"\r\n");

	}	//end if

	templateBuilder.Append(" ><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(ShowForumAspxRewrite(forumid,0).ToString());
	templateBuilder.Append("\">全部</a></li>\r\n");
	templateBuilder.Append("		<li \r\n");

	if (filter=="digest")
	{

	templateBuilder.Append("class=\"current\"\r\n");

	}	//end if

	templateBuilder.Append(" ><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&filter=digest\">精华</a></li>\r\n");
	int specialpost = forum.Allowpostspecial&1;
	

	if (specialpost==1)
	{

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

	if (filter=="poll")
	{

	templateBuilder.Append("class=\"current\"\r\n");

	}	//end if

	templateBuilder.Append(" ><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&filter=poll\">投票</a></li>\r\n");

	}	//end if

	 specialpost = forum.Allowpostspecial&4;
	

	if (specialpost==4)
	{

	templateBuilder.Append("		<li id=\"rewardmenu\" class=\"\r\n");

	if (filter=="reward" || filter=="rewarding")
	{

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

	}
	else
	{


	if (filter=="rewarded")
	{

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

	}	//end if


	}	//end if

	templateBuilder.Append(" dropmenu\" onMouseOver=\"showMenu(this.id);\"><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&filter=reward\">悬赏</a></li>\r\n");

	}	//end if

	 specialpost = forum.Allowpostspecial&16;
	

	if (specialpost==16)
	{

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

	if (filter=="debate")
	{

	templateBuilder.Append("class=\"current\"\r\n");

	}	//end if

	templateBuilder.Append(" ><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&filter=debate\">辩论</a></li>\r\n");

	}	//end if

	templateBuilder.Append("	</ul>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<ul class=\"popupmenu_popup headermenu_popup\" id=\"rewardmenu_menu\" style=\"display: none\">\r\n");
	templateBuilder.Append("	<li><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&filter=rewarding\">进行中的悬赏</a></li>\r\n");
	templateBuilder.Append("	<li><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&filter=rewarded\">已结束的悬赏</a></li>\r\n");
	templateBuilder.Append("</ul>\r\n");
	templateBuilder.Append("<form id=\"moderate\" name=\"moderate\" method=\"post\" action=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("topicadmin.aspx?action=moderate&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("<div class=\"mainbox threadlist\">\r\n");
	templateBuilder.Append("	<div id=\"custominfoarea\" class=\"custominfoarea\">\r\n");
	templateBuilder.Append("		<div class=\"sitenote\" id=\"infoicon_menu\" style=\"opacity: 1;\">\r\n");
	templateBuilder.Append("			<div class=\"cornerlayer\">键盘左右键可以进行前后翻页操作</div>\r\n");
	templateBuilder.Append("			<div class=\"minicorner\"></div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<a id=\"infoicon\" onblur=\"$('infoicon_menu').style.display = 'none'\" onclick=\"display('infoicon_menu')\" href=\"javascript:;\">\r\n");
	templateBuilder.Append("		<img alt=\"帮助\" src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/info.gif\" /></a>\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\">setBubble('infoicon', 'quickjumppage')</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<span class=\"headactions\">\r\n");

	if (forum.Applytopictype==1 && forum.Viewbytopictype==1)
	{

	templateBuilder.Append("		");
	templateBuilder.Append(topictypeselectlink.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("	</span>\r\n");
	templateBuilder.Append("	<h1>\r\n");
	 aspxrewriteurl = this.ShowForumAspxRewrite(forum.Fid,0);
	
	templateBuilder.Append("		");
	templateBuilder.Append(forum.Name.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("		<!--<em>(主题:");
	templateBuilder.Append(topiccount.ToString());
	templateBuilder.Append("篇 帖子:");
	templateBuilder.Append(forum.Posts.ToString().Trim());
	templateBuilder.Append("个 今日帖子:");
	templateBuilder.Append(forum.Todayposts.ToString().Trim());
	templateBuilder.Append("个)</em>-->\r\n");
	templateBuilder.Append("	</h1>\r\n");
	templateBuilder.Append("	<table summary=\"");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\" id=\"");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("		<thead class=\"category\">\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td class=\"folder\">&nbsp;</td>\r\n");
	templateBuilder.Append("				<td class=\"icon\">&nbsp;</td>\r\n");
	templateBuilder.Append("				<th>标题</th>\r\n");
	templateBuilder.Append("				<td class=\"author\">作者</td>\r\n");
	templateBuilder.Append("				<td class=\"nums\">回复/查看</td>\r\n");
	templateBuilder.Append("				<td class=\"lastpost\">最后发表</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</thead>\r\n");
	templateBuilder.Append("		<!--announcement 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>\r\n");
	templateBuilder.Append("			<td><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/announcement.gif\" alt=\"announcement\" /></td>\r\n");
	templateBuilder.Append("			<td>&nbsp;</td>\r\n");
	templateBuilder.Append("			<th>\r\n");
	templateBuilder.Append("				<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("announcement.aspx#" + announcement["id"].ToString().Trim() + "\">" + announcement["title"].ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("			</th>\r\n");
	templateBuilder.Append("			<td>\r\n");
	templateBuilder.Append("				<cite>\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=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">" + announcement["poster"].ToString().Trim() + "</a>\r\n");

	}	//end if

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

	}	//end loop

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

	int toptopic__loop__id=0;
	foreach(ShowforumPageTopicInfo toptopic in toptopiclist)
	{
		toptopic__loop__id++;

	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td class=\"folder\">\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(toptopic.Tid,0);
	
	templateBuilder.Append("					<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\"><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/t_top");
	templateBuilder.Append(toptopic.Displayorder.ToString().Trim());
	templateBuilder.Append(".gif\"/></a>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<td class=\"icon\">\r\n");

	if (toptopic.Special==0)
	{


	if (toptopic.Iconid!=0)
	{

	templateBuilder.Append("								<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("images/posticons/");
	templateBuilder.Append(toptopic.Iconid.ToString().Trim());
	templateBuilder.Append(".gif\" alt=\"listicon\" />\r\n");

	}
	else
	{

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

	}	//end if


	}	//end if

//特殊贴图标

	if (toptopic.Special==1)
	{

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

	}	//end if


	if (toptopic.Special==2)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/bonus.gif\" alt=\"悬赏\"/>\r\n");

	}	//end if


	if (toptopic.Special==3)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/rewardsmallend.gif\" alt=\"悬赏已结束\"/>\r\n");

	}	//end if


	if (toptopic.Special==4)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/debatesmall.gif\" alt=\"辩论\"/>\r\n");

	}	//end if

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

	if (toptopic.Digest>0)
	{

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

	}	//end if


	if (toptopic.Attachment>0)
	{

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

	}	//end if


	if (toptopic.Rate>0)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/agree.gif\" alt=\"正分\"/>\r\n");

	}	//end if


	if (toptopic.Rate<0)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/disagree.gif\" alt=\"负分\"/>\r\n");

	}	//end if

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

	if (useradminid>0 && ismoder)
	{


	if (toptopic.Fid==forum.Fid && toptopic.Closed<=1)
	{

	templateBuilder.Append("						<input type=\"checkbox\" name=\"topicid\" value=\"");
	templateBuilder.Append(toptopic.Tid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");

	}
	else
	{

	templateBuilder.Append("						<input type=\"checkbox\" disabled />\r\n");

	}	//end if


	}	//end if


	if (toptopic.Replies>0)
	{

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

	}
	else
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/no-sublist.gif\" id=\"imgButton_");
	templateBuilder.Append(toptopic.Tid.ToString().Trim());
	templateBuilder.Append("\" alt=\"闭合帖子列表\"/>\r\n");

	}	//end if


	if (forum.Applytopictype==1 && forum.Topictypeprefix==1)
	{

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

	if (forum.Viewbytopictype==1 && toptopic.Topictypename!="")
	{

	templateBuilder.Append("							[<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(toptopic.Fid.ToString().Trim());
	templateBuilder.Append("&typeid=");
	templateBuilder.Append(toptopic.Typeid.ToString().Trim());
	templateBuilder.Append("\" >");
	templateBuilder.Append(toptopic.Topictypename.ToString().Trim());
	templateBuilder.Append("</a>]\r\n");

	}
	else if (toptopic.Topictypename!="")
	{

	templateBuilder.Append("							[");
	templateBuilder.Append(toptopic.Topictypename.ToString().Trim());
	templateBuilder.Append("]\r\n");

	}	//end if

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

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(toptopic.Tid,0);
	

	if (toptopic.Special==3)
	{

	 aspxrewriteurl = this.ShowBonusAspxRewrite(toptopic.Tid,0);
	

	}	//end if


	if (toptopic.Special==4)
	{

	 aspxrewriteurl = this.ShowDebateAspxRewrite(toptopic.Tid);
	

	}	//end if

	int ishtmltitle = Topics.GetMagicValue(toptopic.Magic, MagicType.HtmlTitle);
	

	if (ishtmltitle==1)
	{

	templateBuilder.Append("						<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(Topics.GetHtmlTitle(toptopic.Tid).ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}
	else
	{

	templateBuilder.Append("						<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(toptopic.Title.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}	//end if


	if (toptopic.Special==2)
	{

	templateBuilder.Append("						- [悬赏 ");
	templateBuilder.Append(bonusextcreditsinfo.Name.ToString().Trim());
	templateBuilder.Append(" <span class=\"bold\">");
	templateBuilder.Append(toptopic.Price.ToString().Trim());
	templateBuilder.Append("</span> ");
	templateBuilder.Append(bonusextcreditsinfo.Unit.ToString().Trim());
	templateBuilder.Append("] \r\n");

	}
	else if (toptopic.Special==3)
	{

	templateBuilder.Append("						- [悬赏已结束]\r\n");

	}
	else if (toptopic.Special==0)
	{


	if (toptopic.Price>0)
	{

	templateBuilder.Append("							- [售价 ");
	templateBuilder.Append(topicextcreditsinfo.Name.ToString().Trim());
	templateBuilder.Append(" <span class=\"bold\">");
	templateBuilder.Append(toptopic.Price.ToString().Trim());
	templateBuilder.Append("</span> ");
	templateBuilder.Append(topicextcreditsinfo.Unit.ToString().Trim());
	templateBuilder.Append("] \r\n");

	}	//end if


	}	//end if


	if (toptopic.Readperm>0)
	{

	templateBuilder.Append("						- [阅读权限 <span class=\"bold\">");
	templateBuilder.Append(toptopic.Readperm.ToString().Trim());
	templateBuilder.Append("</span>] \r\n");

	}	//end if


	if (toptopic.Replies/ppp>0)
	{

	templateBuilder.Append("							<span class=\"threadpages\"><script type=\"text/javascript\">getpagenumbers(\"");
	templateBuilder.Append(config.Extname.ToString().Trim());
	templateBuilder.Append("\",");
	templateBuilder.Append(toptopic.Replies.ToString().Trim());
	templateBuilder.Append(",");
	templateBuilder.Append(ppp.ToString());
	templateBuilder.Append(",0,\"\",");
	templateBuilder.Append(toptopic.Tid.ToString().Trim());
	templateBuilder.Append(",1, \"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("\");</");
	templateBuilder.Append("script></span>				\r\n");

	}	//end if

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

	if (toptopic.Posterid==-1)
	{

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

	}
	else
	{

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

	}	//end if

	templateBuilder.Append("</cite>\r\n");
	templateBuilder.Append("					<em>\r\n");
	templateBuilder.Append(Convert.ToDateTime(toptopic.Postdatetime).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</em>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<td class=\"nums\"><strong>");
	templateBuilder.Append(toptopic.Replies.ToString().Trim());
	templateBuilder.Append("</strong> / <em>");
	templateBuilder.Append(toptopic.Views.ToString().Trim());
	templateBuilder.Append("</em></td>\r\n");
	templateBuilder.Append("				<td class=\"lastpost\">\r\n");
	templateBuilder.Append("					<em><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showtopic.aspx?topicid=");
	templateBuilder.Append(toptopic.Tid.ToString().Trim());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("&page=end#lastpost\">\r\n");
	templateBuilder.Append(Convert.ToDateTime(toptopic.Lastpost).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</a></em>\r\n");
	templateBuilder.Append("					<cite>by\r\n");

	if (toptopic.Lastposterid==-1)
	{

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

	}
	else
	{

	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(UserInfoAspxRewrite(toptopic.Lastposterid).ToString().Trim());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(toptopic.Lastposter.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}	//end if

	templateBuilder.Append("					</cite>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("			<tr><td colspan=\"7\" id=\"divTopic");
	templateBuilder.Append(toptopic.Tid.ToString().Trim());
	templateBuilder.Append("\" style=\"border:0; padding:0;\"></td></tr>\r\n");
	templateBuilder.Append("		</tbody>\r\n");

	}	//end loop

	templateBuilder.Append("	</table>\r\n");
	templateBuilder.Append("	<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n");

	if (showsplitter)
	{

	templateBuilder.Append("		<thead class=\"separation\">\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td>&nbsp;</td>\r\n");
	templateBuilder.Append("				<td>&nbsp;</td>\r\n");
	templateBuilder.Append("				<td colspan=\"4\">版块主题</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</thead>\r\n");

	}	//end if


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

	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td class=\"folder\">\r\n");

	if (topic.Folder!="")
	{

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	
	templateBuilder.Append("					<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\" target=\"_blank\"><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/folder_");
	templateBuilder.Append(topic.Folder.ToString().Trim());
	templateBuilder.Append(".gif\" alt=\"topicicon\" /></a>\r\n");

	}	//end if

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

	if (topic.Special==0)
	{


	if (topic.Iconid!=0)
	{

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

	}
	else
	{

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

	}	//end if


	}	//end if

/*特殊贴图标*/

	if (topic.Special==1)
	{

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

	}	//end if


	if (topic.Special==2)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/bonus.gif\" alt=\"悬赏\"/>\r\n");

	}	//end if


	if (topic.Special==3)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/rewardsmallend.gif\" alt=\"悬赏已结束\"/>\r\n");

	}	//end if


	if (topic.Special==4)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/debatesmall.gif\" alt=\"辩论\"/>\r\n");

	}	//end if

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

	if (topic.Digest>0)
	{

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

	}	//end if


	if (topic.Attachment>0)
	{

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

	}	//end if


	if (topic.Rate>0)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/agree.gif\" alt=\"正分\"/>\r\n");

	}	//end if


	if (topic.Rate<0)
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/disagree.gif\" alt=\"负分\"/>\r\n");

	}	//end if

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

	if (useradminid>0 && ismoder)
	{


	if (topic.Closed<=1)
	{

	templateBuilder.Append("						<input type=\"checkbox\" name=\"topicid\" value=\"");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");

	}
	else
	{

	templateBuilder.Append("						<input type=\"checkbox\" disabled />\r\n");

	}	//end if


	}	//end if


	if (topic.Replies>0)
	{

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

	}
	else
	{

	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/no-sublist.gif\" id=\"imgButton_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" alt=\"闭合帖子列表\" />\r\n");

	}	//end if


	if (pageid==1 && forum.Allowthumbnail==1)
	{


	if (topic.Attachment==2)
	{

	templateBuilder.Append("							<span id=\"t_thumbnail_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" onmouseover=\"showMenu(this.id, 0, 0, 1, 0)\">\r\n");

	if (forum.Applytopictype==1 && forum.Topictypeprefix==1)
	{

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

	if (forum.Viewbytopictype==1 && topic.Topictypename!="")
	{

	templateBuilder.Append("								[<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&typeid=");
	templateBuilder.Append(topic.Typeid.ToString().Trim());
	templateBuilder.Append("\" >");
	templateBuilder.Append(topic.Topictypename.ToString().Trim());
	templateBuilder.Append("</a>]\r\n");

	}
	else if (topic.Topictypename!="")
	{

	templateBuilder.Append("								[");
	templateBuilder.Append(topic.Topictypename.ToString().Trim());
	templateBuilder.Append("]\r\n");

	}	//end if

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

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	

	if (topic.Special==3)
	{

	 aspxrewriteurl = this.ShowBonusAspxRewrite(topic.Tid,0);
	

	}	//end if


	if (topic.Special==4)
	{

	 aspxrewriteurl = this.ShowDebateAspxRewrite(topic.Tid);
	

	}	//end if

	int ishtmltitle = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle);
	

	if (ishtmltitle==1)
	{

	templateBuilder.Append("								<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\">");
	templateBuilder.Append(Topics.GetHtmlTitle(topic.Tid).ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}
	else
	{

	templateBuilder.Append("								<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\">");
	templateBuilder.Append(topic.Title.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}	//end if


	if (topic.Folder=="new")
	{

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

	}	//end if

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

	}
	else
	{


	if (forum.Applytopictype==1 && forum.Topictypeprefix==1)
	{

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

	if (forum.Viewbytopictype==1 && topic.Topictypename!="")
	{

	templateBuilder.Append("								[<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&typeid=");
	templateBuilder.Append(topic.Typeid.ToString().Trim());
	templateBuilder.Append("\" >");
	templateBuilder.Append(topic.Topictypename.ToString().Trim());
	templateBuilder.Append("</a>]\r\n");

	}
	else if (topic.Topictypename!="")
	{

	templateBuilder.Append("								[");
	templateBuilder.Append(topic.Topictypename.ToString().Trim());
	templateBuilder.Append("]\r\n");

	}	//end if

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

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	

	if (topic.Special==3)
	{

	 aspxrewriteurl = this.ShowBonusAspxRewrite(topic.Tid,0);
	

	}	//end if


	if (topic.Special==4)
	{

	 aspxrewriteurl = this.ShowDebateAspxRewrite(topic.Tid);
	

	}	//end if

	int ishtmltitle = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle);
	

	if (ishtmltitle==1)
	{

	templateBuilder.Append("								<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\">");
	templateBuilder.Append(Topics.GetHtmlTitle(topic.Tid).ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}
	else
	{

	templateBuilder.Append("								<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\">");
	templateBuilder.Append(topic.Title.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}	//end if


	if (topic.Folder=="new")
	{

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

	}	//end if


	}	//end if


	}
	else
	{


	if (forum.Applytopictype==1 && forum.Topictypeprefix==1)
	{

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

	if (forum.Viewbytopictype==1 && topic.Topictypename!="")
	{

	templateBuilder.Append("								[<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&typeid=");
	templateBuilder.Append(topic.Typeid.ToString().Trim());
	templateBuilder.Append("\" >");
	templateBuilder.Append(topic.Topictypename.ToString().Trim());
	templateBuilder.Append("</a>]\r\n");

	}
	else if (topic.Topictypename!="")
	{

	templateBuilder.Append("								[");
	templateBuilder.Append(topic.Topictypename.ToString().Trim());
	templateBuilder.Append("]\r\n");

	}	//end if

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

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	

	if (topic.Special==3)
	{

	 aspxrewriteurl = this.ShowBonusAspxRewrite(topic.Tid,0);
	

	}	//end if


	if (topic.Special==4)
	{

	 aspxrewriteurl = this.ShowDebateAspxRewrite(topic.Tid);
	

	}	//end if

	int ishtmltitle = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle);
	

	if (ishtmltitle==1)
	{

	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\">");
	templateBuilder.Append(Topics.GetHtmlTitle(topic.Tid).ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}
	else
	{

	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("\">");
	templateBuilder.Append(topic.Title.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}	//end if


	if (topic.Folder=="new")
	{

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

	}	//end if


	}	//end if


	if (topic.Special==2)
	{

	templateBuilder.Append("						- [悬赏 ");
	templateBuilder.Append(bonusextcreditsinfo.Name.ToString().Trim());
	templateBuilder.Append(" <span class=\"bold\">");
	templateBuilder.Append(topic.Price.ToString().Trim());
	templateBuilder.Append("</span> ");
	templateBuilder.Append(bonusextcreditsinfo.Unit.ToString().Trim());
	templateBuilder.Append("] \r\n");

	}
	else if (topic.Special==3)
	{

	templateBuilder.Append("						- [悬赏已结束]\r\n");

	}
	else if (topic.Special==0)
	{


	if (topic.Price>0)
	{

	templateBuilder.Append("							- [售价 ");
	templateBuilder.Append(topicextcreditsinfo.Name.ToString().Trim());
	templateBuilder.Append(" <span class=\"bold\">");
	templateBuilder.Append(topic.Price.ToString().Trim());
	templateBuilder.Append("</span> ");
	templateBuilder.Append(topicextcreditsinfo.Unit.ToString().Trim());
	templateBuilder.Append("] \r\n");

	}	//end if


	}	//end if


	if (topic.Readperm>0)
	{

	templateBuilder.Append("						- [阅读权限 <span class=\"bold\">");
	templateBuilder.Append(topic.Readperm.ToString().Trim());
	templateBuilder.Append("</span>] \r\n");

	}	//end if


	if (topic.Replies/ppp>0)
	{

	templateBuilder.Append("						<span class=\"threadpages\"><script type=\"text/javascript\">getpagenumbers(\"");
	templateBuilder.Append(config.Extname.ToString().Trim());
	templateBuilder.Append("\", ");
	templateBuilder.Append(topic.Replies.ToString().Trim());
	templateBuilder.Append(",");
	templateBuilder.Append(ppp.ToString());
	templateBuilder.Append(",0,\"\",");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(",1, \"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("\");</");
	templateBuilder.Append("script></span>\r\n");

	}	//end if

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

	if (topic.Posterid==-1)
	{

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

	}
	else
	{

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

	}	//end if

	templateBuilder.Append("					</cite>\r\n");
	templateBuilder.Append("					<em>\r\n");
	templateBuilder.Append(Convert.ToDateTime(topic.Postdatetime).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</em>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<td class=\"nums\"><strong>");
	templateBuilder.Append(topic.Replies.ToString().Trim());
	templateBuilder.Append("</strong> / <em>");
	templateBuilder.Append(topic.Views.ToString().Trim());
	templateBuilder.Append("</em></td>\r\n");
	templateBuilder.Append("				<td class=\"lastpost\">							\r\n");
	templateBuilder.Append("							<em><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showtopic.aspx?topicid=");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\r\n");

	if (config.Aspxrewrite!=1)
	{

	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\r\n");

	}	//end if

	templateBuilder.Append("&page=end#lastpost\">\r\n");
	templateBuilder.Append(Convert.ToDateTime(topic.Lastpost).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</a></em>\r\n");
	templateBuilder.Append("							<cite>by\r\n");

	if (topic.Lastposterid==-1)
	{

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

	}
	else
	{

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

	}	//end if

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

	if (pageid<3 && forum.Allowthumbnail==1)
	{


	if (topic.Attachment==2)
	{

	string timg = Attachments.GetThumbnailByTid(topic.Tid,160,ThumbnailType.Thumbnail);
	

	if (timg!="")
	{

	templateBuilder.Append("						<div id=\"t_thumbnail_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("_menu\" style=\"display: none;\" class=\"popupmenu_popup\"><img src=\"");
	templateBuilder.Append(timg.ToString());
	templateBuilder.Append("\" /></div>\r\n");

	}	//end if


	}	//end if


	}	//end if

	templateBuilder.Append("			<tr><td colspan=\"6\" id=\"divTopic");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" style=\" border:0;padding:0;\"></td></tr>\r\n");
	templateBuilder.Append("		</tbody>\r\n");

	}	//end loop

	templateBuilder.Append("		<!--NtForumList end-->\r\n");
	templateBuilder.Append("	</table>\r\n");

	if (useradminid>0 && ismoder)
	{

	templateBuilder.Append("	<div class=\"footoperation\"><strong>批量管理选项</strong> &nbsp;\r\n");
	templateBuilder.Append("		<input class=\"radio\" name=\"operat\" type=\"hidden\" />\r\n");
	templateBuilder.Append("		<input class=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'topicid')\" type=\"checkbox\" />全选\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'delete';document.moderate.submit()\"/>删除主题</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'move';document.moderate.submit()\" />移动主题</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'highlight';document.moderate.submit()\" />高亮显示</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'type';document.moderate.submit()\" />主题分类</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'identify';document.moderate.submit()\" />鉴定主题</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'close';document.moderate.submit()\" />关闭/打开主题</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'displayorder';document.moderate.submit()\" />置顶/解除置顶</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'digest';document.moderate.submit()\" />加入/解除精华</button>\r\n");
	templateBuilder.Append("		<button onclick=\"document.moderate.operat.value = 'bump';document.moderate.submit()\" />提升/下沉主题</button>\r\n");
	templateBuilder.Append("	</div>\r\n");

	}	//end if

	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("</form>\r\n");
	templateBuilder.Append("<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("	<div class=\"pages\">\r\n");
	templateBuilder.Append("		<em>");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("/");
	templateBuilder.Append(pagecount.ToString());
	templateBuilder.Append("页</em>");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("		<kbd>跳转<input name=\"gopage\" type=\"text\" id=\"gopage\" onKeyDown=\"if(event.keyCode==13) { if(parseInt('");
	templateBuilder.Append(config.Aspxrewrite.ToString().Trim());
	templateBuilder.Append("')==1) {window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum-");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("-' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1) + '");
	templateBuilder.Append(config.Extname.ToString().Trim());
	templateBuilder.Append("';}else{window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1)}}\" size=\"4\" maxlength=\"9\" />页</kbd>\r\n");
	templateBuilder.Append("	</div>\r\n");

	if (userid<0||canposttopic)
	{

	templateBuilder.Append("	<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=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\" onmouseover=\"if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);\"><img alt=\"发新话题\" src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/newtopic.gif\"/></a></span>\r\n");

	}	//end if

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

	if (canquickpost)
	{



	if (quickeditorad!="")
	{

	templateBuilder.Append("<div class=\"leaderboard\">");
	templateBuilder.Append(quickeditorad.ToString());
	templateBuilder.Append("</div>\r\n");

	}	//end if

	templateBuilder.Append("<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("javascript/post.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<form method=\"post\" name=\"postform\" id=\"postform\" action=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\"\r\n");
	templateBuilder.Append("	enctype=\"multipart/form-data\" onsubmit=\"return validate(this);\">\r\n");
	templateBuilder.Append("<div id=\"quickpost\" class=\"box\"> \r\n");
	templateBuilder.Append("	<h4>快速发新话题</h4>\r\n");
	templateBuilder.Append("	<div class=\"postoptions\">\r\n");
	templateBuilder.Append("		<h5>选项</h5>\r\n");
	templateBuilder.Append("		<p><label><input type=\"checkbox\" value=\"1\" name=\"htmlon\" id=\"htmlon\" \r\n");

	if (usergroupinfo.Allowhtml!=1)
	{

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

	}	//end if

	templateBuilder.Append("/>使用HTML标签</label></p>\r\n");
	templateBuilder.Append("		<p><label><input type=\"checkbox\" value=\"1\" name=\"parseurloff\" id=\"parseurloff\" \r\n");

	if (parseurloff==1)
	{

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

	}	//end if

	templateBuilder.Append(" />禁用</label>网址识别</label></p>\r\n");
	templateBuilder.Append("		<p><label><input type=\"checkbox\" value=\"1\" name=\"smileyoff\" id=\"smileyoff\" \r\n");

	if (smileyoff==1)
	{

	templateBuilder.Append(" checked disabled \r\n");

	}	//end if

	templateBuilder.Append(" />禁用</label>表情</p>\r\n");
	templateBuilder.Append("		<p><label><input type=\"checkbox\" value=\"1\" name=\"bbcodeoff\" id=\"bbcodeoff\" \r\n");

	if (bbcodeoff==1)
	{

	templateBuilder.Append(" checked disabled \r\n");

	}	//end if

	templateBuilder.Append(" />禁用</label>论坛代码</p>\r\n");
	templateBuilder.Append("		<p><label><input type=\"checkbox\" value=\"1\" name=\"usesig\" id=\"usesig\"\r\n");

	if (usesig==1)
	{

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

	}	//end if

	templateBuilder.Append("/>使用个人签名</label></p>	\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"postform\">\r\n");
	templateBuilder.Append("		<h5>\r\n");
	templateBuilder.Append("		<label for=\"subject\">标题</label>\r\n");

	if (forum.Applytopictype==1 && topictypeselectoptions!="")
	{

	templateBuilder.Append("			<select name=\"typeid\" id=\"typeid\">\r\n");
	templateBuilder.Append("			");
	templateBuilder.Append(topictypeselectoptions.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("			</select>\r\n");

	}	//end if

	templateBuilder.Append("			<input type=\"text\" id=\"title\" name=\"title\" size=\"84\" tabindex=\"1\" value=\"\"/>\r\n");
	templateBuilder.Append("		</h5>\r\n");
	templateBuilder.Append("		<p><label>内容</label>\r\n");
	templateBuilder.Append("		<textarea rows=\"5\" cols=\"80\" name=\"message\" id=\"message\" onKeyDown=\"ctlent(event);\" tabindex=\"2\" class=\"autosave\"  style=\"background:url(");
	templateBuilder.Append(quickbgadimg.ToString());
	templateBuilder.Append(") no-repeat 0 0; \" \r\n");

	if (quickbgadlink!="")
	{

	templateBuilder.Append(" onfocus=\"$('adlinkbtn').style.display='';$('closebtn').style.display='';this.onfocus=null;\"\r\n");

	}	//end if

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

	if (isseccode)
	{

	templateBuilder.Append("<p class=\"formcode\">验证码:\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=");
	templateBuilder.Append(Processtime.ToString());
	templateBuilder.Append("\" class=\"cursor\" id=\"vcodeimg\" onclick=\"this.src='tools/VerifyImagePage.aspx?id=");
	templateBuilder.Append(olid.ToString());
	templateBuilder.Append("&time=' + Math.random();\" />\r\n");
	templateBuilder.Append("<!--<input name=\"reloadvcade\" type=\"button\" class=\"colorblue\" id=\"reloadvcade\" value=\"刷新验证码\" tabindex=\"-1\"  style=\"color:#99cc00; width:75px;\" />-->\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	if (typeof vcodeimgid == 'undefined'){\r\n");
	templateBuilder.Append("		var vcodeimgid = 1;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	var actualid = $('vcodeimg').id + vcodeimgid++;\r\n");
	templateBuilder.Append("	$('vcodeimg').id = actualid;\r\n");
	templateBuilder.Append("	var actualobject = $(actualid);\r\n");
	templateBuilder.Append("	actualobject.src='tools/VerifyImagePage.aspx?bgcolor=F5FAFE&time=' + Math.random();\r\n");
	templateBuilder.Append("	var btn = document.createElement(\"INPUT\");\r\n");
	templateBuilder.Append("	btn.type = \"button\";\r\n");
	templateBuilder.Append("	btn.className = \"colorblue\";\r\n");
	templateBuilder.Append("	btn.value=\"刷新验证码\";\r\n");
	templateBuilder.Append("	btn.style.color = \"#99cc00\";\r\n");
	templateBuilder.Append("	btn.style.width = \"75px\";\r\n");
	templateBuilder.Append("	btn.onclick =  function() {\r\n");
	templateBuilder.Append("		actualobject.src = 'tools/VerifyImagePage.aspx?time=' + Math.random();\r\n");
	templateBuilder.Append("	};\r\n");
	templateBuilder.Append("	actualobject.parentNode.appendChild(btn);\r\n");
	templateBuilder.Append("	function changevcode(form, value){\r\n");
	templateBuilder.Append("		if (!$('vcode')){\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("		}else{\r\n");
	templateBuilder.Append("			$('vcode').value = value;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</");
	templateBuilder.Append("script>\r\n");


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

	}	//end if

	templateBuilder.Append("		<p class=\"btns\">\r\n");
	templateBuilder.Append("			<a href=\"###\" id=\"closebtn\" style=\"display:none;\" onclick=\"$('message').style.background='';this.style.display='none';$('adlinkbtn').style.display='none';\">关闭广告</a>\r\n");
	templateBuilder.Append("			<a href=\"");
	templateBuilder.Append(quickbgadlink.ToString());
	templateBuilder.Append("\" id=\"adlinkbtn\" style=\"display:none;\" target=\"_blank\" onclick=\"\">进入广告</a>\r\n");
	templateBuilder.Append("			<button type=\"submit\" id=\"postsubmit\" name=\"topicsubmit\" value=\"发表帖子\" tabindex=\"3\">发表帖子</button>[可按Ctrl+Enter发布]&nbsp;\r\n");
	templateBuilder.Append("			<input name=\"restoredata\" id=\"restoredata\" value=\"恢复数据\" tabindex=\"5\" title=\"恢复上次自动保存的数据\" onclick=\"loadData();\" type=\"button\" />&nbsp;<input name=\"topicsreset\" value=\"清空内容\" tabindex=\"6\" type=\"reset\" />\r\n");
	templateBuilder.Append("			<input type=\"hidden\" id=\"postbytopictype\" name=\"postbytopictype\" value=\"");
	templateBuilder.Append(forum.Postbytopictype.ToString().Trim());
	templateBuilder.Append("\" tabindex=\"3\" />\r\n");
	templateBuilder.Append("		</p>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"smilies\">\r\n");
	templateBuilder.Append("			<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			var textobj = $('message');\r\n");
	templateBuilder.Append("			var lang = new Array();\r\n");
	templateBuilder.Append("			if (is_ie >= 5 || is_moz >= 2) {\r\n");
	templateBuilder.Append("				window.onbeforeunload = function () {\r\n");
	templateBuilder.Append("					saveData(textobj.value);\r\n");
	templateBuilder.Append("				};\r\n");
	templateBuilder.Append("				lang['post_autosave_none'] = \"没有可以恢复的数据\";\r\n");
	templateBuilder.Append("				lang['post_autosave_confirm'] = \"本操作将覆盖当前帖子内容，确定要恢复数据吗？\";\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			else {\r\n");
	templateBuilder.Append("				$('restoredata').style.display = 'none';\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			var bbinsert = parseInt('1');\r\n");
	templateBuilder.Append("			var smileyinsert = parseInt('1');\r\n");
	templateBuilder.Append("			var editor_id = 'posteditor';\r\n");
	templateBuilder.Append("			var smiliesCount = 9;\r\n");
	templateBuilder.Append("			var colCount = 3;\r\n");
	templateBuilder.Append("			var showsmiliestitle = 0;\r\n");
	templateBuilder.Append("			var smiliesIsCreate = 0;\r\n");
	templateBuilder.Append("			var scrMaxLeft; //表情滚动条宽度\r\n");
	templateBuilder.Append("			var smilies_HASH = {};\r\n");
	templateBuilder.Append("			</");
	templateBuilder.Append("script>\r\n");
	string defaulttypname = string.Empty;
	
	templateBuilder.Append("			<div class=\"navcontrol\">\r\n");
	templateBuilder.Append("			<div class=\"smiliepanel\">\r\n");
	templateBuilder.Append("					<div id=\"scrollbar\" class=\"scrollbar\">\r\n");
	templateBuilder.Append("							<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n");
	templateBuilder.Append("								<tr>\r\n");

	int stype__loop__id=0;
	foreach(DataRow stype in smilietypes.Rows)
	{
		stype__loop__id++;


	if (stype__loop__id==1)
	{

	 defaulttypname = stype["code"].ToString().Trim();
	

	}	//end if

	templateBuilder.Append("									<td id=\"t_s_" + stype__loop__id.ToString() + "\"><div id=\"s_" + stype__loop__id.ToString() + "\" onclick=\"showsmiles(" + stype__loop__id.ToString() + ", '" + stype["code"].ToString().Trim() + "');\" \r\n");

	if (stype__loop__id!=1)
	{

	templateBuilder.Append("style=\"display:none;\"\r\n");

	}
	else
	{

	templateBuilder.Append("class=\"lian\"\r\n");

	}	//end if

	templateBuilder.Append(">" + stype["code"].ToString().Trim() + "</div></td>\r\n");

	}	//end loop

	templateBuilder.Append("								</tr>\r\n");
	templateBuilder.Append("							</table>\r\n");
	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("					<div id=\"scrlcontrol\">\r\n");
	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("editor/images/smilie_prev_default.gif\" alt=\"向前\" onmouseover=\"if($('scrollbar').scrollLeft>0)this.src=this.src.replace(/_default|_selected/, '_hover');\" onmouseout=\"this.src=this.src.replace(/_hover|_selected/, '_default');\" onmousedown=\"if($('scrollbar').scrollLeft>0){this.src=this.src.replace(/_hover|_default/, '_selected');this.boder=1;}\" onmouseup=\"if($('scrollbar').scrollLeft>0)this.src=this.src.replace(/_selected/, '_hover');else{this.src=this.src.replace(/_selected|_hover/, '_default');}this.border=0;\" onclick=\"scrollSmilieTypeBar($('scrollbar'), 0-$('t_s_1').clientWidth);\"/>&nbsp;\r\n");
	templateBuilder.Append("						<img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("editor/images/smilie_next_default.gif\" alt=\"向后\" onmouseover=\"if($('scrollbar').scrollLeft<scrMaxLeft)this.src=this.src.replace(/_default|_selected/, '_hover');\" onmouseout=\"this.src=this.src.replace(/_hover|_selected/, '_default');\" onmousedown=\"if($('scrollbar').scrollLeft<scrMaxLeft){this.src=this.src.replace(/_hover|_default/, '_selected');this.boder=1;}\" onmouseup=\"if($('scrollbar').scrollLeft<scrMaxLeft)this.src=this.src.replace(/_selected/, '_hover');else{this.src=this.src.replace(/_selected|_hover/, '_default');}this.border=0;\" onclick=\"scrollSmilieTypeBar($('scrollbar'), $('t_s_1').clientWidth);\" />\r\n");
	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<div id=\"showsmilie\"\r\n");

	if (config.Smileyinsert==0)
	{

	templateBuilder.Append(" style=\"display: none;\"\r\n");

	}	//end if

	templateBuilder.Append("><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("images/common/loading_wide.gif\" width=\"90%\" alt=\"表情加载\"/><p>正在加载表情...</p></div>\r\n");
	templateBuilder.Append("			<div id=\"showsmilie_pagenum\">&nbsp;</div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			var firstpagesmilies_json ={ ");
	templateBuilder.Append(firstpagesmilies.ToString());
	templateBuilder.Append(" };\r\n");
	templateBuilder.Append("			showFirstPageSmilies(firstpagesmilies_json, '");
	templateBuilder.Append(defaulttypname.ToString());
	templateBuilder.Append("', 12);\r\n");
	templateBuilder.Append("			function getSmilies(func){\r\n");
	templateBuilder.Append("				var c=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("tools/ajax.aspx?t=smilies\";\r\n");
	templateBuilder.Append("				_sendRequest(c,function(d){var e={};try{e=eval(\"(\"+d+\")\")}catch(f){e={}}var h=e?e:null;func(h);e=null;func=null},false,true)\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			getSmilies(function(obj){ \r\n");
	templateBuilder.Append("			smilies_HASH = obj; \r\n");
	templateBuilder.Append("			showsmiles(1, '");
	templateBuilder.Append(defaulttypname.ToString());
	templateBuilder.Append("');\r\n");
	templateBuilder.Append("			});\r\n");
	templateBuilder.Append("			window.onload = function() {\r\n");
	templateBuilder.Append("				$('scrollbar').scrollLeft = 10000;\r\n");
	templateBuilder.Append("				scrMaxLeft = $('scrollbar').scrollLeft;\r\n");
	templateBuilder.Append("				$('scrollbar').scrollLeft = 1;	\r\n");
	templateBuilder.Append("				if ($('scrollbar').scrollLeft > 0)\r\n");
	templateBuilder.Append("				{\r\n");
	templateBuilder.Append("					$('scrlcontrol').style.display = '';\r\n");
	templateBuilder.Append("					$('scrollbar').scrollLeft = 0;	\r\n");
	templateBuilder.Append("				}\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("		</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("</form>\r\n");



	}	//end if


	if (userid<0||canposttopic)
	{

	templateBuilder.Append("	<ul class=\"popupmenu_popup newspecialmenu\" id=\"newspecial_menu\" style=\"display: none\">\r\n");

	if (forum.Allowspecialonly<=0)
	{

	templateBuilder.Append("	<li><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\">发新主题</a></li>\r\n");

	}	//end if

	 specialpost = forum.Allowpostspecial&1;
	

	if (specialpost==1 && usergroupinfo.Allowpostpoll==1)
	{

	templateBuilder.Append("	<li class=\"poll\"><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("&type=poll&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\">发布投票</a></li>\r\n");

	}	//end if

	 specialpost = forum.Allowpostspecial&4;
	

	if (specialpost==4 && usergroupinfo.Allowbonus==1)
	{

	templateBuilder.Append("		<li class=\"reward\"><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("&type=bonus&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\">发布悬赏</a></li>\r\n");

	}	//end if

	 specialpost = forum.Allowpostspecial&16;
	

	if (specialpost==16 && usergroupinfo.Allowdebate==1)
	{

	templateBuilder.Append("		<li class=\"debate\"><a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("posttopic.aspx?forumid=");
	templateBuilder.Append(forum.Fid.ToString().Trim());
	templateBuilder.Append("&type=debate&forumpage=");
	templateBuilder.Append(pageid.ToString());
	templateBuilder.Append("\">发起辩论</a></li>\r\n");

	}	//end if

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

	}	//end if

	templateBuilder.Append("<div id=\"footfilter\" class=\"box\">\r\n");
	templateBuilder.Append("	<form name=\"LookBySearch\" method=\"post\" action=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?search=1&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("&typeid=");
	templateBuilder.Append(topictypeid.ToString());
	templateBuilder.Append("&filter=");
	templateBuilder.Append(filter.ToString());
	templateBuilder.Append("\">\r\n");

	if (topictypeid==0)
	{

	templateBuilder.Append("		查看\r\n");
	templateBuilder.Append("		<select name=\"cond\" id=\"cond\">\r\n");
	templateBuilder.Append("		  <option value=\"0\" \r\n");

	if (cond==0)
	{

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

	}	//end if

	templateBuilder.Append(">全部主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"1\" \r\n");

	if (cond==1)
	{

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

	}	//end if

	templateBuilder.Append(">1 天以来主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"2\" \r\n");

	if (cond==2)
	{

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

	}	//end if

	templateBuilder.Append(">2 天以来主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"7\" \r\n");

	if (cond==7)
	{

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

	}	//end if

	templateBuilder.Append(">1 周以来主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"30\" \r\n");

	if (cond==30)
	{

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

	}	//end if

	templateBuilder.Append(">1 个月以来主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"90\" \r\n");

	if (cond==90)
	{

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

	}	//end if

	templateBuilder.Append(">3 个月以来主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"180\" \r\n");

	if (cond==180)
	{

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

	}	//end if

	templateBuilder.Append(">6 个月以来主题</option>\r\n");
	templateBuilder.Append("		  <option value=\"365\" \r\n");

	if (cond==365)
	{

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

	}	//end if

	templateBuilder.Append(">1 年以来主题</option>\r\n");
	templateBuilder.Append("		</select>\r\n");

	}	//end if

	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("		<button type=\"submit\">提交</button>\r\n");
	templateBuilder.Append("	</form>\r\n");

	if (config.Forumjump==1)
	{

	templateBuilder.Append("    <select onchange=\"if(this.options[this.selectedIndex].value != '') { jumpurl(this.options[this.selectedIndex].value,");
	templateBuilder.Append(config.Aspxrewrite.ToString().Trim());
	templateBuilder.Append(",'");
	templateBuilder.Append(config.Extname.ToString().Trim());
	templateBuilder.Append("');}\">\r\n");
	templateBuilder.Append("		<option>论坛跳转...</option>\r\n");
	templateBuilder.Append("		");
	templateBuilder.Append(forumlistboxoptions.ToString());
	templateBuilder.Append("\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 != '') {jumpurl(this.options[this.selectedIndex].value,");
	templateBuilder.Append(config.Aspxrewrite.ToString().Trim());
	templateBuilder.Append(",'");
	templateBuilder.Append(config.Extname.ToString().Trim());
	templateBuilder.Append("');}\">\r\n");
	templateBuilder.Append("		<option>最近访问...</option>");
	templateBuilder.Append(visitedforumsoptions.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("	</select>\r\n");

	}	//end if

	templateBuilder.Append("	<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	var categorydata = ");
	templateBuilder.Append(goodscategoryfid.ToString());
	templateBuilder.Append(";		\r\n");
	templateBuilder.Append("	function jumpurl(fid, aspxrewrite, extname) {\r\n");
	templateBuilder.Append("		for(var i in categorydata) {\r\n");
	templateBuilder.Append("		   if(categorydata[i].fid == fid) {\r\n");
	templateBuilder.Append("			   if(aspxrewrite) {\r\n");
	templateBuilder.Append("				   window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showgoodslist-' +categorydata[i].categoryid + extname;\r\n");
	templateBuilder.Append("			   }\r\n");
	templateBuilder.Append("			   else {\r\n");
	templateBuilder.Append("				   window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showgoodslist.aspx?categoryid=' +categorydata[i].categoryid;\r\n");
	templateBuilder.Append("			   }\r\n");
	templateBuilder.Append("			   return;\r\n");
	templateBuilder.Append("		       } \r\n");
	templateBuilder.Append("		    }\r\n");
	templateBuilder.Append("		if(aspxrewrite) {\r\n");
	templateBuilder.Append("			window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum-' + fid + extname;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		else {\r\n");
	templateBuilder.Append("			window.location='");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("showforum.aspx?forumid=' + fid ;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("</div>\r\n");

	}	//end if


	if (config.Whosonlinestatus!=0 && config.Whosonlinestatus!=1)
	{

	templateBuilder.Append("<div class=\"box\" id=\"online\">\r\n");
	templateBuilder.Append("	<span class=\"headactions\">\r\n");

	if (DNTRequest.GetString("showonline")=="no")
	{

	templateBuilder.Append("			<a href=\"?showonline=yes#online\"><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/collapsed_yes.gif\" alt=\"展开/收起\" />\r\n");

	}
	else
	{

	templateBuilder.Append("			<a href=\"?showonline=no#online\"><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/collapsed_no.gif\" alt=\"展开/收起\" />\r\n");

	}	//end if

	templateBuilder.Append("		</a>\r\n");
	templateBuilder.Append("	</span>\r\n");
	templateBuilder.Append("	<h4>\r\n");
	templateBuilder.Append("		<strong>在线用户</strong>- <em>");
	templateBuilder.Append(forumtotalonline.ToString());
	templateBuilder.Append("</em> 人在线<span id=\"invisible\"></span>\r\n");
	templateBuilder.Append("	</h4>\r\n");
	templateBuilder.Append("	<dl id=\"onlinelist\">\r\n");
	templateBuilder.Append("		<dt>");
	templateBuilder.Append(onlineiconlist.ToString());
	templateBuilder.Append("</dt>\r\n");
	templateBuilder.Append("		<dd>\r\n");
	templateBuilder.Append("			<ul class=\"userlist\">\r\n");

	if (showforumonline)
	{

	int invisiblecount = 0;
	

	int onlineuser__loop__id=0;
	foreach(OnlineUserInfo onlineuser in onlineuserlist)
	{
		onlineuser__loop__id++;


	if (onlineuser.Invisible==1)
	{

	 invisiblecount = invisiblecount + 1;
	

	if (useradminid==1)
	{

	templateBuilder.Append("				<li>");
	templateBuilder.Append(onlineuser.Olimg.ToString().Trim());
	templateBuilder.Append("\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(onlineuser.Userid);
	
	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(onlineuser.Username.ToString().Trim());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("				</li>\r\n");

	}
	else
	{

	templateBuilder.Append("				<li>(隐身会员)</li>\r\n");

	}	//end if


	}
	else
	{

	templateBuilder.Append("				<li>");
	templateBuilder.Append(onlineuser.Olimg.ToString().Trim());
	templateBuilder.Append("\r\n");

	if (onlineuser.Userid==-1)
	{

	templateBuilder.Append("							");
	templateBuilder.Append(onlineuser.Username.ToString().Trim());
	templateBuilder.Append("\r\n");

	}
	else
	{

	 aspxrewriteurl = this.UserInfoAspxRewrite(onlineuser.Userid);
	
	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(onlineuser.Username.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	}	//end if

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

	}	//end if


	}	//end loop


	if (invisiblecount>0)
	{

	templateBuilder.Append("					<script type=\"text/javascript\">$('invisible').innerHTML = '(");
	templateBuilder.Append(invisiblecount.ToString());
	templateBuilder.Append("' + \" 隐身)\";</");
	templateBuilder.Append("script>\r\n");

	}	//end if


	}
	else
	{

	templateBuilder.Append("				<li style=\"width: auto\"><a href=\"?showonline=yes#online\">点击查看在线列表</a></li>\r\n");

	}	//end if

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

	}	//end if


	if (forum.Layer!=0)
	{

	templateBuilder.Append("<div class=\"legend\">\r\n");
	templateBuilder.Append("	<label><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/folder_new.gif\" alt=\"有新的回复\"/>有新回复</label>\r\n");
	templateBuilder.Append("	<label><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/folder_old.gif\" alt=\"无新回复\"/>无新回复</label>\r\n");
	templateBuilder.Append("	<label><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/folder_newhot.gif\" alt=\"多于15篇回复\"/>热门主题</label>\r\n");
	templateBuilder.Append("	<label><img src=\"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/folder_closed.gif\" alt=\"关闭的主题\"/>关闭主题</label>\r\n");
	templateBuilder.Append("</div>\r\n");

	}	//end if

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

	}	//end if


	}
	else
	{


	if (needlogin)
	{


	templateBuilder.Append("<div class=\"box message\">\r\n");
	templateBuilder.Append("	<h1>");
	templateBuilder.Append(config.Forumtitle.ToString().Trim());
	templateBuilder.Append(" 提示信息</h1>\r\n");
	templateBuilder.Append("	<p>您无权进行当前操作，这可能因以下原因之一造成</p>\r\n");
	templateBuilder.Append("	<p><b>");
	templateBuilder.Append(msgbox_text.ToString());
	templateBuilder.Append("</b></p>\r\n");
	templateBuilder.Append("	<p>您还没有登录，请填写下面的登录表单后再尝试访问。</p>\r\n");
	templateBuilder.Append("	<form id=\"formlogin\" name=\"formlogin\" method=\"post\" action=\"login.aspx\" onsubmit=\"submitLogin(this);\">\r\n");
	templateBuilder.Append("		<input type=\"hidden\" value=\"2592000\" name=\"cookietime\"/>\r\n");
	templateBuilder.Append("	<div class=\"box\" style=\"margin: 10px auto; width: 60%;\">\r\n");
	templateBuilder.Append("		<table cellpadding=\"4\" cellspacing=\"0\" width=\"100%\">\r\n");
	templateBuilder.Append("		<thead>\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td colspan=\"2\">会员登录</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</thead>\r\n");
	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td>用户名</td>\r\n");
	templateBuilder.Append("				<td><input type=\"text\" id=\"username\" name=\"username\" size=\"25\" maxlength=\"40\" tabindex=\"2\" />  <a href=\"register.aspx\" tabindex=\"-1\" accesskey=\"r\" title=\"立即注册 (ALT + R)\">立即注册</a>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td>密码</td>\r\n");
	templateBuilder.Append("				<td><input type=\"password\" name=\"password\" size=\"25\" tabindex=\"3\" /> <a href=\"getpassword.aspx\" tabindex=\"-1\" accesskey=\"g\" title=\"忘记密码 (ALT + G)\">忘记密码</a>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");

	if (config.Secques==1)
	{

	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td>安全问题</td>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("					<select name=\"questionid\" tabindex=\"4\">\r\n");
	templateBuilder.Append("					<option value=\"0\">&nbsp;</option>\r\n");
	templateBuilder.Append("					<option value=\"1\">母亲的名字</option>\r\n");
	templateBuilder.Append("					<option value=\"2\">爷爷的名字</option>\r\n");
	templateBuilder.Append("					<option value=\"3\">父亲出生的城市</option>\r\n");
	templateBuilder.Append("					<option value=\"4\">您其中一位老师的名字</option>\r\n");
	templateBuilder.Append("					<option value=\"5\">您个人计算机的型号</option>\r\n");
	templateBuilder.Append("					<option value=\"6\">您最喜欢的餐馆名称</option>\r\n");
	templateBuilder.Append("					<option value=\"7\">驾驶执照的最后四位数字</option>\r\n");
	templateBuilder.Append("					</select>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td>答案</td>\r\n");
	templateBuilder.Append("				<td><input type=\"text\" name=\"answer\" size=\"25\" tabindex=\"5\" /></td>\r\n");
	templateBuilder.Append("			</tr>\r\n");

	}	//end if

	templateBuilder.Append("			<tr>\r\n");
	templateBuilder.Append("				<td>&nbsp;</td>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("					<button class=\"submit\" type=\"submit\" name=\"loginsubmit\" id=\"loginsubmit\" value=\"true\" tabindex=\"6\">会员登录</button>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("		</tbody>\r\n");
	templateBuilder.Append("		</table>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	</form>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	document.getElementById(\"username\").focus();\r\n");
	templateBuilder.Append("	function submitLogin(loginForm)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		loginForm.action = 'login.aspx?loginsubmit=true&reurl=' + escape(window.location);\r\n");
	templateBuilder.Append("		loginForm.submit();\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("</div>\r\n");



	}
	else
	{


	templateBuilder.Append("<div class=\"box message\">\r\n");
	templateBuilder.Append("	<h1>出现了");
	templateBuilder.Append(page_err.ToString());
	templateBuilder.Append("个错误</h1>\r\n");
	templateBuilder.Append("	<p>");
	templateBuilder.Append(msgbox_text.ToString());
	templateBuilder.Append("</p>\r\n");
	templateBuilder.Append("	<p class=\"errorback\">\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			if(");
	templateBuilder.Append(msgbox_showbacklink.ToString());
	templateBuilder.Append(")\r\n");
	templateBuilder.Append("			{\r\n");
	templateBuilder.Append("				document.write(\"<a href=\\\"");
	templateBuilder.Append(msgbox_backlink.ToString());
	templateBuilder.Append("\\\">返回上一步</a> &nbsp; &nbsp;|&nbsp; &nbsp  \");\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("		</");
	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");



	}	//end if

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

	}	//end if



	if (floatad!="")
	{

	templateBuilder.Append("	<script type=\"text/javascript\" src=\"javascript/template_floatadv.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("	");
	templateBuilder.Append(floatad.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("	<script type=\"text/javascript\">theFloaters.play();</");
	templateBuilder.Append("script>\r\n");

	}
	else if (doublead!="")
	{

	templateBuilder.Append("	<script type=\"text/javascript\" src=\"javascript/template_floatadv.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("	");
	templateBuilder.Append(doublead.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("	<script type=\"text/javascript\">theFloaters.play();</");
	templateBuilder.Append("script>\r\n");

	}	//end if





	if (footerad!="")
	{

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

	}	//end if

	templateBuilder.Append("<div id=\"footer\">\r\n");
	templateBuilder.Append("	<div class=\"wrap\">\r\n");
	templateBuilder.Append("		<div id=\"footlinks\">\r\n");
	templateBuilder.Append("			<p><a href=\"");
	templateBuilder.Append(config.Weburl.ToString().Trim());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(config.Webtitle.ToString().Trim());
	templateBuilder.Append("</a>&nbsp; ");
	templateBuilder.Append(config.Linktext.ToString().Trim());
	templateBuilder.Append("\r\n");

	if (config.Sitemapstatus==1)
	{

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

	}	//end if

	templateBuilder.Append("				");
	templateBuilder.Append(config.Statcode.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("				");
	templateBuilder.Append(config.Icp.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("			</p>\r\n");
	templateBuilder.Append("			<p>\r\n");
	templateBuilder.Append("			<a href=\"http://www.comsenz.com/\" target=\"_blank\">Comsenz Technology Ltd</a>\r\n");
	templateBuilder.Append("			- <a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("archiver/index.aspx\" target=\"_blank\">简洁版本</a>\r\n");
	templateBuilder.Append("			- <span class=\"scrolltop\" onclick=\"window.scrollTo(0,0);\">TOP</span>\r\n");

	if (config.Stylejump==1)
	{


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

	templateBuilder.Append("			- <span id=\"styleswitcher\" class=\"dropmenu\" onmouseover=\"showMenu(this.id)\" onclick=\"window.location.href='");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("showtemplate.aspx'\">界面风格</span>\r\n");
	templateBuilder.Append("				<div id=\"styleswitcher_menu\" class=\"popupmenu_popup\" style=\"display: none;\">\r\n");
	templateBuilder.Append("					<ul>\r\n");
	templateBuilder.Append("						");
	templateBuilder.Append(templatelistboxoptions.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("					</ul>\r\n");
	templateBuilder.Append("				</div>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("			</p>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<a title=\"Powered by Discuz!NT\" target=\"_blank\" href=\"http://nt.discuz.net\"><img border=\"0\" alt=\"Discuz!NT\" src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/discuznt_logo.gif\"/></a>\r\n");
	templateBuilder.Append("		<p id=\"copyright\">\r\n");
	templateBuilder.Append("			Powered by <strong><a href=\"http://nt.discuz.net\" target=\"_blank\" title=\"Discuz!NT 2.6 (.NET Framework 2.0/3.x)\">Discuz!NT</a></strong> <em>2.6.1</em>\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("				");
	templateBuilder.Append(config.Forumcopyright.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("		</p>\r\n");
	templateBuilder.Append("		<p id=\"debuginfo\">\r\n");

	if (config.Debug!=0)
	{

	templateBuilder.Append("			Processed in ");
	templateBuilder.Append(this.Processtime.ToString().Trim());
	templateBuilder.Append(" second(s)\r\n");

	if (isguestcachepage==1)
	{

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

	}
	else if (querycount>1)
	{

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

	}
	else
	{

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

	}	//end if


	}	//end if

	templateBuilder.Append("		</p>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<ul class=\"popupmenu_popup\" id=\"viewpro_menu\" style=\"display: none\">\r\n");

	if (useravatar!="")
	{

	templateBuilder.Append("		<img src=\"");
	templateBuilder.Append(useravatar.ToString());
	templateBuilder.Append("\"/>\r\n");

	}	//end if

	 aspxrewriteurl = this.UserInfoAspxRewrite(userid);
	
	templateBuilder.Append("	<li class=\"popuser\"><a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">我的资料</a></li>\r\n");

	if (config.Enablespace==1)
	{

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

	}	//end if

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

	int prentid__loop__id=0;
	foreach(string prentid in mainnavigationhassub)
	{
		prentid__loop__id++;

	templateBuilder.Append("<ul class=\"popupmenu_popup headermenu_popup\" id=\"menu_");
	templateBuilder.Append(prentid.ToString());
	templateBuilder.Append("_menu\" style=\"display: none\">\r\n");

	int subnav__loop__id=0;
	foreach(DataRow subnav in subnavigation.Rows)
	{
		subnav__loop__id++;

	bool isoutput = false;
	

	if (subnav["parentid"].ToString().Trim()==prentid)
	{


	if (subnav["level"].ToString().Trim()=="0")
	{

	 isoutput = true;
	

	}
	else
	{


	if (subnav["level"].ToString().Trim()=="1" && userid!=-1)
	{

	 isoutput = true;
	

	}
	else
	{

	bool leveluseradmindi = true;
	
	 leveluseradmindi = (useradminid==3 || useradminid==1 || useradminid==2);
	

	if (subnav["level"].ToString().Trim()=="2" &&  leveluseradmindi)
	{

	 isoutput = true;
	

	}	//end if


	if (subnav["level"].ToString().Trim()=="3" && useradminid==1)
	{

	 isoutput = true;
	

	}	//end if


	}	//end if


	}	//end if


	}	//end if


	if (isoutput)
	{


	if (subnav["id"].ToString().Trim()=="11" || subnav["id"].ToString().Trim()=="12")
	{


	if (config.Statstatus==1)
	{

	templateBuilder.Append("	" + subnav["nav"].ToString().Trim() + "\r\n");
	continue;


	}
	else
	{

	continue;


	}	//end if


	}	//end if


	if (subnav["id"].ToString().Trim()=="18")
	{


	if (config.Oltimespan>0)
	{

	templateBuilder.Append("    " + subnav["nav"].ToString().Trim() + "\r\n");
	continue;


	}
	else
	{

	continue;


	}	//end if


	}	//end if


	if (subnav["id"].ToString().Trim()=="24")
	{


	if (config.Enablespace==1)
	{

	templateBuilder.Append("    " + subnav["nav"].ToString().Trim() + "\r\n");
	continue;


	}
	else
	{

	continue;


	}	//end if


	}	//end if


	if (subnav["id"].ToString().Trim()=="25")
	{


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("    " + subnav["nav"].ToString().Trim() + "\r\n");
	continue;


	}
	else
	{

	continue;


	}	//end if


	}	//end if


	if (subnav["id"].ToString().Trim()=="26")
	{


	if (config.Enablemall>=1)
	{

	templateBuilder.Append("    " + subnav["nav"].ToString().Trim() + "\r\n");
	continue;


	}
	else
	{

	continue;


	}	//end if


	}	//end if

	templateBuilder.Append("    " + subnav["nav"].ToString().Trim() + "\r\n");

	}	//end if


	}	//end loop

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

	}	//end loop

	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");

	if (config.Enablespace==1)
	{

	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");

	}	//end if


	if (config.Enablealbum==1)
	{

	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");

	}	//end if

	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(mediaad.ToString());
	templateBuilder.Append("\r\n");

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



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