📄 setup.aspx.vb
字号:
Else '102
db = "\database\" & dbname & ".mdb" '103
End If '104
conn = New ADODB.Connection ( ) '105
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & Server.MapPath ( db ) '106
fso = New Scripting.FileSystemObject ( ) '108
If Not fso.folderexists ( Server.MapPath ( "database" ) ) Then
fso.CreateFolder ( ( Server.MapPath ( "database" ) ) )
End If
'111
If Err.Number Then '112
errorstr1 = "database 文件夹没有被创建!" & Err.Description '113
Err.Clear ( ) '114
End If '115
fso = Nothing '117
Ca = New ADOX.Catalog ( ) '118
Ca.Create ( ( "" & ConnStr & "" ) ) '119
Ca = Nothing '120
If Err.Number Then '121
errorstr2 = "ACCESS数据库没有被创建!因为" & Err.Description & "如果你要重新安装请删除database目录下已存在的库文件." '122
End If '123
Err.Clear ( ) '124
conn.Open ( ConnStr ) '126
If Err.Number Or AspToAspX_CheckDBNull ( errorstr2 ) < > EmptyString.Value Then '127
Err.Clear ( ) '128
conn = Nothing '129
Response.Write ( vbCrLf )
Response.Write ( "<tr><td><b>当前状态: </b><font color=""#0000EE"">浏览/编辑当前配置</font></td></tr>" & Chr ( 13 ) ) '131
Response.Write ( "<tr><td><hr noshade align=""center"" width=""100%"" size=""1""></td></tr>" & Chr ( 13 ) ) '132
Response.Write ( "<tr><td><br>" & Chr ( 13 ) ) '133
Response.Write ( "<tr><td align=""center"">" & Chr ( 13 ) ) '134
Response.Write ( "<table width=""80%"" cellspacing=""1"" bgcolor=""#000000"" border=""0"" align=""center"">" & Chr ( 13 ) ) '135
Response.Write ( "<tr bgcolor=""#085878""><td style=""color: #FFFFFF; padding-left: 10px"" width=""32%"">提示信息</td>" & Chr ( 13 ) ) '136
Response.Write ( "</tr><tr>" & Chr ( 13 ) ) '137
Response.Write ( "<td class=""message"">" & Chr ( 13 ) ) '138
Response.Write ( "<li>" & Chr ( 13 ) ) '139
If AspToAspX_CheckDBNull ( errorstr3 ) < > EmptyString.Value Then '141
Response.Write ( errorstr3 ) '142
Else '143
Response.Write ( errorstr1 & " " & errorstr2 ) '144
End If '145
Response.Write ( vbCrLf )
Response.Write ( "</li></td>" & Chr ( 13 ) ) '147
Response.Write ( "</tr></table><br>" & Chr ( 13 ) ) '148
Response.Write ( "<form method=""post"" action=""setup.aspx"">" & Chr ( 13 ) ) '149
Response.Write ( " <table width=""80%"" cellspacing=""1"" bgcolor=""#000000"" border=""0"" align=""center"">" & Chr ( 13 ) ) '150
Response.Write ( " <tr class=""header""> " & Chr ( 13 ) ) '151
Response.Write ( " <td width=""20%"">设置选项</td>" & Chr ( 13 ) ) '152
Response.Write ( " <td width=""30%"">当前值</td>" & Chr ( 13 ) ) '153
Response.Write ( " <td width=""50%"">注释</td>" & Chr ( 13 ) ) '154
Response.Write ( " </tr>" & Chr ( 13 ) ) '155
Response.Write ( " <tr> " & Chr ( 13 ) ) '156
Response.Write ( " <td class=""altbg1""> 数据库名:</td>" & Chr ( 13 ) ) '157
Response.Write ( " <td class=""altbg2""><input type=""text"" name=""dbname"" value=""ftbbs"" size=""30""></td>" & Chr ( 13 ) ) '158
Response.Write ( " <td class=""altbg1""> 数据库名称</td>" & Chr ( 13 ) ) '159
Response.Write ( " </tr>" & Chr ( 13 ) ) '160
Response.Write ( " <tr> " & Chr ( 13 ) ) '161
Response.Write ( " <td class=""altbg1""> 数据库表前缀名:</td>" & Chr ( 13 ) ) '162
Response.Write ( " <td class=""altbg2""><input name=""ft"" type=""text"" id=""ft"" value=""ft_"" size=""30""></td>" & Chr ( 13 ) ) '163
Response.Write ( " <td class=""altbg1""> 数据库表前缀名</td>" & Chr ( 13 ) ) '164
Response.Write ( " </tr>" & Chr ( 13 ) ) '165
Response.Write ( " <tr> " & Chr ( 13 ) ) '166
Response.Write ( " <td class=""altbg1""> cookies域:</td>" & Chr ( 13 ) ) '167
Response.Write ( " <td class=""altbg2""><input type=""text"" name=""cookdm"" value="""" size=""30""></td>" & Chr ( 13 ) ) '168
Response.Write ( " <td class=""altbg1""> 如你的域名是abc.com那么你可以填<font color=""#FF0000"">abc.com</font>,也可不填</td>" & Chr ( 13 ) ) '169
Response.Write ( " </tr>" & Chr ( 13 ) ) '170
Response.Write ( " <tr> " & Chr ( 13 ) ) '171
Response.Write ( " <td class=""altbg1""> 后台管理用户:</td>" & Chr ( 13 ) ) '172
Response.Write ( " <td class=""altbg2""><input name=""adminuser"" type=""text"" id=""adminuser"" value=""admin"" size=""30""></td>" & Chr ( 13 ) ) '173
Response.Write ( " <td class=""altbg1""> 系统后台管理超级用户</td>" & Chr ( 13 ) ) '174
Response.Write ( " </tr>" & Chr ( 13 ) ) '175
Response.Write ( " <tr> " & Chr ( 13 ) ) '176
Response.Write ( " <td class=""altbg1""> 管理用户密码:</td>" & Chr ( 13 ) ) '177
Response.Write ( " <td class=""altbg2""><input name=""adminpwd"" type=""password"" id=""adminpwd"" value=""123456"" size=""30""></td>" & Chr ( 13 ) ) '178
Response.Write ( " <td class=""altbg1""> 系统后台管理用户密码</td>" & Chr ( 13 ) ) '179
Response.Write ( " </tr>" & Chr ( 13 ) ) '180
Response.Write ( " </table>" & Chr ( 13 ) ) '181
Response.Write ( " <br>" & Chr ( 13 ) ) '182
Response.Write ( "<input type=""hidden"" name=""action"" value=""install"">" & Chr ( 13 ) ) '183
Response.Write ( "<input type=""button"" name=""submit"" value="" 上一步 "" style=""height: 25"" onclick=""window.location='setup.aspx'""> " & Chr ( 13 ) ) '184
Response.Write ( "<input type=""submit"" name=""submit"" value="" 下一步 "" style=""height: 25"">" & Chr ( 13 ) ) '185
Response.Write ( "</form></td></tr>" & Chr ( 13 ) ) '186
Response.Write ( " " ) '187
Else '187
Response.Write ( vbCrLf )
Response.Write ( "<tr><td><b>当前状态: </b><font color=""#0000EE"">开始安装 FTBBS</font></td></tr>" & Chr ( 13 ) ) '188
Response.Write ( "<tr><td><hr noshade align=""center"" width=""100%"" size=""1""></td></tr>" & Chr ( 13 ) ) '189
Response.Write ( "<tr><td align=""center"">" & Chr ( 13 ) ) '190
Response.Write ( "<textarea name=""notice"" style=""width: 80%; height: 330px"" readonly id=""notice"">" & Chr ( 13 ) ) '191
Response.Write ( "安装程序正在创建数据表,请您耐心的等待......" & Chr ( 13 ) ) '192
Response.Write ( "</textarea>" & Chr ( 13 ) ) '193
Response.Write ( "<br><br>" & Chr ( 13 ) ) '194
Response.Write ( "<input type=""button"" name=""submit"" value="" 正在安装... "" disabled style=""height: 25"" onclick=""window.location='default.aspx'"" id=""laststep""><br><br>" & Chr ( 13 ) ) '195
Response.Write ( "<br>" & Chr ( 13 ) ) '196
Response.Write ( "</td></tr>" & Chr ( 13 ) ) '197
strSQL = "CREATE TABLE " & ft & "BBS_Cate (" '199
strSQL = strSQL + "BBS_ID autoincrement PRIMARY KEY ," '200
strSQL = strSQL + "BBS_Cate_ID text(20) Null ," '201
strSQL = strSQL + "BBS_Cate_PID text(50) Null ," '202
strSQL = strSQL + "BBS_Cate_Name text(50) Null ," '203
strSQL = strSQL + "BBS_Cate_Topic int NOT NULL default 0," '204
strSQL = strSQL + "BBS_Cate_Reply int NOT NULL default 0," '205
strSQL = strSQL + "BBS_Cate_Manager_Name text(200) ," '206
strSQL = strSQL + "BBS_Cate_Manager_Email text(50) Null ," '207
strSQL = strSQL + "BBS_Cate_Qs int NULL default 0," '208
strSQL = strSQL + "treesign int NULL default 0," '209
strSQL = strSQL + "deleted int NOT NULL default 0," '210
strSQL = strSQL + "Initial text(1) Null ," '211
strSQL = strSQL + "display int NULL default 0," '212
strSQL = strSQL + "totop int NULL default 0," '213
strSQL = strSQL + "BBS_Cate_Note text NULL ," '214
strSQL = strSQL + "BBS_Cate_Board text NULL" '215
strSQL = strSQL + ") " '216
Conn.Execute ( strSQL ) '217
strSQL = "CREATE TABLE " & ft & "BBS_Poll (" '218
strSQL = strSQL + "id autoincrement PRIMARY KEY ," '219
strSQL = strSQL + "pid int NULL default 0," '220
strSQL = strSQL + "投票类型 text(50) Null ," '221
strSQL = strSQL + "选项内容 text(255) Null ," '222
strSQL = strSQL + "票数 int NULL default 0," '223
strSQL = strSQL + "投票用户 text NULL ," '224
strSQL = strSQL + "发布日期 smalldatetime NULL ," '225
strSQL = strSQL + "发起日期 smalldatetime NULL ," '226
strSQL = strSQL + "到期日期 smalldatetime NULL" '227
strSQL = strSQL + ") " '228
Conn.Execute ( strSQL ) '229
strSQL = "CREATE TABLE " & ft & "BBS_arrest (" '230
strSQL = strSQL + "id autoincrement PRIMARY KEY ," '231
strSQL = strSQL + "Content text(50) Null ," '232
strSQL = strSQL + "Kind text(50) Null ," '233
strSQL = strSQL + "indbdate datetime NULL default now()" '234
strSQL = strSQL + ") " '235
Conn.Execute ( strSQL ) '236
strSQL = "CREATE TABLE " & ft & "bbsmenu (" '237
strSQL = strSQL + "id autoincrement PRIMARY KEY ," '238
strSQL = strSQL + "BoardID_1 text(20) Null ," '239
strSQL = strSQL + "BoardID_2 text(20) Null ," '240
strSQL = strSQL + "pid int NULL ," '241
strSQL = strSQL + "user_id text(50) Null ," '242
strSQL = strSQL + "rename text(50) Null ," '243
strSQL = strSQL + "remail text(50) Null ," '244
strSQL = strSQL + "remenu text NULL ," '245
strSQL = strSQL + "retel text(50) Null ," '246
strSQL = strSQL + "reip text(50) Null ," '247
strSQL = strSQL + "dateh datetime NULL ," '248
strSQL = strSQL + "kind int NULL ," '249
strSQL = strSQL + "deleted int NULL ," '250
strSQL = strSQL + "usertype int NULL default 1," '251
strSQL = strSQL + "bbs_img text(50) Null ," '252
strSQL = strSQL + "bbs_img_display int NULL ," '253
strSQL = strSQL + "bbs_img_text text(100) Null ," '254
strSQL = strSQL + "img_url text(150) Null ," '255
strSQL = strSQL + "img_url_display int NULL ," '256
strSQL = strSQL + "img_url_text text(100) Null" '257
strSQL = strSQL + ") " '258
Conn.Execute ( strSQL ) '259
strSQL = "CREATE TABLE " & ft & "bbstitle (" '260
strSQL = strSQL + "id autoincrement PRIMARY KEY ," '261
strSQL = strSQL + "BoardID_1 text(20) Null ," '262
strSQL = strSQL + "BoardID_2 text(20) Null , " '263
strSQL = strSQL + "user_id text(50) Null , " '264
strSQL = strSQL + "name text(50) Null , " '265
strSQL = strSQL + "mail text(50) Null , " '266
strSQL = strSQL + "title text(150) Null , " '267
strSQL = strSQL + "menu text NULL , " '268
strSQL = strSQL + "tel text(50) Null , " '269
strSQL = strSQL + "ip text(50) Null , " '270
strSQL = strSQL + "hit int NULL default 0, " '271
strSQL = strSQL + "rep int NULL default 0, " '272
strSQL = strSQL + "dateh datetime NULL default now(), " '273
strSQL = strSQL + "deleted int NULL default 0, " '274
strSQL = strSQL + "sign int NULL default 0, " '275
strSQL = strSQL + "redate datetime NULL , " '276
strSQL = strSQL + "zhiye int NULL default 0, " '277
strSQL = strSQL + "huati int NULL default 0, " '278
strSQL = strSQL + "bbs_img text(50) Null , " '279
strSQL = strSQL + "bbs_img_display int NULL , " '280
strSQL = strSQL + "bbs_img_text text(100) Null , " '281
strSQL = strSQL + "img_url text(150) Null , " '282
strSQL = strSQL + "img_url_display int NULL , " '283
strSQL = strSQL + "img_url_text text(100) Null , " '284
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -