<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/char.jsp" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="IsLogin.jsp" -->
<% 
dim rs,m_Sql
mUserID = Request.Cookies("aspxnet")("CurUserID")
m_AlbumID = checkStr(Request.QueryString("AlbumID"))

'read image size
m_Sql = "Select sum(F_ImageSize) from Photo_AlbumList where F_AlbumID="&m_AlbumID
set rs = conn.Execute(m_Sql)
if not rs.Eof then 
  m_ImageSize = rs(0)
  if m_ImageSize <> "" then
    m_ImageSize = round((m_ImageSize / 1024 / 1024),3)
	if m_ImageSize<1 then m_ImageSize="0"+cstr(m_ImageSize)
	else
	m_ImageSize = 0
  end if
end if

  If Request.ServerVariables("REQUEST_METHOD") = "POST" then

    mAlbumName = checkStr(Trim(Request.Form("txtAlbumName")))
    mAlbumPassword = checkStr(Trim(Request.Form("txtAlbumPassword")))
	mCategoryID = Request.Form("selCategory")
    mAlbumContent = checkStr(Trim(Request.Form("txtAlbumContent")))

  m_Sql = "Update Photo_Album set"
  m_Sql = m_Sql + " F_CategoryID='"&mCategoryID&"',"
  m_Sql = m_Sql + " F_AlbumName='"&mAlbumName&"',"
  m_Sql = m_Sql + " F_Password='"&mAlbumPassword&"',"
  m_Sql = m_Sql + " F_AlbumContent='"&mAlbumContent&"'"
  m_Sql = m_Sql + " Where F_ID="&m_AlbumID
  conn.Execute(m_Sql)
  Call msgbox("相册资料已修改成功!","Photo_my.jsp")
End if
  
  

m_SQL = "SELECT * FROM Photo_Album WHERE F_ID="&m_AlbumID& "and F_UserID="&mUserID
set rs = conn.Execute(m_SQL)
If rs.Eof then
  call MsgBox("对不起，操作有误，您不能修改别人的相册资料！",2)
Else
 m_AlbumName = rs("F_AlbumName")
 m_CategoryID = rs("F_CategoryID")
 m_AlbumContent = rs("F_AlbumContent")
 m_Password = rs("F_Password")
end if
rs.Close
  
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>相册-修改创建</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="css/index_photo.css" type=text/css rel=stylesheet>
<script language="JavaScript">
 function check(){
   if (document.form1.txtAlbumName.value == ""){
     alert("对不起，相册名称不能为空！");
	 document.form1.txtAlbumName.focus();
	 return false;
   }
 }
</script>

<META content="MSHTML 6.00.2800.1555" name=GENERATOR></HEAD>
<BODY><LINK href="相册-修改创建.files/index_photo.css" type=text/css rel=stylesheet>
<DIV id=logo><A title=网络相册-首页 
href="photo_default.jsp"><SPAN>网络相册-首页</SPAN></A> </DIV>
	<DIV id=nav><A href="../">首页</A> | <A 
href="QQ_default.jsp">运城地带</A> | <A 
href="QQ_index.jsp">小圈子</A> | <A 
href="../blog/">运城博客</A> | <A 
href="photo_default.jsp">网络相册</A> | <A 
href="QQ_ployall.jsp">精彩活动</A> | <A 
href="friend_index.jsp">交友频道</A> | <A 
href="../bbs/" target=_blank>运城社区</A> </DIV>
<DIV id=main>
<DIV id=menu><IMG src="img/photo/photo_left.gif" name="limg" id=limg> 
<UL>
  <LI><A title=相册首页 href="photo_default.jsp"><IMG 
  src="img/photo/home.gif"></A> </LI>
  <LI><A title=我的相册 href="photo_my.jsp"><IMG 
  src="img/photo/my_album.gif"></A> </LI>
  <LI><A title=分类相册 href="photo_list.jsp"><IMG 
  src="img/photo/sort.gif"></A> </LI>
  <LI><A title=最新照片 href="photo_new.jsp"><IMG 
  src="img/photo/newPhoto.gif"></A> </LI>
  <LI><A title=相册排行 href="photo_sort.jsp"><IMG 
  src="img/photo/rank.gif"></A> </LI>
  <LI id=menuend><A title=在线大头贴 href="photo_dtt.jsp"><IMG 
  src="img/photo/dtt.gif"></A> </LI></UL></DIV>  
<DIV id=contian><!--Create start-->
<DIV id=create>
<H6><IMG src="img/nophoto_man.gif"><A class=blue 
href="photo_my.jsp">我的相册</A> / 修改相册</H6>
<FIELDSET><LEGEND>****请输入相册名称,相册类别,和相册的介绍****</LEGEND>
<FORM name=form1 onSubmit="return check()" action=?AlbumID=<%=m_AlbumID%> 
method=post><LABEL><SPAN>相册名称：</SPAN> <INPUT value=<%=m_AlbumName%> name=txtAlbumName> * 
</LABEL><LABEL><SPAN>相册类型：</SPAN> <select  name="selCategory" class="text">
                        <%
					    mSql = "Select * From Photo_Category  Order by F_Grade"
						Set rs = conn.Execute(mSql)
						Do While Not rs.Eof
						  Response.write "<option value='" & rs("F_ID") & "'>" & rs("F_Value") & "</option>"
						  rs.MoveNext
						Loop
						rs.Close
					  %>
                      </select> 
</LABEL><LABEL><SPAN>相册密码：</SPAN> <INPUT name=txtAlbumPassword value=<%=m_Password%>> // 
如果没有输入密码,表示此相册为公开相册. </LABEL><LABEL><SPAN>相册介绍：</SPAN> <TEXTAREA name=txtAlbumContent rows=8 cols=60><%=m_AlbumContent%></TEXTAREA> 
</LABEL><LABEL><SPAN>&nbsp;</SPAN><BUTTON type=submit>提交</BUTTON><BUTTON 
type=reset>取消</BUTTON> </LABEL></FORM></FIELDSET> </DIV></DIV><!--Create end-->
<DIV id=foot><A class=list href="../about/?Para=Intro" target=_blank>关于我们</A> ┊ <A class=list href="../about/?Para=Contact" target=_blank>联系方式</A> ┊ <A class=list href="../about/?Para=Job" target=_blank>招贤纳士</A> ┊ <A class=list href="../about/?Para=AdService" target=_blank>广告服务</A> ┊ <A class=list href="../about/?Para=Cooperate" target=_blank>合作伙伴</A> ┊ <A class=list href="../so/Suggestion.jsp" target=_blank> 留言/投诉</A> ┊ <A class=list href="../about/?Para=Job" target=_blank></A><BR><%=Site_info(5)%> </DIV></DIV>
      <%if Request.Cookies("aspxnet")("CurUserName") = "" then%>
<DIV id=leftlist>
<H3>网络相册</H3>
<FORM name=form1 action=ChkLogin.jsp?return=photo method=post onSubmit="return checkForm()">
<H4>登陆进入您的相册</H4><LABEL for=username><SPAN>用户名:</SPAN><INPUT size=9 
name=username></LABEL> <LABEL for=password><SPAN>密码:</SPAN><INPUT 
type=password size=8 name=password></LABEL> 
<P><BUTTON class=login type=submit><SPAN>登陆</SPAN></BUTTON><BUTTON class=reg 
type=reset><SPAN>注册</SPAN></BUTTON> </P></FORM></DIV>
<%else%>
<DIV id=leftlist>
<H3>网络相册</H3>
<FORM>
<H4><%m_TempUserName = Request.Cookies("aspxnet")("CurUserName")
				  if m_TempUserName = "" then Response.write "游客" else Response.write m_TempUserName
				  %>的相册</H4>
<P style="PADDING-RIGHT: 9px; LINE-HEIGHT: 180%; TEXT-ALIGN: right">[ <A 
href="Logout.jsp">退出</A> ]<BR><A 
href="Photo_Upload.jsp?AlbumID=<%=m_AlbumID%>">上传照片</A><BR><A 
href="photo_my.jsp">我的相册</A><BR><A 
href="Photo_AddNew.jsp">新增相册</A> </P></FORM>
<FORM>
<H4>相册统计</H4>
<P style="PADDING-RIGHT: 9px; LINE-HEIGHT: 180%">&nbsp;相册总空间 <SPAN 
class=STYLE1>5.00</SPAN> MB<BR>&nbsp;已用<SPAN class=STYLE1><%=m_ImageSize%></SPAN> 
MB</P>
</FORM></DIV>
<%end if%>
<SCRIPT language=javascript>
function checkForm(){
  if (document.form1.username.value == ""){
    alert("对不起，用户名不能为空!请输入..");
	document.form1.username.focus();
	return false;
  }
  if (document.form1.password.value == ""){
    alert("对不起，密码不能为空!请输入..");
	document.form1.password.focus();
	return false;
  }

}
</SCRIPT>

</BODY></HTML>
