<% classid=ReplaceUnsafe(request.QueryString("classid")) if not IsNumeric(smallclassid) then response.write"" response.End end if set dhrs=server.createobject("adodb.recordset") dhsql="select * from class where id="&classid dhrs.open dhsql,conn,1,1 if dhrs.eof then response.write"" response.End end if classname=dhrs("classname") classid=dhrs("id") dhrs.close set dhrs=nothing %> <%=website%>
  <% Set rs=Server.CreateObject("ADODB.RecordSet") sql="select id,Title,hits,addtime,ClassName,showname from article where classid="& classid &" order by id desc" rs.Open sql,conn,1,1 if rs.eof and rs.bof then %> <% else rs.PageSize=20 page=request.QueryString("page") if page="" then page=request.Form("page") page=clng(page) if page=0 then page=1 pages=rs.pagecount if page > pages then page=pages rs.AbsolutePage=page for j=1 to rs.PageSize Title = rs("Title") turl="article.asp?id="&rs("id")&"&name="&rs("showname") hits= rs("hits") addtime=rs("addtime") %> <% rs.movenext if rs.eof then exit for next %> <% end if set rs=nothing%>

<%if Page<2 then response.write "首页 上一页 " else response.write "首页 " response.write "上一页 " end if if rs.pagecount-page<1 then response.write "下一页 尾页" else response.write "" response.write "下一页 尾页" end if response.write " 页次:"&Page&"/"&rs.pagecount&"页 " response.write " 共"&rs.recordcount&"条记录 "&rs.pagesize&"条记录/页" response.write " 转到:" response.write " " %>