<!--#include file="conn.asp"-->
<!--#include file="inc/publicfun.asp"-->
<%
userid=request("userid")
%>
<!--#include file="memberinfo.asp"-->
<html><head><meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<script language="javascript" src="js/publicfun.js"></script>
<body>
<center>
<title><%=username%>的个人相册</title>
<link rel="stylesheet" type="text/css" href="<%=cssfile%>">
<!--#include file="usernav.asp" -->
<!--#include file="photohead.asp" -->
<div class="stage">
<div class="stagepad">
<div style="width:100%">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
	<tr><td class="modtl" width="7">&nbsp;</td>
	<td class="modtc" nowrap>
		<table border="0" cellspacing="0" cellpadding="0"><tr><td>
		<div class="modhead"><span class="modtit">相册列表</span> </div>
		</td></tr></table>
	</td>
	<td class="modtc" nowrap align="right"></td>
	<td class="modtr" width="7">&nbsp;</td>
	</tr></table>
<div class="modbox">
<div style="width:100%">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modact">
	<tr>
<%
sql="SELECT * FROM ftbbs_upload WHERE (id IN(SELECT MAX(id) FROM ftbbs_upload GROUP BY photo_name)) and (bbs_blog_type=1 or bbs_blog_type=2) and (sign=0 or sign=2) and clubuser_id="&userid&" order by indate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
page=request("page")

if page="" then
page=1
else
page=cint(trim(request("page")))
end if
ipagesize=24
rs.pagesize=ipagesize  
  if not rs.eof then
	  rs.absolutepage=page
	  i=0
	  do while not rs.eof
       photourl=""
       if rs("file_type")=1 then
          photourl=rs("upload_pic")
       else
          photourl=rs("upload_pic")
       end if
	   str="select count(id) as k from ftbbs_upload where photo_name='"&rs("photo_name")&"' and (bbs_blog_type=1 or bbs_blog_type=2) and clubuser_id="&userid
	   set rsnum=conn.execute(str)
  %>
	<td align="center" valign="bottom" width="25%">
		<table border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td><img src="blogimages/pbtl.gif" border="0"></td>
		<td background="blogimages/pbtc.gif"></td>
		<td ><img src="blogimages/pbtr.gif" border="0"></td>
		</tr>
		<tr>
		  <td background="blogimages/pblc.gif"></td>
		  <td>
		  <%if rs("sign")=2 then%>
		  <a onClick=checkpwd('<%=rs("id")%>','<%=userid%>','<%=rs("photo_name")%>') href="#"><img src="blogimages/pwdchk.gif" width="200" border="0"></a>
		  <%else%>
		  <a href="disphoto.asp?id=<%=rs("id")%>&userid=<%=userid%>&photo_name=<%=rs("photo_name")%>"><img src="<%=photourl%>" width="200" border="0"></a>
		  <%end if%>
		  </td>
		<td background="blogimages/pbrc.gif"></td>
		</tr>
		<tr>
		<td><img src="blogimages/pbbl.gif" border="0"></td>
		<td background="blogimages/pbbc.gif"></td>
		<td><img src="blogimages/pbbr.gif" border="0"></td>
		</tr>
		</table>
		<div class="tit">
		<%if rs("sign")=2 then%>
		<a onClick=checkpwd('<%=rs("id")%>','<%=userid%>','<%=rs("photo_name")%>') href="#"><%=rs("photo_name")%></a>
		<%else%>
		<a href="disphoto.asp?id=<%=rs("id")%>&userid=<%=userid%>&photo_name=<%=rs("photo_name")%>"><%=rs("photo_name")%></a>
		<%end if%>
		<span class="count"><font color="#000000">(共<%=rsnum("k")%>张)</font></span></div>	
	</td>
  <%
  i=i+1
  if i mod 3=0 then
  response.write "<tr align=center>"
  end if
  rs.movenext
  if i>=ipagesize then exit do
  loop
  %>
	</tr>
  <tr align=center> 
    <td colspan="15"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="modact">
                    <tr> 
                      <td width="77%"> 
                        <div align="center"><font color="#000000">共<%=rs.recordcount%>个 第<%=page%>页/共<%=rs.pagecount%>页　 
              <%if page>1 then%>
              <a href="myphoto.asp?page=1&userid=<%=userid%>">［首　页］</a> 
              <%else%>
              ［首　页］ 
              <%end if%>
              <%if page>1 then%>
              <a href="myphoto.asp?page=<%=page-1%>&userid=<%=userid%>">［上一页］</a> 
              <%else%>
              ［上一页］ 
              <%end if%>
              <%if page<rs.pagecount then%>
              <a href="myphoto.asp?page=<%=page+1%>&userid=<%=userid%>">［下一页］</a> 
              <%else%>
              ［下一页］ 
              <%end if%>
              <%if page<>rs.pagecount then%>
              <a href="myphoto.asp?page=<%=rs.pagecount%>&userid=<%=userid%>">［尾　页］</a> 
              <%else%>
              ［尾　页］ 
              <%end if%>
			  </font>
            </div></td>
          <form name="form2" method="post" action="myphoto.asp">
                        <td width="23%"> 
                          <div align="center">
                          <input name="userid" type="hidden" id="userid" value="<%=userid%>">
                          第<input type="text" name="page" size="3">页 
                <input type="submit" name="Submit" value="GO！" style='FILTER:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#9DBCEA);font-size:12px;BORDER:1px solid #002D96;PADDING:2px 2px 0;CURSOR:hand;COLOR:black;;background-color:#BFEFFF;'>
              </div></td>
          </form>
        </tr>
      </table></td>
  </tr>
  <%else%>
  <tr> 
                <td colspan=15 align=center><font color="#cccccc">相册暂时为空！</font></td>
  </tr>
  <%end if%>
	</table>
</div>
</div>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
	<tr><td class="modbl" width="7">&nbsp;</td>
	<td class="modbc">&nbsp;</td>
	<td class="modbr" width="7">&nbsp;</td>
	</tr></table>
</div>
</div>
</div>
</div>
<br><center><!--#include file="tail.asp" --></center>
</body></html>
<%closedb%>