% if Request("Page")<>"" then If IsNumeric(Request("Page"))<>True Then response.write "" response.end End If CurPage = CINT(Request("Page")) if Curpage<1 then Curpage=1 end if else Curpage=1 end if k=strFilter(Request("k")) if k<>"" then where=" and ntitle like '%"& k &"%'" end if sql="select * from asnews where nclass='观注劳权' and RecordState=1 "& where &" order by px,newsid desc" set rs = server.createobject("adodb.recordset") rs.open sql,conn,1,1 iPageSize=30 '每页显示的记录数 Totalcount =INT(RS.recordcount) RS.PageSize=iPageSize TotalPages = RS.PageCount If CurPage>RS.Pagecount Then CurPage=RS.Pagecount end if if rs.eof=false and rs.bof=false then RS.AbsolutePage=CurPage end if rs.CacheSize = RS.PageSize if Curpage<=1 then if rs.eof or rs.bof then PageRecB=0 else PageRecB=1 end if else PageRecB=(CurPage-1)*iPageSize+1 end if if Curpage>=TotalPages then PageRecE=Totalcount else PageRecE=Curpage*iPageSize end if aspname="index.asp?k="&k %>