⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pagefun.aspx.vb

📁 本程序修改自飞天BBS 7.0 将原来的ASP语法迁移为ASP.NET并封装成DLL ASP.NET相对ASP有更快的执行效率以及更高的并发访问量 基于ASP.NET的DLL可以运行在支持ASP
💻 VB
字号:
' ***************************************************
' *        本程序由AspToAspX风火轮0.99转换生成      *
' *        http://Www.AspToAspX.Cn                  *
' *        Q Q :  139227536                         *
' *        QQ群:  17152722                          *
' *        MSN :  gzliangjianhua@hotmail.com        *
' *        EMail  AspToDll@vip.163.com              *
' ***************************************************
Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Math
Imports System.Web.SessionState


Public Class _PAGEFUN

    Public AspToAspX_Host_Class_Object As Object

Dim _aspx_root,_aspx_pagestr,_aspx_wzrep,_aspx_wzpage,_aspx_wzcount,_aspx_pagenum
#Region "..."
    Public Sub AspToAspX_InitIncludeFiles()
    End Sub

    Public Sub AspToAspX_UnloadIncludeFiles()
    End Sub

#End Region
    Public Sub AspToAspX_Page_Init()
    On Error GoTo _AspToAspX_Err
    Response.Write ( vbCrLf )

        Exit Sub
    _AspToAspX_Err:
        AspToAspX_WriteLog ("pagefun_aspx Page_Init:" & Err.Description)
        Resume Next
        End Sub
'E:\FTBBS_UTF8_7.0\UPLOAD\PAGEFUN.ASP
Function pageclass(ByRef  totalpage,ByRef wzcount,ByRef wzrep,ByRef pagestr,ByRef root )
On Error GoTo _AspToAspX_Err
    Dim wzpage
    Dim pagenum
    If AspToAspX_Len ( ( Request.QueryString ( "page" ) ) ) < > 0 Then '21
        wzpage = AspToAspX_CInt ( ( Request.QueryString ( "page" ) ) ) '22
    Else '23
        wzpage = 1 '24
    End If '25
    If AspToAspX_CheckDBNull ( wzpage ) < = 0 Then
wzpage = 1
End If
   '26
        pagenum = ( wzpage \ 10 ) * 10 + 1 '27
    If AspToAspX_CheckDBNull ( wzpage Mod 10 ) = 0 Then
pagenum = ( wzpage \ 10 ) * 10 - 9
End If
   '28
        Response.Write ( "<table border=""0"" cellspacing=""0"" cellpadding=""0""><tr>" & vbCrLf ) '29
        Response.Write ( "<td width=""2""></td><td class=""intd"" title=""记录数"">&nbsp;" & wzcount & "&nbsp;</td>" & vbCrLf ) '30
        Response.Write ( "<td width=""2""></td><td class=""intd"" title=""当前页/总页数"">&nbsp;" & wzpage & "/" & totalpage & "&nbsp;</td>" & vbCrLf ) '31
        Response.Write ( "<td width=""2""></td><td class=""intd"" title=""每页记录数"">&nbsp;" & wzrep & "&nbsp;></td>" & vbCrLf ) '32
        If AspToAspX_CheckDBNull ( wzpage ) > 10 Then '33
            Response.Write ( "<td class=""outtd""><a href=""?page=1" & pagestr & """ title=""首页""><img src=""" & root & "images/first.gif"" border=""0""></a></td><td width=""2""></td>" & vbCrLf ) '34
            Response.Write ( "<td class=""outtd""><a href=""?page=" & pagenum - 1 & pagestr & """ title=""前十页""><img src=""" & root & "images/previous.gif"" border=""0""></a></td>" & vbCrLf ) '35
        End If '36
        For pagenum = pagenum To Val ( pagenum ) + 9 '37
            If AspToAspX_CheckDBNull ( pagenum ) = wzpage Then '38
                Response.Write ( "<td width=""2""></td><td class=""intd"" title=""当前页"">" & pagenum & "</td>" & vbCrLf ) '39
            Else '40
                Response.Write ( " <td width=""2""></td><td class=""outtd"" onmouseover=""this.className='intd';"" onmouseout=""this.className='outtd';"">" ) '41
                Response.Write ( " <div style=""width:100%""><a href=""?page=" & pagenum & pagestr & """>" & pagenum & "</a></div></td>" & vbCrLf ) '42
            End If '43
        If AspToAspX_CheckDBNull ( pagenum ) > = totalpage Then
Exit For
End If
   '44
        Next '45
        If AspToAspX_CheckDBNull ( wzpage ) < = ( totalpage - ( totalpage Mod 10 ) ) Then '46
            Response.Write ( "<td width=""2""></td><td class=""outtd"" onmouseover=""this.className='outtd';"" onmouseout=""this.className='outtd';""><a href=""?page=" & pagenum & pagestr & """  title=""后十页""><img src=""" & root & "images/next.gif"" border=""0""></a></td> " & vbCrLf ) '47
            Response.Write ( "<td width=""2""></td><td class=""outtd"" onmouseover=""this.className='outtd';"" onmouseout=""this.className='outtd';""><a href=""?page=" & totalpage & pagestr & """  title=""末页""><img src=""" & root & "images/last.gif"" border=""0""></a></td>" & vbCrLf ) '48
        End If '49
        Response.Write ( " <td width=""2""></td><td><input class=""inputpage"" name=""page"" type=""text"" size=""3"" onKeyDown=""if(event.keyCode==13) {window.location='?page='+this.value+'" & pagestr & "';}""></td>" & vbCrLf ) '50
        Response.Write ( "</tr></table>" & vbCrLf ) '51
    Exit Function
_AspToAspX_Err:
    AspToAspX_WriteLog("E:\FTBBS_UTF8_7.0\UPLOAD\PAGEFUN.ASP pageclass:" & Err.Description)
    Resume Next
End Function
#Region "..."
    Public Property root
        Get
            On Error Resume Next
            root = AspToAspX_Host_Class_Object.root
            If Err.Number = 438 Then
                Err.Clear
                root = _aspx_root
            End If
        End Get
        Set(ByVal value)
            On Error Resume Next
            AspToAspX_Host_Class_Object.root = value
            If Err.Number = 438 Then
                Err.Clear
                _aspx_root = value
            End If
        End Set
    End Property
    Public Property pagestr
        Get
            On Error Resume Next
            pagestr = AspToAspX_Host_Class_Object.pagestr
            If Err.Number = 438 Then
                Err.Clear
                pagestr = _aspx_pagestr
            End If
        End Get
        Set(ByVal value)
            On Error Resume Next
            AspToAspX_Host_Class_Object.pagestr = value
            If Err.Number = 438 Then
                Err.Clear
                _aspx_pagestr = value
            End If
        End Set
    End Property
    Public Property wzrep
        Get
            On Error Resume Next
            wzrep = AspToAspX_Host_Class_Object.wzrep
            If Err.Number = 438 Then
                Err.Clear
                wzrep = _aspx_wzrep
            End If
        End Get
        Set(ByVal value)
            On Error Resume Next
            AspToAspX_Host_Class_Object.wzrep = value
            If Err.Number = 438 Then
                Err.Clear
                _aspx_wzrep = value
            End If
        End Set
    End Property
    Public Property wzpage
        Get
            On Error Resume Next
            wzpage = AspToAspX_Host_Class_Object.wzpage
            If Err.Number = 438 Then
                Err.Clear
                wzpage = _aspx_wzpage
            End If
        End Get
        Set(ByVal value)
            On Error Resume Next
            AspToAspX_Host_Class_Object.wzpage = value
            If Err.Number = 438 Then
                Err.Clear
                _aspx_wzpage = value
            End If
        End Set
    End Property
    Public Property wzcount
        Get
            On Error Resume Next
            wzcount = AspToAspX_Host_Class_Object.wzcount
            If Err.Number = 438 Then
                Err.Clear
                wzcount = _aspx_wzcount
            End If
        End Get
        Set(ByVal value)
            On Error Resume Next
            AspToAspX_Host_Class_Object.wzcount = value
            If Err.Number = 438 Then
                Err.Clear
                _aspx_wzcount = value
            End If
        End Set
    End Property
    Public Property pagenum
        Get
            On Error Resume Next
            pagenum = AspToAspX_Host_Class_Object.pagenum
            If Err.Number = 438 Then
                Err.Clear
                pagenum = _aspx_pagenum
            End If
        End Get
        Set(ByVal value)
            On Error Resume Next
            AspToAspX_Host_Class_Object.pagenum = value
            If Err.Number = 438 Then
                Err.Clear
                _aspx_pagenum = value
            End If
        End Set
    End Property
#End Region
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -