<%@ Page language="c#" Codebehind="spaceregister.aspx.cs" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.ForumPage.spaceregister" %>
<%@ 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:58.
		本页面代码由Discuz!NT模板引擎生成于 2007-11-15 11:15:58. 
	*/

	base.OnInit(e);


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


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

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

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

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

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

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if

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

	}	//end if

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

	if (userid==-1)
	{

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

	}
	else
	{

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

	if (useradminid==1)
	{

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

	}	//end if


	}	//end if


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


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

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

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if


	}	//end if


	if (usergroupinfo.Allowsearch>0)
	{

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

	}	//end if

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

	if (headerad!="")
	{

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

	}	//end if

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

	if (userid!=-1)
	{

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

	}	//end if

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

	if (userid!=-1)
	{

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

	}	//end if

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


	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> > 申请个人空间</h2>	</div>\r\n");
	templateBuilder.Append("	<div class=\"forumstats\">\r\n");
	templateBuilder.Append("		<div id=\"search\">\r\n");

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


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

	if (page_err==0)
	{

	templateBuilder.Append("<!--body-->\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	function validatefrom()\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		if(document.getElementById(\"spacetitle\").value == \"\")\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			alert(\"个人空间名称不能为空！\");\r\n");
	templateBuilder.Append("			document.getElementById(\"spacetitle\").focus();\r\n");
	templateBuilder.Append("			return false;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		if(document.getElementById('spacedescription').value.length > 200)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			alert('个人空间描述长度最大为200字');\r\n");
	templateBuilder.Append("			return false;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		if(!(/^\\d+$/.test(document.getElementById(\"bpp\").value)))\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			alert(\"显示日志篇数必须是数值！\");\r\n");
	templateBuilder.Append("			document.getElementById(\"bpp\").focus();\r\n");
	templateBuilder.Append("			return false;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</" + "script>\r\n");

	if (ispost)
	{


	templateBuilder.Append("<div class=\"forumtrue\">\r\n");
	templateBuilder.Append("			<div class=\"navforumtrue\">" + msgbox_text.ToString() + "\r\n");

	if (msgbox_url!="")
	{

	templateBuilder.Append("					<p class=\"errorback\">\r\n");
	templateBuilder.Append("						<a href=\"" + msgbox_url.ToString() + "\">如果浏览器没有转向, 请点击这里.</a>\r\n");
	templateBuilder.Append("					</p>\r\n");

	}	//end if

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



	}
	else
	{

	templateBuilder.Append("	<form id=\"postpm\" name=\"postpm\" method=\"post\" action=\"\">\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("				<th class=\"formlabel\">个人空间名称:</th>\r\n");
	templateBuilder.Append("				<td class=\"formbody\"><input name=\"spacetitle\" type=\"text\" id=\"spacetitle\"  size=\"40\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"100\"/>\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\"><textarea name=\"description\" cols=\"50\" rows=\"6\" id=\"spacedescription\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" style=\"width:80%;\"></textarea>\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\">\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"blogdispmode\" value=\"0\"  class=\"radioinput\" checked=\"checked\"/>摘要\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"blogdispmode\" value=\"1\"  class=\"radioinput\"/>全文\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"blogdispmode\" value=\"2\"  class=\"radioinput\"/>只显示标题\r\n");
	templateBuilder.Append("				</td>\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=\"bpp\" type=\"text\" class=\"colorblue\" id=\"bpp\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" size=\"30\" maxlength=\"3\" /> \r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("			</tr>\r\n");
	templateBuilder.Append("			</tbody>\r\n");

	if (spaceactiveconfig.Enablespacerewrite==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("						<input name=\"rewritename\" type=\"text\" class=\"colorblue\" id=\"rewritename\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';checkrewritename(this.value);\" value=\"\" size=\"30\" /><span id=\"checkresult\" style=\"line-height: 25px;\"></span>\r\n");
	templateBuilder.Append("						<p>设置此项后您将可以用 http://论坛地址/space/个性域名 形式的地址访问您的个人空间, 设置之后将不可更改</p>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("					function checkrewritename(rewritename)\r\n");
	templateBuilder.Append("					{\r\n");
	templateBuilder.Append("						if (rewritename.length > 0)\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							ajaxRead(\"tools/ajax.aspx?t=checkrewritename&rewritename=\" + escape(rewritename), \"showcheckresult(obj,'\" + rewritename + \"');\");\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("						else\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							$(\"checkresult\").innerHTML = \"\";\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("					function showcheckresult(obj, rewritename)\r\n");
	templateBuilder.Append("					{\r\n");
	templateBuilder.Append("						var res = obj.getElementsByTagName('result');\r\n");
	templateBuilder.Append("						var resContainer = $(\"checkresult\");\r\n");
	templateBuilder.Append("						var result = \"\";\r\n");
	templateBuilder.Append("						if (res[0] != null && res[0] != undefined)\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							if (res[0].childNodes.length > 1) {\r\n");
	templateBuilder.Append("								result = res[0].childNodes[1].nodeValue;\r\n");
	templateBuilder.Append("							} else {\r\n");
	templateBuilder.Append("								result = res[0].firstChild.nodeValue;    		\r\n");
	templateBuilder.Append("							}\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("						if (result == \"1\")\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							resContainer.innerHTML = \"<font color='#009900'>对不起，您输入的个性化名称 \\\"\" + rewritename + \"\\\" 中含有非法字符或被禁用，请选择其他名字后再试。</font>\";\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("						else if (result == \"2\")\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							resContainer.innerHTML = \"<font color='#009900'>个性化名称只能为字母、数字、下划线、减号的组合\";\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("						else if (result == \"3\")\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							resContainer.innerHTML = \"<font color='#009900'>对不起，您输入的个性化名称 \\\"\" + rewritename + \"\\\" 已经被其他会员使用，请选择其他名字后再试。\";\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("						else\r\n");
	templateBuilder.Append("						{\r\n");
	templateBuilder.Append("							resContainer.innerHTML = \"可用\";\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("					}\r\n");
	templateBuilder.Append("				</" + "script>\r\n");
	templateBuilder.Append("				<script type=\"text/javascript\" src=\"templates/default/ajax.js\"></" + "script>\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\">\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"commentpref\" value=\"0\"  class=\"radioinput\" checked=\"checked\" />允许所有人\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"commentpref\" value=\"1\"  class=\"radioinput\"/>禁止所有人\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"commentpref\" value=\"2\"  class=\"radioinput\"/>只有登录用户						\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\">\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"messagepref\" value=\"0\"  class=\"radioinput\" checked=\"checked\"/>允许所有人\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"messagepref\" value=\"1\"  class=\"radioinput\"/>禁止所有人\r\n");
	templateBuilder.Append("					<input type=\"radio\" name=\"messagepref\" value=\"2\"  class=\"radioinput\"/>只有登录用户													\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\"><input type=\"submit\" name=\"Submit\" value=\"确定\" class=\"sbutton\" onclick=\"return validatefrom()\" ID=\"Submit1\"/></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");

	}	//end if

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


	if (footerad!="")
	{

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

	}	//end if

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

	if (config.Sitemapstatus==1)
	{

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

	}	//end if

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

	if (config.Licensed==1)
	{

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

	}	//end if

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

	if (config.Debug!=0)
	{

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

	if (isguestcachepage==1)
	{

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

	}
	else if (querycount>1)
	{

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

	}
	else
	{

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

	}	//end if


	}	//end if

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

	if (config.Stylejump==1)
	{


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

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

	}	//end if


	}	//end if

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

	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if

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



	}
	else
	{


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

	if (usergroupid==7)
	{

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

	}	//end if

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


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

	}	//end if


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