|
 |
| |
<%
set rs=server.CreateObject("adodb.recordset")
strsql="select * from news order by id desc"
rs.open strsql,Conn,3,3
if rs.eof then
RecordCount=0
PageCount=0
page=0
else
rs.PageSize=15
RecordCount=rs.recordcount
PageCount =rs.pagecount
if request.QueryString("page")=Empty then
page=1
elseif cint(request.QueryString("page"))<=0 then
page=1
elseif cint(request.QueryString("page"))>PageCount then
page=PageCount
else
page=request.QueryString("page")
end if
rs.AbsolutePage=page
end if
if rs.eof then
response.Write "| no data now | "
else
session("new")="ok"
for i=1 to rs.recordcount
%>
| ● |
"><%=mid(rs("title"),1,40)%>...<%=rs("pdate")%> |
<%
rs.movenext
if rs.eof then exit for
Next
end if
%>
|
<%if cint(page) > 1 then%>
Prev.
<%else%>
Prev.
<%end if%>¦
<%
for i=1 to cint(PageCount)
if i=cint(page) then
%>
<%=i%>
<% else %>
<%=i%>
<%
end if
if(i<>cint(PageCount)) then
response.write "."
end if
next
%>
¦
<%if cint(page) < cint(PageCount) then%>
Next
<%else%>
Next
<%end if%>
|
|
|
|
|