📄 morecool.asp
字号:
<%Option Explicit%>
<!--#include file="2008admin/CONFIG.ASP"-->
<!--#include file="con-the-hhlong.asp"-->
<%
dim objRS,sql
dim i
dim pagecount,currpage,Spage,Epage,recordcount
currpage = request.querystring("currpage")
if currpage = "" or IsNull(currpage) then currpage = 1
if not IsNumeric(currpage) then currpage = 1
currpage = Cint(currpage)
sql = "select * from cool order by visitcount DESC"
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open sql, objConn, 3, 1
recordcount = objRS.RecordCount
objRS.PageSize = PAGESIZE
pagecount = objRS.PageCount
if currpage < 1 then
currpage = 1
elseif currpage > pagecount then
currpage = pagecount
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>热门信息</title>
<link rel="stylesheet" href="happycss.css" type="text/css">
<script language="JavaScript">
<!--
function setvalid(f,b) {
for (var i=0;i<f.elements.length;i++) {
var e = f.elements[i]
if (e.name != 'si' && e.name != 'b1' && e.name != 'b2' && e.name != 'op' && e.name != 'keyword')
e.disabled = !b
}
}
function gethelp() {
location.href="help.html"
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<!--#include file="include-top3.htm"-->
<br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><b>点击数最高的<%=objRS.RecordCount%> 条分类信息:</b></td>
</tr>
<tr>
<td>
<%
'========================================实现翻页=============================
if pagecount > 1 then
response.write("<font color=red>" & currpage & "</font>/" & pagecount & " ")
Spage = currpage mod PARTSIZE
if currpage > PARTSIZE then
if Spage = 0 then Spage = PARTSIZE
Spage = currpage - Spage + 1
else
Spage = 1
end if
Epage = Spage + PARTSIZE - 1
if Epage > pagecount then Epage = pagecount
if currpage > PARTSIZE then
response.write("<a href=""morecool.asp?currpage=" & Spage - 1 & """>前" & PARTSIZE & "页</a>" & VbCrlf)
end if
for i = Spage to Epage
if i = currpage then
response.write("[<font style={color:red}><b>" & i & "</b></font>]" & VbCrlf)
else
response.write("[<a href=""morecool.asp?currpage=" & i & """>" & i & "</a>]" & VbCrlf)
end if
next
if Epage < pagecount then
response.write("<a href=""morecool.asp?currpage=" & Epage + 1 & """>后" & PARTSIZE & "页</a>" & VbCrlf)
end if
if Spage <> 1 then response.write("[<a href=""morecool.asp?currpage=1"">第一页</a>]")
if Epage <> pagecount then response.write("[<a href=""morecool.asp?currpage=" & pagecount & """>最末页</a>]" & VbCrlf)
response.write("<br>")
end if
'======================================完成处理=================================
Response.Write("<ul>")
if not objRS.EOF then objRS.AbsolutePage = currpage
for i = 1 to PAGESIZE
if objRS.EOF then exit for
Response.Write("<LI type=""disc""><a href=""information.asp?ID=" & objRS("ID") & """ target=""_blank"">" & objRS("title") & "</a> <b>" & objRS("lang") & "</b>" & VbCrlf)
Response.Write(" <dl>" & VbCrlf)
Response.Write(" <dd>" & objRS("description") & "<br><br>" & VbCrlf)
Response.Write(" </dl>" & VbCrlf)
Response.Write("</li>" & VbCrlf)
objRS.MoveNext()
next
Response.Write("</ul>")
if pagecount > 1 then
Response.Write("<br>")
response.write("<font color=red>" & currpage & "</font>/" & pagecount & " ")
if currpage > PARTSIZE then
response.write("<a href=""morecool.asp?currpage=" & Spage - 1 & """>前" & PARTSIZE & "页</a>" & VbCrlf)
end if
for i = Spage to Epage
if i = currpage then
response.write("[<font style={color:red}><b>" & i & "</b></font>]" & VbCrlf)
else
response.write("[<a href=""morecool.asp?currpage=" & i & """>" & i & "</a>]" & VbCrlf)
end if
next
if Epage < pagecount then
response.write("<a href=""morecool.asp?currpage=" & Epage + 1 & """>后" & PARTSIZE & "页</a>" & VbCrlf)
end if
if Spage <> 1 then response.write("[<a href=""morecool.asp?currpage=1"">第一页</a>]")
if Epage <> pagecount then response.write("[<a href=""morecool.asp?currpage=" & pagecount & """>最末页</a>]" & VbCrlf)
response.write("<br>")
end if
objConn.Close()
Set objRS = nothing
Set objConn = nothing
%>
</td>
</tr>
</table>
<br>
<br>
<!--#include file="buttom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -