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

📄 setup.aspx.vb

📁 本程序修改自飞天BBS 7.0 将原来的ASP语法迁移为ASP.NET并封装成DLL ASP.NET相对ASP有更快的执行效率以及更高的并发访问量 基于ASP.NET的DLL可以运行在支持ASP
💻 VB
📖 第 1 页 / 共 5 页
字号:
' ***************************************************
' *        本程序由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 _SETUP
    Inherits System.Web.UI.Page
    Implements IHttpHandler, AspToAspX_Interface

    Public AspToAspX_Host_Class_Object As Object

Public conn
Public ConnStr
Public actionstr
Public setupurl
Public urlarr
Public charmax
Public dbname
Public ft
Public cookdm
Public adminuser
Public adminpwd
Public datestr
Public bbsfolder
Public db
Public errorstr3
Public fso
Public errorstr1
Public Ca
Public errorstr2
Public strSQL
Public filename
Public FileNL
Public arr
Public myFile
Public fileStreamObj
Public textStream
Public postmbstr
Public repostmbstr
Public repostformmbstr
Public postpollmbstr
Public treembstr
Public headmbstr
Public sitenav
Public rs As ADODB.Recordset
Public sql
Public lockfile
Public TestFile
Public ForWriting
Public treemb
    Public ASPX_INC_MD5 As _INC_MD5
    Public ASPX_ADOSTREAM As _ADOSTREAM
    Public ASPX_INSTALL_BOTTOM As _INSTALL_BOTTOM
#Region "..."
    Public Sub AspToAspX_InitIncludeFiles()
        ASPX_INC_MD5 = New _INC_MD5()
        ASPX_INC_MD5.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_INC_MD5.AspToAspX_InitIncludeFiles()
        ASPX_ADOSTREAM = New _ADOSTREAM()
        ASPX_ADOSTREAM.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_ADOSTREAM.AspToAspX_InitIncludeFiles()
        ASPX_INSTALL_BOTTOM = New _INSTALL_BOTTOM()
        ASPX_INSTALL_BOTTOM.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_INSTALL_BOTTOM.AspToAspX_InitIncludeFiles()
    End Sub

    Public Sub AspToAspX_UnloadIncludeFiles()
        ASPX_INC_MD5.AspToAspX_UnloadIncludeFiles()
        ASPX_INC_MD5 = Nothing
        ASPX_ADOSTREAM.AspToAspX_UnloadIncludeFiles()
        ASPX_ADOSTREAM = Nothing
        ASPX_INSTALL_BOTTOM.AspToAspX_UnloadIncludeFiles()
        ASPX_INSTALL_BOTTOM = 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_INC_MD5.AspToAspX_Page_Init ( )
    ASPX_ADOSTREAM.AspToAspX_Page_Init ( )
    Response.Write ( "<html><head>" & Chr ( 13 ) ) '4
    Response.Write ( "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">" & Chr ( 13 ) ) '5
    Response.Write ( "<title>飞天论坛(FTBBS)安装向导</title>" & Chr ( 13 ) ) '6
    Response.Write ( "<link rel=""stylesheet"" type=""text/css"" id=""css"" href=""install/style.css"">" & Chr ( 13 ) ) '7
    Response.Write ( "</head>" & Chr ( 13 ) ) '8
    On Error Resume Next '20
    actionstr = AspToAspX_CheckIsNothing ( Request.Form ( "action" ) ) '21
    Response.Write ( vbCrLf )
    Response.Write ( "<body bgcolor=""#085878"" text=""#000000""><table width=""95%"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=""#FFFFFF"" align=""center""><tr><td><table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center""><tr>" & Chr ( 13 ) ) '23
    Response.Write ( "          <td class=""install"" height=""30"" valign=""bottom""><font color=""#FF0000"">&gt;&gt;</font> " & Chr ( 13 ) ) '24
    Response.Write ( "            飞天论坛(FTBBS ACCESS UTF8版)&nbsp;安装向导 </td>" & Chr ( 13 ) ) '25
    Response.Write ( "    </tr><tr><td><hr noshade align=""center"" width=""100%"" size=""1""></td></tr>" & Chr ( 13 ) ) '26
    If AspToAspX_CheckDBNull ( actionstr ) = "config" Then '28
        Response.Write ( vbCrLf )
        Response.Write ( "<tr>" & Chr ( 13 ) ) '30
        Response.Write ( "          <td><b>当前状态: </b><font color=""#0000EE"">设置数据库相关参数</font></td>" & Chr ( 13 ) ) '31
        Response.Write ( "        </tr>" & Chr ( 13 ) ) '32
        Response.Write ( "<tr><td><hr noshade align=""center"" width=""100%"" size=""1""></td></tr>" & Chr ( 13 ) ) '33
        Response.Write ( "<tr><td><br>" & Chr ( 13 ) ) '34
        Response.Write ( "<tr><td align=""center"">" & Chr ( 13 ) ) '35
        Response.Write ( "<table width=""80%"" cellspacing=""1"" bgcolor=""#000000"" border=""0"" align=""center"">" & Chr ( 13 ) ) '36
        Response.Write ( "<tr bgcolor=""#085878""><td style=""color: #FFFFFF; padding-left: 10px"" width=""32%"">提示信息</td>" & Chr ( 13 ) ) '37
        Response.Write ( "</tr><tr>" & Chr ( 13 ) ) '38
        Response.Write ( "<td class=""message"">" & Chr ( 13 ) ) '39
        Response.Write ( "<li>请在下面填写您的数据库信息与后台管理员帐号信息</li>" & Chr ( 13 ) ) '40
        Response.Write ( "<li>后台管理路径为:/admin.aspx</li>" & Chr ( 13 ) ) '41
        Response.Write ( "</td>" & Chr ( 13 ) ) '42
        Response.Write ( "</tr></table><br>" & Chr ( 13 ) ) '43
        Response.Write ( "<form method=""post"" action=""setup.aspx"">" & Chr ( 13 ) ) '44
        Response.Write ( "              <table width=""80%"" cellspacing=""1"" bgcolor=""#000000"" border=""0"" align=""center"">" & Chr ( 13 ) ) '45
        Response.Write ( "                <tr class=""header""> " & Chr ( 13 ) ) '46
        Response.Write ( "                  <td width=""20%"">设置选项</td>" & Chr ( 13 ) ) '47
        Response.Write ( "                  <td width=""30%"">当前值</td>" & Chr ( 13 ) ) '48
        Response.Write ( "                  <td width=""50%"">注释</td>" & Chr ( 13 ) ) '49
        Response.Write ( "                </tr>" & Chr ( 13 ) ) '50
        Response.Write ( "                <tr> " & Chr ( 13 ) ) '51
        Response.Write ( "                  <td class=""altbg1"">&nbsp;数据库名:</td>" & Chr ( 13 ) ) '52
        Response.Write ( "                  <td class=""altbg2""><input type=""text"" name=""dbname"" value=""ftbbs""  size=""30""></td>" & Chr ( 13 ) ) '53
        Response.Write ( "                  <td class=""altbg1"">&nbsp;数据库名称</td>" & Chr ( 13 ) ) '54
        Response.Write ( "                </tr>" & Chr ( 13 ) ) '55
        Response.Write ( "                <tr> " & Chr ( 13 ) ) '56
        Response.Write ( "                  <td class=""altbg1"">&nbsp;数据库表前缀名:</td>" & Chr ( 13 ) ) '57
        Response.Write ( "                  <td class=""altbg2""><input type=""text"" name=""ft"" value=""ft_""  size=""30""></td>" & Chr ( 13 ) ) '58
        Response.Write ( "                  <td class=""altbg1"">&nbsp;数据库表前缀名</td>" & Chr ( 13 ) ) '59
        Response.Write ( "                </tr>" & Chr ( 13 ) ) '60
        Response.Write ( "                <tr> " & Chr ( 13 ) ) '61
        Response.Write ( "                  <td class=""altbg1"">&nbsp;cookies域:</td>" & Chr ( 13 ) ) '62
        Response.Write ( "                  <td class=""altbg2""><input type=""text"" name=""cookdm"" value=""""  size=""30""></td>" & Chr ( 13 ) ) '63
        Response.Write ( "                  <td class=""altbg1"">&nbsp;如你的域名是abc.com那么你可以填<font color=""#FF0000"">abc.com</font>,也可不填</td>" & Chr ( 13 ) ) '64
        Response.Write ( "                </tr>" & Chr ( 13 ) ) '65
        Response.Write ( "                <tr> " & Chr ( 13 ) ) '66
        Response.Write ( "                  <td class=""altbg1"">&nbsp;后台管理用户:</td>" & Chr ( 13 ) ) '67
        Response.Write ( "                  <td class=""altbg2""><input name=""adminuser"" type=""text"" id=""adminuser"" value=""admin""  size=""30""></td>" & Chr ( 13 ) ) '68
        Response.Write ( "                  <td class=""altbg1"">&nbsp;系统后台管理超级用户</td>" & Chr ( 13 ) ) '69
        Response.Write ( "                </tr>" & Chr ( 13 ) ) '70
        Response.Write ( "                <tr> " & Chr ( 13 ) ) '71
        Response.Write ( "                  <td class=""altbg1"">&nbsp;管理用户密码:</td>" & Chr ( 13 ) ) '72
        Response.Write ( "                  <td class=""altbg2""><input name=""adminpwd"" type=""password"" id=""adminpwd"" value=""123456""  size=""30""></td>" & Chr ( 13 ) ) '73
        Response.Write ( "                  <td class=""altbg1"">&nbsp;系统后台管理用户密码</td>" & Chr ( 13 ) ) '74
        Response.Write ( "                </tr>" & Chr ( 13 ) ) '75
        Response.Write ( "              </table>" & Chr ( 13 ) ) '76
        Response.Write ( "              <br>" & Chr ( 13 ) ) '77
        Response.Write ( "<input type=""hidden"" name=""action"" value=""install"">" & Chr ( 13 ) ) '78
        Response.Write ( "<input type=""button"" name=""submit"" value="" 上一步 "" style=""height: 25"" onclick=""window.location='setup.aspx'"">&nbsp;" & Chr ( 13 ) ) '79
        Response.Write ( "<input type=""submit"" name=""submit"" value="" 下一步 "" style=""height: 25"">" & Chr ( 13 ) ) '80
        Response.Write ( "</form></td></tr>" & Chr ( 13 ) ) '81
    ElseIf AspToAspX_CheckDBNull ( actionstr ) = "install"Then '83
        setupurl = AspToAspX_GetRequestServerVariables ( "HTTP_REFERER" ) '84
        setupurl = replace ( setupurl , "http://" , "" ) '85
        urlarr = AspToAspX_Split ( setupurl , "/" ) '86
        charmax = UBound ( urlarr ) '87
        dbname = AspToAspX_CheckIsNothing ( Request.Form ( "dbname" ) ) '88
        ft = AspToAspX_CheckIsNothing ( Request.Form ( "ft" ) ) '89
        cookdm = AspToAspX_CheckIsNothing ( Request.Form ( "cookdm" ) ) '90
        adminuser = AspToAspX_CheckIsNothing ( Request.Form ( "adminuser" ) ) '91
        adminpwd = md5 ( AspToAspX_CheckIsNothing ( Request.Form ( "adminpwd" ) ) ) '92
        datestr = AspToAspX_CheckIsNothing ( Request.Form ( "dbname" ) ) & ".mdb" '93
        If AspToAspX_CheckDBNull ( charmax ) = 2 Then '97
            bbsfolder = urlarr ( 1 ) '98
            db = "\" & bbsfolder & "\database\" & dbname & ".mdb" '99
        ElseIf AspToAspX_CheckDBNull ( charmax ) > 2 Then '100
            errorstr3 = "请不要把论坛文件放在三级以上的目录下,最好的做法是在你站点根目录下新建一文件夹如bbs<br>&nbsp;&nbsp;&nbsp;&nbsp;然后把论坛包中upload文件夹下的所有文件全部复制到新建的bbs目录下再进行安装." '101

⌨️ 快捷键说明

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