<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
<!--#include file="../../conn/count.asp"-->
<!--#include file="../page.asp"-->
<!--#include file="../count.asp"-->
<%
if isChkInteger(request("web_id")) then
web_id=request("web_id")
else
Response.Redirect ("../../index.asp")
end if
sql="select * from snsn_user where id="&web_id
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write "<script language='javascript'>"
response.write "alert('没有此用户，请确认后或联系管理员再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
else
if nosql(request("ida"))<>"" then
  session("idaa")=nosql(request("ida"))
  end if
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link rel="stylesheet" href="css.css" type="text/css">
<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="420"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="22">
      <table width="420"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="1" height="1"></td>
          <td height="1" colspan="2" bgcolor="#CCCCCC"></td>
          <td width="1" height="1"></td>
        </tr>
        <tr>
          <td width="1" bgcolor="#CCCCCC"></td>
          <td width="30" bgcolor="#F1F1F1"><div align="center"><span class="M"><IMG 
                              src="img/icon_04.gif" 
                              name=image1754891 width="16" height="13" border=0></span></div></td>
          <td height="25" bgcolor="#F1F1F1"><span class="M"><FONT 
                              color=#000000><a href="web.asp?web_id=<%=web_id%>"><U><%=home%></U></a></FONT> -&gt; <FONT 
                              color=#000000><a href="photo.asp?web_id=<%=web_id%>"><U><%=xc%></U></a>-&gt; <FONT 
                              color=#000000><a href="photo_m.asp?web_id=<%=web_id%>"><U>移动相册</U></a></FONT></FONT></span></td>
          <td width="1" bgcolor="#CCCCCC"></td>
        </tr>
        <tr>
          <td width="1" height="1"></td>
          <td height="1" colspan="2" bgcolor="#CCCCCC"></td>
          <td width="1" height="1"></td>
        </tr>
      </table></td>
  </tr><tr>
    <td height="6"></td>
  </tr>
  <tr>
    <td align="center" valign="top"><div align="center">
      <p></p>
    </div>
       <table border="0" height="180" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
         <%
    	set rs1=server.CreateObject("adodb.recordset")
	rs1.open"select * from snsn_m_photo where poto_user_name='"&rs("username")&"'",conn,1,1	
	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<3
  iiii=iiii+1%>
           <td>
             <table border="0" cellpadding="0" cellspacing="0">
               
               <tr>
                 <td width="120" height="146" align="center" valign="middle" bgcolor="#FFFFFF">
                   <table border="0" cellspacing="0" cellpadding="0">
                     <tr>
                       <td><img src="img/newpage_main_003.gif" width="115" height="12"></td>
                     </tr>
                     <tr>
                       <td height="85" background="img/newpage_main_004.gif"><table width="100" height="75" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                           <tr>
                             <td align="center" bgcolor="#FFFFFF"><a href="pic_m.asp?web_id=<%=web_id%>&id=<%=rs1("poto_id")%>"><img src="<%=rs1("poto_url")%>" width="100" height="75" border="0" align="absmiddle"></a></td>
                           </tr>
                       </table></td>
                     </tr>
                     <tr>
                       <td background="img/newpage_main_004.gif"><b>&nbsp;&nbsp;<%=cutstr(rs1("poto_title"),12)%></b></td>
                     </tr>
                     <tr>
                       <td><img src="img/newpage_main_005.gif" width="115" height="7"></td>
                     </tr>
                   </table>
                   <table width="100%" height="5"  border="0" cellpadding="0" cellspacing="0">
                     <tr>
                       <td align="center"></td>
                     </tr>
                   </table></td>
                 <td width="5" align="center" valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
               </tr>
                <%if session("user")<>"" and session("id")=cint(web_id) then%><tr align="center">
                 <td height="25" bgcolor="#FFFFFF"> <a href="?id=<%=rs1("poto_id")%>&web_id=<%=web_id%>&ac=del" onClick="return confirm('确定删除')">删除该相片</a></td>
                 <td bgcolor="#FFFFFF">&nbsp;</td>
               </tr><%end if%>
           </table></td>
           <%rs1.movenext	
	loop
	%>
           <%	
	loop%>
              </table></td>
  </tr>
</table>
</body>
</html>
<%
if nosql(request("ac"))="del" then
if session("user")="" and session("id")<>cint(web_id) then
response.write"<script>alert('抱歉，你没有权利更改，正在返回!!');location.href='photo_m.asp?web_id="&web_id&"';</script>"
response.End()
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
conn.execute"delete from snsn_m_photo where poto_id="&id&" and poto_user_name='"&session("user")&"'"
response.write"<script>alert('删除成功');location.href='photo_m.asp?web_id="&web_id&"';</script>"
end if
%>  <%
end if%>
<%function cutStr(str,strlen)
	dim l,t,c
	l=len(str)
	t=0
	for i=1 to l
	c=Abs(Asc(Mid(str,i,1)))
	if c>255 then
	t=t+2
	else
	t=t+1
	end if
	if t>=strlen then
	cutStr=left(str,i)&".."
	exit for
	else
	cutStr=str
	end if
	next
	cutStr=replace(cutStr,chr(10),"")
end function %>
