<% Response.Expires = 0 Server.ScriptTimeOut = 500 '程序运行超时时间,请尽可能设置多的时间。 PageShowSize = 20 '每页显示多少个页连接(就是每页显示几个翻页符) MyPageSize = 50 '每页显示多少条记录 '=========设置显示内容循环部分========= Dim numRows numRows = MyPageSize Dim index index = 0 '========判断page参数是否存在或空====== if Request("page") = "" then MyPage = 1 else If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then MyPage=1 Else MyPage=Int(Abs(Request("page"))) End if end if Dim Rtitle, Rcategory Rtitle = server.URLEncode(request("Rtitle")) key = request("key") sql = "select * from Article Inner Join Article_Category ON Article.Category_id = Article_Category.C_RootID where Article_title like '%"&Rtitle&"%'" if key <> "" and key <> "A" then sql = sql & " and Category_id like '%"&key&"%'" end if sql = sql & " order by Article_Taxis Desc" rs.open sql,con,1,1 if not rs.eof then '===== '参数 '===== Rs.PageSize = MyPageSize MaxPages = Rs.PageCount Rs.absolutepage = MyPage total = Rs.RecordCount searchResult = "共查到"&total&"条记录" '===== %>
<%=Request("Types")%>
<% While ((numRows <> 0) AND (NOT Rs.EOF)) Dim SrtID, SrtTitle, SrtTime SrtID = Admin.URLDecode(rs(0)) SrtTitle = Admin.URLDecode(rs(1)) SrtTime = Admin.URLDecode(rs(3)) %>
<% index=index+1 numRows=numRows-1 rs.movenext WEND if index > 20 then response.write("
") Call admin.Page_link(MyPage,total,PageShowSize,MypageSize,MaxPages,searchResult) '调用分页函数 response.write("
") end if %>
<% end if Rs.Close %>