📄 act.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<%Response.Expires=0%>
<!--#include file="conn.asp"-->
<!--#include file="adovbs.inc" --->
<%
Const NumPerPage = 20 '设置你一页要显示多少记录
Dim CurPage '取得当前所在页
If Request.QueryString("CurPage") = "" then
CurPage = 1
Else
CurPage = Request.QueryString("CurPage")
End If
'设置游标属性
conn.CursorLocation = adUseClient
'设置缓存大小 = 每页需显示的记录数目
conn.CacheSize = NumPerPage
Dim strSQL
strSQL = "select * from act"
set rs=conn.execute(strSQL)
if rs.eof then
Response.Write "<title></title>"
Response.write "<br><br><br><br><br><p align='center'>没有错误记录信息 <font color=red>"& username &"</font></p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点这里返回</a><BR><br></p></body>"
Response.end
end if
rs.MoveFirst
rs.PageSize = NumPerPage
'计算最多有多少页
Dim TotalPages,recdcount
TotalPages = rs.PageCount
recdcount= rs.recordcount
rs.AbsolutePage = CurPage
Dim count
%>
<html>
<head>
<title>聊天动作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size : 9pt;}
td {font-size : 9pt;}
.p9 {font-size: 9pt;}
A {color:#blue;text-decoration : none;}
A:Hover {color:red;text-decoration:none;}
A:Active {color:black}
-->
</style>
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="#FFFFFF" topMargin=20>
<form method="post" action="act.asp">
<table border="0" cellspacing="2" cellpadding="1" bgcolor="FFeeFF" align="center">
<tr>
<td align=center>当前有 <font color=red><%=recdcount%></font> 条动作 每页显示 20 条 共 <font color=red><%=TotalPages%></font> 页
</td>
</tr>
<tr>
<td align=center>
<%if CurPage=1 then
Response.Write("<font color=666666>[上一页</font>")
else
Response.Write("[<a href=act.asp?curpage=" &CurPage-1& ">上一页</a>")
end if
if CurPage=Cstr(TotalPages) then
Response.Write("<font color=666666> 下一页</font>")
else
Response.Write(" <a href=act.asp?curpage=" &CurPage+1& ">下一页</a>")
end if%>
<a href=javascript:history.go(0) title=刷新本页>第<%=CurPage%>页]</a>
</td></tr>
</table>
<hr noshade size="1" color=009900>
<TABLE bgcolor="#a0a0a0" border="0" cellpadding="2" cellspacing="1" align=center width="98%">
<tr bgcolor="#66FFCC">
<td width='10' align="center">ID</td>
<td>动作</td>
</tr>
<%
Do While Not rs.EOF And count < rs.PageSize
Response.Write("<tr bgColor=#f0f0f0><td align=center>//" & rs("head") & "</td>")
Response.Write("<td bgcolor=#F8F8F8><font color=#CC00FF>" & rs("act") & "</font></td></tr>")
Count = Count + 1
rs.MoveNext
Loop
rs.Close%>
</table></form>
</body><html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -