📄 modadmin.aspx.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 _BBSADMIN_MODADMIN
Inherits System.Web.UI.Page
Implements IHttpHandler, AspToAspX_Interface
Public AspToAspX_Host_Class_Object As Object
Public id
Public offon
Public AspToAspX_Str
Public rs As ADODB.Recordset
Public adminqs
Public sql
Public linkdb
Public ft
Public ku
Public ckiesdomain
Public conndb
Public ConnectionString
Public ASPX_CONN As _CONN
Public ASPX_ADMIN_CHECK_MASTER As _ADMIN_CHECK_MASTER
Public ASPX_INC_MD5 As _INC_MD5
#Region "..."
Public Sub AspToAspX_InitIncludeFiles()
ASPX_CONN = New _CONN()
ASPX_CONN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_CONN.AspToAspX_InitIncludeFiles()
ASPX_ADMIN_CHECK_MASTER = New _ADMIN_CHECK_MASTER()
ASPX_ADMIN_CHECK_MASTER.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_ADMIN_CHECK_MASTER.AspToAspX_InitIncludeFiles()
ASPX_INC_MD5 = New _INC_MD5()
ASPX_INC_MD5.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_INC_MD5.AspToAspX_InitIncludeFiles()
End Sub
Public Sub AspToAspX_UnloadIncludeFiles()
ASPX_CONN.AspToAspX_UnloadIncludeFiles()
ASPX_CONN = Nothing
ASPX_ADMIN_CHECK_MASTER.AspToAspX_UnloadIncludeFiles()
ASPX_ADMIN_CHECK_MASTER = Nothing
ASPX_INC_MD5.AspToAspX_UnloadIncludeFiles()
ASPX_INC_MD5 = 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_ADMIN_CHECK_MASTER.AspToAspX_Page_Init ( )
ASPX_INC_MD5.AspToAspX_Page_Init ( )
id = Request ( "id" ) '5
If AspToAspX_CheckDBNull ( Session ( "qs" ) ) < > 2 Then '6
offon = " disabled" '7
End If '8
AspToAspX_Str = "select * from " & ft & "ftbbs_admin where id=" & id '9
rs = New ADODB.Recordset ( ) '10
rs.Open ( AspToAspX_Str , conn , 1 , 1 ) '11
If AspToAspX_CheckIsNothing ( Request.Form ( "admin_pwd" ) ) < > EmptyString.Value Then '12
If AspToAspX_CheckDBNull ( AspToAspX_CheckDBNull(rs.Fields ( "admin_pwd" ) .Value) ) = md5 ( Request ( "old_admin_pwd" ) ) Or AspToAspX_CheckDBNull ( Session ( "qs" ) ) = 2 Then '13
If AspToAspX_CheckIsNothing ( Request.Form ( "adminqs" ) ) = EmptyString.Value Then '14
adminqs = "0,0,0" '15
Else '16
adminqs = AspToAspX_CheckIsNothing ( Request.Form ( "adminqs" ) ) '17
End If '18
If AspToAspX_CheckDBNull ( Session ( "qs" ) ) = 2 Then '19
sql = "update " & ft & "ftbbs_admin set admin_pwd='" & md5 ( AspToAspX_CheckIsNothing ( Request.Form ( "admin_pwd" ) ) ) & "',adminqs='" & adminqs & "' where id=" & id '20
Else '21
sql = "update " & ft & "ftbbs_admin set admin_pwd='" & md5 ( AspToAspX_CheckIsNothing ( Request.Form ( "admin_pwd" ) ) ) & "' where id=" & id '22
End If '23
conn.Execute ( sql ) '24
If AspToAspX_CheckDBNull ( Session ( "admin_user" ) ) = AspToAspX_CheckIsNothing ( Request.Form ( "mod_user" ) ) Then '25
Session ( "admin_qs" ) = AspToAspX_CheckIsNothing ( Request.Form ( "adminqs" ) ) '26
Session ( "admin_pwd" ) = md5 ( AspToAspX_CheckIsNothing ( Request.Form ( "admin_pwd" ) ) ) '27
End If '28
AspToAspX_Response_Redirect ( "ftbbs_admin.aspx" ) '29
Else '30
Response.Write ( "<SCRIPT language=JavaScript>alert('对不起,你输入的旧密码是错误的,密码修改不成功!');" ) '31
Response.Write ( "history.go(-1);" ) '32
Response.Write ( "</script>" ) '33
Response.End ( ) '34
End If '35
End If '36
Response.Write ( vbCrLf )
Response.Write ( "<html>" & Chr ( 13 ) ) '38
Response.Write ( "<head>" & Chr ( 13 ) ) '39
Response.Write ( "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">" & Chr ( 13 ) ) '40
Response.Write ( "<title>修改管理用户</title>" & Chr ( 13 ) ) '41
Response.Write ( "<link href=""../css/xmwuye.css"" rel=""stylesheet"" type=""text/css"">" & Chr ( 13 ) ) '42
Response.Write ( "</head>" & Chr ( 13 ) ) '43
Response.Write ( "<body>" & Chr ( 13 ) ) '44
Response.Write ( " <br>" & Chr ( 13 ) ) '45
Response.Write ( " <br>" & Chr ( 13 ) ) '46
Response.Write ( " <br>" & Chr ( 13 ) ) '47
Response.Write ( " <br>" & Chr ( 13 ) ) '48
Response.Write ( " <table width=""71%"" border=""0"" align=""center"">" & Chr ( 13 ) ) '49
Response.Write ( " <form name=""form1"" method=""post"" action="""">" & Chr ( 13 ) ) '50
Response.Write ( " <tr bgcolor=""f8f8f8""> " & Chr ( 13 ) ) '51
Response.Write ( " <td height=""30"" colspan=""2""> <div align=""center"">修改密码</div></td>" & Chr ( 13 ) ) '52
Response.Write ( " </tr>" & Chr ( 13 ) ) '53
Response.Write ( " <tr bgcolor=""f8f8f8""> " & Chr ( 13 ) ) '54
Response.Write ( " <td width=""24%"" height=""30""> <div align=""right"">旧密码:</div></td>" & Chr ( 13 ) ) '55
Response.Write ( " <td width=""76%"" height=""30""> <input name=""old_admin_pwd"" type=""text"" size=""26""></td>" & Chr ( 13 ) ) '56
Response.Write ( " </tr>" & Chr ( 13 ) ) '57
Response.Write ( " <tr bgcolor=""f8f8f8""> " & Chr ( 13 ) ) '58
Response.Write ( " <td width=""24%"" height=""30""> <div align=""right"">新密码:</div></td>" & Chr ( 13 ) ) '59
Response.Write ( " <td width=""76%"" height=""30""> <input name=""admin_pwd"" type=""password"" size=""26""></td>" & Chr ( 13 ) ) '60
Response.Write ( " </tr>" & Chr ( 13 ) ) '61
Response.Write ( " <tr bgcolor=""f8f8f8""> " & Chr ( 13 ) ) '62
Response.Write ( " <td height=""30""> " & Chr ( 13 ) ) '63
Response.Write ( " <div align=""right"">操作权限:</div></td>" & Chr ( 13 ) ) '64
Response.Write ( " <td height=""30""><input name=""adminqs"" type=""checkbox"" id=""adminqs"" value=""1"" " ) '65
If AspToAspX_CheckDBNull ( InStr ( AspToAspX_CheckDBNull(rs.Fields ( "adminqs" ) .Value) , 1 ) ) > 0 Then '65
Response.Write ( "checked" ) '65
End If '65
Response.Write ( " " ) '65
Response.Write ( offon ) '65
Response.Write ( ">" & Chr ( 13 ) ) '65
Response.Write ( " 添加 " & Chr ( 13 ) ) '66
Response.Write ( " <input name=""adminqs"" type=""checkbox"" id=""adminqs"" value=""2"" " ) '67
If AspToAspX_CheckDBNull ( InStr ( AspToAspX_CheckDBNull(rs.Fields ( "adminqs" ) .Value) , 2 ) ) > 0 Then '67
Response.Write ( "checked" ) '67
End If '67
Response.Write ( " " ) '67
Response.Write ( offon ) '67
Response.Write ( ">" & Chr ( 13 ) ) '67
Response.Write ( " 修改 " & Chr ( 13 ) ) '68
Response.Write ( " <input name=""adminqs"" type=""checkbox"" id=""adminqs"" value=""3"" " ) '69
If AspToAspX_CheckDBNull ( InStr ( AspToAspX_CheckDBNull(rs.Fields ( "adminqs" ) .Value) , 3 ) ) > 0 Then '69
Response.Write ( "checked" ) '69
End If '69
Response.Write ( " " ) '69
Response.Write ( offon ) '69
Response.Write ( ">" & Chr ( 13 ) ) '69
Response.Write ( " 删除</td>" & Chr ( 13 ) ) '70
Response.Write ( " </tr>" & Chr ( 13 ) ) '71
Response.Write ( " <tr bgcolor=""f8f8f8""> " & Chr ( 13 ) ) '72
Response.Write ( " <td height=""30""> </td>" & Chr ( 13 ) ) '73
Response.Write ( " <td height=""30""><input type=""submit"" name=""Submit"" value=""修改""> <input name=""id"" type=""hidden"" id=""id"" value=""" ) '74
Response.Write ( Request ( "id" ) ) '74
Response.Write ( """>" & Chr ( 13 ) ) '74
Response.Write ( " <input name=""mod_user"" type=""hidden"" id=""mod_user"" value=""" ) '75
Response.Write ( Request ( "mod_user" ) ) '75
Response.Write ( """></td>" & Chr ( 13 ) ) '75
Response.Write ( " </tr>" & Chr ( 13 ) ) '76
Response.Write ( "" & Chr ( 9 ) & "</form>" & Chr ( 13 ) ) '77
Response.Write ( " </table>" & Chr ( 13 ) ) '78
Response.Write ( "</body>" & Chr ( 13 ) ) '79
Response.Write ( "</html>" & Chr ( 13 ) ) '80
AspToAspX_UnloadIncludeFiles()
Exit Sub
_AspToAspX_Err:
AspToAspX_WriteLog ("modadmin_aspx Page_Init:" & Err.Description)
Resume Next
End Sub
#Region "..."
Public Property conn
Get
conn = ASPX_CONN.conn
End Get
Set(ByVal value)
ASPX_CONN.conn = value
End Set
End Property
Public Property qs
Get
qs = ASPX_CONN.qs
End Get
Set(ByVal value)
ASPX_CONN.qs = value
End Set
End Property
Public Property errc
Get
errc = ASPX_CONN.errc
End Get
Set(ByVal value)
ASPX_CONN.errc = value
End Set
End Property
Public Property iii
Get
iii = ASPX_CONN.iii
End Get
Set(ByVal value)
ASPX_CONN.iii = value
End Set
End Property
Public Property nothis
Get
nothis = ASPX_CONN.nothis
End Get
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -