📄 showalbum.asp
字号:
<!--#INCLUDE FILE="const.asp" -->
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="checkuser.asp" -->
<!--#INCLUDE FILE="char.asp" -->
<%
dim pictype,ordername
pictype=request("type")
if pictype="" then
pictype="school"
end if
if pictype="school" then
ordername="校园相册"
elseif pictype="class" then
ordername="班级相册"
end if
dim totalPages,currentPage
currentPage=request.querystring("page")
stats=ordername
%>
<HTML><HEAD><TITLE><%=SchoolmateName%>——<%=ordername%></TITLE>
<META http-equiv=Content-pictype content="text/html; charset=gb2312">
<link href="txl.css" type="text/css" rel="stylesheet">
<script language="JavaScript" src="script/jsfun.js"></script>
</HEAD>
<BODY topmargin="0" leftmargin="0">
<br><br>
<table width=85% bgcolor=<%=TableborderColor%> cellspacing=0 border=0 align=center>
<tr>
<td>
<table cellpadding=6 cellspacing=1 border=1 width=100% bgcolor=<%=TableborderColor%> bordercolor=<%=TableborderColor%> bordercolorlight=<%=TablebodyColor1%> bordercolordark=<%=TablebodyColor1%>>
<tr bgcolor=<%=TablebodyColor1%>>
<td colspan=5 valign=top width=350 align=center> >> <B><%=ordername%></B> <<
<font face=宋体> </font></td>
<td>相册中照片数:<%=allphotoes()%></td>
</tr>
<tr bgcolor=<%=TabletitleColor%>>
<td align=center><b>照片说明</b></td>
<td align=center><b>提供者</b></td>
<td align=center><b>照片类型</b></td>
<td align=center><b>照片大小</b></td>
<td align=center><b>点击次数</b></td>
<td align=center><b>上载时间</b></td>
</tr>
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
if pictype="school" then
sql="select picid,remark,filename,filesize,type,name,visitcount,datetime "&_
"from [photo] where classid=0 order by picid desc"
elseif pictype="class" then
sql="select photo.*,student.realname from [photo],[student] where photo.classid="&clsid&_
" and student.userid=photo.name order by picid desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<tr bgcolor=<%=TableBodyColor2%>>
<td colspan=9> 目前还没有照片.</td>
</tr>
<%
else
rs.pagesize=20
totalpages=rs.pagecount
if currentpage="" then currentpage=1
if not isNumeric(currentpage) then
currentpage=1
elseif Cint(currentpage)>totalpages then
currentpage=totalpages
end if
currentpage=Cint(currentpage)
rs.absolutepage=currentpage
for i=1 to 20
if rs.eof then exit for
%>
<tr bgcolor=<%=TablebodyColor2%>>
<td valign=top> <a href="javascript:openScript('viewphoto.asp?id=<%=(rs("picid"))%>',300,200)"><img src=images/<%=right(rs("filename"),3)%>.gif border=0 align=absmiddle hspace=2><%=htmlencode(rs("remark"))%></a></td>
<td align=center>
<%
if pictype="school" then %>
<a href="javascript:openScript('profile.asp?name=<%=htmlencode(rs("name"))%>',420,320)"><%=htmlencode(rs("name"))%></a>
<%elseif pictype="class" then
response.write rs("realname")
end if
%>
</td>
<td align=center><%=rs("type")%></td>
<td align=center><%=rs("filesize")\1024%>KB</td>
<td align=center>
<%=rs("visitcount")%>
</td>
<td align=center><%=rs("datetime")%></td>
</tr>
<%
rs.movenext
next
end if
rs.close
set rs=nothing
function allphotoes()
if pictype="school" then
tmprs=conn.execute("Select count(picid) from [photo] where classid=0")
elseif pictype="class" then
tmprs=conn.execute("Select count(picid) from [photo] where classid="&clsid)
end if
allphotoes=tmprs(0)
set tmprs=nothing
if isnull(allphotoes) then allphotoes=0
end function
%>
</table>
</td></tr>
</table>
<table width=85% align="center" >
<tr><td align=right>
<% if currentpage=0 then currentpage=1
response.write "共 "&totalpages&" 页 第 "¤tpage&" 页 "
if currentpage=1 or totalpages=0 then
response.write "<font color=gray>首页 前页</font>"
else
response.write "<a href=?page=1&orders="&orders&">首页</a> <a href=?page="¤tpage-1&"&orders="&orders&">前页</a>"
end if
if currentpage=totalpages or totalpages=0 then
response.write " <font color=gray>后页 尾页</font>"
else
response.write " <a href=?page="¤tpage+1&"&orders="&orders&">后页</a> <a href=?page="&totalpages&"&orders="&orders&">尾页</a>"
end if
%>
</td></tr></table>
<!--#include file="footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -