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

	base.OnInit(e);


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


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

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

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

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

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

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if

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

	}	//end if

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

	if (userid==-1)
	{

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

	}
	else
	{

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

	if (useradminid==1)
	{

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

	}	//end if


	}	//end if


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


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

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

	}	//end if


	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if


	}	//end if


	if (usergroupinfo.Allowsearch>0)
	{

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

	}	//end if

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

	if (headerad!="")
	{

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

	}	//end if

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

	if (userid!=-1)
	{

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

	}	//end if

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

	if (userid!=-1)
	{

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

	}	//end if

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


	templateBuilder.Append("<!--header end-->\r\n");
	templateBuilder.Append("<!--TheCurrent start-->\r\n");
	templateBuilder.Append("<div id=\"foruminfo\">\r\n");
	templateBuilder.Append("	<div class=\"userinfo\">\r\n");
	templateBuilder.Append("		<h2><a href=\"" + config.Forumurl.ToString().Trim() + "\" class=\"home\">" + config.Forumtitle.ToString().Trim() + "</a><span><a href=\"usercp.aspx\">用户中心</a></span><span><a href=\"usercpspacemanagealbum.aspx\">管理相册</a></span><span><a href=\"usercpspacemanagephoto.aspx?albumid=" + albumid.ToString() + "\">管理图片</a></span><strong>增加图片</strong></h2>	</div>\r\n");
	templateBuilder.Append("	<div class=\"forumstats\">\r\n");
	templateBuilder.Append("		<div id=\"search\">\r\n");

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


	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<!--TheCurrent end-->\r\n");
	templateBuilder.Append("<!--主体-->\r\n");
	templateBuilder.Append("<img id=\"img_hidden\" alt=\"1\" style=\"position:absolute;top:-100000px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image');width:400;height:300\"></img>\r\n");
	templateBuilder.Append("<div class=\"controlpannel\">\r\n");

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

	if (userid>0)
	{


	if (pagename=="usercptopic.aspx"||pagename=="usercppost.aspx"||pagename=="usercpdigest.aspx"||pagename=="usercpprofile.aspx"


      ||pagename=="usercpnewpassword.aspx"||pagename=="usercppreference.aspx")
	{

	templateBuilder.Append("	   <a href=\"usercpprofile.aspx\" class=\"current\"><span>个人设置</span></a>\r\n");

	}
	else
	{

	templateBuilder.Append("	   <a href=\"usercpprofile.aspx\">个人设置</a>\r\n");

	}	//end if


	if (pagename=="usercpinbox.aspx"||pagename=="usercpsentbox.aspx"||pagename=="usercpdraftbox.aspx"||pagename=="usercppostpm.aspx"||pagename=="usercpshowpm.aspx"||pagename=="usercppmset.aspx")
	{

	templateBuilder.Append("	   <a href=\"usercpinbox.aspx\" class=\"current\"><span>短消息</span></a>\r\n");

	}
	else
	{

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

	}	//end if


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

	templateBuilder.Append("	   <a href=\"usercpsubscribe.aspx\" class=\"current\"><span>收藏夹</span></a>\r\n");

	}
	else
	{

	templateBuilder.Append("	   <a href=\"usercpsubscribe.aspx\">收藏夹</a>\r\n");

	}	//end if


	if (pagename=="usercpcreditspay.aspx"||pagename=="usercpcreditstransfer.aspx"||pagename=="usercpcreditspayoutlog.aspx"||pagename=="usercpcreditspayinlog.aspx"


	   ||pagename=="usercpcreaditstransferlog.aspx")
	{

	templateBuilder.Append("       <a href=\"usercpcreditspay.aspx\" class=\"current\"><span>积分交易</span></a>\r\n");

	}
	else
	{

	templateBuilder.Append("       <a href=\"usercpcreditspay.aspx\">积分交易</a>\r\n");

	}	//end if


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

	templateBuilder.Append("			<a href=\"usercpforumsetting.aspx\" class=\"current\"><span>论坛设置</span></a>\r\n");

	}
	else
	{

	templateBuilder.Append("			<a href=\"usercpforumsetting.aspx\">论坛设置</a>\r\n");

	}	//end if


	if (config.Enablespace==1 && user.Spaceid>0)
	{


	if (pagename=="usercpspacepostblog.aspx"||pagename=="usercpspacemanageblog.aspx"||pagename=="usercpspaceeditblog.aspx"||pagename=="usercpspacelinklist.aspx"||pagename=="usercpspacelinkedit.aspx"||pagename=="usercpspacelinkadd.aspx"||pagename=="usercpspacecomment.aspx"||pagename=="usercpspacemanagecategory.aspx"||pagename=="usercpspacecategoryadd.aspx"||pagename=="usercpspacecategoryedit.aspx"||pagename=="usercpspacemanageattachment.aspx"||pagename=="usercpspaceset.aspx")
	{

	templateBuilder.Append("		   <a href=\"usercpspacemanageblog.aspx\" class=\"current\"><span>" + config.Spacename.ToString().Trim() + "</span></a>\r\n");

	}
	else
	{

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

	}	//end if


	}	//end if


	if (config.Enablealbum==1)
	{


	if (pagename=="usercpspacemanagealbum.aspx"||pagename=="usercpspacemanagephoto.aspx"||pagename=="usercpspacephotoadd.aspx"||pagename=="usercpeditphoto.aspx")
	{

	templateBuilder.Append("	            <a href=\"usercpspacemanagealbum.aspx\" class=\"current\"><span>" + config.Albumname.ToString().Trim() + "</span></a>\r\n");

	}
	else
	{

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

	}	//end if


	}	//end if


	}	//end if

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


	templateBuilder.Append("	<div class=\"pannelcontent\">\r\n");
	templateBuilder.Append("		<div class=\"pcontent\">\r\n");
	templateBuilder.Append("			<div class=\"panneldetail\">\r\n");


	if (config.Enablealbum==1)
	{

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

	if (userid>0)
	{

	templateBuilder.Append("					 <a href=\"usercpspacemanagealbum.aspx\"\r\n");

	if (pagename=="usercpspacemanagealbum.aspx"||pagename=="usercpspacemanagephoto.aspx"||pagename=="usercpspacephotoadd.aspx")
	{

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

	}	//end if

	templateBuilder.Append(">管理" + config.Albumname.ToString().Trim() + "</a>\r\n");

	}	//end if

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

	}	//end if



	templateBuilder.Append("				<div class=\"pannelbody\">\r\n");
	templateBuilder.Append("					<div class=\"pannellist\">\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("						<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\r\n");
	templateBuilder.Append("						<div id=\"freePhotoSize\" align=\"center\"></div>\r\n");
	templateBuilder.Append("						<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td  style=\"text-align:left; width:70%;\">\r\n");
	templateBuilder.Append("								<label for=\"phototitle1\" style=\"text-align:left;\">标题:</label>\r\n");
	templateBuilder.Append("								<input name=\"phototitle1\" type=\"text\" id=\"phototitle1\" style=\"width:400px\" size=\"20\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"50\" /><br />\r\n");
	templateBuilder.Append("								<label for=\"description1\">描述:</label>\r\n");
	templateBuilder.Append("								<textarea name=\"description1\" rows=\"4\" style=\"width:400px\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"\r\n");
	templateBuilder.Append("								onblur=\"this.className='colorblue';\" ></textarea>\r\n");
	templateBuilder.Append("								<label for=\"phototitle1\">&nbsp;</label><input type=\"file\" id=\"photo1\" onchange=\"PhotoView(1)\" runat=\"server\" size=\"50\" name=\"photo1\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\">\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("							<td id=\"td1\" style=\"text-align:left;\"><img src=\"" + spaceurl.ToString() + "space/manage/images/invalid.gif\" width=\"100\" height=\"75\" id=\"view1\"></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td  style=\"text-align:left; width:70%;\">\r\n");
	templateBuilder.Append("								<label for=\"phototitle2\" style=\"text-align:left;\">标题:</label>\r\n");
	templateBuilder.Append("								<input name=\"phototitle2\" type=\"text\" id=\"phototitle2\" style=\"width:400px\" size=\"20\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"50\" /><br />\r\n");
	templateBuilder.Append("								<label for=\"description2\">描述:</label>\r\n");
	templateBuilder.Append("								<textarea name=\"description2\" rows=\"4\" style=\"width:400px\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"\r\n");
	templateBuilder.Append("								onblur=\"this.className='colorblue';\" ></textarea>\r\n");
	templateBuilder.Append("								<label for=\"phototitle2\">&nbsp;</label><input type=\"file\" id=\"photo2\" onchange=\"PhotoView(2)\" runat=\"server\" size=\"50\" name=\"photo2\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\">\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("							<td id=\"td2\" style=\"text-align:left;\"><img src=\"" + spaceurl.ToString() + "space/manage/images/invalid.gif\" width=\"100\" height=\"75\" id=\"view2\"></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td  style=\"text-align:left; width:70%;\">\r\n");
	templateBuilder.Append("								<label for=\"phototitle3\" style=\"text-align:left;\">标题:</label>\r\n");
	templateBuilder.Append("								<input name=\"phototitle3\" type=\"text\" id=\"phototitle3\" style=\"width:400px\" size=\"20\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"50\" /><br />\r\n");
	templateBuilder.Append("								<label for=\"description3\">描述:</label>\r\n");
	templateBuilder.Append("								<textarea name=\"description3\" rows=\"4\" style=\"width:400px\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"\r\n");
	templateBuilder.Append("								onblur=\"this.className='colorblue';\" ></textarea>\r\n");
	templateBuilder.Append("								<label for=\"phototitle3\">&nbsp;</label><input type=\"file\" id=\"photo3\" onchange=\"PhotoView(3)\" runat=\"server\" size=\"50\" name=\"photo3\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\">\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("							<td id=\"td3\" style=\"text-align:left;\"><img src=\"" + spaceurl.ToString() + "space/manage/images/invalid.gif\" width=\"100\" height=\"75\" id=\"view3\"></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td  style=\"text-align:left; width:70%;\">\r\n");
	templateBuilder.Append("								<label for=\"phototitle4\" style=\"text-align:left;\">标题:</label>\r\n");
	templateBuilder.Append("								<input name=\"phototitle4\" type=\"text\" id=\"phototitle4\" style=\"width:400px\" size=\"20\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"50\" /><br />\r\n");
	templateBuilder.Append("								<label for=\"description4\">描述:</label>\r\n");
	templateBuilder.Append("								<textarea name=\"description4\" rows=\"4\" style=\"width:400px\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"\r\n");
	templateBuilder.Append("								onblur=\"this.className='colorblue';\" ></textarea>\r\n");
	templateBuilder.Append("								<label for=\"phototitle4\">&nbsp;</label><input type=\"file\" id=\"photo4\" onchange=\"PhotoView(4)\" runat=\"server\" size=\"50\" name=\"photo4\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\">\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("							<td id=\"td4\" style=\"text-align:left;\"><img src=\"" + spaceurl.ToString() + "space/manage/images/invalid.gif\" width=\"100\" height=\"75\" id=\"view4\"></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td  style=\"text-align:left; width:70%;\">\r\n");
	templateBuilder.Append("								<label for=\"phototitle5\" style=\"text-align:left;\">标题:</label>\r\n");
	templateBuilder.Append("								<input name=\"phototitle5\" type=\"text\" id=\"phototitle5\" style=\"width:400px\" size=\"20\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"50\" /><br />\r\n");
	templateBuilder.Append("								<label for=\"description5\">描述:</label>\r\n");
	templateBuilder.Append("								<textarea name=\"description5\" rows=\"4\" style=\"width:400px\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"\r\n");
	templateBuilder.Append("								onblur=\"this.className='colorblue';\" ></textarea>\r\n");
	templateBuilder.Append("								<label for=\"phototitle5\">&nbsp;</label><input type=\"file\" id=\"photo5\" onchange=\"PhotoView(5)\" runat=\"server\" size=\"50\" name=\"photo5\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\">\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("							<td id=\"td5\" style=\"text-align:left;\"><img src=\"" + spaceurl.ToString() + "space/manage/images/invalid.gif\" width=\"100\" height=\"75\" id=\"view5\"></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("						<tr>\r\n");
	templateBuilder.Append("							<td  style=\"text-align:left; width:70%;\">\r\n");
	templateBuilder.Append("								<label for=\"phototitle6\" style=\"text-align:left;\">标题:</label>\r\n");
	templateBuilder.Append("								<input name=\"phototitle6\" type=\"text\" id=\"phototitle6\" style=\"width:400px\" size=\"20\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\" maxlength=\"50\" /><br />\r\n");
	templateBuilder.Append("								<label for=\"description6\">描述:</label>\r\n");
	templateBuilder.Append("								<textarea name=\"description6\" rows=\"4\" style=\"width:400px\" class=\"colorblue\" onfocus=\"this.className='colorfocus';\"\r\n");
	templateBuilder.Append("								onblur=\"this.className='colorblue';\" ></textarea>\r\n");
	templateBuilder.Append("								<label for=\"phototitle6\">&nbsp;</label><input type=\"file\" id=\"photo6\" onchange=\"PhotoView(6)\" runat=\"server\" size=\"50\" name=\"photo6\" class=\"colorblue\"\r\n");
	templateBuilder.Append("								onfocus=\"this.className='colorfocus';\" onblur=\"this.className='colorblue';\">\r\n");
	templateBuilder.Append("							</td>\r\n");
	templateBuilder.Append("							<td id=\"td6\" style=\"text-align:left;\"><img src=\"" + spaceurl.ToString() + "space/manage/images/invalid.gif\" width=\"100\" height=\"75\" id=\"view6\"></td>\r\n");
	templateBuilder.Append("						</tr>\r\n");
	templateBuilder.Append("					</table>\r\n");
	templateBuilder.Append("					<div class=\"formarea\">\r\n");
	templateBuilder.Append("						<input type=\"submit\" name=\"Submit\" value=\"上传\" class=\"sbutton\" ID=\"Submit1\"/>\r\n");
	templateBuilder.Append("					</div>\r\n");
	templateBuilder.Append("						</form>\r\n");

	}	//end if

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

	}
	else
	{


	templateBuilder.Append("<div class=\"forumerror\">" + 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;|  \");\r\n");
	templateBuilder.Append("						}\r\n");
	templateBuilder.Append("					</" + "script>\r\n");
	templateBuilder.Append("					&nbsp; &nbsp; <a href=\"forumindex.aspx\">论坛首页</a>\r\n");

	if (usergroupid==7)
	{

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

	}	//end if

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



	}	//end if

	templateBuilder.Append("			  </div>\r\n");
	templateBuilder.Append("			</div>\r\n");
	templateBuilder.Append("		</div>\r\n");
	templateBuilder.Append("	</div>\r\n");
	templateBuilder.Append("</div>\r\n");
	templateBuilder.Append("<script type=\"text/javascript\">\r\n");
	templateBuilder.Append("	var currentFreePhotoSize = " + freephotosize.ToString() + ";\r\n");
	templateBuilder.Append("	SetMessage(currentFreePhotoSize);\r\n");
	templateBuilder.Append("	function PhotoView(layer)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		var file = $(\"photo\" + layer).value;\r\n");
	templateBuilder.Append("		if (file != \"\")\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			var patn = /\\.jpg$|\\.jpeg$|\\.gif$|\\.png$/i;\r\n");
	templateBuilder.Append("			if (!patn.test(file))\r\n");
	templateBuilder.Append("			{\r\n");
	templateBuilder.Append("				clearFileInput($(\"photo\" + layer));\r\n");
	templateBuilder.Append("				alert(\"相册只允许jpg、jpeg、gif或png格式的图片!\");\r\n");
	templateBuilder.Append("				return;\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			if(document.all) //IE执行\r\n");
	templateBuilder.Append("			{\r\n");
	templateBuilder.Append("                insertImage(layer);\r\n");
	templateBuilder.Append("            }			\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		else\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			$(\"view\" + layer).src = \"" + spaceurl.ToString() + "space/manage/images/invalid.gif\";\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		setTimeout(\"CalSize()\", 500);\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	function insertImage(id) \r\n");
	templateBuilder.Append("{\r\n");
	templateBuilder.Append("    var localimgpreview = '';\r\n");
	templateBuilder.Append("    var path = $('photo' + id).value;\r\n");
	templateBuilder.Append("    var ext = path.lastIndexOf('.') == -1 ? '' : path.substr(path.lastIndexOf('.') + 1, path.length).toLowerCase();\r\n");
	templateBuilder.Append("    var re = new RegExp(\"(^|\\\\s|,)\" + ext + \"($|\\\\s|,)\", \"ig\");\r\n");
	templateBuilder.Append("    var localfile = $('photo' + id).value.substr($('photo' + id).value.replace(/\\\\/g, '/').lastIndexOf('/') + 1);\r\n");
	templateBuilder.Append("    if(path == '') \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        return;\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    var err = false;\r\n");
	templateBuilder.Append("    $('img_hidden').alt = id;\r\n");
	templateBuilder.Append("    try \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        $('img_hidden').filters.item(\"DXImageTransform.Microsoft.AlphaImageLoader\").sizingMethod = 'image';\r\n");
	templateBuilder.Append("    } \r\n");
	templateBuilder.Append("    catch (e) \r\n");
	templateBuilder.Append("    {err = true;}\r\n");
	templateBuilder.Append("    try \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        $('img_hidden').filters.item(\"DXImageTransform.Microsoft.AlphaImageLoader\").src = $('photo' + id).value;\r\n");
	templateBuilder.Append("    } \r\n");
	templateBuilder.Append("    catch (e) \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("		alert('无效的图片文件。');\r\n");
	templateBuilder.Append("		delAttach(id);\r\n");
	templateBuilder.Append("		err = true;		\r\n");
	templateBuilder.Append("        return;\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    var wh = {'w' : $('img_hidden').offsetWidth, 'h' : $('img_hidden').offsetHeight};\r\n");
	templateBuilder.Append("    if (wh['w']>100) \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        wh['h']*= 100/wh['w'];\r\n");
	templateBuilder.Append("        wh['w']=100;\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    if (wh['h']>100) \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        wh['w']*= 100/wh['h'];\r\n");
	templateBuilder.Append("        wh['h']=100;\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    $('img_hidden').style.width = wh['w'];\r\n");
	templateBuilder.Append("    $('img_hidden').style.height = wh['h'];\r\n");
	templateBuilder.Append("    try \r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        $('img_hidden').filters.item(\"DXImageTransform.Microsoft.AlphaImageLoader\").sizingMethod = 'scale';\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    catch (e)\r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    if (err == true)\r\n");
	templateBuilder.Append("    {\r\n");
	templateBuilder.Append("        $('img_hidden').src = $('photo' + id).value;\r\n");
	templateBuilder.Append("    }\r\n");
	templateBuilder.Append("    div = document.createElement('div');\r\n");
	templateBuilder.Append("    $('td' + id).removeChild($('td' + id).children(0));\r\n");
	templateBuilder.Append("    $('td' + id).appendChild(div);\r\n");
	templateBuilder.Append("    div.innerHTML = '<img style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=\\'scale\\',src=\\'' + $('photo' + id).value+'\\');width:'+wh['w']+';height:'+wh['h']+'\" src=\\'images/common/none.gif\\' border=\"0\" id=\"view' + id + '\" aid=\"view'+ id +'\" alt=\"\" />';\r\n");
	templateBuilder.Append("}\r\n");
	templateBuilder.Append("	function clearFileInput(file){\r\n");
	templateBuilder.Append("		var form = document.createElement('form');\r\n");
	templateBuilder.Append("		document.body.appendChild(form);\r\n");
	templateBuilder.Append("		var pos = file.nextSibling;\r\n");
	templateBuilder.Append("		form.appendChild(file);\r\n");
	templateBuilder.Append("		form.reset();\r\n");
	templateBuilder.Append("		pos.parentNode.insertBefore(file, pos);\r\n");
	templateBuilder.Append("		document.body.removeChild(form);\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	function ShowFormatBytesStr(bytes)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		if(bytes > 1073741824)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			return((Math.round((bytes/1073741824)*100)/100).toString()+' GB');\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		else if(bytes > 1048576)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			return((Math.round((bytes/1048576)*100)/100).toString()+' MB');\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		else if(bytes > 1024)\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			return((Math.round((bytes/1024)*100)/100).toString()+' KB');\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("		else\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			return(bytes.toString()+' 字节');\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	function CalSize()\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		var sumsize = 0;\r\n");
	templateBuilder.Append("			for(i = 1 ; i < 7 ; i++)\r\n");
	templateBuilder.Append("			{\r\n");
	templateBuilder.Append("				if($(\"photo\" + i).value != \"\")\r\n");
	templateBuilder.Append("				{\r\n");
	templateBuilder.Append("					var photoSize = $(\"view\" + i).fileSize;\r\n");
	templateBuilder.Append("					sumsize += parseInt(photoSize);\r\n");
	templateBuilder.Append("				}\r\n");
	templateBuilder.Append("			}\r\n");
	templateBuilder.Append("			SetMessage(currentFreePhotoSize - sumsize);\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("	function SetMessage(bytesize)\r\n");
	templateBuilder.Append("	{\r\n");
	templateBuilder.Append("		if (is_ie && $(\"freePhotoSize\"))\r\n");
	templateBuilder.Append("		{\r\n");
	templateBuilder.Append("			if(bytesize >= 0)\r\n");
	templateBuilder.Append("				$(\"freePhotoSize\").innerHTML = \"您还有<font color='#009900'>\" + ShowFormatBytesStr(parseInt(bytesize)) + \"</font>的上传空间\";\r\n");
	templateBuilder.Append("			else\r\n");
	templateBuilder.Append("				$(\"freePhotoSize\").innerHTML = \"<font color='#ff0000'>警告：您已经超过最大上传空间\" + -bytesize + \"字节</font>\";\r\n");
	templateBuilder.Append("		}\r\n");
	templateBuilder.Append("	}\r\n");
	templateBuilder.Append("</" + "script>\r\n");
	templateBuilder.Append("<!--主体-->\r\n");
	templateBuilder.Append("</div>\r\n");


	if (footerad!="")
	{

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

	}	//end if

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

	if (config.Sitemapstatus==1)
	{

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

	}	//end if

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

	if (config.Licensed==1)
	{

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

	}	//end if

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

	if (config.Debug!=0)
	{

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

	if (isguestcachepage==1)
	{

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

	}
	else if (querycount>1)
	{

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

	}
	else
	{

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

	}	//end if


	}	//end if

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

	if (config.Stylejump==1)
	{


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

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

	}	//end if


	}	//end if

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

	if (config.Enablespace==1)
	{

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

	}	//end if


	if (config.Enablealbum==1)
	{

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

	}	//end if

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



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



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