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

	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.Webtitle.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() + "/main.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=\"container\">\r\n");
	templateBuilder.Append("<!--header start-->\r\n");
	templateBuilder.Append("<div id=\"header\">\r\n");
	templateBuilder.Append("	<h2><img src=\"templates/" + templatepath.ToString() + "/images/logo.gif\" alt=\"Discuz! Board NT|BBS|论坛\"/></h2>\r\n");
	templateBuilder.Append("	<p id=\"topmenu\">\r\n");

	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

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

	if (headerad!="")
	{

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

	}	//end if

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

	if (announcementcount>0)
	{

	templateBuilder.Append("        <!--message area start--->\r\n");
	templateBuilder.Append("		<div class=\"ntforumnote\">\r\n");
	templateBuilder.Append("		<dl>\r\n");
	templateBuilder.Append("			<dt>公告:</dt>\r\n");
	templateBuilder.Append("			<dd>\r\n");
	templateBuilder.Append("				<marquee width=\"98%\" direction=\"left\" scrollamount=\"2\" scrolldelay=\"1\" onmouseover=\"this.stop();\" onmouseout=\"this.start();\">\r\n");
	templateBuilder.Append("				<ul>\r\n");

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

	templateBuilder.Append("					<li><a href=\"" + forumurl.ToString() + "announcement.aspx#" + announcement["id"].ToString().Trim() + "\">" + announcement["title"].ToString().Trim() + "</a><cite>\r\n");
templateBuilder.Append(Convert.ToDateTime(announcement["starttime"].ToString().Trim()).ToString("MM.dd"));
	templateBuilder.Append("</cite></li>\r\n");

	}	//end loop

	templateBuilder.Append("				</ul>\r\n");
	templateBuilder.Append("				</marquee>\r\n");
	templateBuilder.Append("			</dd>\r\n");
	templateBuilder.Append("		</dl>\r\n");
	templateBuilder.Append("	</div>		       \r\n");
	templateBuilder.Append("	    <!--message area end-->\r\n");

	}	//end if

	templateBuilder.Append("	    <div class=\"ntforumsearch\">\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 id=\"ntforumbody\">\r\n");
	templateBuilder.Append("		<div id=\"ntforumleft\">\r\n");
	templateBuilder.Append("			<div class=\"modulebox\" style=\"margin-top:0;\">\r\n");

	if (postlist.Length>0)
	{

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

	int __postinfo__loop__id=0;
	foreach(PostInfo __postinfo in postlist)
	{
		__postinfo__loop__id++;

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

	if (__postinfo.Posterid>0)
	{

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

	}
	else
	{

	templateBuilder.Append("						    " + __postinfo.Poster.ToString().Trim() + "\r\n");

	}	//end if

	templateBuilder.Append("						      " + __postinfo.Postdatetime.ToString().Trim() + "\r\n");
	templateBuilder.Append("						</cite></dt>\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(__postinfo.Tid,0);
	
	templateBuilder.Append("						<dd>" + __postinfo.Message.ToString().Trim() + " <a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">详细</a></dd>\r\n");

	}	//end loop

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

	}	//end if

	templateBuilder.Append("				<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("						<h2>BBS</h2>\r\n");
	templateBuilder.Append("						<em><a href=\"forumindex.aspx\" onfocus=\"javascript:this.blur();\">更多</a>...</em>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"nttable\">\r\n");
	templateBuilder.Append("					<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");

	int __topicinfo__loop__id=0;
	foreach(DataRow __topicinfo in topiclist.Rows)
	{
		__topicinfo__loop__id++;


	if (__topicinfo["title"].ToString().Trim()!="")
	{

	templateBuilder.Append("						  <tr>\r\n");
	templateBuilder.Append("							<td class=\"topicname\"><h5>\r\n");
	 aspxrewriteurl = this.ShowForumAspxRewrite(__topicinfo["fid"].ToString().Trim(),0);
	
	templateBuilder.Append("							<a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">" + __topicinfo["name"].ToString().Trim() + "</a></h5></td>\r\n");
	templateBuilder.Append("							<td class=\"topiccontent\"><h4>·\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(__topicinfo["tid"].ToString().Trim(),0);
	
	templateBuilder.Append("							<a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">" + __topicinfo["title"].ToString().Trim() + "</a></h4></td>\r\n");
	templateBuilder.Append("						  </tr>\r\n");

	}	//end if


	}	//end loop

	templateBuilder.Append("						</table>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("						<h2>热门版块</h2>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"hotforum\">\r\n");
	templateBuilder.Append("						<ul>\r\n");

	int __foruminfo__loop__id=0;
	foreach(DataRow __foruminfo in hotforumlist.Rows)
	{
		__foruminfo__loop__id++;

	 aspxrewriteurl = this.ShowForumAspxRewrite(__foruminfo["fid"].ToString().Trim(),0);
	
	templateBuilder.Append("							<li><a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">" + __foruminfo["name"].ToString().Trim() + "</a></li>\r\n");

	}	//end loop

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

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

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

	}	//end if


	if (config.Enablespace==1)
	{

	templateBuilder.Append("				<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("						<h2>个人空间</h2>\r\n");
	templateBuilder.Append("					<em><a href=\"" + config.Spaceurl.ToString().Trim() + "\" onfocus=\"javascript:this.blur();\">更多</a>...</em>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"hotblog\">\r\n");
	templateBuilder.Append("						<ul>\r\n");

	int __spaceconfig__loop__id=0;
	foreach(SpaceConfigInfoExt __spaceconfig in spaceconfigs)
	{
		__spaceconfig__loop__id++;

	templateBuilder.Append("							<li>\r\n");
	templateBuilder.Append("									<a href=\"" + spaceurl.ToString() + "space/?uid=" + __spaceconfig.Userid.ToString().Trim() + "\"><img src=\"" + __spaceconfig.Spacepic.ToString().Trim() + "\" alt=\"blogphoto\" width=\"52\" height=\"52\" onerror=\"this.src='avatars/common/0.gif';\"/></a>\r\n");
	templateBuilder.Append("									<h3><a href=\"" + spaceurl.ToString() + "space/?uid=" + __spaceconfig.Userid.ToString().Trim() + "\">\r\n");
templateBuilder.Append(Utils.GetSubString(__spaceconfig.Spacetitle,0,20,"..."));
	templateBuilder.Append("</a></h3>\r\n");
	templateBuilder.Append("									<p><a href=\"" + spaceurl.ToString() + "space/viewspacepost.aspx?postid=" + __spaceconfig.Postid.ToString().Trim() + "\">\r\n");
templateBuilder.Append(Utils.GetSubString(__spaceconfig.Posttitle,0,20,"..."));
	templateBuilder.Append("</a></p>\r\n");
	templateBuilder.Append("									<p>日志: <em>" + __spaceconfig.Postcount.ToString().Trim() + "</em>   \r\n");

	if (config.Enablealbum==1)
	{

	templateBuilder.Append("" + config.Albumname.ToString().Trim() + ": <em>" + __spaceconfig.Albumcount.ToString().Trim() + "</em>\r\n");

	}	//end if

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

	}	//end loop

	templateBuilder.Append("						</ul>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("					<h2>日志</h2>\r\n");
	templateBuilder.Append("						<em><a href=\"" + spaceurl.ToString() + "bloglist.aspx\" onfocus=\"javascript:this.blur();\">更多...</a></em>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"nttable\">\r\n");
	templateBuilder.Append("					<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");

	int __spacepostinfo__loop__id=0;
	foreach(SpaceShortPostInfo __spacepostinfo in spacepostlist)
	{
		__spacepostinfo__loop__id++;

	templateBuilder.Append("						  <tr>\r\n");
	templateBuilder.Append("							<td class=\"topiccontent\">· <a href=\"" + spaceurl.ToString() + "space/viewspacepost.aspx?postid=" + __spacepostinfo.Postid.ToString().Trim() + "\">\r\n");
templateBuilder.Append(Utils.GetSubString(__spacepostinfo.Title,0,56,"..."));
	templateBuilder.Append("</a><cite>( " + __spacepostinfo.Commentcount.ToString().Trim() + " / " + __spacepostinfo.Views.ToString().Trim() + " )</cite> </td>\r\n");
	templateBuilder.Append("							<td><a href=\"" + spaceurl.ToString() + "space/?uid=" + __spacepostinfo.Uid.ToString().Trim() + "\">" + __spacepostinfo.Author.ToString().Trim() + "</a></td>\r\n");
	templateBuilder.Append("							<td>\r\n");
templateBuilder.Append(Convert.ToDateTime(__spacepostinfo.Postdatetime).ToString("yyyy-MM-dd"));
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						  </tr>\r\n");

	}	//end loop

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

	}	//end if


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("			    <div class=\"forumtitle\">\r\n");
	templateBuilder.Append("					<h2>" + config.Albumname.ToString().Trim() + "</h2>\r\n");
	templateBuilder.Append("				    <em><a href=\"" + albumurl.ToString() + "showalbumlist.aspx\" onfocus=\"javascript:this.blur();\">更多</a>...</em>	\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("					<div class=\"Photo\">\r\n");
	templateBuilder.Append("						<ul>\r\n");

	int __albuminfo__loop__id=0;
	foreach(AlbumInfo __albuminfo in recommendalbumlist)
	{
		__albuminfo__loop__id++;

	templateBuilder.Append("						    <li style=\"width:33%;\">						\r\n");

	if (__albuminfo.Logo!="")
	{

	templateBuilder.Append("								<div class=\"PhotoPicture\">\r\n");
	templateBuilder.Append("									<a href=\"" + albumurl.ToString() + "showalbum.aspx?albumid=" + __albuminfo.Albumid.ToString().Trim() + "\"><img src=\"" + __albuminfo.Logo.ToString().Trim() + "\" alt=\"" + __albuminfo.Title.ToString().Trim() + "\" style=\"height: 80px; width: 105px\"/></a>\r\n");
	templateBuilder.Append("								</div>\r\n");

	}
	else
	{

	templateBuilder.Append("									<a href=\"" + albumurl.ToString() + "showalbum.aspx?albumid=" + __albuminfo.Albumid.ToString().Trim() + "\"><img src=\"templates/" + templatepath.ToString() + "/images/NoPhoto.jpg\" alt=\"" + __albuminfo.Albumid.ToString().Trim() + "\"  style=\"height: 100px; width: 125px\"/></a>\r\n");

	}	//end if

	templateBuilder.Append("								<h3><a href=\"" + albumurl.ToString() + "showalbum.aspx?albumid=" + __albuminfo.Albumid.ToString().Trim() + "\">" + __albuminfo.Title.ToString().Trim() + "</a> <em>(" + __albuminfo.Imgcount.ToString().Trim() + ")</em></h3>\r\n");
	templateBuilder.Append("							</li>\r\n");

	}	//end loop

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

	}	//end if


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

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

	}	//end if


	if (forumlinkcount>0)
	{

	templateBuilder.Append("                <div class=\"forumlink modulebox\">\r\n");
	templateBuilder.Append("					<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("						<h2>友情链接</h2>\r\n");
	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("	                <div id=\"linklist\">\r\n");
	templateBuilder.Append("						<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"  width=\"100%\">\r\n");

	int forumlink__loop__id=0;
	foreach(DataRow forumlink in forumlinklist.Rows)
	{
		forumlink__loop__id++;


	if (forumlink["logo"].ToString().Trim()!="")
	{

	templateBuilder.Append("							<tbody>	\r\n");
	templateBuilder.Append("								<tr class=\"list\" >\r\n");
	templateBuilder.Append("									<td  class=\"topicicon\">\r\n");
	templateBuilder.Append("										<img src=\"templates/" + templatepath.ToString() + "/images/parters02.gif\" alt=\"友情链接\"/>\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("									<td class=\"linktitle\">\r\n");
	templateBuilder.Append("									<h3>\r\n");
	templateBuilder.Append("										<a href=\"" + forumlink["url"].ToString().Trim() + "\" target=\"_blank\">" + forumlink["name"].ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("									</h3>\r\n");
	templateBuilder.Append("									<p>" + forumlink["note"].ToString().Trim() + "</p>\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("									<td class=\"linklogo\">\r\n");
	templateBuilder.Append("										<a href=\"" + forumlink["url"].ToString().Trim() + "\" target=\"_blank\"><img src=\"" + forumlink["logo"].ToString().Trim() + "\" alt=\"" + forumlink["name"].ToString().Trim() + "\"/></a>\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("								</tr>\r\n");
	templateBuilder.Append("							</tbody>\r\n");

	}
	else if (forumlink["name"].ToString().Trim()!="$$otherlink$$")
	{

	templateBuilder.Append("							<tbody>\r\n");
	templateBuilder.Append("								<tr class=\"list\">\r\n");
	templateBuilder.Append("									<td class=\"topicicon\">\r\n");
	templateBuilder.Append("										<img src=\"templates/" + templatepath.ToString() + "/images/parters02.gif\" alt=\"友情链接\"/>\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("									<td colspan=\"2\"  class=\"linktitle\">\r\n");
	templateBuilder.Append("									<h3>\r\n");
	templateBuilder.Append("										<a href=\"" + forumlink["url"].ToString().Trim() + "\" target=\"_blank\">" + forumlink["name"].ToString().Trim() + "</a>\r\n");
	templateBuilder.Append("									</h3>\r\n");
	templateBuilder.Append("									<p>" + forumlink["note"].ToString().Trim() + "</p>\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("								</tr>\r\n");
	templateBuilder.Append("							</tbody>\r\n");

	}
	else
	{

	templateBuilder.Append("							<tbody>\r\n");
	templateBuilder.Append("								<tr class=\"list\">\r\n");
	templateBuilder.Append("									<td  class=\"topicicon\">\r\n");
	templateBuilder.Append("										<img src=\"templates/" + templatepath.ToString() + "/images/parters02.gif\" alt=\"友情链接\"/>\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("									<td colspan=\"2\"  class=\"linktitle\">\r\n");
	templateBuilder.Append("										" + forumlink["note"].ToString().Trim() + "\r\n");
	templateBuilder.Append("									</td>\r\n");
	templateBuilder.Append("							   </tr>\r\n");
	templateBuilder.Append("							</tbody>\r\n");

	}	//end if


	}	//end loop

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

	}	//end if

	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div id=\"ntforumright\">\r\n");
	templateBuilder.Append("		    <div class=\"ntforumlogin\">\r\n");
	templateBuilder.Append("				<div class=\"ntnavform\">\r\n");

	if (userid==-1)
	{

	templateBuilder.Append("					<form id=\"login\" name=\"login\" method=\"post\" action=\"login.aspx?reurl=website.aspx\">\r\n");
	templateBuilder.Append("					<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td><strong>用户名:</strong></td>\r\n");
	templateBuilder.Append("							<td><input name=\"username\" type=\"text\" /></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td><strong>密码:</strong></td>\r\n");
	templateBuilder.Append("							<td><input name=\"password\" type=\"password\" /></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");

	if (isseccode)
	{

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

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


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

	}	//end if


	if (config.Secques==1)
	{

	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td><strong>安全问题:</strong></td>\r\n");
	templateBuilder.Append("							<td>\r\n");
	templateBuilder.Append("								<select name=\"question\" id=\"question\">\r\n");
	templateBuilder.Append("									<option value=\"0\" selected=\"selected\">无</option>\r\n");
	templateBuilder.Append("									<option value=\"1\">母亲的名字</option>\r\n");
	templateBuilder.Append("									<option value=\"2\">爷爷的名字</option>\r\n");
	templateBuilder.Append("									<option value=\"3\">父亲出生的城市</option>\r\n");
	templateBuilder.Append("									<option value=\"4\">您其中一位老师的名字</option>\r\n");
	templateBuilder.Append("									<option value=\"5\">您个人计算机的型号</option>\r\n");
	templateBuilder.Append("									<option value=\"6\">您最喜欢的餐馆名称</option>\r\n");
	templateBuilder.Append("									<option value=\"7\">驾驶执照的最后四位数字</option>\r\n");
	templateBuilder.Append("								</select>\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td><strong>问题答案:</strong></td>\r\n");
	templateBuilder.Append("							<td><input name=\"answer\" type=\"text\" class=\"colorblue\" id=\"answer\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" size=\"50\" /></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");

	}	//end if

	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td colspan=\"2\" height=\"35\"><input name=\"submit\" type=\"submit\" class=\"SubmitButton\" value=\"登录\"/> <input name=\"expires\" type=\"checkbox\"  class=\"RadionButton\"/><em>记住密码</em> <a href=\"" + forumurl.ToString() + "register.aspx\" class=\"two\" onfocus=\"this.blur()\">注册</a></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("					</table>\r\n");
	templateBuilder.Append("					</form>\r\n");

	}
	else
	{

	templateBuilder.Append("					<p style=\"padding-left:5px;\">欢迎您<strong> " + username.ToString() + "</strong>[ <a href=\"" + forumurl.ToString() + "logout.aspx?userkey=" + userkey.ToString() + "\">退出</a> ] [ <a href=\"" + forumurl.ToString() + "help.aspx\" target=\"_blank\">帮助</a> ]\r\n");

	if (useradminid==1)
	{

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

	}	//end if

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

	if (config.Enablespace==1)
	{

	templateBuilder.Append("<li><a href=\"" + spaceurl.ToString() + "space/?uid=" + userid.ToString() + "\" class=\"two\" onfocus=\"this.blur()\">我的空间</a></li>\r\n");

	}	//end if


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("<li><a href=\"" + albumurl.ToString() + "showalbumlist.aspx\" class=\"three\" onfocus=\"this.blur()\">我的相册</a></li>\r\n");

	}	//end if

	templateBuilder.Append("						<li><a href=\"" + forumurl.ToString() + "usercp.aspx\" class=\"four\" onfocus=\"this.blur()\">用户中心</a></li>\r\n");
	templateBuilder.Append("						<li><a href=\"" + forumurl.ToString() + "usercpinbox.aspx\" class=\"one\" onfocus=\"this.blur()\">短消息</a></li>\r\n");
	templateBuilder.Append("						</ul>\r\n");
	templateBuilder.Append("					</div>\r\n");

	}	//end if

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

	if (rotatepicdata!=null && rotatepicdata!="")
	{

	templateBuilder.Append("			<div class=\"modulebox sidebox\" style=\"padding:1px;\">\r\n");
	templateBuilder.Append("				<script type='text/javascript'>\r\n");
	templateBuilder.Append("				var imgwidth = 318;\r\n");
	templateBuilder.Append("				var imgheight = 187;\r\n");
	templateBuilder.Append("				</" + "script>			\r\n");
	templateBuilder.Append("				<!--图片轮换代码开始-->\r\n");
	templateBuilder.Append("				<script type='text/javascript' src='templates/" + templatepath.ToString() + "/rotatepic.js'></" + "script>\r\n");
	templateBuilder.Append("				<script type='text/javascript'>\r\n");
	templateBuilder.Append("				var data = { };\r\n");
	templateBuilder.Append("				" + rotatepicdata.ToString() + "\r\n");
	templateBuilder.Append("				var ri = new MzRotateImage();\r\n");
	templateBuilder.Append("				ri.dataSource = data;\r\n");
	templateBuilder.Append("				ri.width = 318;\r\n");
	templateBuilder.Append("				ri.height = 187;\r\n");
	templateBuilder.Append("				ri.interval = 3000;\r\n");
	templateBuilder.Append("				ri.duration = 2000;\r\n");
	templateBuilder.Append("				document.write(ri.render());\r\n");
	templateBuilder.Append("				</" + "script>\r\n");
	templateBuilder.Append("				<!--图片轮换代码结束-->\r\n");
	templateBuilder.Append("			</div>\r\n");

	}	//end if

	templateBuilder.Append("	  <div class=\"sidebox sideboxbg\">\r\n");
	templateBuilder.Append("				<h2>新帖</h2>\r\n");
	templateBuilder.Append("				<ul class=\"newslist\">\r\n");

	int __newtopicinfo__loop__id=0;
	foreach(DataRow __newtopicinfo in newtopiclist.Rows)
	{
		__newtopicinfo__loop__id++;

	 aspxrewriteurl = this.ShowTopicAspxRewrite(__newtopicinfo["tid"].ToString().Trim(),0);
	
	templateBuilder.Append("    					<li><a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">\r\n");
templateBuilder.Append(Utils.GetSubString(__newtopicinfo["title"].ToString().Trim(),0,43,"..."));
	templateBuilder.Append("</a></li>\r\n");

	}	//end loop

	templateBuilder.Append("				</ul>\r\n");
	templateBuilder.Append("				<h2>热帖</h2>\r\n");
	templateBuilder.Append("				<ul class=\"newslist\">\r\n");

	int __hottopicinfo__loop__id=0;
	foreach(DataRow __hottopicinfo in hottopiclist.Rows)
	{
		__hottopicinfo__loop__id++;

	 aspxrewriteurl = this.ShowTopicAspxRewrite(__hottopicinfo["tid"].ToString().Trim(),0);
	
	templateBuilder.Append("						<li><a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">\r\n");
templateBuilder.Append(Utils.GetSubString(__hottopicinfo["title"].ToString().Trim(),0,43,"..."));
	templateBuilder.Append("</a></li>\r\n");

	}	//end loop

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

	if (config.Enablespace==1)
	{

	templateBuilder.Append("			<div class=\"sidebox newstopicbg\">\r\n");
	templateBuilder.Append("							<h2>最近更新的空间</h2>\r\n");
	templateBuilder.Append("				<ul class=\"newslist\">\r\n");

	int __spaceinfo__loop__id=0;
	foreach(DataRow __spaceinfo in recentupdatespaceList.Rows)
	{
		__spaceinfo__loop__id++;

	templateBuilder.Append("							<li><a href=\"" + spaceurl.ToString() + "space/?uid=" + __spaceinfo["userid"].ToString().Trim() + "\">\r\n");
templateBuilder.Append(Utils.GetSubString(__spaceinfo["spacetitle"].ToString().Trim(),0,43,"..."));
	templateBuilder.Append("</a></li>\r\n");

	}	//end loop

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

	}	//end if

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

	templateBuilder.Append("</div>\r\n");
	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;&nbsp; " + config.Linktext.ToString().Trim() + "\r\n");
	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</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("			&nbsp;&nbsp; " + config.Forumcopyright.ToString().Trim() + "\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=\"返顶部\" border=\"0\" onclick=\"window.scrollTo(0,0)\"/></span>\r\n");

	if (config.Stylejump==1)
	{

	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

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



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