disphoto.aspx.vb

来自「本程序修改自飞天BBS 7.0 将原来的ASP语法迁移为ASP.NET并封装成」· VB 代码 · 共 451 行 · 第 1/2 页

VB
451
字号
' ***************************************************
' *        本程序由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 _DISPHOTO
    Inherits System.Web.UI.Page
    Implements IHttpHandler, AspToAspX_Interface

    Public AspToAspX_Host_Class_Object As Object

Public i
Public userid
Public id
Public photo_name
Public AspToAspX_Sign
Public tyname
Public sql
Public smt
Public wzrep
Public wzpage
Public wzpagecount
Public wzcount
Public a
Public photourl
Public fnarr
Public fn
Public linkdb
Public ft
Public ku
Public ckiesdomain
Public conndb
Public ConnectionString
Public rs As ADODB.Recordset
Public username
Public userimg
Public homepagetitle
Public cssfile
Public bokeer
Public blog_mid
Public blogheadimg
Public clubuser_id
Public rs8
    Public ASPX_CONN As _CONN
    Public ASPX_INC_PUBLICFUN As _INC_PUBLICFUN
    Public ASPX_GBTOUTF8 As _GBTOUTF8
    Public ASPX_MEMBERINFO As _MEMBERINFO
    Public ASPX_USERNAV As _USERNAV
    Public ASPX_PHOTOHEAD As _PHOTOHEAD
    Public ASPX_TAIL As _TAIL
#Region "..."
    Public Sub AspToAspX_InitIncludeFiles()
        ASPX_CONN = New _CONN()
        ASPX_CONN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_CONN.AspToAspX_InitIncludeFiles()
        ASPX_INC_PUBLICFUN = New _INC_PUBLICFUN()
        ASPX_INC_PUBLICFUN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_INC_PUBLICFUN.AspToAspX_InitIncludeFiles()
        ASPX_GBTOUTF8 = New _GBTOUTF8()
        ASPX_GBTOUTF8.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_GBTOUTF8.AspToAspX_InitIncludeFiles()
        ASPX_MEMBERINFO = New _MEMBERINFO()
        ASPX_MEMBERINFO.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_MEMBERINFO.AspToAspX_InitIncludeFiles()
        ASPX_USERNAV = New _USERNAV()
        ASPX_USERNAV.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_USERNAV.AspToAspX_InitIncludeFiles()
        ASPX_PHOTOHEAD = New _PHOTOHEAD()
        ASPX_PHOTOHEAD.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_PHOTOHEAD.AspToAspX_InitIncludeFiles()
        ASPX_TAIL = New _TAIL()
        ASPX_TAIL.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_TAIL.AspToAspX_InitIncludeFiles()
    End Sub

    Public Sub AspToAspX_UnloadIncludeFiles()
        ASPX_CONN.AspToAspX_UnloadIncludeFiles()
        ASPX_CONN = Nothing
        ASPX_INC_PUBLICFUN.AspToAspX_UnloadIncludeFiles()
        ASPX_INC_PUBLICFUN = Nothing
        ASPX_GBTOUTF8.AspToAspX_UnloadIncludeFiles()
        ASPX_GBTOUTF8 = Nothing
        ASPX_MEMBERINFO.AspToAspX_UnloadIncludeFiles()
        ASPX_MEMBERINFO = Nothing
        ASPX_USERNAV.AspToAspX_UnloadIncludeFiles()
        ASPX_USERNAV = Nothing
        ASPX_PHOTOHEAD.AspToAspX_UnloadIncludeFiles()
        ASPX_PHOTOHEAD = Nothing
        ASPX_TAIL.AspToAspX_UnloadIncludeFiles()
        ASPX_TAIL = Nothing
    End Sub

#End Region
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
        AspToAspXGlobal.Application = Application
        AspToAspXGlobal.Server = Server
        AspToAspXGlobal.Response = Response
        AspToAspXGlobal.Request = Request
        AspToAspXGlobal.Session = Session
        AspToAspX_Host_Class_Object = Me
        AspToAspX_InitIncludeFiles()
        AspToAspX_Page_Init()
        End Sub
    Public Sub AspToAspX_Page_Init()
    On Error GoTo _AspToAspX_Err
    ASPX_CONN.AspToAspX_Page_Init ( )
    ASPX_INC_PUBLICFUN.AspToAspX_Page_Init ( )
    ASPX_GBTOUTF8.AspToAspX_Page_Init ( )
    userid = AspToAspX_CInt ( ( Request.QueryString ( "userid" ) ) ) '5
    id = AspToAspX_CInt ( ( Request.QueryString ( "id" ) ) ) '6
    photo_name = Checkstr ( Request ( "photo_name" ) ) '7
    AspToAspX_Sign = Request.QueryString ( "sign" ) '8
    If AspToAspX_CheckDBNull ( Session ( "passok" ) ) < > EmptyString.Value And AspToAspX_CheckDBNull ( Session ( "userid" ) ) = userid Then '9
        AspToAspX_Sign = "(sign=0 or sign=2)" '10
    Else '11
        AspToAspX_Sign = "sign=0" '12
    End If '13
    tyname = "photo_name" '14
    Response.Write ( vbCrLf )
    ASPX_MEMBERINFO.AspToAspX_Page_Init ( )
    Response.Write ( "<html><head><meta http-equiv=content-type content=""text/html; charset=utf-8"">" & Chr ( 13 ) ) '17
    Response.Write ( "<title>" ) '18
    Response.Write ( username ) '18
    Response.Write ( "的个人相册</title>" & Chr ( 13 ) ) '18
    Response.Write ( "<link rel=""stylesheet"" type=""text/css"" href=""" ) '19
    Response.Write ( cssfile ) '19
    Response.Write ( """>" & Chr ( 13 ) ) '19
    Response.Write ( "</head>" & Chr ( 13 ) ) '20
    Response.Write ( "<body>" & Chr ( 13 ) ) '21
    Response.Write ( "<center>" & Chr ( 13 ) ) '22
    ASPX_USERNAV.AspToAspX_Page_Init ( )
    ASPX_PHOTOHEAD.AspToAspX_Page_Init ( )
    Response.Write ( "<div class=""stage"">" & Chr ( 13 ) ) '25
    Response.Write ( "<div class=""stagepad"">" & Chr ( 13 ) ) '26
    Response.Write ( "<div style=""width:100%"">" & Chr ( 13 ) ) '27
    Response.Write ( "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" class=""modth"">" & Chr ( 13 ) ) '28
    Response.Write ( "<tr><td class=""modtl"" width=""7"">&nbsp;</td>" & Chr ( 13 ) ) '29
    Response.Write ( "<td class=""modtc"" nowrap><div class=""modhead""><a href=""myphoto.aspx?id=" ) '30
    Response.Write ( id ) '30
    Response.Write ( "&userid=" ) '30
    Response.Write ( userid ) '30
    Response.Write ( """ class=""modtit"">相册列表</a> &gt;&gt; <span class=""modtit"">" ) '30
    Response.Write ( Request ( "photo_name" ) ) '30
    Response.Write ( "</span></div></td>" & Chr ( 13 ) ) '30
    Response.Write ( "<td class=""modtc"" nowrap align=""right""></td>" & Chr ( 13 ) ) '31
    Response.Write ( "<td class=""modtr"" width=""7"">&nbsp;</td>" & Chr ( 13 ) ) '32
    Response.Write ( "</tr></table>" & Chr ( 13 ) ) '33
    Response.Write ( "<div id=""m_albumlist"" class=""modbox"">" & Chr ( 13 ) ) '34
    Response.Write ( "<!--<strong>简介:</strong>-->" & Chr ( 13 ) ) '35
    Response.Write ( "<div style=""width:100%"">" & Chr ( 13 ) ) '36
    Response.Write ( "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & Chr ( 13 ) ) '37
    Response.Write ( "<tr>" & Chr ( 13 ) ) '38
    sql = "SELECT * FROM " & ft & "ftbbs_upload WHERE (bbs_blog_type=1 or bbs_blog_type=2) and photo_name='" & photo_name & "' and clubuser_id=" & userid & " and " & AspToAspX_Sign & " order by indate desc" '40
    smt = New ADODB.Recordset ( ) '41
    smt.Open ( sql , conn , 3 , 1 ) '42
    If Not smt.EOF Then '43
        wzrep = 20 '44
        wzpage = AspToAspX_CInt ( ( Request.QueryString ( "page" ) ) ) '45
    If AspToAspX_Len ( wzpage ) = 0 Or AspToAspX_CheckDBNull ( wzpage ) = 0 Then
wzpage = 1
End If
    '46
        smt.PageSize = wzrep '47
        smt.AbsolutePage = wzpage '48
        wzpagecount = smt.PageCount '49
        wzcount = smt.RecordCount '50
        a = 0 '51
        For i = 0 To Val ( wzrep ) - 1 '52
        If smt.EOF Then
Exit For
End If
    '53
            If AspToAspX_CheckDBNull ( AspToAspX_CheckDBNull(smt.Fields ( "bbs_blog_type" ) .Value) ) = 2 Then '54
                photourl = AspToAspX_CheckDBNull(smt.Fields ( "upload_pic" ) .Value) '55
            Else '56
                photourl = AspToAspX_CheckDBNull(smt.Fields ( "upload_pic" ) .Value) '57
            End If '58
            fnarr = AspToAspX_Split ( AspToAspX_CheckDBNull(smt.Fields ( "upload_pic" ) .Value) , "/" ) '59
            fn = fnarr ( UBound ( fnarr ) ) '60
            Response.Write ( vbCrLf )
            Response.Write ( "<td align=""center"" valign=""bottom"" width=""25%"">" & Chr ( 13 ) ) '62
            Response.Write ( "" & Chr ( 9 ) & "<a href=""mypic.aspx?id=" ) '63
            Response.Write ( AspToAspX_CheckDBNull(smt.Fields ( "id" ) .Value) ) '63
            Response.Write ( "&userid=" ) '63
            Response.Write ( userid ) '63
            Response.Write ( "&photo_name=" ) '63
            Response.Write ( GBtoUTF8 ( AspToAspX_CheckDBNull(smt.Fields ( "photo_name" ) .Value) ) ) '63
            Response.Write ( """ target=""_blank""><img src=""" ) '63
            Response.Write ( photourl ) '63
            Response.Write ( """ width=""200"" border=""0"" resize=""1""></a>" & Chr ( 13 ) ) '63
            Response.Write ( "" & Chr ( 9 ) & "<div class=""tit""><span class=""size"">" ) '64
            Response.Write ( AspToAspX_CheckDBNull(smt.Fields ( "upload_size" ) .Value) ) '64
            Response.Write ( "K</span><br>" ) '64
            Response.Write ( fn ) '64
            Response.Write ( "</div>" & Chr ( 13 ) ) '64
            Response.Write ( "</td>" & Chr ( 13 ) ) '65
            a = a + 1 '67
            If AspToAspX_CheckDBNull ( a Mod 4 ) = 0 Then '68
                Response.Write ( "</tr><tr><td colspan=""4""><div class=""line"">&nbsp;</div></td></tr><tr>" ) '69
            End If '70
            smt.MoveNext ( ) '71
        Next '72
    End If '73
    Response.Write ( vbCrLf )
    Response.Write ( "</tr>" & Chr ( 13 ) ) '75
    Response.Write ( "</tr><tr><td colspan=""4""><div class=""line"">&nbsp;</div></td></tr><tr>" & Chr ( 13 ) ) '76
    Response.Write ( "</table>" & Chr ( 13 ) ) '77
    Response.Write ( "<div id=""page"">" ) '78
    Response.Write ( pagenar ( wzpagecount , userid , tyname , photo_name ) ) '78
    Response.Write ( "</div>" & Chr ( 13 ) ) '78
    Response.Write ( "</div>" & Chr ( 13 ) ) '79
    Response.Write ( "</div>" & Chr ( 13 ) ) '80
    Response.Write ( "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" height=""8"">" & Chr ( 13 ) ) '81
    Response.Write ( "<tr><td class=""modbl"" width=""7"">&nbsp;</td>" & Chr ( 13 ) ) '82
    Response.Write ( "<td class=""modbc"">&nbsp;</td>" & Chr ( 13 ) ) '83
    Response.Write ( "<td class=""modbr"" width=""7"">&nbsp;</td>" & Chr ( 13 ) ) '84
    Response.Write ( "</tr></table>" & Chr ( 13 ) ) '85

⌨️ 快捷键说明

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