📄 morenew.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 new order by thisdate 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">
<title>最新发布信息</title>
<meta name="description" content="睇睇鲜,分类信息,广州在线,广州分类信息,发布信息,著名企业,分类广告,供应信息">
<meta name="keywords" content="睇睇鲜,分类广告,广州在线,公司,广州在线分类信息,供应信息">
<link rel="stylesheet" href="happycss.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<!--#include file="include-top3.htm"-->
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="778" border="0" cellpadding="18" cellspacing="0">
<tr>
<td> 您的位置:<a href="default.asp">网站首页</a>>><a href="morenew.asp">最新信息</a><br>
<br>
<br>
最新发布的 <%=objRS.RecordCount%> 条分类信息 <br> <%
'========================================实现翻页=============================
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=""morenew.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=""morenew.asp?currpage=" & i & """>" & i & "</a>]" & VbCrlf)
end if
next
if Epage < pagecount then
response.write("<a href=""morenew.asp?currpage=" & Epage + 1 & """>后" & PARTSIZE & "页</a>" & VbCrlf)
end if
if Spage <> 1 then response.write("[<a href=""morenew.asp?currpage=1"">第一页</a>]")
if Epage <> pagecount then response.write("[<a href=""morenew.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("<p><LI type=""disc""><a href=""information.asp?id=" & objRS("ID") & """ target=""_blank""><font color=ff0000 size=3>" & objRS("title") & "</font></a> 分类信息 - 睇睇鲜" & VbCrlf)
Response.Write(" <dl>" & VbCrlf)
Response.Write(" <dd>" & left(objRS("description"),150) & "……<br>——<font color=#009900>发布时间:" & objRS("thisdate") & "</font>" & 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=""morenew.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=""morenew.asp?currpage=" & i & """>" & i & "</a>]" & VbCrlf)
end if
next
if Epage < pagecount then
response.write("<a href=""morenew.asp?currpage=" & Epage + 1 & """>后" & PARTSIZE & "页</a>" & VbCrlf)
end if
if Spage <> 1 then response.write("[<a href=""morenew.asp?currpage=1"">第一页</a>]")
if Epage <> pagecount then response.write("[<a href=""morenew.asp?currpage=" & pagecount & """>最末页</a>]" & VbCrlf)
response.write("<br>")
end if
objConn.Close()
Set objRS = nothing
Set objConn = nothing
%> <br>
</td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="buttom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -