📄 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>2008信息网:最新发布信息,郑州最新分类信息</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-top.htm"-->
<br>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <h2><img src="images/index/tmmm.gif" width="1" height="15">最新发布的
<%=objRS.RecordCount%> 条信息</h2></td>
</tr>
<tr>
<td > <a href="default.asp"><font size="3"><<返回首页</font></a></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="1" align="center">
<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=""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> <b>" & objRS("lang") & "</b>" & VbCrlf)
Response.Write(" <dl>" & VbCrlf)
Response.Write(" <dd><br>——<font color=3399FF>发布时间:" & 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
%>
</td>
</tr>
</table>
<br>
<br>
<!--#include file="buttom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -