📄 photo_index.asp
字号:
<script>
<!--
function openFullscreen(page) {
var yes = 1;
var no = 0;
var menubar = no;
var scrollbars = no;
var locationbar = no;
var directories = no;
var resizable = no;
var statusbar = no;
var toolbar = no;
windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-50) + ",top=0,left=0";
windowprops += (menubar ? ",menubars" : "") + (scrollbars ? ",scrollbars" : "") +
(locationbar ? ",location" : "") +
(directories ? ",directories" : "") +
(resizable ? ",resizable" : "") +
(statusbar ? ",status" : "") +
(toolbar ? ",toolbar" : "");
window.open(page, 'fullPopup', windowprops);
}
//-->
</script>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="images/bg2.gif">
<tr>
<td height="1" bgcolor="#E32D3F"></td>
</tr>
<tr>
<td height="30" align="center">
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td><font color=red class=titletext><%=NickName%>的个人影集</font></td>
<%if cint(request("user_id"))=cint(session("u_id")) then%>
<td width="80" align="right">
<a href="UploadPhoto.asp">上传照片</a>
</td>
<td width="80" align="right">
<a href="ClearPhoto.asp?user_id=<%=session("u_id")%>">全部删除</a>
</td>
<%end if%>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" background="images/hline.gif"></td>
</tr>
<tr>
<td align=center valign="top"> <BR>
<!----------------主体部分开始------------------------------------->
<%
If WhoCanSee = 0 And cint(Session("u_id")) <> cint(Request("user_id")) Then
Response.Write "关闭了个人影集"
ElseIf WhoCanSee = 2 And Not IsMember() Then
Response.Write "您还没登录,不能看到影集"
ElseIf WhoCanSee = 1 And Not IsFriend(Request("user_id")) And cint(Session("u_id")) <> cint(Request("user_id")) Then
Response.Write "只有" & NickName & "的好友才能看到个人影集"
Else
%>
<!--#include file="../connpic.asp"-->
<%
AccountID=request("user_id")
Set Rs = Server.CreateObject("ADODB.Recordset")
Dim PageSize,AllCount,MaxPage,PageNo
PageNO = Request.QueryString("PageNO")
SQLStr = "select * from pic where user_id="& AccountID &" Order By id Desc"
PageSize = 5
Rs.PageSize = PageSize
Rs.Open SQLStr,conn,1,3
AllCount = Rs.RecordCount
MaxPage = Rs.PageCount
If Rs.RecordCount > 0 Then
Rs.MoveFirst
If PageNO = "" Then PageNO=1
If PageNO+1 < 1 Then PageNO=1
If PageNO+1 > MaxPage+1 Then PageNO = MaxPage
Rs.AbsolutePage = PageNO
End If
i=0
DO While Not Rs.EOF and i < PageSize
i=i+1
%>
<table width="100%" border="1" cellpadding="2" bgcolor="#FFFFFF" cellspacing="2" bordercolor="#FFFFFF">
<tr>
<%if Rs("index")=True then%>
<td bordercolorlight=black bordercolordark=black>
<%else%>
<td bordercolorlight="#E32D3F" bordercolordark="#E32D3F">
<%end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="98"><a href="javascript:openFullscreen('picview/viewpic.asp?id=<%=rs("id")%>')"><img border="0" src="display.asp?id=<%=rs("id")%>" width="90" height="120" alt="点击看大图"></a>
</td>
<td align="right">
<table width="100%" height="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td colspan="3" valign="top" height="90">
<font color="#E32D3F">相片简介:</font><br>
<%=Rs("about")%>
</td>
</tr>
<tr bgcolor="#FFECEC">
<td height="1" colspan="3"></td>
</tr>
<tr>
<td width="180"><font color="#999999">上传日期:<%=Rs("date")%></font></td>
<td width="110"><font color="#999999">大小:<%=FormatNumber(Cint(Rs("size"))/1024,2,True)%>KB</font></td>
<td align="right">
<%if cint(request("user_id"))=cint(session("u_id")) then%>
<a href="EditPhoto.asp?id=<%=rs("id")%>">编辑</a> <a href="delphoto.asp?id=<%=rs("id")%>&user_id=<%=rs("user_id")%>">删除</a>
</td>
<%end if%>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<%
Rs.MoveNext
Loop
Rs.Close()
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
<tr>
<td> 共有个 <font color=red><b><%=AllCount%></b></font> 相片 页次: <font color=red><b><%=PageNO%></b></font> / <b><%=MaxPage%></b> 页
</td>
<td align="right">
<%if PageNO-1>0 then %>
<A href=list_photo.asp?user_id=<%=AccountID%>&pageNO=1>首页</a> <A href=list_photo.asp?user_id=<%=AccountID%>&pageNO=<%=pageNO-1%>>上一页</a>
<%
else
%>
首页 上一页
<%
end if %>
<%
if PageNo+1<=MaxPage then
%>
<A href=list_photo.asp?user_id=<%=AccountID%>&pageNO=<%=pageNO+1%>>下一页</a> <A href=list_photo.asp?user_id=<%=AccountID%>&pageNO=<%=MaxPage%>>末页</a>
<%
else
%>
下一页 末页
<%
end if
%>
</td>
</tr>
</table>
<%
End IF
%>
<!----------------主体部分结束-------------------------------------->
</td>
</tr>
<tr>
<td height="1" background="images/hline.gif"></td>
</tr>
</table>
</div>
<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -