📄 login.bas
字号:
Attribute VB_Name = "login"
'管理员登录---------------------------------------
Sub log()
If login_form.a_name.Text = "" Then
MsgBox "管理员登录名不能为空", vbInformation, "T6-G4"
Exit Sub
End If
ado.admin_rs.MoveFirst
While Not ado.admin_rs.EOF
If login_form.a_name.Text = ado.admin_rs.Fields("a_name") Then
GoTo li:
End If
ado.admin_rs.MoveNext
Wend
MsgBox "管理员登录名错误", vbInformation, "T6-G4"
Exit Sub
If login_form.pwd.Text = "" Then
MsgBox "密码不能为空", vbInformation, "T6-G4"
Exit Sub
End If
li:
If login_form.pwd.Text = ado.admin_rs.Fields("a_pwd") Then
GoTo nn:
Else
MsgBox "密码错误", vbInformation, "T6-G4"
Exit Sub
End If
nn:
If login_form.adm_type.Text = "超级用户" And ado.admin_rs.Fields("a_type").Value = "超级用户" Then
main_form.Show
ini_form.operator_a = login_form.a_name.Text
login_form.Hide
Exit Sub
End If
If login_form.adm_type.Text = "普通用户" And ado.admin_rs.Fields("a_type").Value = "普通用户" Then
ini_form.operator_a = login_form.a_name.Text
main_form.Show
Call sys.log_normal
login_form.Hide
Exit Sub
End If
MsgBox "用户类型错误", vbInformation, "T6-G4"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -