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= "M" 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 as not rs.eof
%>
<tr>
<td width= "M" height= "131" valign= "Top" ><table width= "100%" border= "0" cellpadding= "0" cellspacing= "0" >
<!--dwlayouttable-->
<tr>
&LT;TD width= "height=" "valign=" Middle ">&nbsp;<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>
&LT;TD width= "height=" valign= "middle" >&nbsp; 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>
&LT;TD height= "valign=" Top "style=" line-height:20px; padding:5px "><font color=" #878787 ><%=left (removehtml ("News_content"), 180)%>.....</font ></td>
</tr>
<tr>
&LT;TD height= valign= "Middle" >&nbsp; Release date: <%=rs ("date")%>&nbsp;&nbsp; lookup times: <%=rs (" Click ")%> times </td>
</tr>
</table></td>
</tr>
&LT;TR&GT;&LT;TD colspan= "4" background= "Images/bg5.gif" ></td></tr>
&LT;TR&GT;&LT;TD colspan= "4" height= "Ten" ></td></tr>
<%i1=i1+1
If I1>=rs.pagesize then Exit Do
Rs.movenext
Loop
%>
<tr>
&LT;TD height= "align=" "Center" valign= "Middle" > <font color= "#FF0000" ><%=currentpage%></font > Page/Total <font color= "#FF0000" ><%=rs. Pagecount%></font> page &nbsp;&nbsp; Total <font color= "#FF0000" ><%=rs.recordcount%></ Font> Strip Record &nbsp;&nbsp;&nbsp;
<% ' 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 </a>
<% ' End If%></td>

Related Article

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.