ASP page UP next page code

Source: Internet
Author: User

<%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") & "%"/cdkey88_game.game_name like '% "&request (" keywords ") &"% ") ORDER BY cdkey88_news.news_id Desc ", conn,1,1


%>


<table width= "960" border= "0" cellpadding= "0" cellspacing= "4" align= "center" bgcolor= "#FFFFFF" >


<!--dwlayouttable-->


<tr>


<td width= "height=" 206 "valign=" "Top" ><table width= "100%" border= "0" cellpadding= "0" cellspacing= "0 ">


<%


if Rs.eof then


Response.Write "<tr><td colspan=9 height=50 align=center><font color= #ff0000 > Sorry, did not find the relevant records! </font></td></tr> "


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, not rs.eof


%>


<tr>


<td width= "M" height= "131" valign= "Top" ><table width= "100%" border= "0" cellpadding= "0" cellspacing= "0" >


<!--dwlayouttable-->


<tr>


<td width= "height=" valign= "Middle" > <a href= "news/show_news.asp?news_id=<%" =rs ("news_id")%> "target=" _blank "><font color=" #669933 "style=" font-size:14px "><b><%=rs (" News_title ")%></b></font></a></td>


</tr>


<tr>


<TD width= "height=" valign= "middle" >  related games: <a href= "Game/game_<%=rs (" game_id ")%> HTML "target=" _blank "><font color=" #FF6600 "style=" font-size:12px "><b><%=rs (" Game_name ")%> </b></font></a></td>


</tr>


<tr>


<td height= "" "valign=" Top "style=" line-height:20px; padding:5px "><font color=" #878787 ><%=left (removehtml ("News_content"), 180)%>.....</font ></td>


</tr>


<tr>


<TD height= valign= "Middle" >  Release date: <%=rs ("date")%>   lookup times: <%=rs (" Click ")%> </td>


</tr>


</table></td>


</tr>


<tr><td colspan= "4" background= "Images/bg5.gif" ></td></tr>


<tr><td colspan= "4" height= "Ten" ></td></tr>


<%i1=i1+1


if I1>=rs.pagesize then Exit Do


Rs.movenext


Loop


%>


<tr>


<TD height= "align=" "Center" valign= "Middle" > <font color= "#FF0000" ><%=currentpage%></font > Page/Total <font color= "#FF0000" ><%=rs. Pagecount%></font> page    Total <font color= "#FF0000" ><%=rs.recordcount%></ Font> Strip Record    


<% ' If session ("Cur_page") >1 then%>


<a href= "? Page=1&keywords=<%=request (" keywords ")%>&typeid=<%=request (" typeID ")%>" > Home </a>


<a href= "? Page=<%=currentpage-1%>&keywords=<%=request (" keywords ")%>&typeid=<%= Request ("typeID")%> "> Prev </a>


<% ' End if%>


<% ' If session ("Cur_page") <rs. PageCount then%>


<a href= "? Page=<%=currentpage+1%>&keywords=<%=request (" keywords ")%>&typeid=<%=request ("typeID")%> "> next page </a>


<a href= "? Page=<%=rs.pagecount%>&keywords=<%=request (" keywords ")%>&typeid=<%= Request ("typeID")%> "> last page </a>


<% ' End If%></td>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.