婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > 簡單分頁函數一 常用

簡單分頁函數一 常用

熱門標簽:縣域地圖標注打印店 個人可以辦理400電話么 鳳臺百度地圖標注店 萊西電子地圖標注 外呼系統API接口 修改地圖標注 怎么在地圖標注自己 金昌電話機器人價格 武夷山旅游地圖標注
復制代碼 代碼如下:

%
      page=trim(request("page"))
      maxperpage=40
      first=true
      last=true
      dim rs
      set rs=server.CreateObject("adodb.recordset")
      sql="select id,title,add1,cartype,isred,enterdate,hits from newnews where classtype=0 and pass=1 order by id desc"
rs.open sql,conn,1,1
        rs.pagesize=maxperpage
        totalpage=rs.pagecount
        if len(page)=0 then
        intpage=1
        first=false
        else
            if cint(page)=1 then
            intpage=1
            first=false
            else
                if cint(page)>=rs.pagecount then
                intpage=rs.pagecount
                last=false
                else
                intpage=cint(page)
                end if
            end if
        end if            
        if not rs.eof then
        rs.absolutepage=intpage
        end if
        for a=1 to maxperpage
        if rs.eof then exit for
        %>
        tr %if (a mod 2)=0 then
      response.write "bgcolor=#ffffff"
      else
      response.write "bgcolor=#f6f6f6"
      end if
      %>>
          td height="20">div align="center">%=a%>/div>/td>
          td>div align="center">
            %add=rs("add1")
        substring add,4
        %>
          /div>/td>
          td>
          a href="displaynews.asp?id=%=rs("id")%>" target="_blank">          
         %
        if rs("isred")=True then
        %>
        font color="red">
        %title=rs("title")
        substring title,20
        %>/font>
        %else
        title=rs("title")
        substring title,20
        %>
        %
        end if
        %>        
        /a>/td>
          td>div align="center">%=rs("cartype")%>/div>/td>
          td>div align="center">
              %thetime=rs("enterdate")
                    themon=datepart("m",thetime)
                    if len(themon)2 then themon="0"themon
                    theday=datepart("d",thetime)
                    if len(theday)2 then theday="0"theday
                    ther=themon"-"theday
                    response.write ther
                %>
          /div>/td>
          td>div align="center">%=rs("hits")%>/div>/td>
        /tr>
        %
      rs.movenext
      if rs.eof then exit for
      next        
      %>
      /table>
      table width="100%" border="0" cellspacing="0" cellpadding="0">
      tr>
        td height="5">/td>
      /tr>
    /table>
     table width="100%" border="0" cellpadding="0" cellspacing="0">
            tr>
              td height="20" bgcolor="#f6f6f6">
                  div align="center">
                    %if rs.pagecount>0 then %>
              共有%=rs.recordcount%>條|當前頁%=intpage%>/
              %

=rs.pagecount%>

              % end if %>
              %if intpage>1 then%>
              a href="%request.ServerVariables("SCRIPT_NAME")%>?

page=1">首頁/a>
              %else%>
              首頁
              %end if%>
              %if first then%>
              a href="%request.ServerVariables("SCRIPT_NAME")%>?

page=%=intpage-1%>">上一頁/a>
              %else%>
              上一頁
              %end if%>
              %if last and intpagers.pagecount then%>
              a href="%request.ServerVariables("SCRIPT_NAME")%>?

page=%=intpage+1%>">下一頁/a>
              %else%>
              下一頁
              %end if%>
              %if intpagers.pagecount then%>
              a href="%request.ServerVariables("SCRIPT_NAME")%>?

page=%=rs.pagecount%>">尾頁/a>
              %else%>
              尾頁
              %end if%>
              轉到
              select onChange="location=this.options

[this.selectedIndex].value">
                %for b=1 to rs.pagecount
     if b=intpage then%>
                option value="%request.ServerVariables("SCRIPT_NAME")%>?page=%=b%>" selected>

                第%=b%>頁/option>
                % else %>
                option value="%request.ServerVariables("SCRIPT_NAME")%>?page=%=b%>">第%=b%>頁

                /option>
                %end if
     next%>
              /select>
nbsp;nbsp;nbsp;nbsp;/div>/td>
            /tr>
      /table>    
/body>
%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

標簽:邢臺 楚雄 上海 赤峰 涼山 南京 通遼 清遠

巨人網絡通訊聲明:本文標題《簡單分頁函數一 常用》,本文關鍵詞  簡單,分頁,函數,一,常用,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《簡單分頁函數一 常用》相關的同類信息!
  • 本頁收集關于簡單分頁函數一 常用的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 蓬安县| 昭平县| 调兵山市| 洱源县| 晋宁县| 梁平县| 永靖县| 泗阳县| 铅山县| 上饶市| 宝丰县| 容城县| 郸城县| 崇左市| 临清市| 汨罗市| 屏边| 桦川县| 丰都县| 红河县| 哈巴河县| 永吉县| 鄄城县| 隆化县| 西昌市| 马边| 绥江县| 曲沃县| 长白| 玉环县| 漾濞| 库伦旗| 桐柏县| 乐业县| 民县| 临洮县| 牡丹江市| 宽城| 岗巴县| 泸水县| 上杭县|