<!--#include file="../include/opendb.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
'声明数据库记录集对象
Dim rsAREAL
'创建数据库记录集对象
Set rsAREAL=Server.CreateObject("ADODB.Recordset")
'设定数据库记录集游标类型
rsAREAL.cursortype=3
'打开记录集对象
rsAREAL.Open "SELECT newid,bt,time2 FROM xwtp where leibie='外埠新闻' ORDER BY newid desc",Connection
'设定每页显示记录数
rsAREAL.pagesize=4
'得到请求的页号
page=1
IF request("page")<>"" then
page=clng(request("page"))
Else
page=1
End IF
IF page<1 Then page=1
If page>rsAREAL.pagecount Then page=rsAREAL.pagecount
rsAREAL.absolutepage=page
%>
<title>-版块列表</title>
<style type="text/css">
<!--
<%=LMA.CSSCode%>
.style1 {font-size: 14px}
.style2 {font-size: 12px}
-->
</style>
<%=LMA.JavaScript%>
</head>
<body>
<table width="400" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="15" colspan="3" valign="top"><p align="right" class="style2">共<%=rsAREAL.pagecount%>页 当前第<%=page%>页 分页:<a href="AREAList.asp?page=1&PageP=10" title="第一页" target="_self"><font face=webdings>9</font></a>
<%
Dim PageP
Dim fp
'stop
IF page<>1 Then
IF Request("PageP")="" Then
Response.Write "<a href=AREAList.asp?page="&(page-1)&"&PageP="&(page+9)&" title=上一页 target=_self><font face=webdings>7</font></A>"
Else
PageP=Clng(Request("PageP"))
IF page>=PageP Then
Response.Write "<a href=AREAList.asp?page="&(page-1)&"&PageP="&(page+9)&" title=上一页 target=_self><font face=webdings>7</font></A>"
Else
IF page=(PageP-10) Then
Response.Write "<a href=AREAList.asp?page="&(page-1)&"&PageP="&(PageP-9)&" title=上一页 target=_self><font face=webdings>7</font></A>"
PageP=PageP-9
Else
Response.Write "<a href=AREAList.asp?page="&(page-1)&"&PageP="&PageP&" title=上一页 target=_self><font face=webdings>7</font></A>"
End IF
End IF
End IF
Else
Response.Write "<font face=webdings>7</font>"
End IF
IF Request("PageP")="" Then
For fp=page To (page+9)
IF fp<rsAREAL.pagecount Then
Response.Write "<a href=AREAList.asp?page="&CStr(fp)&"&PageP="&CStr(page+9)&" target=_self>"&CStr(fp)&"</a> "
End IF
Next
Else
'PageP=Clng(Request("PageP"))
IF page>=PageP Then
For fp=page To page+9
IF fp<rsAREAL.pagecount Then
Response.Write "<a href=AREAList.asp?page="&CStr(fp)&"&PageP="&CStr(page+9)&" target=_self>"&CStr(fp)&"</a> "
End IF
Next
'Response.Write "PD"
Else
IF page=(PageP-9) Then
IF page<>1 Then
For fp=(page-9) To (page-9)+9
IF fp<rsAREAL.pagecount Then
Response.Write "<a href=AREAList.asp?page="&CStr(fp)&"&PageP="&CStr((page-9)+9)&" target=_self>"&CStr(fp)&"</a> "
End IF
Next
Else
For fp=1 To 1+9
IF fp<rsAREAL.pagecount Then
Response.Write "<a href=AREAList.asp?page="&CStr(fp)&"&PageP="&CStr(1+9)&" target=_self>"&CStr(fp)&"</a> "
End IF
Next
End IF
Else
For fp=(PageP-9) To (PageP-9)+9
IF fp<rsAREAL.pagecount Then
Response.Write "<a href=AREAList.asp?page="&CStr(fp)&"&PageP="&CStr(PageP)&" target=_self>"&CStr(fp)&"</a> "
End IF
Next
End IF
'Response.Write "PF"&CStr((PageP-9)+9)&","&CStr(PageP-9)
End IF
End IF
IF page<>rsAREAL.pagecount Then
IF Request("PageP")="" Then
Response.Write "<a href=AREAList.asp?page="&(page+1)&"&PageP="&(page+9)&" title=下一页 target=_self><font face=webdings>8</font></A>"
Else
IF page>=PageP Then
Response.Write "<a href=AREAList.asp?page="&(page+1)&"&PageP="&(page+9)&" title=下一页 target=_self><font face=webdings>8</font></A>"
Else
Response.Write "<a href=AREAList.asp?page="&(page+1)&"&PageP="&Request("PageP")&" title=下一页 target=_self><font face=webdings>8</font></A>"
End IF
End IF
Else
Response.Write "<font face=webdings>8</font>"
End IF
%>
<a href="AREAList.asp?page=<%=rsAREAL.pagecount%>&PageP=<%=(rsAREAL.pagecount+3)%>" title="最后一页" target="_self"><font face=webdings>:</font></a></p> </td>
</tr>
</body>
<%
Connection.Close
conn.Close
rsAREAL.Close
Set conn=Nothing
Set rsAREAL=Nothing
Set Connection=Nothing
Set LMA=Nothing %>
<table width="398" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <table width="399" border="0" align="left" cellpadding="0" cellspacing="0">
<% do while not rsAREAL.eof and i<rsAREAL.pagesize
Set timew = rsAREAL("time2")%>
<tr>
<td width="10"><img src="shou/shou/shou51.JPG" width="6" height="7"></td>
<td width="389" align="left" ><span class=title04><a href="../xw/imagesnew.asp?id=<%=rsAREAL("newid")%>" target="_blank"><%=mid(rsAREAL("bt"),1,30)%></a>
<%=timew%></span></td>
</tr>
<%
i=i+1
rsAREAL.movenext
loop
end if
%>
</table>
</table>
Set LMAF=Nothing
%>
</html>
[此贴子已经被作者于2005-12-9 17:04:19编辑过]