<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
<%
if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
if session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
%>
<html>
<head>
<title>交友中心_<%=webname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css.css" type="text/css">
<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<!--#include file="../../top.asp"-->
</head>

<body>

<script language="javascript">
function ck(){
if(form.tclass.value==""){
alert("请选择要上传到什么相册！")
form.tclass.focus()
return false
}
if(form.bt.value==""){
alert("请输入照片的标题！")
form.bt.focus()
return false
}




}
</script>
<%
if nosql(request("act"))="save" then
if isChkInteger(request("id")) then
id=request("id")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作，正在返回！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
conn.execute"update snsn_uppic set bt='"&nosql(request("bt"))&"',nr='"&nosql(request("nr"))&"',tclass='"&nosql(request("tclass"))&"'  where username='"&session("user")&"' and id="&id
response.write"<script>alert('修改成功!!!');location.href='uppic1.asp?ida="&nosql(request("tclass"))&"';</script>"
end if
if isChkInteger(request("id")) then
id=request("id")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作，正在返回！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
set rs1=server.CreateObject("adodb.recordset")
rs1.open"select * from snsn_uppic where username='"&session("user")&"' and  id="&id,conn,1,3%>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td width="970"><table width="970"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="10"><img src="/img/m_left.gif" width="10" height="20"></td>
          <td width="950" bgcolor="#FFFFFF"></td>
          <td width="10"><img src="/img/m_right.gif" width="10" height="20"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="188" colspan="3"><table width="950"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="1" bgcolor="efefef"></td>
                <td width="200" height="77" valign="top"><!--#include file="../left.asp"--></td>
                <td width="1" bgcolor="efefef"></td>
                <td valign="top"><p>&nbsp;</p>
                    <BR>
                    <table width="70%"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#BBD7FF">
                      <form action="?act=save&id=<%=nosql(request("id"))%>" method="post" name=form onsubmit="return ck()"><tr>
                        <td height="21" align="center" bgcolor="#e8f4ff">修改照片相关信息</td>
                      </tr>
                      <tr>
                        <td height="21" align="center" valign="middle" bgcolor="#FFFFFF"><table width="120" height="146"  border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td align="center" valign="middle" background="<%if rs1("mink")=1 then%>../images/bga.gif<%else%>../images/bgb.jpg<%end if%>"><img src="<%=rs1("uppic")%>" width="112" height="138" border="0" align="absmiddle"></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td height="21" bgcolor="#FFFFFF">相册名
                            <select name="tclass" id="tclass" class="wenbenkuang">
                              <option value="" >请选择上传的相册</option>
                              <option value="<%=rs1("tclass")%>" selected ><%=rs1("tclass")%></option>
                              <%set rs=server.CreateObject("adodb.recordset")
			rs.open"select * from snsn_uppic_class where username='"&session("user")&"'",conn,3,3
			if not rs.eof then
			do while not rs.eof %>
                              <%if rs("tclass")<>rs1("tclass") then%>
                              <option value="<%=rs("tclass")%>"><%=rs("tclass")%></option>
                              <%end if
			rs.movenext
			loop
			else%>
                              <option value="我的相册">我的相册</option>
                              <%end if%>
                          </select></td>
                      </tr>
                      <tr>
                        <td height="21" bgcolor="#FFFFFF">标　题
                            <input name="bt" type="text" class="wenbenkuang" id="bt" value="<%=rs1("bt")%>" size="40"></td>
                      </tr>
                      <tr>
                        <td height="21" bgcolor="#FFFFFF"><textarea name="nr" class="wenbenkuang" cols="60" rows="5" id="nr"><%=rs1("nr")%></textarea></td>
                      </tr>
                      <tr>
                        <td height="21" align="right" bgcolor="#FFFFFF"><div align="center">
                            <input type="submit" name="Submit" class="go-wenbenkuang" value="修改">
                        </div></td>
                      </tr></form>
                    </table>
                </td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td valign="top"><img src="/img/index_img.jpg" width="10"></td>
  </tr>
</table>
<!--#include file="../../end.asp"-->
</body>
</html>
