<% dim rst,currentpage,rowcount,i currentpage = Request.QueryString("currentpage") if currentpage="" then currentpage=1 end if typeid = request.querystring("Typeid") if typeid="" then typeid = 1 end if set rst=server.CreateObject("adodb.recordset") rst.CursorType = adOpenStatic rst.PageSize = 20 rst.open "select * from News where typeid="&typeid&" order by id desc",Conn,1,1 rst.AbsolutePage=Cint(currentpage) %> -
 
 
<% set rsx=server.createobject("adodb.recordset") rsx.open "select * from Newstype where typeid="&typeid&"",conn,1,1 %>
    <% set rs=server.createobject("adodb.recordset") rs.open "select * from Newstype",conn,1,1 if rs.bof or rs.eof then response.write "ûŷ" end if do while not rs.eof %>
  • "><%=rs("typename")%>

  • <% rs.movenext loop rs.close set rs=nothing %>
 ҳ > > "><%=rsx("typename")%>  
 
<%if rst.bof or rst.eof then response.write "" end if for i=1 to rst.PageSize if rst.bof or rst.eof then exit for end if %> <% rst.movenext next %>
   "><%=rst("title")%>  <%=month(rst("newstime"))%>/<%=day(rst("newstime"))%> [<%=rst("num")%>]

<%=rst.PageCount%>ҳ <%=rst.RecordCount%> ǰҳΣ<%=currentpage%>/<%=rst.PageCount%>    ҳ <%for i = 1 to rst.PageCount if i=Cint(currentpage) then %> [<%=i%>] <%else%> [<%=i%>] <%end if next rst.close set rst=nothing %>