<!--#Include File="Connection.Asp"-->

<%
Dim JaZ,C,flyN,B,cur,k
Set JaZ = new q_zone
B = JaZ.JaKillStr(Request.QueryString("JaUid"))
If B="" Then
B= "2"
End If
C=Split(JaZ.GetHeadElement("*",B,"JaFaceSet",""),"<><><>")
flyN = split(Trim(C(2)),"|")
If Cint(Trim(C(1)))<>0 Then
cur = "CURSOR:url('cur/"&C(1)&".ani');"
Else
cur = ""
End If 

Dim JaCheckIsLog
JaCheckIsLog = JaZ.JaIsUser(B)

Dim rs,sqlstr,MaxPerPage,text,checkpage,CurrentPage,i
sqlstr = "SELECT * FROM [JaAlbum] Where JaUid='"&B&"' "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sqlstr,conn,1,1
MaxPerPage=6
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
i=0 
%>
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312;no-cache">
<title>myzone-互动-个性交友-在线聊天-装扮小屋</title>
<link type="text/css" rel="stylesheet" href="Style/<%=Trim(C(5))%>/css.css">
</head>
<script src="JsInc/MsgPage.js"></script>
<body leftMargin=2 topMargin=0 marginheight="0" marginwidth="0" style="background-color:transparent;<%=cur%>" text="#cccccc" link="#cccccc" vlink="#cccccc" alink="#cccccc">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="845" height="23" background="Style/<%=Trim(C(5))%>/titleback.gif"><span class="classs"><img src="Style/<%=Trim(C(5))%>/b.gif" width="1" height="1" align="absmiddle" class="ltitle">&nbsp;<b>相 
      册</b></span></td>
<%If JaCheckIsLog = "yes" Then%>
    <td width="29" valign="middle" background="Style/<%=Trim(C(5))%>/titleback.gif"><div align="right">
   <img src="Qz/p_icon05.gif" width="19" height="15"></div></td>
    <td width="131" valign="middle" background="Style/<%=Trim(C(5))%>/titleback.gif">
<a href="AlbumAdd.asp?JaUid=<%=B%>">新建相册</a></td>
  </tr>
<%End if%>
  <tr> 
    <td height="2"></td>
    <td></td>
    <td></td>
  </tr>
</table>
<BR>
<%
If Rs.Eof Then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><div align="center">
<%
If JaCheckIsLog = "yes" Then
Response.Write "您还没有创建相册，<br>"
Response.Write "请点击“<a href='AlbumAdd.asp?JaUid="& B &"'>创建相册</a>”开始创建</div>"
Else
Response.Write "对不起，该用户还未创建相册"
End if
%>
    </td>
  </tr>
</table>
<%Else%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
Dim abcount,newph
Dim abcount2,newph2
Do While Not Rs.Eof
abcount = JaZ.GetCount("Count(ID)","JaPhoto","Where JaUid='"&Rs(1)&"' and JaAlbumID="&Rs(0)&" ")
newph = JaZ.GetCount("JaPhotoUrl","JaPhoto","Where JaUid='"&Rs(1)&"' and JaAlbumID="&Rs(0)&" Order By JaDate Desc")
If newph="" THen newph="defeat.gif"
%>
  <tr> 
    <td width="50%"><table width="130" height="150" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
        <tr> 
          <td bgcolor="#FFFFFF"><div align="center"><%=Rs(2)%>
<%If JaCheckIsLog = "yes" Then%>
<a href="AlbumEdit.asp?JaUid=<%=B%>&albumID=<%=Rs(0)%>">
 <img src="Qz/p_icon12.gif" alt="修改相册" width="15" height="15" border="0"></a>
 <%End if%>
 </div></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><div align="center">
<a href="AlbumMenu.Asp?JaUid=<%=B%>&albumID=<%=Rs(0)%>">
<img src="UpLoad/<%=Trim(newph)%>" width="100" height="100" border="0"></a></div></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><div align="center"><%=abcount%>张 
              <%If JaCheckIsLog = "yes" Then%>
              <a href="AlbumDel.asp?JaUid=<%=B%>&albumID=<%=Rs(0)%>" onClick="{if(confirm('确定删除吗?')){return true;}return false;}"> 删除</a> 
              <%End if%>
            </div></td>
        </tr>
      </table></td>
<%
Rs.MoveNext
If Not Rs.Eof Then
abcount2 = JaZ.GetCount("Count(ID)","JaPhoto","Where JaUid='"&Rs(1)&"' and JaAlbumID="&Rs(0)&" ")
newph2 = JaZ.GetCount("JaPhotoUrl","JaPhoto","Where JaUid='"&Rs(1)&"' and JaAlbumID="&Rs(0)&" Order By JaDate Desc")
If newph2="" THen newph2="defeat.gif"
%>
    <td width="50%"><table width="130" height="150" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
        <tr> 
          <td bgcolor="#FFFFFF"><div align="center"><%=Rs(2)%> 
		  <%If JaCheckIsLog = "yes" Then%>
		  <a href="AlbumEdit.asp?JaUid=<%=B%>&albumID=<%=Rs(0)%>">
		  <img src="Qz/p_icon12.gif" alt="修改相册" width="15" height="15" border="0"></a>
		  <%End if%>
		  </div></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF"><div align="center">
<a href="AlbumMenu.Asp?JaUid=<%=B%>&albumID=<%=Rs(0)%>"><img src="UpLoad/<%=newph2%>" width="100" height="100" border="0"></a></div></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF"><div align="center"><%=abcount2%>张
              <%If JaCheckIsLog = "yes" Then%>
              <a href="AlbumDel.asp?JaUid=<%=B%>&albumID=<%=Rs(0)%>" onClick="{if(confirm('确定删除吗?')){return true;}return false;}">删除</a> 
              <%End if%>
            </div></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
<%
End if
i=i+1 
If i >= MaxPerpage Then Exit do
Rs.MoveNext
Loop
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><br>
共<%=Rs.PageCount%>页
<Script Language="JavaScript">Pages(<%=CurrentPage%>,<%=Rs.PageCount%>,<%=Rs.RecordCount%>,'page',<%=B%>);</Script> </div>&nbsp;</td>
  </tr>
</table>
<%End if%>
</body>
</html>
<%
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>
