Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VERSION 5.00
- Begin VB.Form form2
- BackColor = &H00FF8080&
- Caption = "LOGIN"
- ClientHeight = 11460
- ClientLeft = 225
- ClientTop = 525
- ClientWidth = 14985
- LinkTopic = "Form2"
- ScaleHeight = 11460
- ScaleWidth = 14985
- StartUpPosition = 3 'Windows Default
- WindowState = 2 'Maximized
- Begin VB.Timer Timer1
- Interval = 500
- Left = 0
- Top = 120
- End
- Begin VB.Frame Frame2
- BackColor = &H00FF8080&
- Caption = "LOG_IN_CUSTOMERS"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3855
- Left = 10200
- TabIndex = 13
- Top = 3480
- Width = 5535
- Begin VB.CommandButton Command6
- BackColor = &H00FF8080&
- Caption = "REGISTOR NOW"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 2640
- Style = 1 'Graphical
- TabIndex = 7
- Top = 2520
- Width = 2055
- End
- Begin VB.CommandButton Command5
- BackColor = &H00FF8080&
- Caption = "LOG_IN"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 600
- Style = 1 'Graphical
- TabIndex = 6
- Top = 2520
- Width = 1455
- End
- Begin VB.TextBox Text4
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- IMEMode = 3 'DISABLE
- Left = 3000
- PasswordChar = "*"
- TabIndex = 5
- Top = 1560
- Width = 1935
- End
- Begin VB.TextBox Text3
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- Left = 3000
- TabIndex = 4
- Top = 600
- Width = 1935
- End
- Begin VB.Label Label2
- BackColor = &H00FF8080&
- BackStyle = 0 'Transparent
- Caption = "PASSWORD"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- Left = 840
- TabIndex = 15
- Top = 1560
- Width = 1575
- End
- Begin VB.Label Label1
- BackColor = &H00FF8080&
- BackStyle = 0 'Transparent
- Caption = "USER NAME"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- Left = 840
- TabIndex = 14
- Top = 600
- Width = 1815
- End
- End
- Begin VB.CommandButton Command2
- BackColor = &H00FF8080&
- Caption = "EXIT"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 7680
- MaskColor = &H00FF8080&
- Style = 1 'Graphical
- TabIndex = 10
- Top = 9720
- Width = 2055
- End
- Begin VB.CommandButton Command1
- BackColor = &H00FF8080&
- Caption = "GUEST"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 7680
- MaskColor = &H00FF8080&
- Style = 1 'Graphical
- TabIndex = 8
- Top = 8520
- Width = 2055
- End
- Begin VB.Frame Frame1
- BackColor = &H00FF8080&
- Caption = "LOG_IN_ADMIN"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3855
- Left = 1800
- TabIndex = 9
- Top = 3480
- Width = 5535
- Begin VB.CommandButton Command4
- BackColor = &H00FF8080&
- Caption = "&CANCEL"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 2880
- Style = 1 'Graphical
- TabIndex = 3
- Top = 2640
- Width = 1575
- End
- Begin VB.TextBox Text2
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- IMEMode = 3 'DISABLE
- Left = 2520
- PasswordChar = "*"
- TabIndex = 1
- Top = 1680
- Width = 2175
- End
- Begin VB.TextBox Text1
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- Left = 2520
- TabIndex = 0
- Top = 840
- Width = 2175
- End
- Begin VB.CommandButton Command3
- Appearance = 0 'Flat
- BackColor = &H00FF8080&
- Caption = "&LOGIN"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 855
- Left = 720
- MaskColor = &H00FFC0C0&
- Style = 1 'Graphical
- TabIndex = 2
- ToolTipText = "click to login"
- Top = 2640
- UseMaskColor = -1 'True
- Width = 1575
- End
- Begin VB.Label Label4
- BackColor = &H00FFC0C0&
- BackStyle = 0 'Transparent
- Caption = "PASSWORD"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- Left = 240
- TabIndex = 12
- Top = 1800
- Width = 1335
- End
- Begin VB.Label Label3
- BackColor = &H00FFC0C0&
- BackStyle = 0 'Transparent
- Caption = "ADMIN"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 495
- Left = 360
- TabIndex = 11
- Top = 960
- Width = 1335
- End
- End
- Begin VB.Shape Shape1
- BackColor = &H00FFC0C0&
- FillColor = &H00FFC0C0&
- FillStyle = 0 'Solid
- Height = 2775
- Left = 7080
- Shape = 4 'Rounded Rectangle
- Top = 8160
- Width = 3255
- End
- Begin VB.Label Label5
- BackStyle = 0 'Transparent
- Caption = "PROJECT ON MOBILE BILLING"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 24
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1095
- Left = 5280
- TabIndex = 16
- Top = 2040
- Width = 7695
- End
- Begin VB.Image Image1
- Height = 1380
- Left = 0
- Picture = "Form2.frx":0000
- Top = 0
- Width = 18855
- End
- End
- Attribute VB_Name = "form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim cn As New ADODB.Connection
- Dim rs As New ADODB.Recordset
- Dim rs1 As New ADODB.Recordset
- Dim rs2 As New ADODB.Recordset
- Dim rs3 As New ADODB.Recordset
- Dim rs4 As New ADODB.Recordset
- Dim rs5 As New ADODB.Recordset
- Dim rs6 As New ADODB.Recordset
- Dim cnt
- Private Sub Command1_Click()
- g = 1
- Form14.Show
- Unload Me
- End Sub
- Private Sub Command2_Click()
- Unload Me
- thanks.Show
- End Sub
- Private Sub Command3_Click()
- If (Text1.Text = "admin") And (Text2.Text = "admin") Then
- adminmenu.Show
- Unload Me
- Else
- MsgBox "invalid username or password"
- Text1.Text = ""
- Text2.Text = ""
- Text1.SetFocus
- End If
- End Sub
- Private Sub Command4_Click()
- thanks.Show
- Unload Me
- End Sub
- Private Sub Command5_Click()
- e = 0
- 'blank field
- If Text3.Text = Empty Or Text4.Text = Empty Then
- MsgBox "ENTER COMPLETE INFORMATION:"
- Text3.Locked = False
- Text4.Locked = False
- Text3.Text = ""
- Text4.Text = ""
- Text3.SetFocus
- e = 1
- End If
- If e = 0 Then
- Set rs6 = cn.Execute("select count(cid) from register where USERNAME='" & Text3.Text & "'")
- cnt = rs6.Fields(0)
- If cnt = 0 Then
- MsgBox "CUSTOMER WITH THIS USER NAME DOESN'T EXIST:", vbOKOnly
- Text3.Locked = False
- Text4.Locked = False
- Text3.Text = ""
- Text4.Text = ""
- Text3.SetFocus
- Else
- Set rs6 = cn.Execute("select *from register where USERNAME='" & Text3.Text & "'")
- If rs6.EOF = False Then
- If StrComp(rs6.Fields("password"), Text4.Text, vbTextCompare) = 0 Then
- customerlogin.Show
- Unload Me
- Else
- MsgBox "INVALID PASSWORD:"
- Text3.Text = ""
- Text4.Text = ""
- Text3.SetFocus
- End If
- End If
- End If
- End If
- End Sub
- Private Sub Command6_Click()
- registration.Show
- Unload Me
- End Sub
- Private Sub Form_Load()
- dbname = App.Path & "\stddata.mdb"
- cn.Open "provider=microsoft.jet.oledb.4.0;data source=" & dbname & ";jet oledb:database password=jittdenishan"
- End Sub
- Private Sub Label6_Click()
- registration.Show
- Unload Me
- End Sub
- Private Sub Timer1_Timer()
- Label5.ForeColor = QBColor(Rnd * 15)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement