📄 list.asp
字号:
<!--#include file="_conn.asp" -->
<%
Call Header(" - 字条列表"&Request("page"))
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="List">
<tr>
<th>字条编号</th>
<th>字条内容</th>
<th>发送人</th>
<th>接收人</th>
<th>日期</th>
</tr>
<%
Dim Sql
Sql="Select * From LOVE Order By Id DESC"
Dim Rs
Set Rs=Server.CreateObject("ADODB.RecordSet")
Rs.PageSize=LOVE_SIZE
Rs.CacheSize=Rs.PageSize
Rs.Open Sql,Conn,1,1
Dim Page
If Request("page")="" Then
Page=1
Else
Page=Request("page")
End If
If Not(Rs.Eof And Rs.Bof) Then Rs.AbsolutePage=Page
Dim I
For I=1 To Rs.PageSize
If Rs.Eof Then Exit For
Response.Write "<tr class=""tr""><td class=""ListA"">"&Rs("ID")&"</td><td class=""ListB""><a href=""default.asp?id="&Rs("ID")&""">"&Rs("Info")&"</a>"
If Session("_ASPK")="ok" Then Response.Write " ("&Rs("IP")&" <a href=""admin.asp?cmd=del&id="&Rs("ID")&"""><img src=""images/close.gif"" alt=""删除"" /></a>)"
Response.Write "</td><td class=""ListC"">"&Rs("Send")&"</td><td class=""ListC"">"&Rs("Pick")&"</td><td class=""ListD"">"&Rs("PostDate")&"</td></tr>"
Rs.MoveNext
If Rs.Eof Or I=Rs.PageSize Then Exit For
Response.Write "<tr><td class=""ListA"">"&Rs("ID")&"</td><td class=""ListB""><a href=""default.asp?id="&Rs("ID")&""">"&Rs("Info")&"</a>"
If Session("_ASPK")="ok" Then Response.Write " ("&Rs("IP")&" <a href=""admin.asp?cmd=del&id="&Rs("ID")&"""><img src=""images/close.gif"" alt=""删除"" /></a>)"
Response.Write "</td><td class=""ListC"">"&Rs("Send")&"</a></td><td class=""ListC"">"&Rs("Pick")&"</td><td class=""ListD"">"&Rs("PostDate")&"</td></tr>"
I=I+1
Rs.MoveNext
Next
Dim PageCount,RecordCount
PageCount=Rs.PageCount
RecordCount=Rs.RecordCount
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>
<tr>
<td colspan="5" class="ListP">
<%If Session("_ASPK")="ok" Then Response.Write "<a href=""login.asp?q=q"">修改密码</a> "
Response.Write "(字条总数:"&RecordCount&") "
Call PageBar(Int(PageCount),Int(Page))%>
</td>
</tr>
</table>
<%
Call Footer()
Function PageBar(pages,page)
If page>1 Then
response.write "<a href=""?page=1"">1</a>..."
Else
response.write "<strong>1</strong>..."
End If
Dim p,pp,n,i
p=page-5
pp=pages-1
If p<2 Then p=2
For n=p To pp
i=i+1
If n=page Then
response.write "<strong>"&n&"</strong> "
Else
response.write " <a href=""?page="&n&""">"&n&"</a> "
End If
If i>=11 Then Exit For
Next
If page<pages Then
response.write "...<a href=""?page="&pages&""">"&pages&"</a>"
Else
response.write "...<strong>"&pages&"</strong>"
End If
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -