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

	base.OnInit(e);

	templateBuilder.Capacity = 220000;


	templateBuilder.Append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
	templateBuilder.Append("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
	templateBuilder.Append("<head>\r\n");
	templateBuilder.Append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n");
	templateBuilder.Append("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\r\n");
	templateBuilder.Append(meta.ToString());
	templateBuilder.Append("\r\n");

	if (pagetitle=="首页")
	{

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

	}
	else
	{

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

	}	//end if

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


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

	if (headerad!="")
	{

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

	}	//end if

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

	if (config.Isframeshow!=0)
	{

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

	}	//end if

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

	if (userid==-1)
	{

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

	}
	else
	{


	if (oluserinfo.Newpms>0)
	{

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

	}	//end if

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

	if (oluserinfo.Newnotices>0)
	{

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

	}	//end if

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

	}	//end if

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


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

	if (page_err==0)
	{


	if (ispost && editusersubmit||banusersubmit||editannouncement||deleteannoucement)
	{


	templateBuilder.Append("<div class=\"box message\">\r\n");
	templateBuilder.Append("	<h1>Discuz!NT Board 提示信息</h1>\r\n");
	templateBuilder.Append("	<p>");
	templateBuilder.Append(msgbox_text.ToString());
	templateBuilder.Append("</p>\r\n");

	if (msgbox_url!="")
	{

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

	}	//end if

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



	}
	else
	{

	templateBuilder.Append("<div id=\"foruminfo\">\r\n");
	templateBuilder.Append("	<div id=\"nav\">\r\n");
	templateBuilder.Append("		<a href=\"");
	templateBuilder.Append(config.Forumurl.ToString().Trim());
	templateBuilder.Append("\" class=\"home\">");
	templateBuilder.Append(config.Forumtitle.ToString().Trim());
	templateBuilder.Append("</a> &raquo; <strong>管理面板</strong>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div id=\"headsearch\">\r\n");
	templateBuilder.Append("		<div id=\"search\">\r\n");

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


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

	if (admingroupinfo.Allowpostannounce==1)
	{

	templateBuilder.Append("			<h2>公告管理</h2>\r\n");
	templateBuilder.Append("				<ul>\r\n");
	templateBuilder.Append("					<li>\r\n");
	templateBuilder.Append("						<a href=\"modcp.aspx?operation=addannouncements&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">添加公告</a>\r\n");
	templateBuilder.Append("					</li>\r\n");
	templateBuilder.Append("					<li>\r\n");
	templateBuilder.Append("						<a href=\"modcp.aspx?operation=list&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">管理公告</a>\r\n");
	templateBuilder.Append("					</li>\r\n");
	templateBuilder.Append("				</ul>\r\n");

	}	//end if

	templateBuilder.Append("			<h2>用户管理</h2>\r\n");
	templateBuilder.Append("				<ul>\r\n");

	if (admingroupinfo.Allowedituser==1)
	{

	templateBuilder.Append("					<li>\r\n");
	templateBuilder.Append("						<a href=\"modcp.aspx?operation=edituser&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">编辑用户</a>  \r\n");
	templateBuilder.Append("					</li>\r\n");

	}	//end if


	if (admingroupinfo.Allowbanuser==1)
	{

	templateBuilder.Append("					<li>\r\n");
	templateBuilder.Append("						<a href=\"modcp.aspx?operation=banusersearch&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">禁止用户</a>\r\n");
	templateBuilder.Append("					</li>					\r\n");

	}	//end if

	templateBuilder.Append("					<li>\r\n");
	templateBuilder.Append("						<a href=\"modcp.aspx?operation=forumaccesslist&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">用户权限</a> 				\r\n");
	templateBuilder.Append("					</li>\r\n");

	if (admingroupinfo.Allowbanip==1)
	{

	templateBuilder.Append("					<li>\r\n");
	templateBuilder.Append("						<a href=\"modcp.aspx?operation=showbannedlist&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">禁止 IP</a>   \r\n");
	templateBuilder.Append("					</li>\r\n");

	}	//end if

	templateBuilder.Append("				</ul>\r\n");
	templateBuilder.Append("			<h2>版块管理</h2>\r\n");
	templateBuilder.Append("			<ul>\r\n");
	templateBuilder.Append("				<li>\r\n");
	templateBuilder.Append("					<a href=\"modcp.aspx?operation=editforum&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">版块编辑</a>  \r\n");
	templateBuilder.Append("				</li>\r\n");
	templateBuilder.Append("			</ul>\r\n");
	templateBuilder.Append("			<h2>主题管理</h2>\r\n");
	templateBuilder.Append("			<ul>\r\n");

	if (admingroupinfo.Allowmodpost==1)
	{

	templateBuilder.Append("				<li>\r\n");
	templateBuilder.Append("					<a href=\"modcp.aspx?operation=audittopic&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">审核主题</a> \r\n");
	templateBuilder.Append("				</li>\r\n");
	templateBuilder.Append("				<li>\r\n");
	templateBuilder.Append("					<a href=\"modcp.aspx?operation=auditpost&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">审核回复</a>\r\n");
	templateBuilder.Append("				</li>\r\n");

	}	//end if

	templateBuilder.Append("				<li>\r\n");
	templateBuilder.Append("					<a href=\"modcp.aspx?operation=attention&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">主题关注</a>  \r\n");
	templateBuilder.Append("				</li>\r\n");
	templateBuilder.Append("			</ul>\r\n");
	templateBuilder.Append("			<h2>其他</h2>\r\n");
	templateBuilder.Append("				<ul>\r\n");
	templateBuilder.Append("					<li><a href=\"modcp.aspx?operation=logs&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">管理日志</a></li>\r\n");
	templateBuilder.Append("					<li><a href=\"modcp.aspx?operation=userout&forumid=");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">返回论坛</a></li>\r\n");
	templateBuilder.Append("				</ul>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	<div class=\"content\">\r\n");
	templateBuilder.Append("		<!--管理员登录-->\r\n");

	if (operation=="login")
	{

	templateBuilder.Append("<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>管理登录</h3>\r\n");
	templateBuilder.Append("			<form action=\"\" method=\"post\">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<table cellspacing=\"0\" cellpadding=\"0\" summary=\"会员统计\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th>用户名</th><td><input type=\"text\" name=\"cpname\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th>密码</th><td><input type=\"password\" name=\"cppwd\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th/><td><input type=\"submit\" id=\"Submit1\" value=\"提交\" name=\"Submit\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"hintinfo\">当您首次进入管理面板或者长时间没有管理动作时，您需要输入密码才能进入。如果密码输入错误超过 3 次，管理面板将会锁定。30 分钟或者更长时间后，管理面板才能解除锁定。\r\n");
	templateBuilder.Append("		</div>\r\n");

	}	//end if

	templateBuilder.Append("	<!--添加公告-->\r\n");

	if (operation=="addannouncements" && admingroupinfo.Allowpostannounce==1)
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>添加公告</h3>\r\n");
	templateBuilder.Append("			<form action=\"modcp.aspx?operation=add\" method=\"post\">\r\n");
	templateBuilder.Append("				<input type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" name=\"operation\"/>\r\n");
	templateBuilder.Append("				<input type=\"hidden\" value=\"0\" name=\"displayorder\"/>\r\n");
	templateBuilder.Append("				<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th width=\"20%\">标题</th><td><input type=\"text\" size=\"80\" id=\"subject\" name=\"subject\" value=\"\" /></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th>起始时间</th><td><input type=\"text\" style=\"cursor:default\" onClick=\"showcalendar(event, 'starttime', 'cal_startdate1', 'cal_enddate1', '");
	templateBuilder.Append(nowdatetime.ToString());
	templateBuilder.Append("');\" name=\"starttime\" value='");
	templateBuilder.Append(starttime.ToString());
	templateBuilder.Append("' id=\"starttime\"/>\r\n");
	templateBuilder.Append("							<input type=\"hidden\" name=\"cal_startdate1\" id=\"cal_startdate1\" size=\"10\"  value=\"1900-01-01\" />\r\n");
	templateBuilder.Append("							<input type=\"hidden\" name=\"cal_enddate1\" id=\"cal_enddate1\" size=\"10\"  value=\"2099-01-01\" />\r\n");
	templateBuilder.Append("						</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th>结束时间</th><td><input type=\"text\" style=\"cursor:default\" onClick=\"showcalendar(event, 'endtime', 'cal_startdate2', 'cal_enddate2', 'nowdatetime');\" name=\"endtime\" value='");
	templateBuilder.Append(endtime.ToString());
	templateBuilder.Append("' id=\"endtime\"/>\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"cal_startdate2\" id=\"cal_startdate2\" size=\"10\"  value=\"1900-01-01\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"cal_enddate2\" id=\"cal_enddate2\" size=\"10\"  value=\"2099-01-01\" />\r\n");
	templateBuilder.Append("						</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th>内容</th><td><textarea cols=\"80\" rows=\"10\" id=\"message\" name=\"message\" ></textarea></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th/><td><input type=\"submit\" id=\"addannouncement_Submit\" value=\"提交\" name=\"Submit\"/></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("				</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>		\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\" src=\"javascript/template_calendar.js\"></");
	templateBuilder.Append("script>\r\n");

	}	//end if

	templateBuilder.Append("	<!--编辑公告-->\r\n");

	if (operation=="editannouncements")
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>编辑公告</h3>\r\n");
	templateBuilder.Append("			<form action=\"modcp.aspx?operation=updateannouncements\" method=\"post\">\r\n");
	templateBuilder.Append("				<input type=\"hidden\" value=");
	templateBuilder.Append(id.ToString());
	templateBuilder.Append(" name=\"id\"/>\r\n");
	templateBuilder.Append("				<input type=\"hidden\" value=");
	templateBuilder.Append(displayorder.ToString());
	templateBuilder.Append(" name=\"displayorder\"/>\r\n");
	templateBuilder.Append("				<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th width=\"20%\">标题</th><td><input type=\"text\" size=\"80\" id=\"subject\" name=\"subject\" value=");
	templateBuilder.Append(subject.ToString());
	templateBuilder.Append(" /></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("					<th>起始时间</th>\r\n");
	templateBuilder.Append("					<td>\r\n");
	templateBuilder.Append("						<input type=\"text\" style=\"cursor:default\" onClick=\"showcalendar(event, 'starttime', 'cal_startdate1', 'cal_enddate1', '");
	templateBuilder.Append(nowdatetime.ToString());
	templateBuilder.Append("');\" name=\"starttime\" value=\"");
	templateBuilder.Append(starttime.ToString());
	templateBuilder.Append("\" id=\"starttime\"/>\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"cal_startdate1\" id=\"cal_startdate1\" size=\"10\"  value=\"1900-01-01\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"cal_enddate1\" id=\"cal_enddate1\" size=\"10\"  value=\"2099-01-01\" />\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th>结束时间</th>\r\n");
	templateBuilder.Append("						<td>\r\n");
	templateBuilder.Append("						<input type=\"text\" style=\"cursor:default\" onClick=\"showcalendar(event, 'endtime', 'cal_startdate2', 'cal_enddate2', 'nowdatetime');\" name=\"endtime\" value=\"");
	templateBuilder.Append(endtime.ToString());
	templateBuilder.Append("\" id=\"endtime\"/>\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"cal_startdate2\" id=\"cal_startdate2\" size=\"10\"  value=\"1900-01-01\" />\r\n");
	templateBuilder.Append("						<input type=\"hidden\" name=\"cal_enddate2\" id=\"cal_enddate2\" size=\"10\"  value=\"2099-01-01\" />\r\n");
	templateBuilder.Append("						</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th>内容</th><td><textarea cols=\"80\" rows=\"10\" id=\"message\" name=\"message\" >");
	templateBuilder.Append(message.ToString());
	templateBuilder.Append("</textarea></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th/><td><input type=\"submit\" id=\"editannoucementsubmit\" name=\"editannoucementsubmit\" value=\"提交\"/></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("				</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\" src=\"javascript/template_calendar.js\"></");
	templateBuilder.Append("script>\r\n");

	}	//end if

	templateBuilder.Append("	<!--公告列表-->\r\n");

	if (operation=="list")
	{

	templateBuilder.Append("		<form action=\"modcp.aspx?operation=manage&op=delannouncements\" method=\"post\">\r\n");
	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>公告列表</h3>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append(" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=");
	templateBuilder.Append(op.ToString());
	templateBuilder.Append(" name=\"op\"/>\r\n");
	templateBuilder.Append("			<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("				<thead>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th width=\"8%\"><input type=\"checkbox\" onclick=\"checkall(this.form)\" name=\"chkall\" id=\"chkall\" class=\"checkbox\"/>删除</th>\r\n");
	templateBuilder.Append("						<th width=\"5%\">顺序</th>\r\n");
	templateBuilder.Append("						<th width=\"15%\">作者</th>\r\n");
	templateBuilder.Append("						<th>标题</th>\r\n");
	templateBuilder.Append("						<th width=\"15%\">起始时间</th>\r\n");
	templateBuilder.Append("						<th width=\"15%\">结束时间</th>\r\n");
	templateBuilder.Append("						<th width=\"5%\">操作</th>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				</thead>\r\n");

	if (counts<=0)
	{

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td colspan=\"7\">暂无公告</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");

	}
	else
	{


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

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

	if (username=="admin"||username==announcement["poster"].ToString().Trim())
	{

	templateBuilder.Append("						<input type=\"checkbox\" name='aidlist' id='aidlist' value=\"" + announcement["id"].ToString().Trim() + "\" class=\"checkbox\"/>\r\n");

	}
	else
	{

	templateBuilder.Append("						<input type=\"checkbox\" name='aidlist' id='aidlist' disabled=\"disabled\" value=\"" + announcement["id"].ToString().Trim() + "\" class=\"checkbox\"/>	\r\n");

	}	//end if

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

	if (username=="admin"||username==announcement["poster"].ToString().Trim())
	{

	templateBuilder.Append("						<input type=\"text\" size=\"3\" id=\"displayorder\" name=\"displayorder\" value=" + announcement["displayorder"].ToString().Trim() + " />\r\n");

	}
	else
	{

	templateBuilder.Append("<input type=\"text\" size=\"3\" readonly=\"readonly\" disabled id=\"displayorder\" name=\"displayorder\" value=" + announcement["displayorder"].ToString().Trim() + " />\r\n");

	}	//end if

	templateBuilder.Append("						<input type=\"hidden\" name=\"hid\" id=\"hid\" size=\"10\"  value=\"" + announcement["id"].ToString().Trim() + "\" />\r\n");
	templateBuilder.Append("						</td>						\r\n");
	templateBuilder.Append("						<td>" + announcement["poster"].ToString().Trim() + "</td>\r\n");
	templateBuilder.Append("						<td>" + announcement["title"].ToString().Trim() + "</td>\r\n");
	templateBuilder.Append("						<td>" + announcement["starttime"].ToString().Trim() + " </td>\r\n");
	templateBuilder.Append("						<td>" + announcement["endtime"].ToString().Trim() + "</td>\r\n");
	templateBuilder.Append("						<td>\r\n");

	if (username=="admin"||(username==announcement["poster"].ToString().Trim()))
	{

	templateBuilder.Append("						<a href=\"modcp.aspx?operation=editannouncements&id=" + announcement["id"].ToString().Trim() + "\">编辑\r\n");

	}	//end if

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

	}	//end loop


	}	//end if

	templateBuilder.Append("			</table>			\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("				<div class=\"pages\">");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("				<span class=\"postbtn\"><input type=\"submit\" name=\"operationsubmit\" id=\"operationsubmit\"  name=\"Submit\" value=\"提交\"/></span>\r\n");
	templateBuilder.Append("		</div>\r\n");

	if (tip=="add")
	{

	templateBuilder.Append("<div class=\"hintinfo\">公告添加完毕，请继续操作</div>\r\n");

	}	//end if


	if (tip=="delsuccessful")
	{

	templateBuilder.Append("<div class=\"hintinfo\">选定公告删除完毕，请继续操</div>\r\n");

	}	//end if

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

	}	//end if

	templateBuilder.Append("	<!--编辑用户-->\r\n");

	if (operation=="edituser")
	{

	templateBuilder.Append(" 		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>编辑用户 - 搜索</h3>\r\n");
	templateBuilder.Append("			<form method=\"post\" action=\"modcp.aspx?operation=edituser&op=edit\">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"");
	templateBuilder.Append(op.ToString());
	templateBuilder.Append("\" name=\"op\"/>\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">用户名</th><td><input name=\"username\" value=\"\" size=\"20\" type=\"text\"></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">UID</th><td><input name=\"uid\" value=\"\" size=\"20\" type=\"text\"> [可选]</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th></th><td><input type=\"submit\" id=\"editusersubmit\" value=\"提交\" name=\"editusersubmit\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	if (op!="edit")
	{

	templateBuilder.Append("		<div class=\"hintinfo\">\r\n");
	templateBuilder.Append("			请首先输入用户名或者 UID 搜索用户，然后进行下一步。搜索 UID 比搜索用户名速度更快且准确\r\n");
	templateBuilder.Append("		</div>\r\n");

	}
	else
	{


	if (op=="edit" &&uid>0)
	{

	templateBuilder.Append("			<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>编辑用户 - ");
	templateBuilder.Append(username.ToString());
	templateBuilder.Append("</h3>\r\n");
	templateBuilder.Append("			<form method=\"post\" action=\"modcp.aspx?operation=updateuser\">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append(" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"updateuser\" name=\"op\"/>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" name=\"username\" value=");
	templateBuilder.Append(uname.ToString());
	templateBuilder.Append(">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" name=\"uid\" value=");
	templateBuilder.Append(uid.ToString());
	templateBuilder.Append(">\r\n");
	templateBuilder.Append("			<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">用户名</th><td>");
	templateBuilder.Append(uname.ToString());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">UID</th><td>");
	templateBuilder.Append(uid.ToString());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">来自</th><td><input type=\"text\" name=\"locationnew\" value=\"");
	templateBuilder.Append(location.ToString());
	templateBuilder.Append("\" size=\"40\"></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">自我介绍</th><td><textarea name=\"bionew\" rows=\"4\" cols=\"80\">");
	templateBuilder.Append(bio.ToString());
	templateBuilder.Append("</textarea></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">个人签名</th><td><textarea name=\"signaturenew\" rows=\"4\" cols=\"80\">");
	templateBuilder.Append(signature.ToString());
	templateBuilder.Append("</textarea></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th></th><td><button type=\"submit\" class=\"submit\" name=\"editsubmit\" id=\"editsubmit\" value=\"true\">提交</button></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=\"hintinfo\">\r\n");
	templateBuilder.Append("			该用户不存在，请重新输入 \r\n");
	templateBuilder.Append("			</div>\r\n");

	}	//end if


	}	//end if


	}	//end if

	templateBuilder.Append("	<!--禁止用户-->\r\n");

	if (operation=="banusersearch")
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>禁止用户 - 搜索</h3>\r\n");
	templateBuilder.Append("			<form method=\"post\" action=\"modcp.aspx?operation=banusersearch&op=ban\">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"");
	templateBuilder.Append(op.ToString());
	templateBuilder.Append("\" name=\"op\"/>\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">用户名</th><td><input name=\"username\" value=\"\" size=\"20\" type=\"text\"></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">UID</th><td><input name=\"uid\" value=\"\" size=\"20\" type=\"text\"> [可选]</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th></th><td><input type=\"submit\" id=\"Submit1\" value=\"提交\" name=\"Submit\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	if (op!="ban")
	{

	templateBuilder.Append("		<div class=\"hintinfo\">\r\n");
	templateBuilder.Append("			请首先输入用户名或者 UID 搜索用户，然后进行下一步。搜索 UID 比搜索用户名速度更快且准确\r\n");
	templateBuilder.Append("		</div>\r\n");

	}
	else
	{


	if (uid>0)
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>禁止用户 - ");
	templateBuilder.Append(uname.ToString());
	templateBuilder.Append("</h3>\r\n");
	templateBuilder.Append("			<form method=\"post\" action=\"modcp.aspx?operation=banuser\">\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append(" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=");
	templateBuilder.Append(uname.ToString());
	templateBuilder.Append(" name=\"username\" >\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=");
	templateBuilder.Append(uid.ToString());
	templateBuilder.Append(" name=\"uid\"/>\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<tbody><tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">用户名</th><td>");
	templateBuilder.Append(uname.ToString());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">UID</th><td>");
	templateBuilder.Append(uid.ToString());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">当前状态</th>\r\n");
	templateBuilder.Append("					<td>\r\n");

	if (curstatus=="禁止发言"||curstatus=="禁止访问")
	{
	templateBuilder.Append(grouptitle.ToString());
	templateBuilder.Append(" (有效期至 ");
	templateBuilder.Append(groupexpiry.ToString());
	templateBuilder.Append(")\r\n");

	}
	else
	{

	templateBuilder.Append("正常状态\r\n");

	}	//end if

	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">变更为</th><td>\r\n");

	if (grouptitle=="禁止发言")
	{

	templateBuilder.Append(" <input name=\"bannew\" value=\"4\" type=\"radio\" checked/> 禁止发言\r\n");

	}
	else
	{

	templateBuilder.Append("<input name=\"bannew\" value=\"4\" type=\"radio\"/>禁止发言\r\n");

	}	//end if


	if (grouptitle=="禁止访问")
	{

	templateBuilder.Append("<input name=\"bannew\" value=\"5\" type=\"radio\" checked/>禁止访问\r\n");

	}
	else
	{

	templateBuilder.Append("<input name=\"bannew\" value=\"5\" type=\"radio\"/>禁止访问\r\n");

	}	//end if

	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("				<th width=\"20%\">期限</th>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("					<select name=\"banexpirynew\">\r\n");
	templateBuilder.Append("						<option value=\"0\">永 久</option>\r\n");
	templateBuilder.Append("						<option value=\"1\">1天</option>\r\n");
	templateBuilder.Append("						<option value=\"3\">3天</option>\r\n");
	templateBuilder.Append("						<option value=\"5\">5天</option>\r\n");
	templateBuilder.Append("						<option value=\"7\">7天</option>\r\n");
	templateBuilder.Append("						<option value=\"14\">14天</option>\r\n");
	templateBuilder.Append("						<option value=\"30\">1个月</option>\r\n");
	templateBuilder.Append("						<option value=\"90\">3个月</option>\r\n");
	templateBuilder.Append("						<option value=\"180\">半年</option>\r\n");
	templateBuilder.Append("						<option value=\"365\">1年</option>\r\n");
	templateBuilder.Append("					</select>期限设置仅对禁止发言和禁止访问的操作有效\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">理由</th><td><textarea name=\"reason\" rows=\"4\" cols=\"80\">");
	templateBuilder.Append(reason.ToString());
	templateBuilder.Append("</textarea></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th></th><td><input type=\"submit\" class=\"submit\" name=\"banusersubmit\" id=\"banusersubmit\" value=\"提交\"></input></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("			</tbody></table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	}
	else
	{

	templateBuilder.Append("			<div class=\"hintinfo\">\r\n");
	templateBuilder.Append("			该用户不存在，请重新输入 \r\n");
	templateBuilder.Append("			</div>\r\n");

	}	//end if


	}	//end if


	}	//end if

	templateBuilder.Append("	<!--用户权限-->\r\n");

	if (operation=="forumaccesslist")
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h1>特殊用户</h1>\r\n");
	templateBuilder.Append("			<table summary=\"\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<thead>\r\n");
	templateBuilder.Append("				<tr align=\"center\">\r\n");
	templateBuilder.Append("					<td width=\"15%\">会员</td>\r\n");
	templateBuilder.Append("					<td width=\"15%\">版块</td>\r\n");
	templateBuilder.Append("					<th width=\"8%\">浏览主题</th>\r\n");
	templateBuilder.Append("					<th width=\"8%\">发表主题</th>\r\n");
	templateBuilder.Append("					<th width=\"8%\">回复主题</th>\r\n");
	templateBuilder.Append("					<th width=\"8%\">上传附件</th>\r\n");
	templateBuilder.Append("					<th width=\"8%\">下载附件</th>\r\n");
	templateBuilder.Append("					<td width=\"15%\">版主</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</thead>\r\n");

	if (foruminfolist.Count>0)
	{


	int filist__loop__id=0;
	foreach(ForumInfo filist in foruminfolist)
	{
		filist__loop__id++;


	int t__loop__id=0;
	foreach(string t in filist.Permuserlist.Split('|'))
	{
		t__loop__id++;

	templateBuilder.Append("				<tr align=\"center\">\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(t.Split(',')[1].ToString().Trim());
	
	templateBuilder.Append("				<td><a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">" + t.Split(',')[0].ToString().Trim() + "</a></td>\r\n");
	string aspxforumrewriteurl = this.ShowForumAspxRewrite(filist.Fid,0,filist.Rewritename);
	
	templateBuilder.Append("				<td><a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxforumrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(filist.Name.ToString().Trim());
	templateBuilder.Append("</a></td>\r\n");
	int power = Convert.ToInt32(t.Split(',')[2].ToString().Trim());
	
	string viewpowerimg = GetPowerImg(power,Forums.ForumSpecialUserPower.ViewByUser);
	
	templateBuilder.Append("				<td><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/");
	templateBuilder.Append(viewpowerimg.ToString());
	templateBuilder.Append("\" /></td>\r\n");
	string postpowerimg = GetPowerImg(power,Forums.ForumSpecialUserPower.PostByUser);
	
	templateBuilder.Append("				<td><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/");
	templateBuilder.Append(postpowerimg.ToString());
	templateBuilder.Append("\" /></td>\r\n");
	string replypowerimg = GetPowerImg(power,Forums.ForumSpecialUserPower.ReplyByUser);
	
	templateBuilder.Append("				<td><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/");
	templateBuilder.Append(replypowerimg.ToString());
	templateBuilder.Append("\" /></td>\r\n");
	string downloadpowerimg = GetPowerImg(power,Forums.ForumSpecialUserPower.DownloadAttachByUser);
	
	templateBuilder.Append("				<td><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/");
	templateBuilder.Append(downloadpowerimg.ToString());
	templateBuilder.Append("\" /></td>\r\n");
	string postattachpowerimg = GetPowerImg(power,Forums.ForumSpecialUserPower.PostAttachByUser);
	
	templateBuilder.Append("				<td><img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/");
	templateBuilder.Append(postattachpowerimg.ToString());
	templateBuilder.Append("\" /></td>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("					<a href=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(filist.Moderators.ToString().Trim());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");

	}	//end loop


	}	//end loop


	}
	else
	{

	templateBuilder.Append("				<tr align=\"center\"><td colspan=\"9\" align=\"left\">\r\n");
	templateBuilder.Append("				当前没有特殊权限用户</td></tr>\r\n");

	}	//end if

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td colspan=\"9\" align=\"right\">\r\n");
	templateBuilder.Append("						<form method=\"post\" action=\"modcp.aspx?operation=forumaccesslist\">\r\n");
	templateBuilder.Append("						<input name=\"formhash\" value=\"5ff4e742\" type=\"hidden\">\r\n");
	templateBuilder.Append("						用户名: <input name=\"suser\" value=\"\" onclick=\"this.value='';\" type=\"text\">\r\n");
	templateBuilder.Append("						<select name=\"forumid\">\r\n");
	templateBuilder.Append("						<option value=\"0\">全部</option>\r\n");
	templateBuilder.Append("						");
	templateBuilder.Append(forumliststr.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("						</select>\r\n");
	templateBuilder.Append("						&nbsp;&nbsp;\r\n");
	templateBuilder.Append("						<input type=\"submit\" id=\"Submit1\" value=\"搜索\" name=\"Submit\"/>\r\n");
	templateBuilder.Append("						</form>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("			</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("		function chkallaccess(obj) {\r\n");
	templateBuilder.Append("			$('new_post').checked\r\n");
	templateBuilder.Append("				= $('new_post').disabled\r\n");
	templateBuilder.Append("				= $('new_reply').checked\r\n");
	templateBuilder.Append("				= $('new_reply').disabled\r\n");
	templateBuilder.Append("				= $('new_postattach').checked\r\n");
	templateBuilder.Append("				= $('new_postattach').disabled\r\n");
	templateBuilder.Append("				= $('new_getattach').checked\r\n");
	templateBuilder.Append("				= $('new_getattach').disabled\r\n");
	templateBuilder.Append("				= obj.checked;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		function disallaccess(obj) {\r\n");
	templateBuilder.Append("			$('new_view').checked\r\n");
	templateBuilder.Append("				= $('new_post').checked\r\n");
	templateBuilder.Append("				= $('new_post').checked\r\n");
	templateBuilder.Append("				= $('new_reply').checked\r\n");
	templateBuilder.Append("				= $('new_postattach').checked\r\n");
	templateBuilder.Append("				= $('new_getattach').checked\r\n");
	templateBuilder.Append("				= false;\r\n");
	templateBuilder.Append("			$('customaccess').disabled\r\n");
	templateBuilder.Append("				= $('new_view').disabled\r\n");
	templateBuilder.Append("				= $('new_view').disabled\r\n");
	templateBuilder.Append("				= $('new_post').disabled\r\n");
	templateBuilder.Append("				= $('new_post').disabled\r\n");
	templateBuilder.Append("				= $('new_reply').disabled\r\n");
	templateBuilder.Append("				= $('new_postattach').disabled\r\n");
	templateBuilder.Append("				= $('new_getattach').disabled\r\n");
	templateBuilder.Append("				= obj.checked;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		</");
	templateBuilder.Append("script>\r\n");
	templateBuilder.Append("		<form method=\"post\" action=\"modcp.aspx?operation=forumaccessupdate\">\r\n");
	templateBuilder.Append("		<input type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" name=\"operation\"/>\r\n");
	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h1>编辑用户权限</h1>\r\n");
	templateBuilder.Append("			<table summary=\"\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("			<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td>版块选择</td>\r\n");
	templateBuilder.Append("					<td>\r\n");
	templateBuilder.Append("						<select name=\"forumid\">\r\n");
	templateBuilder.Append("						<option VALUE=\"0\">全部</option>\r\n");
	templateBuilder.Append("							");
	templateBuilder.Append(forumliststr.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("						</select>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td width=\"18%\">用户名</td>\r\n");
	templateBuilder.Append("					<td><input size=\"30\" value=\"\" id=\"new_user\" name=\"new_user\" type=\"text\"> &nbsp;&nbsp;</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td>权限变更</td>\r\n");
	templateBuilder.Append("					<td>\r\n");
	templateBuilder.Append("						<input value=\"0\" name=\"deleteaccess\" id=\"deleteaccess\" onclick=\"disallaccess(this)\" type=\"checkbox\"> 恢复默认 &nbsp;&nbsp;\r\n");
	templateBuilder.Append("						<span id=\"customaccess\" style=\"border: 0px solid rgb(221, 221, 221); padding: 0px;\">\r\n");
	templateBuilder.Append("						<input value=\"1\" name=\"new_view\" id=\"new_view\" onclick=\"chkallaccess(this)\" type=\"checkbox\"> 禁止查看主题 \r\n");
	templateBuilder.Append("						<input value=\"2\" name=\"new_post\" id=\"new_post\" type=\"checkbox\"> 禁止发表主题 &nbsp;&nbsp;\r\n");
	templateBuilder.Append("						<input value=\"4\" name=\"new_reply\" id=\"new_reply\" type=\"checkbox\"> 禁止发表回复 &nbsp;&nbsp;\r\n");
	templateBuilder.Append("						<input value=\"8\" name=\"new_postattach\" id=\"new_postattach\" type=\"checkbox\"> 禁止上传附件 &nbsp;&nbsp;\r\n");
	templateBuilder.Append("						<input value=\"16\" name=\"new_getattach\" id=\"new_getattach\" type=\"checkbox\"> 禁止下载附件\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td></td><td><input type=\"submit\" id=\"Submit1\" value=\"提交\" name=\"Submit\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td>\r\n");

	if (tip=="access_successful")
	{

	templateBuilder.Append("用户权限更新成功, 请继续操作\r\n");

	}	//end if

	templateBuilder.Append("</td><td></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 class=\"hintinfo\">\r\n");
	templateBuilder.Append("			通常情况下，用户在版块的权限是根据他的用户组决定的，此处您可以限制某个用户在某版块的权限。<br>注意: 看帖是基本权限，一旦禁止, 其他权限会同时进行禁止。<br>图例说明: <img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/access_normal.gif\"> &nbsp; 默认权限&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"");
	templateBuilder.Append(forumurl.ToString());
	templateBuilder.Append("templates/");
	templateBuilder.Append(templatepath.ToString());
	templateBuilder.Append("/images/access_allow.gif\"> &nbsp;强制允许\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		</form>\r\n");

	}	//end if

	templateBuilder.Append("	<!--禁止IP-->	\r\n");

	if (operation=="showbannedlist")
	{

	templateBuilder.Append("		<form method=\"post\" action=\"modcp.aspx?operation=ipban\">\r\n");
	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>禁止 IP </h3>\r\n");
	templateBuilder.Append("			<input type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" name=\"operation\"/>\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<thead>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th width=\"8%\"><input class=\"checkbox\" id=\"chkall\" name=\"chkall\" onclick=\"checkall(this.form)\" type=\"checkbox\">删除</th>\r\n");
	templateBuilder.Append("						<th>IP 地址</th>\r\n");
	templateBuilder.Append("						<th width=\"20%\">地理位置</th>\r\n");
	templateBuilder.Append("						<th width=\"10%\">操作者</th>\r\n");
	templateBuilder.Append("						<th width=\"15%\">起始时间</th>\r\n");
	templateBuilder.Append("						<th width=\"15%\">结束时间</th>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				</thead>\r\n");

	if (counts>0)
	{

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

	int showbannedip__loop__id=0;
	foreach(IpInfo showbannedip in showbannediplist)
	{
		showbannedip__loop__id++;

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

	if (showbannedip.Username!=username)
	{

	templateBuilder.Append("<input class=\"checkbox\" id=\"chkbanip\" name=\"chkbanip\" disabled=\"disabled\" value=");
	templateBuilder.Append(showbannedip.Id.ToString().Trim());
	templateBuilder.Append(" type=\"checkbox\">\r\n");

	}
	else
	{

	templateBuilder.Append("<input class=\"checkbox\" id=\"chkbanip\" name=\"chkbanip\" value=");
	templateBuilder.Append(showbannedip.Id.ToString().Trim());
	templateBuilder.Append(" type=\"checkbox\">\r\n");

	}	//end if

	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						<td>");
	templateBuilder.Append(showbannedip.Ip1.ToString().Trim());
	templateBuilder.Append(".");
	templateBuilder.Append(showbannedip.Ip2.ToString().Trim());
	templateBuilder.Append(".");
	templateBuilder.Append(showbannedip.Ip3.ToString().Trim());
	templateBuilder.Append(".");
	templateBuilder.Append(showbannedip.Ip4.ToString().Trim());
	templateBuilder.Append("</th>\r\n");
	templateBuilder.Append("						<td>");
	templateBuilder.Append(showbannedip.Location.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						<td>");
	templateBuilder.Append(showbannedip.Username.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						<td>");
	templateBuilder.Append(showbannedip.Dateline.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						<td><input type=\"text\" name=\"expiration\" id=\"expiration\" size=\"8\" value=");
	templateBuilder.Append(showbannedip.Expiration.ToString().Trim());
	templateBuilder.Append("></input><input type=\"hidden\" name =\"hiddenexpiration\" id =\"hiddenexpiration\" value=");
	templateBuilder.Append(showbannedip.Expiration.ToString().Trim());
	templateBuilder.Append("><input type=\"hidden\" name =\"hiddenid\" id =\"hiddenid\" value=");
	templateBuilder.Append(showbannedip.Id.ToString().Trim());
	templateBuilder.Append("></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");

	}	//end loop

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

	}	//end if

	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("		</div>		\r\n");
	templateBuilder.Append("		<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("			<div class=\"pages\">");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>新增要禁止IP </h3>\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td>\r\n");
	templateBuilder.Append("						ip地址:<input name=\"ip1new\" value=\"\" size=\"1\" maxlength=\"10\" type=\"text\"> .\r\n");
	templateBuilder.Append("						<input name=\"ip2new\" value=\"\" size=\"1\" maxlength=\"10\" type=\"text\"> .\r\n");
	templateBuilder.Append("						<input name=\"ip3new\" value=\"\" size=\"1\" maxlength=\"10\" type=\"text\"> .\r\n");
	templateBuilder.Append("						<input name=\"ip4new\" value=\"\" size=\"1\" maxlength=\"10\" type=\"text\">\r\n");
	templateBuilder.Append("						　期限: <input name=\"validitynew\" value=\"30\" size=\"3\" type=\"text\"> 天\r\n");
	templateBuilder.Append("						<input type=\"submit\" id=\"Submit1\" value=\"提交\" name=\"Submit\"/>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("		</div>	\r\n");
	templateBuilder.Append("		</form>\r\n");

	}	//end if


	if (operation=="auditpost" && admingroupinfo.Allowmodpost==1)
	{

	templateBuilder.Append("<!--审核回复-->	\r\n");
	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>审核回复范围选择</h3>\r\n");
	templateBuilder.Append("			<form action=\"\" method=\"get\">\r\n");
	templateBuilder.Append("				<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("				<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td width=\"40%\">版块选择: </td>\r\n");
	templateBuilder.Append("						<td width=\"60%\">\r\n");
	templateBuilder.Append("							<select name=\"forumid\">\r\n");
	templateBuilder.Append("							<option value=\"0\">全部</option>\r\n");
	templateBuilder.Append("							");
	templateBuilder.Append(forumliststr.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("							</select>\r\n");
	templateBuilder.Append("							<select name=\"tablelist\">\r\n");
	templateBuilder.Append("							<option value=\"\"></option>\r\n");

	int table__loop__id=0;
	foreach(DataRow table in posttablelist.Rows)
	{
		table__loop__id++;

	templateBuilder.Append("							<option value=\"" + table["id"].ToString().Trim() + "\" \r\n");

	if (tableid.ToString()==table["id"].ToString().Trim())
	{

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

	}	//end if

	templateBuilder.Append(">分表" + table["id"].ToString().Trim() + "</option>\r\n");

	}	//end loop

	templateBuilder.Append("							</select>\r\n");
	templateBuilder.Append("						</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td>帖子范围: </td>\r\n");
	templateBuilder.Append("						<td>\r\n");
	templateBuilder.Append("						<select name=\"filter\">\r\n");
	templateBuilder.Append("							<option value=\"1\" \r\n");

	if (filter==1)
	{

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

	}	//end if

	templateBuilder.Append(">未审核的回复</option>\r\n");
	templateBuilder.Append("							<option value=\"-3\" \r\n");

	if (filter==-3)
	{

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

	}	//end if

	templateBuilder.Append(">已忽略的回复</option>\r\n");
	templateBuilder.Append("					     </select>				    \r\n");
	templateBuilder.Append("					  </td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td/><td><input type=\"submit\" value=\"提交\"/></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("				</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	if (counts!=0)
	{

	templateBuilder.Append("		<form action=\"\" method=\"post\" name=\"auditpost_form\" id=\"auditpost_form\">\r\n");
	templateBuilder.Append("		<input name=\"tableid\" type=\"hidden\" value=\"");
	templateBuilder.Append(tableid.ToString());
	templateBuilder.Append("\" />\r\n");

	int post__loop__id=0;
	foreach(PostInfo post in postlist)
	{
		post__loop__id++;

	templateBuilder.Append("		<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />	\r\n");
	templateBuilder.Append("		<input name=\"pidlist\" type=\"hidden\" value=\"");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("		<input name=\"tidlist\" type=\"hidden\" value=\"");
	templateBuilder.Append(post.Tid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("		<input name=\"fidlist\" type=\"hidden\" value=\"");
	templateBuilder.Append(post.Fid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("		<div class=\"box\">\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(post.Tid,0);
	
	string aspxuserrewriteurl = this.UserInfoAspxRewrite(post.Posterid);
	
	templateBuilder.Append("			<span class=\"headactions\"><a href=\"");
	templateBuilder.Append(aspxuserrewriteurl.ToString());
	templateBuilder.Append("\" title=\"");
	templateBuilder.Append(post.Forumname.ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(post.Poster.ToString().Trim());
	templateBuilder.Append("</a>  发表于 <a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" title=\"");
	templateBuilder.Append(post.Forumname.ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(post.Postdatetime.ToString().Trim());
	templateBuilder.Append("</a></span>\r\n");
	templateBuilder.Append("			<h4>");
	templateBuilder.Append(forumnav.ToString());
	templateBuilder.Append("»<b>");
	templateBuilder.Append(post.Title.ToString().Trim());
	templateBuilder.Append("</b></h4>\r\n");
	templateBuilder.Append("			<table cellspacing=\"0\" cellpadding=\"4\">\r\n");
	templateBuilder.Append("			<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("					<div style=\"overflow-y: auto; overflow-x: hidden; height: 120px; width: 100%;\">");
	templateBuilder.Append(post.Message.ToString().Trim());
	templateBuilder.Append(" </div>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("			</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			<div style=\"border: 0pt none; padding-left:0;\" class=\"footoperation\">\r\n");
	templateBuilder.Append("				<b>理由: </b><input type=\"text\" size=\"80\" value=\"\" name=\"pm_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" id=\"pm_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\"/>     \r\n");
	templateBuilder.Append("				<b>操作: </b><input type=\"radio\" id=\"mod_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" value=\"validate\" name=\"mod_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" class=\"radio\"/>通过\r\n");
	templateBuilder.Append("							<input type=\"radio\" class=\"radio\" value=\"ignore\" id=\"mod_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" name=\"mod_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" checked=\"\" />忽略\r\n");
	templateBuilder.Append("							<input type=\"radio\" id=\"mod_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" value=\"delete\" name=\"mod_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" class=\"radio\"/>删除\r\n");
	templateBuilder.Append("							<input value=\"单条操作\" id=\"modbutton_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" name=\"modbutton_");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append("\" class=\"submit\" type=\"button\" onclick=\"auditpost(");
	templateBuilder.Append(post.Pid.ToString().Trim());
	templateBuilder.Append(",this.form.id,");
	templateBuilder.Append(post.Tid.ToString().Trim());
	templateBuilder.Append(",");
	templateBuilder.Append(tableid.ToString());
	templateBuilder.Append(")\">\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		</div>\r\n");

	}	//end loop

	templateBuilder.Append("		<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("			<div class=\"pages\">");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("			<span class=\"postbtn\"><input type=\"submit\" value=\"批量审核\" /></span>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		</form>		\r\n");

	}
	else
	{

	templateBuilder.Append("		<div class=\"box\"><h4>对不起，没有找到需要审核的回复。</h4></div>\r\n");

	}	//end if


	}	//end if

	templateBuilder.Append("<!--审核主题-->\r\n");

	if (operation=="audittopic" && admingroupinfo.Allowmodpost==1)
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>审核主题范围选择</h3>\r\n");
	templateBuilder.Append("			<form action=\"\" method=\"get\">\r\n");
	templateBuilder.Append("			<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("			<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td width=\"40%\">版块选择: </td>\r\n");
	templateBuilder.Append("					<td width=\"60%\">\r\n");
	templateBuilder.Append("			       	<select name=\"forumid\">\r\n");
	templateBuilder.Append("						<option value=\"0\">全部</option>\r\n");
	templateBuilder.Append("						");
	templateBuilder.Append(forumliststr.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("					</select>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td>帖子范围: </td>\r\n");
	templateBuilder.Append("				    <td>\r\n");
	templateBuilder.Append("					<select name=\"filter\">\r\n");
	templateBuilder.Append("						<option value=\"-2\" \r\n");

	if (filter==-2)
	{

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

	}	//end if

	templateBuilder.Append(">未审核的主题</option>\r\n");
	templateBuilder.Append("						<option value=\"-3\" \r\n");

	if (filter==-3)
	{

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

	}	//end if

	templateBuilder.Append(">已忽略的主题</option>					    \r\n");
	templateBuilder.Append("					</select>				    \r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				 </tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<td/><td><input type=\"submit\" value=\"提交\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	if (counts!=0)
	{

	templateBuilder.Append("		<form action=\"#\" method=\"post\" name=\"audittopic_form\" id=\"audittopic_form\">\r\n");
	templateBuilder.Append("		<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("		<div class=\"mainbox threadlist\">\r\n");
	templateBuilder.Append("			<h1>\r\n");
	templateBuilder.Append("				<a href=\"");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(forumname.ToString());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("			</h1>\r\n");
	templateBuilder.Append("			<table cellspacing=\"0\" cellpadding=\"0\" id=\"110\" summary=\"110\">\r\n");
	templateBuilder.Append("				<thead class=\"category\">\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td>标题</td>\r\n");
	templateBuilder.Append("						<td class=\"author\">作者</td>\r\n");
	templateBuilder.Append("						<td class=\"nums\">回复/查看</td>\r\n");
	templateBuilder.Append("						<td class=\"lastpost\">最后发表</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				</thead>					\r\n");

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

	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("				   <td class=\"common\">\r\n");
	templateBuilder.Append("						<input name=\"topicidlist\" type=\"hidden\" value=\"");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("						<input name=\"fidlist\" type=\"hidden\" value=\"");
	templateBuilder.Append(topic.Fid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	
	templateBuilder.Append("						<a href=\"javascript:void(0);\" onclick=\"getpostinfo(");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(")\" title=\"");
	templateBuilder.Append(topic.Forumname.ToString().Trim());
	templateBuilder.Append("\">");
	templateBuilder.Append(topic.Title.ToString().Trim());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("					<td class=\"author\">\r\n");
	templateBuilder.Append("						<cite>\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(topic.Posterid);
	
	templateBuilder.Append("							<a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(topic.Poster.ToString().Trim());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("						</cite>\r\n");
	templateBuilder.Append("						<em> ");
	templateBuilder.Append(topic.Postdatetime.ToString().Trim());
	templateBuilder.Append("</em>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("					<td class=\"nums\"><strong>");
	templateBuilder.Append(topic.Replies.ToString().Trim());
	templateBuilder.Append("</strong> / <em>");
	templateBuilder.Append(topic.Views.ToString().Trim());
	templateBuilder.Append("</em></td>\r\n");
	templateBuilder.Append("					<td class=\"lastpost\">							\r\n");
	templateBuilder.Append("						<em>\r\n");
	templateBuilder.Append("						<a href=\"showtopic.aspx?topicid=");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("&page=end#lastpost\">");
	templateBuilder.Append(topic.Lastpost.ToString().Trim());
	templateBuilder.Append("</a></em>\r\n");
	templateBuilder.Append("						<cite>by\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(topic.Lastposterid);
	
	templateBuilder.Append("							<a target=\"_blank\" href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\">");
	templateBuilder.Append(topic.Lastposter.ToString().Trim());
	templateBuilder.Append("</a>\r\n");
	templateBuilder.Append("						</cite>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("				<tbody id=\"msgtbody_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" style=\"display:none\">\r\n");
	templateBuilder.Append("					<tr><td colspan=5><div id=\"msg_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\"></div></td></tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("					  <td colspan=\"5\" style=\"padding:0;\">\r\n");
	templateBuilder.Append("						<div class=\"footoperation\" style=\"border: 0pt none; padding-left:4px;\">\r\n");
	templateBuilder.Append("							<b>理由: </b><input type=\"text\" name=\"pm_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" size=\"80\" id=\"pm_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\"/>     \r\n");
	templateBuilder.Append("							<b>操作: </b><input type=\"radio\" class=\"radio\" value=\"validate\" id=\"mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" name=\"mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\"/>通过\r\n");
	templateBuilder.Append("							<input type=\"radio\" class=\"radio\" value=\"ignore\" id=\"mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" name=\"mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" checked=\"\"/>忽略\r\n");
	templateBuilder.Append("							<input type=\"radio\" class=\"radio\" name=\"mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" value=\"delete\" id=\"mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\"/>删除\r\n");
	templateBuilder.Append("							<input value=\"单条操作\" id=\"modbutton_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" name=\"modbutton_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\" class=\"submit\" type=\"button\" onclick=\"javascript:audittopic(");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append(",getradiovalue('mod_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("'),this.form.id,$('pm_");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("').value)\">\r\n");
	templateBuilder.Append("						</div>\r\n");
	templateBuilder.Append("					  </td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");

	}	//end loop

	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("			<div class=\"pages\">");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("			<span class=\"postbtn\"><input type=\"submit\" value=\"批量审核\" /></span>\r\n");
	templateBuilder.Append("		</div>		\r\n");
	templateBuilder.Append("		</form>\r\n");

	}
	else
	{

	templateBuilder.Append("		<div class=\"box\"><h4>对不起，没有找到需要审核的主题。</h4></div>\r\n");

	}	//end if


	}	//end if


	if (operation=="editforum")
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>论坛版块选择</h3>\r\n");
	templateBuilder.Append("			<form method=\"get\" action=\"\">\r\n");
	templateBuilder.Append("			<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("				<th width=\"20%\">版块</th>\r\n");
	templateBuilder.Append("				<td>\r\n");
	templateBuilder.Append("					<select name=\"forumid\">\r\n");
	templateBuilder.Append("						<option value=\"0\">全部</option>\r\n");
	templateBuilder.Append("						");
	templateBuilder.Append(forumliststr.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("					</select>\r\n");
	templateBuilder.Append("				</td>\r\n");
	templateBuilder.Append("				<td><input type=\"submit\" id=\"Submit1\" value=\"提交\"/></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	if (forumid!=0)
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>版块编辑 - ");
	templateBuilder.Append(foruminfo.Name.ToString().Trim());
	templateBuilder.Append("</h3>\r\n");
	templateBuilder.Append("			<form method=\"post\" action=\"?operation=updateforum\">\r\n");
	templateBuilder.Append("			<input name=\"forumid\" type=\"hidden\" value=\"");
	templateBuilder.Append(foruminfo.Fid.ToString().Trim());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("			<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<tbody>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	 aspxrewriteurl = this.ShowForumAspxRewrite(foruminfo.Fid,0);
	
	templateBuilder.Append("					<th width=\"20%\">版块</th><td> ");
	templateBuilder.Append(foruminfo.Name.ToString().Trim());
	templateBuilder.Append(" [<a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">查看</a>]</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">\r\n");
	templateBuilder.Append("					版块描述<br>\r\n");
	templateBuilder.Append("					<br>Html 代码 <b>支持</b><br>不支持自定义 Discuz! 代码<br><br>\r\n");
	templateBuilder.Append("					<a href=\"###\" onclick=\"javascript:$('descpreview').innerHTML=$('descnew').value\">预览</a>\r\n");
	templateBuilder.Append("					</th>\r\n");
	templateBuilder.Append("					<td><div id=\"descpreview\"></div><textarea id=\"descnew\" name=\"descnew\" rows=\"8\" cols=\"80\">");
	templateBuilder.Append(foruminfo.Description.ToString().Trim());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("					</textarea>\r\n");
	templateBuilder.Append("					</td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th width=\"20%\">本版规则<br><br>Html 代码 <b>支持</b><br>不支持自定义 Discuz! 代码<br><br><a href=\"###\" onclick=\"javascript:$('rulespreview').innerHTML=$('rulesnew').value\">预览</a></th><td><div id=\"rulespreview\"></div>\r\n");

	if (alloweditrules)
	{

	templateBuilder.Append("					<textarea id=\"rulesnew\" name=\"rulesnew\" rows=\"8\" cols=\"80\">\r\n");

	}
	else
	{

	templateBuilder.Append("                    <textarea id=\"rulesnew\" name=\"rulesnew\" rows=\"8\" cols=\"80\" disabled readonly>\r\n");

	}	//end if

	templateBuilder.Append("					");
	templateBuilder.Append(foruminfo.Rules.ToString().Trim());
	templateBuilder.Append("</textarea></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				<tr>\r\n");
	templateBuilder.Append("					<th></th><td><input type=\"submit\" id=\"Submit1\" value=\"提交\" /></td>\r\n");
	templateBuilder.Append("				</tr>\r\n");
	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");

	}	//end if


	}	//end if


	if (operation=="logs")
	{

	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>管理日志搜索</h3>\r\n");
	templateBuilder.Append("			<form method=\"get\" action=\"\">\r\n");
	templateBuilder.Append("			<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("				<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("					<td>\r\n");
	templateBuilder.Append("						关键字: <input name=\"keyword\" value=\"\" size=\"60\" type=\"text\">\r\n");
	templateBuilder.Append("						&nbsp;&nbsp;&nbsp;&nbsp;每页显示条数\r\n");
	templateBuilder.Append("						<input name=\"lpp\" value=\"20\" size=\"4\" type=\"text\">&nbsp;&nbsp;&nbsp;&nbsp;\r\n");
	templateBuilder.Append("						<button type=\"submit\" id=\"searchsubmit\" value=\"true\">提交</button></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("				</table>\r\n");
	templateBuilder.Append("			</form>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h1>管理日志列表</h1>\r\n");
	templateBuilder.Append("			<table summary=\"\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("				<thead>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<th width=\"15%\">时间</th>\r\n");
	templateBuilder.Append("						<th width=\"15%\">用户名</th>\r\n");
	templateBuilder.Append("						<th width=\"10%\">管理组</th>\r\n");
	templateBuilder.Append("						<td width=\"10%\">IP</td>\r\n");
	templateBuilder.Append("						<th width=\"10%\">操作</th>\r\n");
	templateBuilder.Append("						<td width=\"15%\">版块</td>\r\n");
	templateBuilder.Append("						<td width=\"5%\">其他</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("				</thead>\r\n");
	templateBuilder.Append("				<tbody>\r\n");

	int logs__loop__id=0;
	foreach(DataRow logs in moderatorLogs.Rows)
	{
		logs__loop__id++;

	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td>" + logs["postdatetime"].ToString().Trim() + "</td>\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(logs["moderatoruid"].ToString().Trim());
	
	templateBuilder.Append("						<td><a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\"><b>" + logs["moderatorname"].ToString().Trim() + "</b></a></td>\r\n");
	templateBuilder.Append("						<td>" + logs["grouptitle"].ToString().Trim() + "</td>\r\n");
	templateBuilder.Append("						<td>" + logs["ip"].ToString().Trim() + "</td>\r\n");
	templateBuilder.Append("						<td>" + logs["actions"].ToString().Trim() + "</td>\r\n");
	 aspxrewriteurl = this.ShowForumAspxRewrite(logs["fid"].ToString().Trim(),0);
	
	templateBuilder.Append("						<td><a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">" + logs["fname"].ToString().Trim() + "</a></td>\r\n");
	templateBuilder.Append("						<td><a href=\"###\" \r\n");

	if (logs["reason"].ToString().Trim()!="")
	{

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

	}	//end if

	templateBuilder.Append(" id=\"" + logs__loop__id.ToString() + "\">详情</a></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<div id=\"" + logs__loop__id.ToString() + "_menu\" class=\"popupmenu_popup\" style=\"display: none;\">\r\n");
	templateBuilder.Append("					<ul>\r\n");
	templateBuilder.Append("						" + logs["reason"].ToString().Trim() + "\r\n");
	templateBuilder.Append("					</ul>\r\n");
	templateBuilder.Append("				</div>\r\n");

	}	//end loop

	templateBuilder.Append("				</tbody>\r\n");
	templateBuilder.Append("			</table>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("		<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("			<div class=\"pages\">\r\n");
	templateBuilder.Append("		     ");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		</div>	\r\n");

	}	//end if

	templateBuilder.Append("<!--主题关注-->\r\n");

	if (operation=="attention")
	{

	templateBuilder.Append("			<div class=\"mainbox\">\r\n");
	templateBuilder.Append("			<h3>论坛版块选择</h3>\r\n");
	templateBuilder.Append("				<form action=\"\" method=\"get\">\r\n");
	templateBuilder.Append("				<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("				<table cellspacing=\"0\" cellpadding=\"0\">\r\n");
	templateBuilder.Append("					<tbody>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td width=\"60%\">关键字: <input name=\"keyword\" value=\"\" size=\"45\" type=\"text\"></td>\r\n");
	templateBuilder.Append("						<td width=\"40%\">版块选择: \r\n");
	templateBuilder.Append("						<select name=\"forumid\">\r\n");
	templateBuilder.Append("							<option value=\"0\">全部</option>\r\n");
	templateBuilder.Append("							");
	templateBuilder.Append(forumliststr.ToString());
	templateBuilder.Append("</select>\r\n");
	templateBuilder.Append("						</td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					<tr>\r\n");
	templateBuilder.Append("						<td/><td><input type=\"submit\" value=\"提交\"/></td>\r\n");
	templateBuilder.Append("					</tr>\r\n");
	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("				</table>\r\n");
	templateBuilder.Append("				</form>\r\n");
	templateBuilder.Append("			</div>\r\n");

	if (counts>0)
	{

	templateBuilder.Append("			<form action=\"\" method=\"post\">\r\n");
	templateBuilder.Append("			<div class=\"mainbox\">\r\n");
	templateBuilder.Append("				<h1>主题关注列表</h1>\r\n");
	templateBuilder.Append("				<input name=\"forumid\" type=\"hidden\" value=\"");
	templateBuilder.Append(forumid.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("				<input name=\"operation\" type=\"hidden\" value=\"");
	templateBuilder.Append(operation.ToString());
	templateBuilder.Append("\" />\r\n");
	templateBuilder.Append("				<table summary=\"\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
	templateBuilder.Append("					<thead>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<th><input type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'topicid')\"/>标题</th>\r\n");
	templateBuilder.Append("							<th width=\"10%\">作者</th>\r\n");
	templateBuilder.Append("							<th width=\"20%\">发布时间</th>\r\n");
	templateBuilder.Append("							<td width=\"20%\">最后发表</td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</thead>\r\n");
	templateBuilder.Append("					<tbody>\r\n");

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

	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td>\r\n");
	 aspxrewriteurl = this.ShowTopicAspxRewrite(topic.Tid,0);
	
	templateBuilder.Append("							<input type=\"checkbox\" id=\"topicid\" name=\"topicid\" value=\"");
	templateBuilder.Append(topic.Tid.ToString().Trim());
	templateBuilder.Append("\"/><a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(topic.Title.ToString().Trim());
	templateBuilder.Append("</a></td>\r\n");
	 aspxrewriteurl = this.UserInfoAspxRewrite(topic.Posterid);
	
	templateBuilder.Append("							<td><a href=\"");
	templateBuilder.Append(aspxrewriteurl.ToString());
	templateBuilder.Append("\" target=\"_blank\">");
	templateBuilder.Append(topic.Poster.ToString().Trim());
	templateBuilder.Append("</a></td>\r\n");
	templateBuilder.Append("							<td>");
	templateBuilder.Append(topic.Postdatetime.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("							<td>");
	templateBuilder.Append(topic.Lastpost.ToString().Trim());
	templateBuilder.Append("</td>\r\n");
	templateBuilder.Append("						</tr>\r\n");

	}	//end loop

	templateBuilder.Append("					</tbody>\r\n");
	templateBuilder.Append("				</table>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			<div class=\"pages_btns\">\r\n");
	templateBuilder.Append("				<div class=\"pages\">\r\n");
	templateBuilder.Append("				 ");
	templateBuilder.Append(pagenumbers.ToString());
	templateBuilder.Append("\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<span class=\"postbtn\"><select name=\"disattentiontype\" id=\"disattentiontype\">\r\n");
	templateBuilder.Append("				  <option value=\"0\" selected=\"selected\">所选主题</option>\r\n");
	templateBuilder.Append("				  <option value=\"7\">一星期前</option>\r\n");
	templateBuilder.Append("				  <option value=\"30\">一月前</option>\r\n");
	templateBuilder.Append("				  <option value=\"365\">一年前</option>\r\n");
	templateBuilder.Append("				</select><input type=\"submit\" value=\"取消关注\"></span>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("			</form>	\r\n");

	}
	else
	{

	templateBuilder.Append("			<div class=\"box\"><h4>对不起，没有找到需要关注的主题。</h4></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");

	}	//end if


	}
	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



	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>
