?? login.dob
字號(hào):
VERSION 5.00
Begin VB.UserDocument Login
BackColor = &H00C0C0FF&
ClientHeight = 9000
ClientLeft = 0
ClientTop = 0
ClientWidth = 12000
HScrollSmallChange= 225
ScaleHeight = 9000
ScaleWidth = 12000
VScrollSmallChange= 225
Begin VB.Frame Frame1
BackColor = &H00E0E0E0&
BorderStyle = 0 'None
Height = 2295
Left = 2880
TabIndex = 4
Top = 3360
Width = 5280
Begin VB.TextBox txtUserName
Height = 345
Left = 2025
TabIndex = 0
Top = 480
Width = 2325
End
Begin VB.CommandButton cmdOK
Caption = "登 錄"
Default = -1 'True
Height = 390
Left = 2640
Style = 1 'Graphical
TabIndex = 2
Top = 1680
Width = 1140
End
Begin VB.TextBox txtPassword
Height = 345
IMEMode = 3 'DISABLE
Left = 2025
PasswordChar = "*"
TabIndex = 1
Top = 870
Width = 2325
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "用戶名(&U):"
Height = 270
Index = 0
Left = 1080
TabIndex = 6
Top = 600
Width = 1080
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "口 令(&P):"
Height = 270
Index = 1
Left = 1080
TabIndex = 5
Top = 960
Width = 1080
End
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H8000000E&
BackStyle = 0 'Transparent
Caption = "圖書(shū)管理系統(tǒng)"
BeginProperty Font
Name = "楷體_GB2312"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 525
Left = 3840
TabIndex = 3
Top = 1080
Width = 3330
End
End
Attribute VB_Name = "Login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private Sub cmdOK_Click()
Dim strUserName As String
Dim strPassword As String
Dim strTargetAsp As String
Dim conn As ADODB.Connection
Dim rsLogin As ADODB.Recordset
Dim strSQL As String
If Trim(txtUserName.Text) = "" Then
MsgBox "“用戶名”不能為空!"
Exit Sub
Else
strUserName = Trim(txtUserName.Text)
End If
If Trim(txtPassword.Text) = "" Then
MsgBox "“口令”不能為空!"
Exit Sub
Else
strPassword = Trim(txtPassword.Text)
End If
'檢查口令、用戶身份
Set conn = New ADODB.Connection
conn.ConnectionString = pConn
conn.Open
strUserName = Replace(strUserName, "'", "''")
strSQL = "select * from 職員 where username='" & strUserName & "' and 口令='" & strPassword & "'"
Set rsLogin = conn.Execute(strSQL)
If rsLogin.EOF Or rsLogin.BOF Then
MsgBox "用戶名或口令錯(cuò)誤,請(qǐng)檢查!"
txtPassword.SelStart = 0
txtPassword.SelLength = Len(txtPassword.Text)
txtPassword.SetFocus
Else
Select Case rsLogin("權(quán)限")
Case "院領(lǐng)導(dǎo)"
strTargetAsp = "LeadersMain.asp"
Case "主任"
strTargetAsp = "ZHURENMAIN.asp"
Case "秘書(shū)"
strTargetAsp = "MiShuMain.asp"
Case "圖書(shū)管理員"
strTargetAsp = "TuShuManagerMain.asp"
Case Else
strTargetAsp = "OthersMain.asp"
End Select
SaveSetting "JGYOA", "Login", "UserName", strUserName
Hyperlink.NavigateTo "HTTP://" & pIP & "/oa/" & strTargetAsp
End If
'釋放變量
Set rsLogin = Nothing
Set conn = Nothing
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -