asp 分页 上一页 下一页代码

作者:袖梨 2022-07-02

<%if request("typeid")=3 then
set rs=server.CreateObject("adodb.recordset")
  rs.open "select cdkey88_news.*,cdkey88_game.game_name from cdkey88_news,cdkey88_game where cdkey88_news.game_id=cdkey88_game.game_id and ( cdkey88_news.news_title like '%"&request("keywords")&"%' or cdkey88_news.news_content like '%"&request("keywords")&"%' or cdkey88_game.game_name like '%"&request("keywords")&"%') order by cdkey88_news.news_id desc",conn,1,1
%>


 
 
   

      <%
   if rs.eof then
 response.write""
 end if
 if rs.recordcount<>0 then
 rs.pagesize=20
    if request("page")<>"" then
 currentpage=cint(request("page"))
 else
 currentpage=1
 end if
 if currentpage<=1 then
 currentpage=1
 end if
 if currentpage=>rs.pagecount then
 currentpage=rs.pagecount
 end if
 rs.AbsolutePage=currentpage
 end if
 do while not rs.eof
   %>
     
       
       
  
  
   <%i1=i1+1
   if i1>=rs.pagesize then exit do
   rs.movenext
   loop
   %>
     
       

相关文章

精彩推荐

一聚教程网

Copyright © 2010-2022

111cn.net All Rights Reserved

对不起,没有找到相关记录!

         
         
           
           
         
           
           
         
           
             
         
           
         
       
 " target="_blank"><%=rs("news_title")%>
 相关游戏:.html" target="_blank"><%=rs("game_name")%>
<%=left(RemoveHTML(rs("news_content")),180)%>.....
 发布日期:<%=rs("date")%>  查阅次数:<%=rs("click")%>次
<%=currentpage%>页/共<%=rs.PageCount%>页  共有<%=rs.recordcount%>条记录   
          <% 'if session("cur_page")>1 then %>
   &typeid=<%=request("typeid")%>">首页 
   &typeid=<%=request("typeid")%>">上一页
  <% 'end if%>
  <% 'if session("cur_page")
   &typeid=<%=request("typeid")%>">下一页 
  &typeid=<%=request("typeid")%>">末页
 <% 'end if %>