<!--#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
%>
<%
if nosql(request("ida"))<>"" then
session("idaa")=nosql(request("ida"))
end if
if nosql(request("ac"))="del" then
conn.execute"delete from snsn_uppic where id="&nosql(request("id"))&" and username='"&session("user")&"'"
response.write"<script>alert('删除成功');location.href='uppic1.asp?ida="&session("idaa")&"';</script>"
end if
if nosql(request("ac"))="mink" 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 mink=0 where username='"&session("user")&"'"
conn.execute"update snsn_uppic set mink=1 where id="&id&" and username='"&session("user")&"'"
response.write"<script>alert('设置形象照片成功');location.href='uppic1.asp?ida="&session("idaa")&"';</script>"
end if
if nosql(request("ac"))="mink2" 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 mink2=0 where username='"&session("user")&"' and tclass='"&nosql(request("idaa"))&"'"
conn.execute"update snsn_uppic set mink2=1 where id="&id&" and username='"&session("user")&"'"
response.write"<script>alert('设置封面照片成功');location.href='uppic1.asp?ida="&session("idaa")&"';</script>"
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>

<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"><table width="31%" height="16"  border="0" cellpadding="0" cellspacing="0">
                  <tr align="center">
                    <td height="31"><a href="uppic.asp"><strong>返回选择相册</strong></a> <a href="uppic2.asp"><strong>点击上传照片</strong></a></td>
                  </tr>
                </table>
                  <br>
                  <table border="0" height="180" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                    <%
 
  	set rs1=server.CreateObject("adodb.recordset")
	rs1.open"select * from snsn_uppic where username='"&session("user")&"' and tclass='"&session("idaa")&"'",conn,3,3	
	if rs1.eof then
	%>
                    <tr>
                      <td height="31"><div align="center">未上传图片
                              <div></div>
                      </div></td>
                    </tr>
                    <%
	end if
 do while not rs1.eof  
  iiii=0%>
                    <tr align="center">
                      <%do while not rs1.eof and iiii<4
  iiii=iiii+1%>
                      <td>
                        <table border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="21" align="center" valign="middle" bgcolor="#FFFFFF"></td>
                            <td align="center" valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                          </tr>
                          <tr>
                            <td width="120" height="146" align="center" valign="middle" background="<%if rs1("mink")=1 then%>../images/bga.gif<%else%>../images/bgb.gif<%end if%>" bgcolor="#FFFFFF"><a href="pic.asp?id=<%=rs1("id")%>" target="_blank"><img src="<%=rs1("uppic")%>" width="95" height="95" border="0" align="absmiddle"></a>
                                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td height="5"></td>
                                  </tr>
                                </table>
                                <%=cutstr(rs1("bt"),15)%></td>
                            <td width="5" align="center" valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                          </tr>
                          <tr align="center">
                            <td height="31" bgcolor="#FFFFFF"> <a href="?id=<%=rs1("id")%>&ac=del" onClick="return confirm('确定删除')">删</a> <a href="uppicmove.asp?id=<%=rs1("id")%>">改</a>&nbsp;<a href="?id=<%=rs1("id")%>&ac=mink">形象照</a> <a href="?id=<%=rs1("id")%>&ac=mink2&idaa=<%=request("ida")%>">封面照</a></td>
                            <td bgcolor="#FFFFFF">&nbsp;</td>
                          </tr>
                      </table></td>
                      <%rs1.movenext	
	loop
	%>
                      <%	
	loop%>
                                    </table>
                  <p>&nbsp;</p>                  <p>&nbsp;
                </p>
                </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>
