首页 > 网站 > 建站经验 > 正文

asp_分页程序

2019-11-02 15:30:28
字体:
来源:转载
供稿:网友

<[email protected]="vbscript" codepage="936"%>
<%
'定义数据连接
option explicit
on error resume next
dim startime,endtime
startime=timer()
dim db,conn,rs
db = "provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("./db.mdb")
set conn = server.createobject("adodb.connection")
set rs = server.createobject("adodb.recordset")
conn.open db
%>
<%
'**************
'分页导航栏函数
'输出wzpage值
'**************
Function pagination(pagecount)
   Dim wzpage,wzpagecount,pagenum,boardid
   boardid = Request.QueryString("board_id")
   If boardid = 0 Then boardid = 1
       If Len(Request.QueryString("page"))<>0 Then
      

求大神ps爆笑ps图[www.62-6.com/1/baoxiaotupian]
    wzpage = clng(Request.QueryString("page"))
         Else
          wzpage =1
       End If
       If wzpage <= 0 Then wzpage =1
       pagenum = (wzpage 10)*10+1
       If wzpage mod 10 = 0 Then pagenum = (wzpage 10)*10-9
       If wzpage > 10 Then
         Response.Write ("<font face=""webdings"">")
            Response.Write ("<a href=""?board_id="& boardid &"&page=1"" title=""首页"">9</a>")
   Response.Write ("<a href=""?board_id="& boardid &"&page="& pagenum-1 &""" title=""前十页"">7</a>")
            Response.Write ("</font>")
    End If
       For pagenum = pagenum To pagenum + 9
           If pagenum = wzpage Then
                  Response.Write ("<font color=""#ff0000"">")
                  Response.Write (" ["& pagenum &"] ")
                  Response.Write ("</font>")
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表