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

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

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

	base.OnInit(e);

	templateBuilder.Append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
	templateBuilder.Append("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
	templateBuilder.Append("<head>\r\n");
	templateBuilder.Append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n");
	templateBuilder.Append("" + meta.ToString() + "\r\n");
	templateBuilder.Append("<title>" + pagetitle.ToString() + " " + config.Seotitle.ToString().Trim() + " - " + config.Albumname.ToString().Trim() + " - Powered by Discuz!NT</title>\r\n");
	templateBuilder.Append("<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\r\n");
	templateBuilder.Append("<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" /> \r\n");
	templateBuilder.Append("<!-- 调用样式表 -->\r\n");
	templateBuilder.Append("<link rel=\"stylesheet\" href=\"templates/" + templatepath.ToString() + "/main.css\" type=\"text/css\" media=\"all\"  />\r\n");
	templateBuilder.Append("" + link.ToString() + "\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/report.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"templates/" + templatepath.ToString() + "/common.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"editor/common.js\"></" + "script>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\" src=\"editor/menu.js\"></" + "script>\r\n");
	templateBuilder.Append("" + script.ToString() + "\r\n");
	templateBuilder.Append("</head>\r\n");
	templateBuilder.Append("<body>\r\n");
	templateBuilder.Append("<div id=\"container\">\r\n");
	templateBuilder.Append("<div id=\"Wraper\">\r\n");
	templateBuilder.Append("<!--header start-->\r\n");
	templateBuilder.Append("<div id=\"header\">\r\n");
	templateBuilder.Append("	<h2><a href=\"" + forumurl.ToString() + "forumindex.aspx\" title=\"Discuz! Board NT|BBS|论坛 - Powered by Discuz!NT\" id=\"NtForumLogo\"><img src=\"templates/" + templatepath.ToString() + "/images/logo.gif\" alt=\"Discuz! Board NT|BBS|论坛\"/></a>\r\n");
	templateBuilder.Append("	</h2>\r\n");
	templateBuilder.Append("	<p id=\"topmenu\">\r\n");

	if (userid==-1)
	{

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

	}
	else
	{

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

	if (useradminid==1)
	{

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

	}	//end if


	}	//end if


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

	templateBuilder.Append("				<a href=\"" + forumurl.ToString() + "forumindex.aspx\">论坛</a>\r\n");

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if


	if (usergroupinfo.Allowsearch>0)
	{

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

	}	//end if

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

	if (headerad!="")
	{

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

	}	//end if

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



	if (page_err==0)
	{


	if (ispost)
	{


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

	if (msgbox_url!="")
	{

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

	}	//end if

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



	}
	else
	{

	templateBuilder.Append("	<script type=\"text/javascript\" src=\"javascript/ajax.js\"></" + "script>\r\n");
	templateBuilder.Append("	<script type=\"text/javascript\" src=\"editor/post.js\"></" + "script>\r\n");
	templateBuilder.Append("	<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	function shownavbar(albumid, curphotoid, b){\r\n");
	templateBuilder.Append("		var c=\"tools/ajax.aspx?t=album&albumid=\" + albumid;\r\n");
	templateBuilder.Append("		var f=\"" + jsonfilename.ToString() + "\";\r\n");
	templateBuilder.Append("		_sendRequest(f,function(d){var e={};try{e=eval(\"(\"+d+\")\")}catch(f){e={};\r\n");
	templateBuilder.Append("		_sendRequest(c,function(d){var e={};try{e=eval(\"(\"+d+\")\")}catch(f){e={}}var h=e?e:null;b(h, curphotoid);e=null;b=null},false,true);\r\n");
	templateBuilder.Append("		return;\r\n");
	templateBuilder.Append("		}var h=e?e:null;b(h, curphotoid);e=null;b=null},false,false)\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	function bindPhotoNav(obj, curphotoid)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		var items = obj.items;\r\n");
	templateBuilder.Append("		var length = items.length;\r\n");
	templateBuilder.Append("		var photoindex = 1;\r\n");
	templateBuilder.Append("		var photonav = $(\"photonav\");\r\n");
	templateBuilder.Append("		if (items.length < 1)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			photonav.innerHTML = \"暂时无法显示导航条\";\r\n");
	templateBuilder.Append("			return;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		var html = \"\";\r\n");
	templateBuilder.Append("		html += \"<table cellpadding='1'><tr>\";\r\n");
	templateBuilder.Append("		for (var i in items)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			var border = \"\";\r\n");
	templateBuilder.Append("			var size = 88;\r\n");
	templateBuilder.Append("			if (items[i].photoid == curphotoid)\r\n");
	templateBuilder.Append("			{\r\n");
	templateBuilder.Append("				photoindex = new Number(i) + 1;\r\n");
	templateBuilder.Append("				border = \" class=\\\"activeimg\\\"\";\r\n");
	templateBuilder.Append("				size = 76;\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			html += \"<td><a href='showphoto.aspx?photoid=\" + items[i].photoid + \"'><div\" + border + \"><img title='\" + items[i].title + \"' alt='\" + items[i].title + \"' src='\" + items[i].square + \"' onerror=\\\"this.src='templates/" + templatepath.ToString() + "/images/errorphoto.gif';\\\" width='\" + size + \"' height='\" + size + \"' border='0' /></div></a></td>\";\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		html += \"</tr></table>\";\r\n");
	templateBuilder.Append("		photonav.innerHTML = html;\r\n");
	templateBuilder.Append("		//scrolling\r\n");
	templateBuilder.Append("		if (photoindex > 5)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			$('photonav').scrollLeft = (photoindex-5) * 90;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		//disable prevImg\r\n");
	templateBuilder.Append("		if (photoindex == 1)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			$(\"prevImg\").href = '###';\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		//disable nextImg\r\n");
	templateBuilder.Append("		if (photoindex == length)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			$(\"nextImg\").href = '###';\r\n");
	templateBuilder.Append("			$(\"nextImgOnPhoto\").href = 'showphoto.aspx?photoid=' + items[0].photoid;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		$(\"photoIndex\").innerHTML = '<em>' + photoindex + '</em>/' + length;\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	function resizePhoto(img)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		if (img.width > 685)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			img.width = 685;\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	</" + "script>\r\n");


	if (config.Enablealbum==1)
	{

	templateBuilder.Append("	<div id=\"ntforummenu\">\r\n");
	templateBuilder.Append("		<div class=\"ntmenubar\">\r\n");
	templateBuilder.Append("			<span style=\"float: left;\">\r\n");
	templateBuilder.Append("			<a href=\"showphotolist.aspx?type=2\">最新图片</a>\r\n");
	templateBuilder.Append("			<a href=\"showphotolist.aspx?type=1\">最多评论</a>\r\n");
	templateBuilder.Append("			<a href=\"showphotolist.aspx?type=3\" class=\"noborder\">最多收藏</a>\r\n");
	templateBuilder.Append("		</span>\r\n");

	if (userid!=-1)
	{

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

	if (config.Enablespace==1)
	{

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

	}	//end if

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

	}	//end if

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

	}	//end if



	templateBuilder.Append("	<div id=\"ntforumposition\">\r\n");
	templateBuilder.Append("		<div class=\"ntforumnote\">\r\n");
	templateBuilder.Append("			<h3><a href=\"" + config.Albumurl.ToString().Trim() + "\" id=\"NavHome\" onmouseover=\"showMenu(this.id);\" onmouseout=\"showMenu(this.id);\">" + config.Albumname.ToString().Trim() + "首页</a> > <a href=\"showalbumlist.aspx?cate=" + albumcategory.Albumcateid.ToString().Trim() + "\">" + albumcategory.Title.ToString().Trim() + "</a> > <a href=\"showalbum.aspx?albumid=" + album.Albumid.ToString().Trim() + "\">" + album.Title.ToString().Trim() + "</a> </h3>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	    <div class=\"ntforumsearch\">\r\n");
	templateBuilder.Append("			<div id=\"search\">\r\n");

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


	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("	" + navhomemenu.ToString() + "\r\n");
	templateBuilder.Append("	<div id=\"ntforumbody\" style=\"overflow:visible;\">\r\n");

	if (!needpassword)
	{

	templateBuilder.Append("			<div class=\"modulebox\">\r\n");
	templateBuilder.Append("					<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("						<h2>" + photo.Title.ToString().Trim() + "</h2>\r\n");
	templateBuilder.Append("						<em>\r\n");

	if (config.Silverlight==1)
	{

	templateBuilder.Append("						<a id=\"silverlightalbum\" target=\"_blank\" title=\"Silverlight相册展示\" href=\"silverlight/album/index.html?albumid=" + album.Albumid.ToString().Trim() + "\">Silverlight酷炫体验</a>&nbsp;\r\n");

	}	//end if

	templateBuilder.Append("						<a title=\"幻灯片播放\" href=\"javascript:void(0);\" onclick=\"window.open('" + spaceurl.ToString() + "space/slidealbum.aspx?albumid=" + album.Albumid.ToString().Trim() + "','','fullscreen=yes')\">幻灯展示</a>&nbsp;<a href=\"showalbum.aspx?albumid=" + album.Albumid.ToString().Trim() + "\">+ 更多</a></em>\r\n");
	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("					<div class=\"scrollphoto\"><ul><li id=\"scrollleft\" style='cursor: pointer;margin-top:8px;\"' onclick=\"scrollHiddenDiv($('photonav'), -90);\"><img src='templates/" + templatepath.ToString() + "/images/scrollarrowleft.jpg' alt='向左移动' /></li><li style='width: 810px;'><div style='position:relative;'><div class='photonavbar' id=\"photonav\" style='overflow: hidden;width:810px;'>加载导航图，请稍候...</div></div></li><li id=\"scrollright\" style='cursor: pointer;margin-top:8px;\"' onclick=\"scrollHiddenDiv($('photonav'), 90);\"><img src=\"templates/" + templatepath.ToString() + "/images/scrollarrowright.jpg\" alt=\"向右移动\" /></li></ul></div>\r\n");
	templateBuilder.Append("					<script type=\"text/javascript\">shownavbar(" + photo.Albumid.ToString().Trim() + ", " + photo.Photoid.ToString().Trim() + ", bindPhotoNav);</" + "script>\r\n");
	templateBuilder.Append("					<div class=\"photoshowBox\">\r\n");
	templateBuilder.Append("					<div class=\"boxbody\">\r\n");
	templateBuilder.Append("						<div class=\"Photo\" style=\"margin: 10px 20px;\">\r\n");
	templateBuilder.Append("							<strong>\r\n");
	templateBuilder.Append("									<cite>\r\n");

	if (config.Enablespace==1)
	{

	templateBuilder.Append("<a href=\"" + spaceurl.ToString() + "space/?uid=" + photo.Userid.ToString().Trim() + "\" target=\"_blank\">" + photo.Username.ToString().Trim() + "的空间</a>\r\n");

	}	//end if

	templateBuilder.Append("									</cite>\r\n");
	templateBuilder.Append("									<cite>\r\n");
	templateBuilder.Append("										<a href=\"" + albumurl.ToString() + "showalbumlist.aspx?uid=" + photo.Userid.ToString().Trim() + "\" target=\"_blank\">" + photo.Username.ToString().Trim() + "的相册</a>\r\n");
	templateBuilder.Append("									</cite>\r\n");
	templateBuilder.Append("									<cite>大小:\r\n");
	templateBuilder.Append("											<script language=\"javascript\" type=\"text/javascript\">\r\n");
	templateBuilder.Append("												ShowFormatBytesStr(" + photo.Filesize.ToString().Trim() + ");\r\n");
	templateBuilder.Append("											</" + "script>\r\n");
	templateBuilder.Append("									</cite>		\r\n");
	templateBuilder.Append("									<cite>上传时间: " + photo.Postdate.ToString().Trim() + "</cite>\r\n");
	templateBuilder.Append("									<cite>浏览量: " + photo.Views.ToString().Trim() + "</cite>\r\n");
	templateBuilder.Append("									<cite>评论数: " + comments.Count.ToString().Trim() + "</cite>\r\n");
	templateBuilder.Append("							</strong>\r\n");
	templateBuilder.Append("							<div class=\"PhotoPIc\" style=\"width: 685px\"><a id=\"nextImgOnPhoto\" href=\"" + albumurl.ToString() + "showphoto.aspx?photoid=" + photo.Photoid.ToString().Trim() + "&go=next\" alt=\"点击图片查看下一张\" title=\"点击图片查看下一张\"><img onload=\"resizePhoto(this);\" alt=\"" + photo.Title.ToString().Trim() + "\" title=\"" + photo.Title.ToString().Trim() + "\" src=\"" + photo.Filename.ToString().Trim() + "\" /></a></div>		\r\n");
	templateBuilder.Append("							<div class=\"PageBox\">\r\n");
	templateBuilder.Append("								<div class=\"PageBoxLeft\"><a id=\"prevImg\" href=\"" + albumurl.ToString() + "showphoto.aspx?photoid=" + photo.Photoid.ToString().Trim() + "&go=prev\">上一张</a><cite>第 <span id=\"photoIndex\"><em>1</em>/1</span> 张</cite> <a id=\"nextImg\" href=\"showphoto.aspx?photoid=" + photo.Photoid.ToString().Trim() + "&go=next\">下一张</a></div>\r\n");

	if (userid!=-1)
	{

	templateBuilder.Append("									<div class=\"Pageboxright\">\r\n");
	templateBuilder.Append("											<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("												enableinfo = '<img src=\"templates/" + templatepath.ToString() + "/images/buttonreport.gif\" alt=\"举报此图片\" />';											;\r\n");
	templateBuilder.Append("												show_report_button(\"<img src=templates/" + templatepath.ToString() + "/images/reportfinish.gif alt=已经举报此图片 />\");\r\n");
	templateBuilder.Append("												enableinfo = '<span class=\"commenreport\">举报<span>';\r\n");
	templateBuilder.Append("											</" + "script>\r\n");
	templateBuilder.Append("									</div>\r\n");

	}	//end if

	templateBuilder.Append("							</div>\r\n");
	templateBuilder.Append("							<strong>" + photo.Description.ToString().Trim() + "</strong>\r\n");

	if (editable || comments.Count>0)
	{

	templateBuilder.Append("							<p class=\"commentstitle\"><a name=\"comments\"></a>\r\n");

	if (editable)
	{

	templateBuilder.Append("									<form id=\"commentform\" name=\"commentform\" method=\"post\" action=\"\"><input name=\"delcommentid\" type=\"hidden\" /></form>\r\n");
	templateBuilder.Append("									<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("									function del_comment(cid)\r\n");
	templateBuilder.Append("									{\r\n");
	templateBuilder.Append("										if (confirm('确定要删除吗?'))\r\n");
	templateBuilder.Append("										{\r\n");
	templateBuilder.Append("											var form = $(\"commentform\");\r\n");
	templateBuilder.Append("											form.delcommentid.value = cid;\r\n");
	templateBuilder.Append("											form.submit();\r\n");
	templateBuilder.Append("										}\r\n");
	templateBuilder.Append("										return false;\r\n");
	templateBuilder.Append("									}\r\n");
	templateBuilder.Append("									</" + "script>\r\n");

	}	//end if


	if (photo.Comments>0)
	{

	templateBuilder.Append("								评论 (" + photo.Comments.ToString().Trim() + ")\r\n");

	}	//end if

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

	}	//end if

	templateBuilder.Append("						</div>\r\n");
	int rowindex = 1;
	

	int comment__loop__id=0;
	foreach(PhotoCommentInfo comment in comments)
	{
		comment__loop__id++;

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

	if (rowindex%2==0)
	{

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

	}
	else
	{

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

	}	//end if

	templateBuilder.Append("\">\r\n");
	templateBuilder.Append("								<div class=\"reviewboxleft\">" + rowindex.ToString() + ".</div>\r\n");
	templateBuilder.Append("								<p>" + comment.Content.ToString().Trim() + "</p>\r\n");
	templateBuilder.Append("								<div class=\"reviewwriterbox\">\r\n");
	templateBuilder.Append("									<div class=\"ReviewManager\">\r\n");

	if (comment.Userid!=-1)
	{

	 aspxrewriteurl = this.UserInfoAspxRewrite(comment.Userid);
	
	templateBuilder.Append("									<a href=\"" + forumurl.ToString() + "" + aspxrewriteurl.ToString() + "\">" + comment.Username.ToString().Trim() + "</a>\r\n");

	}
	else
	{

	templateBuilder.Append("" + comment.Username.ToString().Trim() + "\r\n");

	}	//end if

	templateBuilder.Append("      " + comment.Postdatetime.ToString().Trim() + "</div>\r\n");
	templateBuilder.Append("									<em>\r\n");

	if (userid!=-1)
	{

	templateBuilder.Append("											<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("												show_report_button('<span class=reportfinish>已举报</span>');\r\n");
	templateBuilder.Append("											</" + "script>\r\n");

	}	//end if


	if (editable)
	{

	templateBuilder.Append("										<a id=\"e" + comment.Commentid.ToString().Trim() + "\" title=\"删除此评论\" onclick=\"del_comment(" + comment.Commentid.ToString().Trim() + ");\" href=\"###\" class=\"commenddelete\">删除</a></em>\r\n");

	}	//end if

	templateBuilder.Append("									</em>\r\n");
	templateBuilder.Append("								</div>\r\n");
	templateBuilder.Append("							</div>\r\n");
	 rowindex = rowindex+1;
	

	}	//end loop


	if (commentable)
	{

	templateBuilder.Append("							<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("							function validate(form)\r\n");
	templateBuilder.Append("							{\r\n");
	templateBuilder.Append("								if (form.message.value == \"\")\r\n");
	templateBuilder.Append("								{\r\n");
	templateBuilder.Append("									alert(\"请输入评论内容\");\r\n");
	templateBuilder.Append("									return false;\r\n");
	templateBuilder.Append("								}\r\n");
	templateBuilder.Append("								if(form.message.value.length > 2000) {\r\n");
	templateBuilder.Append("									alert(\"评论最多2000字\");\r\n");
	templateBuilder.Append("									return false;\r\n");
	templateBuilder.Append("								}\r\n");
	templateBuilder.Append("							}\r\n");
	templateBuilder.Append("							</" + "script>							\r\n");
	templateBuilder.Append("							<form method=\"post\" id=\"postform\" onsubmit=\"return validate(this);\">\r\n");
	templateBuilder.Append("										<h3><a name=\"reply\"></a>发表评论</h3>\r\n");
	templateBuilder.Append("										<p>\r\n");
	templateBuilder.Append("											<textarea id=\"message\" tabindex=\"1\" name=\"message\" style=\"width: 400px;\" onKeyDown=\"ctlent(event,false);\" rows=\"8\" class=\"colorblue\"></textarea><br>\r\n");
	templateBuilder.Append("										</p>\r\n");
	templateBuilder.Append("										<p>						\r\n");
	templateBuilder.Append("											<input tabindex=\"2\" id=\"postsubmit\" name=\"post_comment\" class=\"lightbutton\" value=\"提交\" type=\"submit\">[完成后可按 Ctrl+Enter 发布]\r\n");
	templateBuilder.Append("										</p>	\r\n");
	templateBuilder.Append("							</form>\r\n");

	}
	else
	{

	templateBuilder.Append("						<div style=\"margin: 15px 0 15px 20px\">\r\n");
	templateBuilder.Append("						<p>\r\n");
	templateBuilder.Append("						&nbsp;&nbsp;此图片禁止评论 或 登录用户才可评论\r\n");
	templateBuilder.Append("						</p>\r\n");
	templateBuilder.Append("						</div>\r\n");

	}	//end if

	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("					<div class=\"boxright\">\r\n");
	templateBuilder.Append("						<h3>一周热图总排行</h3>\r\n");
	templateBuilder.Append("						<ul>\r\n");

	int weekhotphoto__loop__id=0;
	foreach(PhotoInfo weekhotphoto in weekhotphotolist)
	{
		weekhotphoto__loop__id++;


	if (weekhotphoto.Title!="")
	{

	templateBuilder.Append("								<li><a href=\"" + albumurl.ToString() + "showphoto.aspx?photoid=" + weekhotphoto.Photoid.ToString().Trim() + "\">" + weekhotphoto.Title.ToString().Trim() + "</a> (<a href=\"" + albumurl.ToString() + "showalbumlist.aspx?uid=" + weekhotphoto.Userid.ToString().Trim() + "\">" + weekhotphoto.Username.ToString().Trim() + "</a>)</li>\r\n");

	}	//end if


	}	//end loop

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

	}
	else
	{

	templateBuilder.Append("			<div class=\"modulebox\">\r\n");
	templateBuilder.Append("				<div class=\"forumtitle\">\r\n");
	templateBuilder.Append("					<h2>此相册已被设置密码</h2>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("				<div class=\"forumpassword\">\r\n");
	templateBuilder.Append("					<form id=\"enteralbum\" name=\"enteralbum\" method=\"post\" action=\"\">\r\n");
	templateBuilder.Append("							<label for=\"password\">请输入密码:</label><input name=\"albumpassword\" type=\"password\" id=\"albumpassword\" size=\"20\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" />\r\n");
	templateBuilder.Append("							<p><input type=\"submit\"  value=\"确定\" class=\"lightbutton\"/></p>\r\n");
	templateBuilder.Append("					</form>\r\n");
	templateBuilder.Append("				</div>\r\n");
	templateBuilder.Append("			</div>\r\n");

	}	//end if

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

	}	//end if


	}
	else
	{


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

	if (usergroupid==7)
	{

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

	}	//end if

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



	}	//end if

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

	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<div id=\"forumfooter\">\r\n");
	templateBuilder.Append("	<div class=\"footercopy\">\r\n");
	templateBuilder.Append("		<p>\r\n");
	templateBuilder.Append("			版权所有 <a href=\"" + config.Weburl.ToString().Trim() + "\" target=\"_blank\">" + config.Webtitle.ToString().Trim() + "</a> &nbsp;&nbsp; " + config.Linktext.ToString().Trim() + "\r\n");
	templateBuilder.Append("		</p>\r\n");
	templateBuilder.Append("		<span>Powered by <a href=\"http://nt.discuz.net\" target=\"_blank\" title=\"Discuz!NT 2.0 (.net Framework 1.1)\"><em>Discuz!NT</em></a>&nbsp;<em>2.0.1115</em> \r\n");

	if (config.Licensed==1)
	{

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

	}	//end if

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

	if (config.Debug!=0)
	{

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

	if (isguestcachepage==1)
	{

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

	}
	else if (querycount>1)
	{

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

	}
	else
	{

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

	}	//end if


	}	//end if

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

	if (config.Stylejump==1)
	{

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

	}	//end if

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



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