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

	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\">\r\n");
	templateBuilder.Append("var templatepath = \"");
	templateBuilder.Append(templatepath.ToString());
	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 forumpath = \"");
	templateBuilder.Append(forumpath.ToString());
	templateBuilder.Append("\";\r\n");
	templateBuilder.Append("var ismoder = ");
	templateBuilder.Append(ismoder.ToString());
	templateBuilder.Append(";\r\n");
	templateBuilder.Append("var userid = parseInt('");
	templateBuilder.Append(userid.ToString());
	templateBuilder.Append("');\r\n");
	templateBuilder.Append("var forumallowhtml =true;\r\n");
	templateBuilder.Append("</");
	templateBuilder.Append("script>\r\n");

	if (enabletag)
	{

	templateBuilder.Append("<script type=\"text/javascript\" src=\"cache/tag/closedtags.txt\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"cache/tag/colorfultags.txt\"></");
	templateBuilder.Append("script>\r\n");

	}	//end if

	templateBuilder.Append("<script type=\"text/javascript\" src=\"javascript/template_showtopic.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"javascript/bbcode.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"javascript/ajax.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"javascript/post.js\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"javascript/template_debate.js\"></");
	templateBuilder.Append("script>\r\n");

	if (page_err==0)
	{

	templateBuilder.Append("<div id=\"foruminfo\">\r\n");
	templateBuilder.Append("	<div id=\"nav\">\r\n");
	templateBuilder.Append("		<a id=\"forumlist\" href=\"");
	templateBuilder.Append(config.Forumurl.ToString().Trim());
	templateBuilder.Append("\" \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("\r\n");
	int ishtmltitle = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle);
	

	if (ishtmltitle==1)
	{

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

	}
	else
	{

	templateBuilder.Append("		  &raquo; <strong>");
	templateBuilder.Append(topictitle.ToString());
	templateBuilder.Append("</strong>\r\n");

	}	//end if

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

	if (config.Forumjump==1)
	{

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

	}	//end if

	templateBuilder.Append("<div class=\"mainbox viewthread specialthread specialthread_5\">\r\n");
	templateBuilder.Append("	<h3>\r\n");

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

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

	}	//end if

	templateBuilder.Append("辩论主题\r\n");
	templateBuilder.Append("	</h3>\r\n");
	templateBuilder.Append("	<table cellspacing=\"0\" cellpadding=\"0\" summary=\"辩论主题\">\r\n");
	templateBuilder.Append("		<tr>\r\n");
	templateBuilder.Append("		<td class=\"postcontent\">\r\n");
	templateBuilder.Append("			<h1>");
	templateBuilder.Append(debatepost.Title.ToString().Trim());
	templateBuilder.Append(" </h1>\r\n");
	templateBuilder.Append("			<div class=\"postmessage\">\r\n");
	templateBuilder.Append("				<div id=\"firstpost\">\r\n");
	templateBuilder.Append("					");
	templateBuilder.Append(debatepost.Message.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("				</div>\r\n");

	if (enabletag)
	{

	templateBuilder.Append("				<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("					function forumhottag_callback(data)\r\n");
	templateBuilder.Append("					{\r\n");
	templateBuilder.Append("						tags = data;\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("				</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("				<script type=\"text/javascript\" src=\"cache/hottags_forum_cache_jsonp.txt\"></");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("				<div id=\"topictag\">\r\n");
	int hastag = Topics.GetMagicValue(topic.Magic, MagicType.TopicTag);
	

	if (hastag==1)
	{

	templateBuilder.Append("						<script type=\"text/javascript\">getTopicTags(");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(");</");
	templateBuilder.Append("script>\r\n");

	}
	else
	{

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

	}	//end if

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

	}	//end if

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

	if (debatepost.Posterid!=-1)
	{

	templateBuilder.Append("				<cite>\r\n");
	templateBuilder.Append("					<a href=\"#\" target=\"_blank\" id=\"memberinfo_topic\" class=\"dropmenu\"  onmouseover=\"showMenu(this.id,false)\">\r\n");

	if (debatepost.Onlinestate==1)
	{

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

	}
	else
	{

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

	}	//end if

	templateBuilder.Append("					<em>发起人:</em>");
	templateBuilder.Append(debatepost.Poster.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("					</a>\r\n");
	templateBuilder.Append("				</cite>\r\n");

	if (config.Showavatars==1)
	{

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

	if (debatepost.Avatar!="")
	{

	templateBuilder.Append("					<img src=\"");
	templateBuilder.Append(debatepost.Avatar.ToString().Trim());
	templateBuilder.Append("\" onerror=\"this.onerror=null;this.src='templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/noavatar.gif';\" \r\n");

	if (debatepost.Avatarwidth>0)
	{

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

	}	//end if

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

	}	//end if

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

	}	//end if


	}
	else
	{

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

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

	templateBuilder.Append("						<a href=\"getip.aspx?pid=");
	templateBuilder.Append(debatepost.Pid.ToString().Trim());
	templateBuilder.Append("&topicid=");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\" title=\"查看IP\"><img src=\"templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/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("			<p>开始时间&nbsp; \r\n");
	templateBuilder.Append(Convert.ToDateTime(debatepost.Postdatetime).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</p>\r\n");
	templateBuilder.Append("			<p>结束时间&nbsp;\r\n");
	templateBuilder.Append(Convert.ToDateTime(debateexpand.Terminaltime).ToString(" yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</p>\r\n");
	templateBuilder.Append("		</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("		<tr>\r\n");
	templateBuilder.Append("		<td class=\"postcontent\">\r\n");
	templateBuilder.Append("		<div class=\"postactions\">\r\n");

	if (userid!=-1)
	{


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


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

	}	//end if

	templateBuilder.Append("			<a href=\"favorites.aspx?topicid=");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\">收藏</a>|\r\n");

	if (ismoder==1)
	{

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

	if (debatepost.Posterid!=-1)
	{

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

	if (debatepost.Ratetimes>0)
	{

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

	}	//end if


	}	//end if


	if (debatepost.Layer==0 && topic.Special==4)
	{


	if (isenddebate==true  && userid==debatepost.Posterid)
	{

	templateBuilder.Append("|<a href=\"###\" onClick=\"showMenu(this.id)\" id=\"commentdebates\" name=\"commentdebates\">点评</a>\r\n");

	}	//end if


	}	//end if


	}
	else
	{


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


	if (topic.Closed==0)
	{

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

	}	//end if

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

	}	//end if


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

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

	}	//end if


	}	//end if

	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		</td>\r\n");
	templateBuilder.Append("		<td class=\"postauthor\">&nbsp;</td>\r\n");
	templateBuilder.Append("		</tr>\r\n");
	templateBuilder.Append("	</table>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div id=\"commentdebates_menu\" style=\"display: none; width:270px;\" class=\"popupmenu_popup\">\r\n");
	templateBuilder.Append("	<form id=\"commentform\" >\r\n");
	templateBuilder.Append("		<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("		  <tr>\r\n");
	templateBuilder.Append("   		 <td><textarea name=\"commentdebatesmsg\" cols=\"43\" rows=\"6\" id=\"commentdebatesmsg\"></textarea></td>\r\n");
	templateBuilder.Append("		  </tr>                                                      \r\n");
	templateBuilder.Append("		  <tr>\r\n");
	templateBuilder.Append("			<td><input type=\"button\" value=\"提交\"  onclick=\"commentdebates(");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(",'firstpost')\"/></td>\r\n");
	templateBuilder.Append("		  </tr>\r\n");
	templateBuilder.Append("		</table>\r\n");
	templateBuilder.Append("	</form>\r\n");
	templateBuilder.Append("</div>\r\n");

	if (debatepost.Posterid!=-1)
	{

	templateBuilder.Append("	<!-- member menu -->\r\n");
	templateBuilder.Append("	<div class=\"popupmenu_popup userinfopanel\" id=\"memberinfo_topic_menu\" style=\"display: none; z-index: 50; filter: progid:dximagetransform.microsoft.shadow(direction=135,color=#cccccc,strength=2); left: 19px; clip: rect(auto auto auto auto); position absolute; top: 253px; width:150px;\" initialized ctrlkey=\"userinfo2\" h=\"209\">\r\n");
	templateBuilder.Append("		<p class=\"recivemessage\"><a href=\"usercppostpm.aspx?msgtoid=");
	templateBuilder.Append(debatepost.Posterid.ToString().Trim());
	templateBuilder.Append("\" target=\"_blank\">发送短消息</a></p>\r\n");

	if (useradminid>0)
	{


	if (admininfo.Allowviewip==1)
	{

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

	}	//end if


	if (admininfo.Allowbanuser==1)
	{

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

	}	//end if


	}	//end if

	templateBuilder.Append("		<p>\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(debatepost.Posterid);
	
	templateBuilder.Append("			<a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">查看公共资料</a>\r\n");
	templateBuilder.Append("		</p>\r\n");

	if (debatepost.Nickname!="")
	{

	templateBuilder.Append("		<p>昵称<em>:");
	templateBuilder.Append(debatepost.Nickname.ToString().Trim());
	templateBuilder.Append("</em></p>\r\n");

	}	//end if

	templateBuilder.Append("		<p>\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("			ShowStars(");
	templateBuilder.Append(debatepost.Stars.ToString().Trim());
	templateBuilder.Append(", ");
	templateBuilder.Append(config.Starthreshold.ToString().Trim());
	templateBuilder.Append(");\r\n");
	templateBuilder.Append("		</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("		</p>\r\n");

	if (debatepost.Medals!="")
	{

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

	}	//end if

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

	if (config.Userstatusby==1)
	{

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

	}	//end if

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

	if (debatepost.Bday!="")
	{

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

	}	//end if

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

	if (debatepost.Joindate!="")
	{

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

	}	//end if

	templateBuilder.Append("</li>\r\n");
	templateBuilder.Append("			<li>UID:");
	templateBuilder.Append(debatepost.Posterid.ToString().Trim());
	templateBuilder.Append("</li>\r\n");
	templateBuilder.Append("		</ul>\r\n");
	templateBuilder.Append("		<p>状态:\r\n");

	if (debatepost.Onlinestate==1)
	{

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

	}
	else
	{

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

	}	//end if

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

	if (debatepost.Msn!="")
	{

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

	}	//end if


	if (debatepost.Skype!="")
	{

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

	}	//end if


	if (debatepost.Icq!="")
	{

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

	}	//end if


	if (debatepost.Qq!="")
	{

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

	}	//end if


	if (debatepost.Yahoo!="")
	{

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

	}	//end if

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

	}	//end if

	templateBuilder.Append("<div id=\"ajaxdebateposts\">\r\n");
	templateBuilder.Append("<div class=\"box specialpostcontainer\">\r\n");
	templateBuilder.Append("	<ul class=\"tabs\">\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	
	templateBuilder.Append("		 <li class=\"current\" style=\"padding:0 8px;\">辩论详情</li><li><a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">普通模式</a></li>\r\n");
	templateBuilder.Append("	</ul>\r\n");
	templateBuilder.Append("	<div class=\"talkbox\">\r\n");
	templateBuilder.Append("		<div class=\"specialtitle\">\r\n");
	templateBuilder.Append("			<div class=\"squaretitle\">\r\n");
	templateBuilder.Append("				<p>正方观点</p>\r\n");
	templateBuilder.Append("				");
	templateBuilder.Append(debateexpand.Positiveopinion.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<div class=\"sidetitle\">\r\n");
	templateBuilder.Append("				<p>反方观点</p>\r\n");
	templateBuilder.Append("				");
	templateBuilder.Append(debateexpand.Negativeopinion.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"balance\">\r\n");
	templateBuilder.Append("			<span class=\"scalevalue1\"><b id=\"positivediggs\">");
	templateBuilder.Append(debateexpand.Positivediggs.ToString().Trim());
	templateBuilder.Append("</b></span>\r\n");
	templateBuilder.Append("			<span class=\"scalevalue\"><b id=\"negativediggs\">");
	templateBuilder.Append(debateexpand.Negativediggs.ToString().Trim());
	templateBuilder.Append("</b></span>\r\n");
	templateBuilder.Append("			<div id=\"positivepercent\" class=\"squareboll\" style=\"width:");
	templateBuilder.Append(positivepercent.ToString());
	templateBuilder.Append("%;\"></div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"talkinner\">\r\n");
	templateBuilder.Append("			<div class=\"squarebox\">\r\n");

	if (!isenddebate)
	{

	templateBuilder.Append("				<div class=\"buttoncontrol\"><button onclick=\"$('positivepostform').style.display='';this.style.display='none';\">加入正方</button></div>\r\n");
	templateBuilder.Append("				<div id=\"positivepostform\" style=\"display: none;\">\r\n");
	templateBuilder.Append("					<form method=\"post\" name=\"postform_");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\" id=\"postform_");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\" action=\"postreply.aspx?topicid=");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\"	enctype=\"multipart/form-data\" onsubmit=\"return validate(this);\" >\r\n");
	templateBuilder.Append("						<input type=\"hidden\" id=\"title\" name=\"title\" size=\"84\" tabindex=\"1\" value=\"\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" id=\"postid\" name=\"postid\" value=\"-1\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"debateopinion\" value=\"1\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"parseurloff\" value=\"");
	templateBuilder.Append(parseurloff.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"smileyoff\" value=\"");
	templateBuilder.Append(smileyoff.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"bbcodeoff\" value=\"");
	templateBuilder.Append(bbcodeoff.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"usesig\" value=\"0\" />\r\n");
	templateBuilder.Append("						<table cellspacing=\"0\" cellpadding=\"0\" summary=\"正方观点\">\r\n");
	templateBuilder.Append("							<tr><td>我的意见：</td></tr>\r\n");
	templateBuilder.Append("							<tr>\r\n");
	templateBuilder.Append("								<td>\r\n");
	templateBuilder.Append("									<textarea name=\"message\" cols=\"6\" rows=\"4\" class=\"autosave\" id=\"message\" tabindex=\"2\" onkeydown=\"debatequickreply(event, this.form);\" onfocus=\"textareachange(this.form.id)\";></textarea>\r\n");
	templateBuilder.Append("								</td>\r\n");
	templateBuilder.Append("							</tr>\r\n");
	templateBuilder.Append("							<tr>\r\n");
	templateBuilder.Append("								<td>\r\n");

	if (isseccode)
	{

	templateBuilder.Append("<div id=\"debate_vcode\" name=\"debate_vcode\"><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></div>\r\n");

	}	//end if

	templateBuilder.Append("<input type=\"submit\" name=\"replysubmit\" value=\"我要发表\" class=\"submitbutton\"/>\r\n");
	templateBuilder.Append("								</td>\r\n");
	templateBuilder.Append("							</tr>\r\n");
	templateBuilder.Append("						</table>\r\n");
	templateBuilder.Append("					</form>\r\n");
	templateBuilder.Append("				</div>\r\n");

	}
	else
	{

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

	}	//end if


	if (positivepostlist.Count>0)
	{

	templateBuilder.Append("					<div id=\"positive_pagenumbers_top\" class=\"debatepages\">");
	templateBuilder.Append(positivepagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("					<div id=\"positivepage_owner\">\r\n");

	int positivepost__loop__id=0;
	foreach(ShowtopicPagePostInfo positivepost in positivepostlist)
	{
		positivepost__loop__id++;

	templateBuilder.Append("							<div class=\"square\">\r\n");
	templateBuilder.Append("								<table cellspacing=\"0\" cellpadding=\"0\" summary=\"正方观点\">\r\n");
	templateBuilder.Append("								<tbody>\r\n");
	templateBuilder.Append("								<tr>\r\n");
	templateBuilder.Append("								<td class=\"supportbox\">\r\n");
	templateBuilder.Append("										<p style=\"background: rgb(255, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;\">支持度\r\n");
	templateBuilder.Append("										<span class=\"talknum\" id=\"diggs");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(positivepost.Diggs.ToString().Trim());
	templateBuilder.Append("</span>\r\n");

	if (!isenddebate  && positivepost.Posterid!=userid)
	{


	if (!positivepost.Digged)
	{

	templateBuilder.Append("										<span class=\"cliktalk\" id=\"cliktalk");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\"><a href=\"javascript:void(0);\" onclick=\"digg(");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append(",");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(",1)\">支持</a></span>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("										</p>\r\n");
	templateBuilder.Append("								</td>\r\n");
	templateBuilder.Append("								<td class=\"comment\">\r\n");
	templateBuilder.Append("									<h3><span>时间:\r\n");
	templateBuilder.Append(Convert.ToDateTime(positivepost.Postdatetime).ToString("yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</span>发表者:<a id=\"poster");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\" href=\"");
	templateBuilder.Append(UserInfoAspxRewrite(positivepost.Posterid).ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(positivepost.Poster.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	if (ismoder==1)
	{

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

	}
	else
	{


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

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

	}	//end if


	}	//end if

	templateBuilder.Append("									</h3>\r\n");
	templateBuilder.Append("									<div class=\"debatemessage\"  id=\"message");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("									");
	templateBuilder.Append(positivepost.Message.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("									</div>\r\n");

	if (!isenddebate  && positivepost.Posterid!=userid)
	{

	templateBuilder.Append("									<input name=\"hiddendpid");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\" type=\"hidden\" id=\"hiddendpid");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\" value=\"");
	templateBuilder.Append(positivepost.Ubbmessage.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("									<p class=\"othertalk\"><a id=\"reply_btn_");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\" href=\"###\" onclick=\"showDebatReplyBox(");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(", ");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append(", 2, ");
	templateBuilder.Append(parseurloff.ToString());
	templateBuilder.Append(", ");
	templateBuilder.Append(smileyoff.ToString());
	templateBuilder.Append(", ");
	templateBuilder.Append(bbcodeoff.ToString());
	templateBuilder.Append(");this.style.display='none';\">我不同意</a><div id=\"reply_box_owner_");
	templateBuilder.Append(positivepost.Pid.ToString().Trim());
	templateBuilder.Append("\"></div>\r\n");
	templateBuilder.Append("									</p>\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("							</div>\r\n");

	}	//end loop

	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("					<div id=\"positive_pagenumbers_buttom\" class=\"debatepages\">");
	templateBuilder.Append(positivepagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");

	if (!isenddebate)
	{

	templateBuilder.Append("					<div class=\"buttoncontrol\"><button onclick=\"$('positivepostform2').innerHTML=$('positivepostform').innerHTML;$('positivepostform2').style.display='';this.style.display='none';\">加入正方</button></div>\r\n");
	templateBuilder.Append("					<div id=\"positivepostform2\" style=\"display:none;\"></div>\r\n");

	}	//end if


	}	//end if

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

	if (!isenddebate)
	{

	templateBuilder.Append("				<div class=\"buttoncontrol\"><button onclick=\"$('negativepostform').style.display='';this.style.display='none';\">加入反方</button></div>\r\n");
	templateBuilder.Append("				<div id=\"negativepostform\" style=\"display: none;\" >\r\n");
	templateBuilder.Append("					<form method=\"post\" name=\"postform_");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\" id=\"postform_");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\" action=\"postreply.aspx?topicid=");
	templateBuilder.Append(topicid.ToString());
	templateBuilder.Append("\"	enctype=\"multipart/form-data\" onsubmit=\"return validate(this);\" >\r\n");
	templateBuilder.Append("						<input type=\"hidden\" id=\"title\" name=\"title\" size=\"84\" tabindex=\"1\" value=\"\"/>\r\n");
	templateBuilder.Append("						<input type=\"hidden\" id=\"postid\" name=\"postid\" value=\"-1\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"debateopinion\" value=\"2\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"parseurloff\" value=\"");
	templateBuilder.Append(parseurloff.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"smileyoff\" value=\"");
	templateBuilder.Append(smileyoff.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"bbcodeoff\" value=\"");
	templateBuilder.Append(bbcodeoff.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"usesig\" value=\"0\" />\r\n");
	templateBuilder.Append("						<table cellspacing=\"0\" cellpadding=\"0\" summary=\"反方观点\">\r\n");
	templateBuilder.Append("							<tr>\r\n");
	templateBuilder.Append("								<td>我的意见：</td>\r\n");
	templateBuilder.Append("							</tr>\r\n");
	templateBuilder.Append("							<tr>\r\n");
	templateBuilder.Append("								<td>\r\n");
	templateBuilder.Append("									<textarea name=\"message\" cols=\"6\" rows=\"4\" class=\"autosave\" id=\"message\" tabindex=\"2\" onkeydown=\"debatequickreply(event, this.form);\" onfocus=\"textareachange(this.form.id);\"></textarea>\r\n");
	templateBuilder.Append("								</td>\r\n");
	templateBuilder.Append("							</tr>\r\n");
	templateBuilder.Append("							<tr>\r\n");
	templateBuilder.Append("								<td>\r\n");

	if (isseccode)
	{

	templateBuilder.Append("<div id=\"debate_vcode\" name=\"debate_vcode\"><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></div>\r\n");

	}	//end if

	templateBuilder.Append("<input type=\"submit\" name=\"replysubmit\" value=\"我要发表\" class=\"submitbutton\"/>\r\n");
	templateBuilder.Append("								</td>\r\n");
	templateBuilder.Append("							</tr>\r\n");
	templateBuilder.Append("						</table>\r\n");
	templateBuilder.Append("					</form>\r\n");
	templateBuilder.Append("				</div>\r\n");

	}
	else
	{

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

	}	//end if


	if (negativepostlist.Count>0)
	{

	templateBuilder.Append("					<div id=\"negative_pagenumbers_top\" class=\"debatepages\">");
	templateBuilder.Append(negativepagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("					<div id=\"negativepage_owner\">\r\n");

	int negativepost__loop__id=0;
	foreach(ShowtopicPagePostInfo negativepost in negativepostlist)
	{
		negativepost__loop__id++;

	templateBuilder.Append("							<div class=\"square\">\r\n");
	templateBuilder.Append("								<table cellspacing=\"0\" cellpadding=\"0\" summary=\"反方观点\">\r\n");
	templateBuilder.Append("								<tbody>\r\n");
	templateBuilder.Append("								<tr>\r\n");
	templateBuilder.Append("								<td class=\"supportbox\">\r\n");
	templateBuilder.Append("								        <p style=\"background: rgb(255, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;\">支持度\r\n");
	templateBuilder.Append("										<span class=\"talknum\" id=\"diggs");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(negativepost.Diggs.ToString().Trim());
	templateBuilder.Append("</span>\r\n");

	if (!isenddebate && negativepost.Posterid!=userid)
	{


	if (!negativepost.Digged)
	{

	templateBuilder.Append("										<span class=\"cliktalk\" id=\"cliktalk");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\"><a href=\"javascript:void(0);\" onclick=\"digg(");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append(",");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(",2)\">支持</a></span>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("									</p>\r\n");
	templateBuilder.Append("								</td>\r\n");
	templateBuilder.Append("								<td class=\"comment\">\r\n");
	templateBuilder.Append("									<h3><span>时间:\r\n");
	templateBuilder.Append(Convert.ToDateTime(negativepost.Postdatetime).ToString("yyyy-MM-dd HH:mm"));
	templateBuilder.Append("</span>发表者:<a id=\"poster");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\" href=\"");
	templateBuilder.Append(UserInfoAspxRewrite(negativepost.Posterid).ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(negativepost.Poster.ToString().Trim());
	templateBuilder.Append("</a>\r\n");

	if (ismoder==1)
	{

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

	}
	else
	{


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

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

	}	//end if


	}	//end if

	templateBuilder.Append("									</h3>\r\n");
	templateBuilder.Append("									<div class=\"debatemessage\" id=\"message");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("									");
	templateBuilder.Append(negativepost.Message.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("									</div>\r\n");

	if (!isenddebate  && negativepost.Posterid!=userid)
	{

	templateBuilder.Append("										<input name=\"hiddendpid");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\" type=\"hidden\" id=\"hiddendpid");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\" value=\"");
	templateBuilder.Append(negativepost.Ubbmessage.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("									<p class=\"othertalk\"><a href=\"###\" id=\"reply_btn_");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\" onclick=\"showDebatReplyBox(");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(", ");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append(", 1, ");
	templateBuilder.Append(parseurloff.ToString());
	templateBuilder.Append(", ");
	templateBuilder.Append(smileyoff.ToString());
	templateBuilder.Append(", ");
	templateBuilder.Append(bbcodeoff.ToString());
	templateBuilder.Append(");this.style.display='none';\">我不同意</a><div id=\"reply_box_owner_");
	templateBuilder.Append(negativepost.Pid.ToString().Trim());
	templateBuilder.Append("\"></div>\r\n");
	templateBuilder.Append("									</p>\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("							</div>\r\n");

	}	//end loop

	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("					<div id=\"negative_pagenumbers_buttom\" class=\"debatepages\">");
	templateBuilder.Append(negativepagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");

	if (!isenddebate)
	{

	templateBuilder.Append("					<div class=\"buttoncontrol\"><button onclick=\"$('negativepostform2').innerHTML=$('negativepostform').innerHTML;$('negativepostform2').style.display='';this.style.display='none';\">加入反方</button></div>\r\n");
	templateBuilder.Append("					<div id=\"negativepostform2\" style=\"display:none;\"></div>\r\n");

	}	//end if


	}	//end if

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


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



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