<%Set rs = Server.CreateObject("ADODB.Recordset") maxannounce=9 if not isempty(request("page")) then currentpage=cint(request("page")) else currentpage=1 end if sql="Select * from news order by id desc" rs.open sql,conn,3,2 'if not rs.eof and not rs.bof then totalannounce=rs.recordcount if currentpage<>1 then if (currentpage-1)*maxannounce

<%do while not Rs.eof and j <% Rs.movenext j=j+1 loop %>
·
"><%=rs("title")%> [<%=formatdatetime(rs("itime"),2)%>]
<% show_nav2%>
<%sub show_nav1 %>
>> 共<%=totalAnnounce%>条新闻,当前第<%=currentpage%>页,共<%=n%>页,每页<%=maxannounce%>

<%end sub sub show_nav2%>

[<%if currentpage>1 then%><%end if%>首页<%if currentpage>1 then%><%end if%>] [<%if currentpage>1 then%><%end if%>上一页<%if currentpage>1 then%><%end if%>] [<%if n-currentpage>0 then%><%end if%>下一页<%if n-currentpage>0 then%><%end if%>] [<%if n-currentpage>0 then%><%end if%>尾页<%if n-currentpage>0 then%><%end if%>]
<%end sub%>