📄 p_all.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<%
'=========================================================
' File: p_all.asp
' Date: 2006-04-06
' Script Written by Leibo
'=========================================================
' Copyright (C) 2002,2008 Mathren.com. All rights reserved.
' Web: http://www.hrbyydz.com
' Email: qa_90@hotmail.com
'=========================================================
stats="查看所有照片"
dim picid,classname,trs
dim currentPage,totalrec,Pcount,page_count,endpage
dim abgcolor
dim Photonum
if Cint(GroupSetting(6))=1 then
Errmsg=Errmsg+"<br>"+"<li>您没有访问班级相册的权限,请<a href=login.asp>登陆</a>或者同管理员联系。"
founderr=true
end if
if founderr then
call head()
call head_var("","")
call txl_error()
else
call head()
call head_var("班级相册","p_index.asp")
if founderr then
call txl_error()
else
call main()
if founderr then call txl_error()
end if
end if
call foot()
sub main()
abgcolor="tablebody2"
set rs=conn.execute("select top 1 PhotoNum from config where active=1")
Photonum=rs(0)
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">
<tr>
<td width=120 bgcolor=<%=txl_body(10)%> align="center" valign="top">
<br>
<a href=p_send.asp><img src="<%=txl_info(6)&txl_skinpic(10)%>" height="25" border=0></a> <br><br>
<a href=p_my.asp><img src="<%=txl_info(6)&txl_skinpic(11)%>" height="25" border=0></a> <br><br>
<a href=p_order.asp><img src="<%=txl_info(6)&txl_skinpic(12)%>" height="25" border=0></a><br><br><br>
<%
set rs=server.createobject("adodb.recordset")
sql="select classid,classname,classinfo from imgclass order by classid"
rs.open sql,conn,1
if rs.eof and rs.bof then
response.write "<p>还没有设定班级照片类别</p>"
else
do while not rs.eof
response.write "<a href=""p_more.asp?classid="&rs("classid")&""" title="""&rs("classinfo")&"""><img src="""&txl_info(7)&"dot02.gif"" border=0> "&rs("classname")&"</a><br><br>"
rs.movenext
loop
end if
%>
</td>
<td width=* bgcolor=<%=txl_body(10)%> valign="top"><br>
<table width="95%" cellpadding="5" cellspacing="1" class=tableborder1>
<tr>
<td colspan=4 class=tablebody1 height=40 align=center>>>班级相册共有照片 <b><%=Photonum%></b> 张<<</td>
<td colspan=2 class=tablebody1></td>
</tr>
<tr>
<th width=40% height=25>照片说明</th>
<th width=12%>上 传 人</th>
<th width=14%>照片类型</th>
<th width=10%>照片大小</th>
<th width=10%>点击次数</th>
<th width=14%>上传时间</th>
</tr>
<%
'======================show========================
currentPage=request("page")
if currentpage="" or not isInteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
set rs=server.createobject("adodb.recordset")
sql="select * from imgdata where picset<2 order by addtime desc"
rs.open sql,conn,1
if rs.eof and rs.bof then
response.write "<tr><td colspan=9 class=tablebody1> 还没有任何用户数据。</font></td></tr>"
else
totalrec=rs.recordcount
if totalrec mod txl_Set(11)=0 then
Pcount= totalrec \ txl_Set(12)
else
Pcount= totalrec \ txl_Set(12)+1
end if
RS.MoveFirst
if currentpage > Pcount then currentpage = Pcount
if currentpage<1 then currentpage=1
RS.Move (currentpage-1) * txl_Set(12)
page_count=0
do while not rs.eof and page_count < Clng(txl_Set(12))
set trs=conn.execute("select classname from imgclass where classID="&rs("classID"))
%>
<tr>
<td class=tablebody1 height=28><a href="p_show.asp?id=<%=rs("picid")%>" ><u><%=rs("picinfo")%></u></a></td>
<td class=tablebody1 align=center><a href="userinfo.asp?id=<%=rs("postuserid")%>" ><%=rs("postuser")%></a></td>
<td class=tablebody1 align=center><%=trs("classname")%></td>
<td class=tablebody1 align=center><%=int(rs("filesize")/1024)%>K</td>
<td class=tablebody1 align=center><%=rs("hits")%></td>
<td class=tablebody1 align=center><%=formatdatetime(rs("addtime"),vbshortdate)%></td>
</tr>
<%
page_count=page_count+1
rs.movenext
loop
end if
'========================end===================
%>
</table>
<br>
<table border=0 cellpadding=0 cellspacing=0 width="95%">
<tr><td valign=middle nowrap>
页次:<b><%=currentpage%></b>/<b><%=Pcount%></b>页
每页<b><%=txl_Set(11)%></b>条 总<b><%=totalrec%></b>条留言</td>
<td valign=middle nowrap><div align=right><p>分页:
<%
if currentpage > 4 then
response.write "<a href=""?page=1"">[1]</a> ..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color=#ce0000>["&i&"]</font>"
else
response.write " <a href=""?page="&i&""">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "... <a href=""?page="&Pcount&""">["&Pcount&"]</a>"
end if
%>
</p></div></td></tr></table>
<%
rs.close
set rs=nothing
%>
<br>
</td>
</tr>
</table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -