<%
set conn=server.CreateObject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("adminn@19X1128/mynews.asp")
set rs=server.createobject("adodb.recordset")
exce="select * from article order by newsid desc"
rs.open exce,conn,1,1
%>
<%
if rs.eof then
response.Write " 暂无信息!"
else
rs.PageSize =35 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
<%For i=1 To x%>
|