<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/char.jsp" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="IsLogin.jsp" -->
<%
m_UserID = Request.Cookies("aspxnet")("CurUserID")
if Request.QueryString("action") = "read" then
  m_ID = Request.QueryString("ID")
  m_Sql = "SELECT * FROM Photo_AlbumList WHERE F_ID=" & m_ID
  Set rs = conn.Execute(m_Sql)
  if Not rs.Eof then
	m_Title = rs("F_Title")
    m_Content = rs("F_Content")
    m_AlbumID = rs("F_AlbumID")
  end if
end if

If Request.ServerVariables("REQUEST_METHOD")="POST" then
  'Read Reuest
  m_ID = Request.Form("hidID")
  m_UserID = Request.Form("hidUserID")
  m_AlbumID = Request.Form("selAlbumID")
  m_Title = checkStr(Trim(Request.Form("txtTitle")))
  m_Content = checkStr(Trim(Request.Form("txtContent")))
  if m_Content = "" then m_Content = "该家伙很懒，什么都没留下就走了..."
  'Insert 
  m_Sql = "Update Photo_AlbumList set"
  m_Sql = m_Sql + " F_AlbumID="&m_AlbumID&","
  m_Sql = m_Sql + " F_Title='"&m_Title&"',"
  m_Sql = m_Sql + " F_Content='"&m_Content&"'"
  m_Sql = m_Sql + " Where F_ID="&m_ID
  conn.Execute(m_Sql)
  Call CloseDataBase()
    Call Msgbox("恭喜您，照片修改成功!","Photo_my.jsp")
end if
%>
<!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>
<STYLE>TD {
	FONT-SIZE: 12px; COLOR: #151515; WORD-BREAK: break-all; FONT-FAMILY: "宋体"
}
.tdbg-dark {
	BACKGROUND: #dddddd; LINE-HEIGHT: 150%
}
.tdbg {
	BACKGROUND: #efefef; LINE-HEIGHT: 150%
}
</STYLE>
<script language="javascript">
<!--
function CheckData()
{
  if (document.form1.txtTitle.value=="")
  {
    alert("对不起，照片标题不能为空，请输入！");
	document.form1.txtTitle.focus();
	return false;
   }
}
//-->
</script>
<META content="MSHTML 6.00.2800.1555" name=GENERATOR></HEAD>
<BODY>
<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" method="post" action="Photo_Update.jsp" onSubmit="return CheckData()"><LABEL><SPAN>照片标题：</SPAN> 
<INPUT class=text size=32 value=<%=m_Title%> name=txtTitle> * 
</LABEL><LABEL><SPAN>选择相册：</SPAN> <select size="1" name="selAlbumID">
                       <%
		                  mSql = "Select F_ID,F_AlbumName From Photo_Album where F_UserID=" & m_UserID &" order by F_ID asc"
		                  Set rs = conn.Execute(mSql)
		                  do while not rs.eof
			                if Trim(m_AlbumID) = Trim(rs("F_ID")) then
                  			   response.write "<option value=" + cstr(rs("F_ID"))
           			           response.write " selected"
       				           response.write ">" + rs("F_AlbumName")
                             else
                               response.write "<option value='" & rs("F_ID") &"'>"& rs("F_AlbumName") &"</option>"
                             end if
                            rs.movenext
	 	                  loop
						  rs.Close
		                %>
              </select> </LABEL><LABEL><SPAN>照片描述：</SPAN><textarea name="txtContent" cols="60" rows="8" class="text"><%=m_Content%></textarea> 
</LABEL> <input name="hidID" type="hidden" value="<%=m_ID%>"> 
              <input name="hidUserID" type="hidden" value="<%=m_UserID%>">
<LABEL><SPAN>&nbsp;</SPAN><BUTTON class=bot1 type=submit>提交</BUTTON><BUTTON 
class=bot1 type=reset>取消</BUTTON> </LABEL></FORM></FIELDSET> </DIV><!--Create end--></DIV>
<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>
<H4>相册列表</H4>
<%m_Sql = "Select * From Photo_Album Where F_UserID="&m_UserID&" order by F_ID desc"
								Set rst = conn.Execute(m_Sql)
								Do While Not rst.Eof%>
<P style="PADDING-RIGHT: 9px; LINE-HEIGHT: 180%">&nbsp;<A href="photo_my.jsp?AlbumID=<%=rst("F_ID")%>"><U><%=rst("F_AlbumName")%></U></A><BR></P><%rst.MoveNext
								loop
								rst.Close
								%></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>
