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

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

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

	base.OnInit(e);


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


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

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

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

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

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

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if

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

	}	//end if

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

	if (userid==-1)
	{

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

	}
	else
	{

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

	if (useradminid==1)
	{

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

	}	//end if


	}	//end if


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


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

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

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if


	}	//end if


	if (usergroupinfo.Allowsearch>0)
	{

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

	}	//end if

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

	if (headerad!="")
	{

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

	}	//end if

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

	if (userid!=-1)
	{

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

	}	//end if

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

	if (userid!=-1)
	{

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

	}	//end if

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


	int loopi = 1;
	

	if (page_err==0)
	{

	templateBuilder.Append("<script type=\"text/javascript\" src=\"editor/common.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/ajax.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/showtopic.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("var postminchars = parseInt(" + config.Minpostsize.ToString().Trim() + ");\r\n");
	templateBuilder.Append("var postmaxchars = parseInt(" + config.Maxpostsize.ToString().Trim() + ");\r\n");
	templateBuilder.Append("var disablepostctrl = parseInt(" + disablepostctrl.ToString() + ");\r\n");
	templateBuilder.Append("var forumpath = \"" + forumpath.ToString() + "\";\r\n");
	templateBuilder.Append("function validate(theform, previewpost, switcheditormode) {\r\n");
	templateBuilder.Append("	var message = !theform.parseurloff.checked ? parseurl(theform.message.value) : theform.message.value;\r\n");
	templateBuilder.Append("	if (theform.title.value == \"\" || message == \"\") {\r\n");
	templateBuilder.Append("		alert(\"请完成标题和内容栏。\");\r\n");
	templateBuilder.Append("		$(\"postsubmit\").disabled = false;\r\n");
	templateBuilder.Append("		return false;\r\n");
	templateBuilder.Append("	} else if (theform.title.value.length > 60) {\r\n");
	templateBuilder.Append("		alert(\"您的标题超过 60 个字符的限制。\");\r\n");
	templateBuilder.Append("		theform.title.focus();\r\n");
	templateBuilder.Append("		$(\"postsubmit\").disabled = false;\r\n");
	templateBuilder.Append("		return false;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	if(!disablepostctrl && ((postminchars != 0 && mb_strlen(message) < postminchars) || (postmaxchars != 0 && mb_strlen(message) > postmaxchars))) {\r\n");
	templateBuilder.Append("		alert(\"您的帖子长度不符合要求。\\n\\n当前长度: \" + mb_strlen(message) + \" 字节\\n系统限制: \" + postminchars + \" 到 \" + postmaxchars + \" 字节\");\r\n");
	templateBuilder.Append("		return false;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	if (!switcheditormode && !previewpost) {\r\n");
	templateBuilder.Append("		$(\"postsubmit\").disabled = true;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	theform.message.value = message;\r\n");
	templateBuilder.Append("	return true;\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("function ShowFormatBytesStr(bytes)\r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("	if(bytes > 1073741824)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		document.write((Math.round((bytes/1073741824)*100)/100).toString()+' G');\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	else if(bytes > 1048576)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		document.write((Math.round((bytes/1048576)*100)/100).toString()+' M');\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	else if(bytes > 1024)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		document.write((Math.round((bytes/1024)*100)/100).toString()+' K');\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	else\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		document.write(bytes.toString()+' Bytes');\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("function ShowStars(n, t) {\r\n");
	templateBuilder.Append("	var s = '';\r\n");
	templateBuilder.Append("	for(var i=3; i>0; i--) {\r\n");
	templateBuilder.Append("		level = parseInt(n / Math.pow(t, i-1));\r\n");
	templateBuilder.Append("		n = n % Math.pow(t, i-1);\r\n");
	templateBuilder.Append("		for(var j=0; j<level; j++) {\r\n");
	templateBuilder.Append("			s += '<img src=\"templates/" + templatepath.ToString() + "/images/star_level'+i+'.gif\" />';\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	document.write(s);\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("function imgzoom(o)\r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("	if(event.ctrlKey)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		var zoom = parseInt(o.style.zoom, 10) || 100;\r\n");
	templateBuilder.Append("		zoom -= event.wheelDelta / 12;\r\n");
	templateBuilder.Append("		if(zoom > 0)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			o.style.zoom = zoom + '%';\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		return false;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	else\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		return true;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("</" + "script>\r\n");
	templateBuilder.Append("<div id=\"foruminfo\">\r\n");
	templateBuilder.Append("	<div class=\"userinfo\">\r\n");
	templateBuilder.Append("		<h2><a href=\"" + config.Forumurl.ToString().Trim() + "\">" + config.Forumtitle.ToString().Trim() + "</a><span> " + forumnav.ToString() + "</span><strong>" + topictitle.ToString() + "</strong></h2>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"forumstats\">\r\n");
	templateBuilder.Append("		<div id=\"search\">\r\n");

	if (usergroupinfo.Allowsearch>0)
	{


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



	}	//end if

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


	if (pagewordad!="")
	{

	templateBuilder.Append("<!--adtext-->\r\n");
	templateBuilder.Append("<div id=\"adtext\">\r\n");
	templateBuilder.Append("	<div class=\"adtextbody\">\r\n");
	templateBuilder.Append("		<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("			" + pagewordad.ToString() + "\r\n");
	templateBuilder.Append("		</table>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--adtext-->\r\n");

	}	//end if





	if (newpmcount>0 && showpmhint)
	{

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

	if (pmsound>0)
	{

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

	}	//end if

	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<span class=\"open\"><a href=\"usercpinbox.aspx\" target=\"_blank\">查看详情</a> <a href=\"###\" onclick=\"document.getElementById('frmnewpm').submit();\">不再提示</a></span>\r\n");
	templateBuilder.Append("		<h3>您有 " + newpmcount.ToString() + " 条新的短消息</h3>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"notelist\">\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 class=\"list\" onmouseover=\"this.className='liston'\" onmouseout=\"this.className='list'\">\r\n");
	templateBuilder.Append("			<td class=\"topicicon\"><img src=\"templates/" + templatepath.ToString() + "/images/message_" + pm.New.ToString().Trim() + ".gif\" alt=\"短信息\"/></td>\r\n");
	templateBuilder.Append("			<th class=\"forumlisttitle\"><a href=\"usercpshowpm.aspx?pmid=" + pm.Pmid.ToString().Trim() + "\">" + pm.Subject.ToString().Trim() + "</a></th>\r\n");
	templateBuilder.Append("			<td>\r\n");
	templateBuilder.Append("				<a href=\"userinfo.aspx?userid=" + pm.Msgfromid.ToString().Trim() + "\" target=\"_blank\">" + pm.Msgfrom.ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("				<span class=\"fontfamily\">" + pm.Postdatetime.ToString().Trim() + "</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("	</div>\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 (ispoll)
	{

	templateBuilder.Append("<!--投票区开始-->\r\n");
	templateBuilder.Append("<div class=\"ntforumbox ticket\">\r\n");
	templateBuilder.Append("	<form id=\"formpoll\" name=\"formpoll\" method=\"post\" action=\"poll.aspx?topicid=" + topicid.ToString() + "\">\r\n");
	templateBuilder.Append("		<div id=\"ticketcount\"><img src=\"templates/" + templatepath.ToString() + "/images/pollsmall.gif\" alt=\"欢迎\"/>&nbsp;投票：<strong>" + topictitle.ToString() + "</strong>\r\n");

	if (polltype==1)
	{

	templateBuilder.Append("				<img src=\"templates/" + templatepath.ToString() + "/images/ture.gif\" alt=\"投票可以\"/>多选\r\n");

	}	//end if

	templateBuilder.Append("				<img src=\"templates/" + templatepath.ToString() + "/images/error.gif\" alt=\"时间限制\"/>截止时间：" + pollenddatetime.ToString() + "\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");

	int poll__loop__id=0;
	foreach(DataRow poll in polllist.Rows)
	{
		poll__loop__id++;

	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"ticketleft\">\r\n");

	if (allowvote)
	{


	if (poll["polltype"].ToString().Trim()=="1")
	{

	templateBuilder.Append("							<input type=\"checkbox\" name=\"pollitemid\" value=\"" + poll__loop__id.ToString() + "\" />\r\n");

	}
	else
	{

	templateBuilder.Append("							<input type=\"radio\" name=\"pollitemid\" value=\"" + poll__loop__id.ToString() + "\" />\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("					" + poll["name"].ToString().Trim() + "\r\n");
	templateBuilder.Append("			</th>\r\n");
	templateBuilder.Append("			<td width=\"420\">\r\n");
	templateBuilder.Append("				<div class=\"ticket-show\">\r\n");
	templateBuilder.Append("					<div style=\"width:" + poll["percent"].ToString().Trim() + "\"></div>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("			<td class=\"ticketnumbers\"><strong>" + poll["value"].ToString().Trim() + "</strong>票 / " + poll["percent"].ToString().Trim() + "\r\n");
	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("		</tbody>\r\n");

	}	//end loop


	if (config.Silverlight==1)
	{

	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("			<tr class=\"list\">\r\n");
	templateBuilder.Append("			<td colspan=\"3\"><iframe src=\"silverlight/piechart/index.html?topicid=" + topicid.ToString() + "&bg=F5FAFE\" allowtransparency=\"yes\" width=\"95%\" height=\"425\" border=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" ></iframe>\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 class=\"list\">\r\n");
	templateBuilder.Append("			<td colspan=\"3\" class=\"ticketfooter\">\r\n");
	templateBuilder.Append("			<input type=\"button\" value=\"查看投票用户名单>>\" onclick=\"expandoptions('ticketvoterlist');\" class=\"lightbutton\" />\r\n");

	if (usergroupinfo.Allowvote==1)
	{


	if (userid==-1)
	{

	templateBuilder.Append("							提示: 您尚未登录, 因此无法参与投票\r\n");

	}
	else
	{


	if (allowvote)
	{

	templateBuilder.Append("								<input type=\"submit\" name=\"Submit\" value=\"投票\" class=\"lightbutton\" />\r\n");

	}
	else
	{

	templateBuilder.Append("								提示: 您已经投过票或者投票已经过期\r\n");

	}	//end if


	}	//end if


	}
	else
	{

	templateBuilder.Append("					抱歉,您没有参与投票的权限\r\n");

	}	//end if

	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");
	templateBuilder.Append("<div id=\"ticketvoterlist\" style=\"display:none;\" class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<table width=\"96%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("		<tr>\r\n");
	templateBuilder.Append("			<td align=\"left\">投票用户名单:<br />\r\n");
	templateBuilder.Append("				" + voters.ToString() + "</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</table>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--投票区结束-->\r\n");

	}	//end if



	templateBuilder.Append("<div class=\"forumpages\">\r\n");
	templateBuilder.Append("  <div class=\"pagesothers\">\r\n");

	if (canposttopic)
	{

	templateBuilder.Append("			<a href=\"posttopic.aspx?forumid=" + forumid.ToString() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/write-bbs.gif\" alt=\"发表新主题\" /></a>\r\n");

	}	//end if


	if (topic.Closed==0)
	{

	templateBuilder.Append("			<a href=\"postreply.aspx?topicid=" + topicid.ToString() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/hf-bbs.jpg\" alt=\"回复该主题\" /></a>\r\n");

	}	//end if

	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<h2>\r\n");

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

	templateBuilder.Append("			" + topictypes.ToString() + " \r\n");

	}	//end if

	templateBuilder.Append("		标题: " + topictitle.ToString() + "\r\n");

	if (topic.Price>0 && topic.Posterid!=userid)
	{

	templateBuilder.Append("				  <a href=\"buytopic.aspx?topicid=" + topicid.ToString() + "&showpayments=1\">浏览需支付 " + userextcreditsinfo.Name.ToString().Trim() + " " + topic.Price.ToString().Trim() + " " + userextcreditsinfo.Unit.ToString().Trim() + "</a>\r\n");

	}	//end if

	templateBuilder.Append("		</h2>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"viewthread\">\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("		<td class=\"postauthor\" id=\"" + post.Pid.ToString().Trim() + "\">\r\n");
	templateBuilder.Append("		<!--register user-->\r\n");

	if (post.Posterid!=-1)
	{

	templateBuilder.Append("				<div id=\"memberinfo_" + loopi.ToString() + "\" class=\"popmenubutton-new-out cursor\" onmouseover=\"showMenu(this.id,false)\">\r\n");
	templateBuilder.Append("					<div class=\"normalname\" onmouseover=\"this.className='normalnameon'\" onmouseout=\"this.className='normalname'\">\r\n");

	if (post.Onlinestate==1)
	{

	templateBuilder.Append("					<img src=\"templates/" + templatepath.ToString() + "/images/friend_dot.gif\" title=\"在线\" alt=\"在线\"/>\r\n");

	}
	else
	{

	templateBuilder.Append("					<img src=\"templates/" + templatepath.ToString() + "/images/friend_dot2.gif\" title=\"离线\" alt=\"离线\"/>\r\n");

	}	//end if

	templateBuilder.Append("					" + post.Poster.ToString().Trim() + "\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("				<div class=\"avatarphoto\">\r\n");

	if (config.Showavatars==1 && post.Avatar!="")
	{

	templateBuilder.Append("					<img class=\"avatar\" src=\"" + post.Avatar.ToString().Trim() + "\"\r\n");

	if (post.Avatarwidth>0)
	{

	templateBuilder.Append("							width=\"" + post.Avatarwidth.ToString().Trim() + "\"\r\n");
	templateBuilder.Append("							height=\"" + post.Avatarheight.ToString().Trim() + "\"\r\n");

	}	//end if

	templateBuilder.Append(" alt=\"头像\"\r\n");
	templateBuilder.Append("					/>			\r\n");

	}	//end if

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

	if (post.Nickname!="")
	{

	templateBuilder.Append("					<div class=\"nickname\">" + post.Nickname.ToString().Trim() + "</div>\r\n");

	}	//end if

	templateBuilder.Append("					<p>\r\n");
	templateBuilder.Append("				<script language=\"javascript\" type=\"text/javascript\">\r\n");
	templateBuilder.Append("					ShowStars(" + post.Stars.ToString().Trim() + ", " + config.Starthreshold.ToString().Trim() + ");\r\n");
	templateBuilder.Append("				</" + "script>\r\n");
	templateBuilder.Append("					</p>\r\n");
	templateBuilder.Append("				<div class=\"profile\">\r\n");
	templateBuilder.Append("					<ul>\r\n");

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

	templateBuilder.Append("						<li class=\"otherproduct\">\r\n");

	}	//end if


	if (config.Enablespace==1)
	{

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

	if (post.Spaceid>0)
	{

	templateBuilder.Append("<a href=\"" + spaceurl.ToString() + "space/?uid=" + post.Posterid.ToString().Trim() + "\">个人空间</a>\r\n");

	}
	else
	{

	templateBuilder.Append("<a href=\"###\" onclick=\"nospace('" + post.Poster.ToString().Trim() + "');\">个人空间</a>\r\n");

	}	//end if

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

	}	//end if


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("<em><a href=\"showalbumlist.aspx?uid=" + post.Posterid.ToString().Trim() + "\">相册</a></em>\r\n");

	}	//end if


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

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

	}	//end if


	if (config.Userstatusby==1)
	{

	templateBuilder.Append("<li>组别:<span>" + post.Status.ToString().Trim() + "</span></li>\r\n");

	}	//end if

	templateBuilder.Append("									<li>性别:<span><script type=\"text/javascript\">document.write(displayGender(" + post.Gender.ToString().Trim() + "));</" + "script></span></li>\r\n");

	if (post.Bday!="")
	{

	templateBuilder.Append("										<li>生日:<span>" + post.Bday.ToString().Trim() + "</span></li>\r\n");

	}	//end if

	templateBuilder.Append("						<li>来自:<span>" + post.Location.ToString().Trim() + "</span></li>\r\n");
	templateBuilder.Append("						<li>积分:<span>" + post.Credits.ToString().Trim() + "</span></li>\r\n");
	templateBuilder.Append("						<li>帖子:<span>" + post.Posts.ToString().Trim() + "</span></li>\r\n");
	templateBuilder.Append("						<li>注册:<span>\r\n");

	if (post.Joindate!="")
	{

templateBuilder.Append(Convert.ToDateTime(post.Joindate).ToString("yyyy-MM-dd"));

	}	//end if

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

	if (post.Medals!="")
	{

	templateBuilder.Append("				<div class=\"medals\">" + post.Medals.ToString().Trim() + "</div>\r\n");

	}	//end if


	}
	else
	{

	templateBuilder.Append("			<div class=\"noregediter\"><strong>" + post.Poster.ToString().Trim() + "</strong>  " + post.Ip.ToString().Trim() + "\r\n");

	if (useradminid>0 && admininfo.Allowviewip==1)
	{

	templateBuilder.Append("					<a href=\"getip.aspx?pid=" + post.Pid.ToString().Trim() + "&topicid=" + topicid.ToString() + "\" title=\"查看IP\"><img src=\"templates/" + templatepath.ToString() + "/images/ip.gif\" alt=\"查看IP\" /></a>\r\n");

	}	//end if

	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<!--guest-->\r\n");
	templateBuilder.Append("			<div class=\"noregediter\">\r\n");
	templateBuilder.Append("					未注册\r\n");
	templateBuilder.Append("			</div>\r\n");

	}	//end if

	templateBuilder.Append("		</td>\r\n");
	templateBuilder.Append("		<td class=\"postcontent\">\r\n");
	templateBuilder.Append("			<div class=\"navpostinfo\">\r\n");
	templateBuilder.Append("				<div class=\"postinfoleft\"><span>\r\n");
templateBuilder.Append(Convert.ToDateTime(post.Postdatetime).ToString("yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</span></div>\r\n");
	templateBuilder.Append("				<div class=\"postinfoitem\">\r\n");

	if (userid!=-1)
	{


	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("    show_report_button();\r\n");
	templateBuilder.Append("</" + "script>\r\n");


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

	}	//end if

	 aspxrewriteurl = this.ShowTopicAspxRewrite(topicid,0);
	
	templateBuilder.Append("						<a href=\"" + aspxrewriteurl.ToString() + "\">平板</a>|\r\n");
	templateBuilder.Append("						<a href=\"favorites.aspx?topicid=" + topicid.ToString() + "\">收藏</a>|\r\n");

	if (ismoder==1)
	{

	templateBuilder.Append("							<a href=\"editpost.aspx?topicid=" + topicid.ToString() + "&postid=" + post.Pid.ToString().Trim() + "\">编辑</a>|\r\n");
	templateBuilder.Append("							<a href=\"delpost.aspx?topicid=" + topicid.ToString() + "&postid=" + post.Pid.ToString().Trim() + "\" onclick=\"return confirm('确定要删除吗?');\">删除</a>|\r\n");

	if (post.Posterid!=-1)
	{

	templateBuilder.Append("								<a href=\"###\" onclick=\"action_onchange('rate',$('moderate'),'" + post.Pid.ToString().Trim() + "');\">评分</a>|\r\n");

	if (post.Ratetimes>0)
	{

	templateBuilder.Append("								<a href=\"###\" onclick=\"action_onchange('cancelrate',$('moderate'),'" + post.Pid.ToString().Trim() + "');\">撤销评分</a>&nbsp;\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("							<input name=\"postid\" id=\"postid\" value=\"" + post.Pid.ToString().Trim() + "\" type=\"checkbox\" />\r\n");

	}
	else
	{


	if (post.Posterid!=-1 && userid==post.Posterid)
	{


	if (topic.Closed==0)
	{

	templateBuilder.Append("									<a href=\"editpost.aspx?topicid=" + topicid.ToString() + "&postid=" + post.Pid.ToString().Trim() + "\">编辑</a>|\r\n");

	}	//end if

	templateBuilder.Append("								<a href=\"delpost.aspx?topicid=" + topicid.ToString() + "&postid=" + post.Pid.ToString().Trim() + "\" onclick=\"return confirm('确定要删除吗?');\">删除</a>|\r\n");

	}	//end if


	if (usergroupinfo.Raterange!="" && post.Posterid!=-1)
	{

	templateBuilder.Append("<a href=\"###\" onclick=\"action_onchange('rate',$('moderate'),'" + post.Pid.ToString().Trim() + "');\">评分</a>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("						<a href=\"###\" class=\"t_number\" onclick=\"$('message" + post.Pid.ToString().Trim() + "').className='t_smallfont'\">小</a>			\r\n");
	templateBuilder.Append("						<a href=\"###\" class=\"t_number\" onclick=\"$('message" + post.Pid.ToString().Trim() + "').className='t_msgfont'\">中</a>\r\n");
	templateBuilder.Append("						<a href=\"###\" class=\"t_number\" onclick=\"$('message" + post.Pid.ToString().Trim() + "').className='t_bigfont'\">大</a>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("				<div id=\"ad_thread2_1\"></div>\r\n");
	templateBuilder.Append("			<div class=\"defaultcontent\">\r\n");

	if (topic.Identify>0)
	{

	templateBuilder.Append("						<div class=\"ntprint\" onclick=\"this.style.display='none';\"><img src=\"images/identify/" + topicidentify.Filename.ToString().Trim() + "\" alt=\"点击关闭鉴定图章\" title=\"点击关闭鉴定图章\" /></div>\r\n");

	}	//end if

	templateBuilder.Append("				  <div class=\"forumarticle\">\r\n");
	templateBuilder.Append("				  <h3>" + post.Title.ToString().Trim() + "</h3>\r\n");
	templateBuilder.Append("				  <div id=\"message" + post.Pid.ToString().Trim() + "\" class=\"t_msgfont\">\r\n");
	templateBuilder.Append("					<div id=\"ad_thread3_1\"></div>\r\n");
	templateBuilder.Append("					" + post.Message.ToString().Trim() + "\r\n");
	templateBuilder.Append("				  </div>\r\n");
	templateBuilder.Append("				  </div>\r\n");

	if (post.Ratetimes>0)
	{


	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("function ratevalveimg(rate,ratevalveset)\r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("    valveimg = '';\r\n");
	templateBuilder.Append("	if(rate) {\r\n");
	templateBuilder.Append("		image = rate > 0 ? 'templates/" + templatepath.ToString() + "/images/agree.gif' : 'templates/" + templatepath.ToString() + "/images/disagree.gif';\r\n");
	templateBuilder.Append("		var  ratevalve = ratevalveset.split(\",\");\r\n");
	templateBuilder.Append("		for(i = 0; i < ratevalve.length; i++) {\r\n");
	templateBuilder.Append("		    if(Math.abs(rate)>ratevalve[i]){ \r\n");
	templateBuilder.Append("			    valveimg += '<img src=\"' + image + '\" border=\"0\" alt=\"\" />';\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			else{\r\n");
	templateBuilder.Append("			    break;\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	return valveimg;\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("</" + "script>\r\n");

	if (showratelog==1)
	{

	templateBuilder.Append("	<div class=\"ratelog\">\r\n");
	templateBuilder.Append("		<div id=\"rate_" + post.Pid.ToString().Trim() + "_fake\"><script>document.write(ratevalveimg(" + post.Rate.ToString().Trim() + ",'" + config.Ratevalveset.ToString().Trim() + "'));</" + "script> <a href=\"###\" title=\"查看/收起 评分记录\" onclick=\"showrate(" + post.Pid.ToString().Trim() + "," + config.Aspxrewrite.ToString().Trim() + ")\">本帖被评分 " + post.Ratetimes.ToString().Trim() + " 次</a></div>\r\n");
	templateBuilder.Append("		<div id=\"rate_" + post.Pid.ToString().Trim() + "_real\" style=\"display:none\">\r\n");
	templateBuilder.Append("		<fieldset style=\"width: 550px;\">\r\n");
	templateBuilder.Append("			<legend><script>document.write(ratevalveimg(" + post.Rate.ToString().Trim() + ",'" + config.Ratevalveset.ToString().Trim() + "'));</" + "script> <a href=\"###\" title=\"查看/收起 评分记录\" onclick=\"showrate(" + post.Pid.ToString().Trim() + "," + config.Aspxrewrite.ToString().Trim() + ")\">本帖被评分 " + post.Ratetimes.ToString().Trim() + " 次</a> </legend>\r\n");
	templateBuilder.Append("			<div id=\"rate_" + post.Pid.ToString().Trim() + "\" style=\"margin: 5px; height: 77px; overflow: auto;\"></div>\r\n");
	templateBuilder.Append("		</fieldset>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	</div>\r\n");

	}
	else
	{

	templateBuilder.Append("	<div class=\"ratelog\">\r\n");
	templateBuilder.Append("		<script>document.write(ratevalveimg(" + post.Rate.ToString().Trim() + ",'" + config.Ratevalveset.ToString().Trim() + "'));</" + "script> 本帖被评分 " + post.Ratetimes.ToString().Trim() + " 次\r\n");
	templateBuilder.Append("	</div>\r\n");

	}	//end if




	}	//end if


	int attachment__loop__id=0;
	foreach(ShowtopicPageAttachmentInfo attachment in attachmentlist)
	{
		attachment__loop__id++;


	if (attachment.Pid==post.Pid)
	{

	templateBuilder.Append("					<!--附件开始-->\r\n");
	templateBuilder.Append("					<div class=\"quote\" id=\"attachment_" + attachment.Aid.ToString().Trim() + "\">\r\n");
	templateBuilder.Append("					<div class=\"text\"><h1><img src=\"templates/" + templatepath.ToString() + "/images/attachment.gif\" alt=\"附件\" />附件:</h1>\r\n");
	templateBuilder.Append("						<h2>\r\n");

	if (attachment.Getattachperm==1)
	{


	if (attachment.Allowread==1)
	{


	templateBuilder.Append("										<div class=\"attachmentinfo\">\r\n");
	templateBuilder.Append("											<div>文件名:<a href=\"attachment.aspx?attachmentid=" + attachment.Aid.ToString().Trim() + "\">" + attachment.Attachment.ToString().Trim() + "</a></div>\r\n");
	templateBuilder.Append("											<div>下载次数:" + attachment.Downloads.ToString().Trim() + "</div>\r\n");
	templateBuilder.Append("											<div>文件类型:" + attachment.Filetype.ToString().Trim() + "</div>\r\n");
	templateBuilder.Append("											<div>文件大小:\r\n");
	templateBuilder.Append("													<script language=\"javascript\" type=\"text/javascript\">\r\n");
	templateBuilder.Append("														ShowFormatBytesStr(" + attachment.Filesize.ToString().Trim() + ");\r\n");
	templateBuilder.Append("													</" + "script>\r\n");
	templateBuilder.Append("											</div>\r\n");
	templateBuilder.Append("											<div>上传时间:" + attachment.Postdatetime.ToString().Trim() + "</div>\r\n");
	templateBuilder.Append("											<div>描述:" + attachment.Description.ToString().Trim() + "</div>\r\n");

	if (attachment.Preview!="")
	{

	templateBuilder.Append("											<div>预览信息:" + attachment.Preview.ToString().Trim() + "</div>\r\n");

	}	//end if

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

	if (allowdownloadattach)
	{

	templateBuilder.Append("<!--当用户有下载附件权限时-->\r\n");

	if (config.Showimages==1)
	{


	if (config.Attachimgpost==1)
	{


	if (attachment.Attachimgpost==1)
	{

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

	if (config.Showattachmentpath==1)
	{

	templateBuilder.Append("															src=\"upload/" + attachment.Filename.ToString().Trim() + "\"\r\n");

	}
	else
	{

	templateBuilder.Append("															src=\"attachment.aspx?attachmentid=" + attachment.Aid.ToString().Trim() + "\"\r\n");

	}	//end if

	templateBuilder.Append("													onload=\"if(this.width>body.clientWidth/2) {this.resized=true; this.width=body.clientWidth/2; this.alt='点击在新窗口浏览图片\\nCTRL+Mouse 滚轮可放大/缩小';$('attachment_" + attachment.Aid.ToString().Trim() + "').style.width=this.width+25+'px';}\" onmouseover=\"if(this.width>body.clientWidth/2) {this.resized=true; this.width=body.clientWidth/2; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片\\nCTRL+Mouse 滚轮可放大/缩小';$('attachment_" + attachment.Aid.ToString().Trim() + "').style.width=this.width+25+'px';}\" onclick=\"if(!this.resized) { return true; } else { window.open(this.src); }\" onmousewheel=\"return imgzoom(this);\" />\r\n");

	}	//end if


	}	//end if

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

	}	//end if


	}
	else
	{

	templateBuilder.Append("											<br /><br />\r\n");
	templateBuilder.Append("											<span class=\\\"attachnotdown\\\">您所在的用户组无法下载或查看附件</span>\r\n");

	}	//end if




	}
	else
	{

	templateBuilder.Append("									<span class=\"notdown\">你的下载权限 " + usergroupinfo.Readaccess.ToString().Trim() + " 低于此附件所需权限 " + attachment.Readperm.ToString().Trim() + ", 你无权查看此附件</span>\r\n");

	}	//end if


	}
	else
	{

	templateBuilder.Append("									<img src=\"images/attachicons/attachment.gif\" alt=\"附件\">&nbsp;附件: <span class=\"attachnotdown\">您所在的用户组无法下载或查看附件</span>\r\n");

	}	//end if

	templateBuilder.Append("						</h2>\r\n");
	templateBuilder.Append("						</div>\r\n");
	templateBuilder.Append("						</div>\r\n");
	templateBuilder.Append("					<!--附件结束-->\r\n");

	}	//end if


	}	//end loop


	if (post.Lastedit!="")
	{

	templateBuilder.Append("					<!--最后编辑开始-->\r\n");
	templateBuilder.Append("					<div class=\"lastediter\">\r\n");
	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/lastedit.gif\" alt=\"最后编辑\"/>" + post.Lastedit.ToString().Trim() + "\r\n");
	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("					<!--最后编辑结束-->\r\n");

	}	//end if

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

	if (config.Showsignatures==1)
	{


	if (post.Usesig==1)
	{


	if (post.Signature!="")
	{

	templateBuilder.Append("					<!--签名开始-->\r\n");
	templateBuilder.Append("				<div class=\"postertext\">\r\n");

	if (config.Maxsigrows>0)
	{

	int ieheight = config.Maxsigrows*12;
	
	templateBuilder.Append("								<div class=\"t_signature\" style=\"overflow: hidden; max-height: " + config.Maxsigrows.ToString().Trim() + "em;maxHeightIE:" + ieheight.ToString() + "px\">" + post.Signature.ToString().Trim() + "</div>\r\n");

	}
	else
	{

	templateBuilder.Append("								" + post.Signature.ToString().Trim() + "\r\n");

	}	//end if

	templateBuilder.Append("						</div>\r\n");
	templateBuilder.Append("					<!--签名结束-->\r\n");

	}	//end if


	}	//end if


	}	//end if

	templateBuilder.Append("	</td>\r\n");
	templateBuilder.Append("	</tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("	<tr>\r\n");
	templateBuilder.Append("	<!--用户信息结束-->\r\n");
	templateBuilder.Append("		<td class=\"postauthor threadfoot\">\r\n");
	templateBuilder.Append("			<a href=\"#top\">\r\n");
	templateBuilder.Append("			<img src=\"templates/" + templatepath.ToString() + "/images/gototop.gif\" alt=\"gototop\"/>\r\n");
	templateBuilder.Append("			</a>\r\n");
	templateBuilder.Append("		</td>\r\n");
	templateBuilder.Append("		<td class=\"threadfootright threadfoot\">\r\n");
	templateBuilder.Append("			<div class=\"ForumContentAd\"><div id=\"ad_thread1_1\"></div></div> \r\n");
	templateBuilder.Append("			<div class=\"forumanswer\">\r\n");

	if (topic.Closed==0)
	{

	templateBuilder.Append("				<a href=\"postreply.aspx?topicid=" + topicid.ToString() + "&postid=" + post.Pid.ToString().Trim() + "&quote=yes\"><img src=\"templates/" + templatepath.ToString() + "/images/button_use.gif\" alt=\"引用\"/></a>\r\n");
	templateBuilder.Append("				<a href=\"postreply.aspx?topicid=" + topicid.ToString() + "&postid=" + post.Pid.ToString().Trim() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/dot_replay.gif\" alt=\"回复\"/></a>\r\n");

	}	//end if

	templateBuilder.Append("			</div>\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");

	if (post.Posterid!=-1)
	{

	templateBuilder.Append("	<!-- member menu -->\r\n");
	templateBuilder.Append("	<div class=\"menuwindow\" id=\"memberinfo_" + loopi.ToString() + "_menu\" style=\"display:none; width:176px;\">\r\n");
	templateBuilder.Append("		<div class=\"popupmenu\">\r\n");
	templateBuilder.Append("			<div class=\"popupmenuitem\" style=\"border-top:0px;\">\r\n");
	templateBuilder.Append("				<p class=\"recivemessage\"><a href=\"usercppostpm.aspx?msgtoid=" + post.Posterid.ToString().Trim() + "\" target=\"_blank\">发送短消息</a></p>\r\n");

	if (useradminid>0)
	{


	if (admininfo.Allowviewip==1)
	{

	templateBuilder.Append("						<p  class=\"seeip\"><a href=\"getip.aspx?pid=" + post.Pid.ToString().Trim() + "&topicid=" + topicid.ToString() + "\" title=\"查看IP\">查看IP</a></p>\r\n");

	}	//end if


	if (admininfo.Allowbanuser==1)
	{

	templateBuilder.Append("						<p><a href=\"useradmin.aspx?action=banuser&uid=" + post.Posterid.ToString().Trim() + "\" title=\"禁止用户\">禁止用户</a></p>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<div class=\"popupmenuitem\">\r\n");
	templateBuilder.Append("				<p>\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(topic.Posterid);
	
	templateBuilder.Append("				<a href=\"" + aspxrewriteurl.ToString() + "\" target=\"_blank\">查看公共资料</a></p>\r\n");
	templateBuilder.Append("				<p><a href=\"search.aspx?posterid=" + post.Posterid.ToString().Trim() + "\">查找该会员全部帖子</a></p>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<div class=\"popupmenuitem\">\r\n");
	templateBuilder.Append("				<ul>\r\n");
	templateBuilder.Append("				<li>UID:<span>" + post.Posterid.ToString().Trim() + "</span></li>\r\n");
	templateBuilder.Append("				<li>精华:<span>\r\n");

	if (post.Digestposts>0)
	{

	templateBuilder.Append("<a href=\"search.aspx?posterid=" + post.Posterid.ToString().Trim() + "&type=digest\">" + post.Digestposts.ToString().Trim() + "</a>\r\n");

	}
	else
	{

	templateBuilder.Append("" + post.Digestposts.ToString().Trim() + "\r\n");

	}	//end if

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

	if (score[1].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[1].ToString().Trim() + ":<span>" + post.Extcredits1.ToString().Trim() + " " + scoreunit[1].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[2].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[2].ToString().Trim() + ":<span>" + post.Extcredits2.ToString().Trim() + " " + scoreunit[2].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[3].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[3].ToString().Trim() + ":<span>" + post.Extcredits3.ToString().Trim() + " " + scoreunit[3].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[4].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[4].ToString().Trim() + ":<span>" + post.Extcredits4.ToString().Trim() + " " + scoreunit[4].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[5].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[5].ToString().Trim() + ":<span>" + post.Extcredits5.ToString().Trim() + " " + scoreunit[5].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[6].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[6].ToString().Trim() + ":<span>" + post.Extcredits6.ToString().Trim() + " " + scoreunit[6].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[7].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[7].ToString().Trim() + ":<span>" + post.Extcredits7.ToString().Trim() + " " + scoreunit[7].ToString().Trim() + "</span></li>\r\n");

	}	//end if


	if (score[8].ToString().Trim()!="")
	{

	templateBuilder.Append("					<li>" + score[8].ToString().Trim() + ":<span>" + post.Extcredits8.ToString().Trim() + " " + scoreunit[8].ToString().Trim() + "</span></li>\r\n");

	}	//end if

	templateBuilder.Append("				</ul>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<div class=\"popupmenuitem\">\r\n");
	templateBuilder.Append("				<p>状态:<span>\r\n");

	if (post.Onlinestate==1)
	{

	templateBuilder.Append("					在线\r\n");

	}
	else
	{

	templateBuilder.Append("					离线\r\n");

	}	//end if

	templateBuilder.Append("</span>\r\n");
	templateBuilder.Append("				</p>\r\n");
	templateBuilder.Append("				<ul class=\"tools\">\r\n");

	if (post.Msn!="")
	{

	templateBuilder.Append("							<li>\r\n");
	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/tools-msn.gif\" title=\"MSN Messenger: " + post.Msn.ToString().Trim() + "\" alt=\"MSN Messenger: " + post.Msn.ToString().Trim() + "\" />\r\n");
	templateBuilder.Append("						<a href=\"mailto:" + post.Msn.ToString().Trim() + "\" target=\"_blank\">" + post.Msn.ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("							</li>\r\n");

	}	//end if


	if (post.Skype!="")
	{

	templateBuilder.Append("							<li>\r\n");
	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/tools-skype.gif\" title=\"Skype: " + post.Skype.ToString().Trim() + "\" alt=\"Skype: " + post.Skype.ToString().Trim() + "\" />\r\n");
	templateBuilder.Append("						<a href=\"skype:" + post.Skype.ToString().Trim() + "\" target=\"_blank\">" + post.Skype.ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("							</li>\r\n");

	}	//end if


	if (post.Icq!="")
	{

	templateBuilder.Append("							<li>\r\n");
	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/tools-icq.gif\" alt=\"ICQ: " + post.Icq.ToString().Trim() + "\" alt=\"ICQ: " + post.Icq.ToString().Trim() + "\" />\r\n");
	templateBuilder.Append("						<a href=\"http://wwp.icq.com/scripts/search.dll?to=" + post.Icq.ToString().Trim() + "\" target=\"_blank\">" + post.Icq.ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("							</li>\r\n");

	}	//end if


	if (post.Qq!="")
	{

	templateBuilder.Append("							<li>\r\n");
	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/tools-qq.gif\" alt=\"QQ: " + post.Qq.ToString().Trim() + "\" alt=\"QQ: " + post.Qq.ToString().Trim() + "\" />\r\n");
	templateBuilder.Append("						<a href=\"http://wpa.qq.com/msgrd?V=1&Uin=" + post.Qq.ToString().Trim() + "&Site=" + config.Forumtitle.ToString().Trim() + "&Menu=yes\" target=\"_blank\">" + post.Qq.ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("							</li>\r\n");

	}	//end if


	if (post.Yahoo!="")
	{

	templateBuilder.Append("							<li>\r\n");
	templateBuilder.Append("						<img src=\"templates/" + templatepath.ToString() + "/images/tools-yahoo.gif\" width=\"16\" alt=\"Yahoo Messenger: " + post.Yahoo.ToString().Trim() + "\"/>\r\n");
	templateBuilder.Append("						<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" + post.Yahoo.ToString().Trim() + "&.src=pg\" target=\"_blank\">" + post.Yahoo.ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("							</li>\r\n");

	}	//end if

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

	}	//end if

	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--ntforumbox end-->\r\n");
	templateBuilder.Append("<div class=\"forumpages\">\r\n");
	templateBuilder.Append("  <div class=\"pagesothers\">\r\n");

	if (canposttopic)
	{

	templateBuilder.Append("			<a href=\"posttopic.aspx?forumid=" + forumid.ToString() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/write-bbs2.gif\" alt=\"发表新主题\" /></a>\r\n");

	}	//end if


	if (topic.Closed==0)
	{

	templateBuilder.Append("			<a href=\"postreply.aspx?topicid=" + topicid.ToString() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/hf-bbs.gif\" alt=\"回复该主题\" /></a>\r\n");

	}	//end if

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

	if (canreply)
	{

	templateBuilder.Append("<!--quickreply-->\r\n");


	if (quickeditorad!="")
	{

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

	}	//end if

	templateBuilder.Append("<script type=\"text/javascript\" src=\"editor/post.js\"></" + "script>\r\n");
	templateBuilder.Append("<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<h3>快速回复帖子</h3>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<script type=\"text/javascript\" src=\"editor/bbcode.js\"></" + "script>\r\n");
	templateBuilder.Append("	<form method=\"post\" name=\"postform\" id=\"postform\" action=\"postreply.aspx?topicid=" + topicid.ToString() + "\" enctype=\"multipart/form-data\" onsubmit=\"return validate(this);\">\r\n");
	templateBuilder.Append("		<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("			  <tr class=\"list\">\r\n");
	templateBuilder.Append("					<th class=\"formlabel quicklabel\">标题</th>\r\n");
	templateBuilder.Append("					<td class=\"formbody\"><input type=\"text\" id=\"title\" name=\"title\" size=\"84\" tabindex=\"1\" value=\"回复：" + replytitle.ToString() + "\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" /></td>\r\n");
	templateBuilder.Append("			  </tr>\r\n");
	templateBuilder.Append("		</tbody>\r\n");
	templateBuilder.Append("		<tbody>\r\n");
	templateBuilder.Append("		 <tr>\r\n");
	templateBuilder.Append("			<td class=\"formlabel editorbody quicklabel\">\r\n");
	templateBuilder.Append("					<input type=\"checkbox\" name=\"parseurloff\" ID=\"parseurloff\" value=\"1\"\r\n");

	if (parseurloff==1)
	{

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

	}	//end if

	templateBuilder.Append("						/> 禁用 URL 识别<br />\r\n");
	templateBuilder.Append("						<input type=\"checkbox\" name=\"smileyoff\" ID=\"smileyoff\" value=\"1\"\r\n");

	if (smileyoff==1)
	{

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

	}	//end if

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

	if (bbcodeoff==1)
	{

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

	}	//end if

	templateBuilder.Append("						/> 禁用 Discuz!NT 代码<br />\r\n");
	templateBuilder.Append("						<input type=\"checkbox\" name=\"usesig\" ID=\"usesig\" value=\"1\"\r\n");

	if (usesig==1)
	{

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

	}	//end if

	templateBuilder.Append("						/> 使用个人签名\r\n");
	templateBuilder.Append("			 </td>\r\n");
	templateBuilder.Append("			 <td class=\"formbody editorbody\">\r\n");
	templateBuilder.Append("					<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("					  <tr>\r\n");
	templateBuilder.Append("						<td valign=\"top\" class=\"navtextarea\" ><textarea rows=\"7\" cols=\"80\" name=\"message\" id=\"message\" onKeyDown=\"ctlent(event,false);\" tabindex=\"2\" class=\"autosave colorblue\" onfocus=\"this.className='autosave colorfocus';\" onblur=\"this.className='autosave colorblue';\"></textarea>\r\n");

	if (isseccode)
	{

	templateBuilder.Append("<p class=\"formcode\">验证码:\r\n");

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


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

	}	//end if

	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						<td valign=\"top\">\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("							</" + "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() + "');\">" + 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=\"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'), 1-$('t_s_1').clientWidth);\"/>&nbsp;\r\n");
	templateBuilder.Append("						<img src=\"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\"><img src=\"images/common/loading_wide.gif\" width=\"200\" style=\" margin-top:20px;\" alt=\"表情下载\" /><p>正在加载表情...</p></div>\r\n");
	templateBuilder.Append("				<div id=\"showsmilie_pagenum\">&nbsp;</div></div>\r\n");
	templateBuilder.Append("				<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("		            function getSmilies(func){\r\n");
	templateBuilder.Append("		                var c=\"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("					window.onload = function() {\r\n");
	templateBuilder.Append("		                getSmilies(function(obj){ \r\n");
	templateBuilder.Append("	                    smilies_HASH = obj; \r\n");
	templateBuilder.Append("	                    showsmiles(1, '" + defaulttypname.ToString() + "');\r\n");
	templateBuilder.Append("	                    });\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("				</" + "script>\r\n");
	templateBuilder.Append("					 </td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					 <tbody>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td colspan=2><input class=\"sbutton\" type=\"submit\" id=\"postsubmit\" name=\"replysubmit\" value=\"发表帖子\" tabindex=\"3\"/>\r\n");
	templateBuilder.Append("							 &nbsp; [完成后可按 Ctrl+Enter 发布]<input name=\"topicsreset\" class=\"lightbutton\" value=\"清空内容\" tabindex=\"6\" type=\"reset\" onclick=\"javascript:document.postform.reset(); return true; \"/>&nbsp;&nbsp;<input class=\"lightbutton\" name=\"restoredata\" id=\"restoredata\" value=\"恢复数据\" tabindex=\"5\" title=\"恢复上次自动保存的数据\" onclick=\"loadData();\" type=\"button\" /></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					 </tbody>\r\n");
	templateBuilder.Append("					</table>\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");


	templateBuilder.Append("<!--quickreply-->\r\n");

	}	//end if

	templateBuilder.Append("<!--replay-->\r\n");
	templateBuilder.Append("<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<h2>标题: " + topictitle.ToString() + "</h2>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<ul id=\"replaycontent\">\r\n");

	int posttreeitem__loop__id=0;
	foreach(DataRow posttreeitem in posttree.Rows)
	{
		posttreeitem__loop__id++;

	templateBuilder.Append("		<li>\r\n");
	templateBuilder.Append("			<span>" + posttreeitem["spaces"].ToString().Trim() + "·<a href=\"showtree.aspx?topicid=" + topicid.ToString() + "&postid=" + posttreeitem["pid"].ToString().Trim() + "\">\r\n");

	if (Utils.StrToInt(posttreeitem["pid"].ToString().Trim(), 0)==postid)
	{

	templateBuilder.Append("					" + posttreeitem["title"].ToString().Trim() + "\r\n");

	}
	else
	{

	templateBuilder.Append("					" + posttreeitem["title"].ToString().Trim() + "\r\n");

	}	//end if

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

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

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

	}
	else
	{

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

	}	//end if

	templateBuilder.Append("			</span>\r\n");
	templateBuilder.Append("			<span>发表于 " + posttreeitem["postdatetime"].ToString().Trim() + ")</span>\r\n");
	templateBuilder.Append("			</li>\r\n");

	}	//end loop

	templateBuilder.Append("	</ul>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--reply-->\r\n");
	templateBuilder.Append("<!--forumjumping-->\r\n");
	templateBuilder.Append("<div id=\"forumjumping\">\r\n");
	templateBuilder.Append("	<div class=\"manageritem\">\r\n");

	if (useradminid>0)
	{

	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			function action_onchange(value,objfrm,postid){\r\n");
	templateBuilder.Append("				if (value != ''){\r\n");
	templateBuilder.Append("					objfrm.operat.value = value;\r\n");
	templateBuilder.Append("					objfrm.postid.value = postid;\r\n");
	templateBuilder.Append("					if(value != 'delpost'){\r\n");
	templateBuilder.Append("						objfrm.submit();\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("					else{\r\n");
	templateBuilder.Append("						document.delpost.submit();\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("				}\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("		</" + "script>\r\n");
	templateBuilder.Append("		<form id=\"moderate\" name=\"moderate\" method=\"post\" action=\"topicadmin.aspx?action=moderate&forumid=" + forumid.ToString() + "\">\r\n");
	templateBuilder.Append("			<input name=\"forumid\" type=\"hidden\" value=\"" + forumid.ToString() + "\" />\r\n");
	templateBuilder.Append("			<input name=\"topicid\" type=\"hidden\" value=\"" + topicid.ToString() + "\" />\r\n");
	templateBuilder.Append("			<input name=\"postid\" type=\"hidden\" value=\"\" />\r\n");
	templateBuilder.Append("			<input name=\"operat\" type=\"hidden\" value=\"\" />\r\n");
	templateBuilder.Append("			<select id=\"operatSel\" onchange=\"action_onchange(this.options[this.selectedIndex].value,this.form,0);\"\r\n");
	templateBuilder.Append("				name=\"operatSel\">\r\n");
	templateBuilder.Append("				<option value=\"\" selected=\"selected\">管理选项</option>\r\n");
	templateBuilder.Append("				<option value=\"delete\">删除主题</option>\r\n");
	templateBuilder.Append("				<option value=\"delpost\">批量删帖</option>\r\n");
	templateBuilder.Append("				<option value=\"close\">关闭主题</option>\r\n");
	templateBuilder.Append("				<option value=\"move\">移动主题</option>\r\n");
	templateBuilder.Append("				<option value=\"copy\">复制主题</option>\r\n");
	templateBuilder.Append("				<option value=\"highlight\">高亮显示</option>\r\n");
	templateBuilder.Append("				<option value=\"digest\">设置精华</option>\r\n");
	templateBuilder.Append("				<option value=\"displayorder\">主题置顶</option>\r\n");
	templateBuilder.Append("				<option value=\"split\">分割主题</option>\r\n");
	templateBuilder.Append("				<option value=\"merge\">合并主题</option>\r\n");
	templateBuilder.Append("				<option value=\"repair\">修复主题</option>\r\n");
	templateBuilder.Append("			</select>\r\n");
	templateBuilder.Append("		</form>\r\n");

	}
	else if (usergroupinfo.Raterange!="")
	{

	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			function action_onchange(value,objfrm,postid){\r\n");
	templateBuilder.Append("				if (value != ''){\r\n");
	templateBuilder.Append("					objfrm.operat.value = value;\r\n");
	templateBuilder.Append("					objfrm.postid.value = postid;\r\n");
	templateBuilder.Append("					if(value != 'delpost'){\r\n");
	templateBuilder.Append("						objfrm.submit();\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("					else{\r\n");
	templateBuilder.Append("						$('delpost').submit();\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("				}\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("		</" + "script>\r\n");
	templateBuilder.Append("		<form id=\"moderate\" name=\"moderate\" method=\"post\" action=\"topicadmin.aspx?action=moderate&forumid=" + forumid.ToString() + "\">\r\n");
	templateBuilder.Append("			<input name=\"forumid\" type=\"hidden\" value=\"" + forumid.ToString() + "\" />\r\n");
	templateBuilder.Append("			<input name=\"topicid\" type=\"hidden\" value=\"" + topicid.ToString() + "\" />\r\n");
	templateBuilder.Append("			<input name=\"postid\" type=\"hidden\" value=\"\" />\r\n");
	templateBuilder.Append("			<input name=\"operat\" type=\"hidden\" value=\"\" />\r\n");
	templateBuilder.Append("		</form>\r\n");

	}	//end if

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

	}
	else
	{


	if (needlogin)
	{


	templateBuilder.Append("<form id=\"formlogin\" name=\"formlogin\" method=\"post\" onsubmit=\"submitLogin(this);\">\r\n");
	templateBuilder.Append("<div class=\"ntforumbox\">\r\n");
	templateBuilder.Append("	<div class=\"titlebar\">\r\n");
	templateBuilder.Append("		<h3>用户登录</h3>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"forumform\">\r\n");
	templateBuilder.Append("	<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("		<td colspan=\"2\">\r\n");
	templateBuilder.Append("			<div class=\"forumerror\">\r\n");
	templateBuilder.Append("				<p>您无权进行当前操作，这可能因以下原因之一造成</p>\r\n");
	templateBuilder.Append("				<p>\r\n");
	templateBuilder.Append("				<b>" + msgbox_text.ToString() + "</b>\r\n");
	templateBuilder.Append("				</p>\r\n");
	templateBuilder.Append("				<p>您还没有登录，请填写下面的登录表单后再尝试访问。</p>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		 </td>\r\n");
	templateBuilder.Append("		 </tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">用户名:</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\"><input name=\"username\" type=\"text\" id=\"username\" size=\"20\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"	onblur=\"this.className='colorblue';\" value=\"\"  />  &nbsp; <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("	</tbody>\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">密码:</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\"><input name=\"password\" type=\"password\" id=\"password\" size=\"20\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" /> &nbsp; <a href=\"getpassword.aspx\" tabindex=\"-1\" accesskey=\"g\" title=\"忘记密码 (ALT + G)\">忘记密码</a>\r\n");
	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");

	if (isseccode)
	{

	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("	<tr class=\"list\">\r\n");
	templateBuilder.Append("		<th class=\"formlabel\">验证码:</th>\r\n");
	templateBuilder.Append("		<td class=\"formbody\"><p class=\"formcode\">\r\n");

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


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

	}	//end if


	if (config.Secques==1)
	{

	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">安全问题:</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\">\r\n");
	templateBuilder.Append("				<select name=\"question\" id=\"question\">\r\n");
	templateBuilder.Append("				<option value=\"0\" selected=\"selected\">无</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("	</tbody>\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">答案:</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\"><input name=\"answer\" type=\"text\" class=\"colorblue\" id=\"answer\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" size=\"50\" /><br/>如果您设置了安全提问，请在此输入正确的问题和回答\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 class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">有效时间:</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\"><input type=\"radio\" name=\"expires\" value=\"5256000\" />\r\n");
	templateBuilder.Append("							  永远\r\n");
	templateBuilder.Append("							<input name=\"expires\" type=\"radio\" value=\"43200\" />\r\n");
	templateBuilder.Append("							一个月  \r\n");
	templateBuilder.Append("							<input type=\"radio\" name=\"expires\" value=\"1440\" />\r\n");
	templateBuilder.Append("							一天  \r\n");
	templateBuilder.Append("							<input type=\"radio\" name=\"expires\" value=\"60\" />\r\n");
	templateBuilder.Append("							一小时 \r\n");
	templateBuilder.Append("							<input type=\"radio\" name=\"expires\" value=\"0\" checked=\"checked\" />\r\n");
	templateBuilder.Append("							浏览器进程\r\n");
	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");
	templateBuilder.Append("	<tbody style=\"display:none;\">\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">界面风格:</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\">\r\n");
	templateBuilder.Append("					<select name=\"templateid\"><option value=\"0\">- 使用默认 -</option>\r\n");
	templateBuilder.Append("					" + templatelistboxoptions.ToString() + "\r\n");
	templateBuilder.Append("					</select>\r\n");
	templateBuilder.Append("			</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</tbody>\r\n");
	templateBuilder.Append("	<tbody>\r\n");
	templateBuilder.Append("		<tr class=\"list\">\r\n");
	templateBuilder.Append("			<th class=\"formlabel\">&nbsp;</th>\r\n");
	templateBuilder.Append("			<td class=\"formbody\">\r\n");
	templateBuilder.Append("				<input name=\"login\" type=\"submit\" id=\"login\" value=\"登录\" onclick=\"javascript:window.location.replace('?agree=yes')\" class=\"sbutton\" />\r\n");
	templateBuilder.Append("						&nbsp;&nbsp;\r\n");
	templateBuilder.Append("				<input name=\"cancel\" type=\"button\" id=\"cancel\" value=\"取消\" onclick=\"javascript:window.location.replace('./index.aspx')\" class=\"sbutton\" />\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("</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?reurl='+window.location;\r\n");
	templateBuilder.Append("		loginForm.submit();\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</" + "script>\r\n");



	}
	else
	{


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

	if (usergroupid==7)
	{

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

	}	//end if

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



	}	//end if


	}	//end if

	templateBuilder.Append("" + inpostad.ToString() + "\r\n");


	if (footerad!="")
	{

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

	}	//end if

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

	if (config.Sitemapstatus==1)
	{

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

	}	//end if

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

	if (config.Licensed==1)
	{

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

	}	//end if

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

	if (config.Debug!=0)
	{

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

	if (isguestcachepage==1)
	{

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

	}
	else if (querycount>1)
	{

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

	}
	else
	{

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

	}	//end if


	}	//end if

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

	if (config.Stylejump==1)
	{


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

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

	}	//end if


	}	//end if

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

	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if

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




	if (floatad!="")
	{

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

	}
	else
	{


	if (doublead!="")
	{

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

	}	//end if


	}	//end if




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



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