Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.43 KB | None | 0 0
  1. VERSION 5.00
  2. Begin VB.Form form2
  3. BackColor = &H00FF8080&
  4. Caption = "LOGIN"
  5. ClientHeight = 11460
  6. ClientLeft = 225
  7. ClientTop = 525
  8. ClientWidth = 14985
  9. LinkTopic = "Form2"
  10. ScaleHeight = 11460
  11. ScaleWidth = 14985
  12. StartUpPosition = 3 'Windows Default
  13. WindowState = 2 'Maximized
  14. Begin VB.Timer Timer1
  15. Interval = 500
  16. Left = 0
  17. Top = 120
  18. End
  19. Begin VB.Frame Frame2
  20. BackColor = &H00FF8080&
  21. Caption = "LOG_IN_CUSTOMERS"
  22. BeginProperty Font
  23. Name = "MS Sans Serif"
  24. Size = 12
  25. Charset = 0
  26. Weight = 400
  27. Underline = 0 'False
  28. Italic = 0 'False
  29. Strikethrough = 0 'False
  30. EndProperty
  31. Height = 3855
  32. Left = 10200
  33. TabIndex = 13
  34. Top = 3480
  35. Width = 5535
  36. Begin VB.CommandButton Command6
  37. BackColor = &H00FF8080&
  38. Caption = "REGISTOR NOW"
  39. BeginProperty Font
  40. Name = "MS Sans Serif"
  41. Size = 12
  42. Charset = 0
  43. Weight = 700
  44. Underline = 0 'False
  45. Italic = 0 'False
  46. Strikethrough = 0 'False
  47. EndProperty
  48. Height = 855
  49. Left = 2640
  50. Style = 1 'Graphical
  51. TabIndex = 7
  52. Top = 2520
  53. Width = 2055
  54. End
  55. Begin VB.CommandButton Command5
  56. BackColor = &H00FF8080&
  57. Caption = "LOG_IN"
  58. BeginProperty Font
  59. Name = "MS Sans Serif"
  60. Size = 12
  61. Charset = 0
  62. Weight = 700
  63. Underline = 0 'False
  64. Italic = 0 'False
  65. Strikethrough = 0 'False
  66. EndProperty
  67. Height = 855
  68. Left = 600
  69. Style = 1 'Graphical
  70. TabIndex = 6
  71. Top = 2520
  72. Width = 1455
  73. End
  74. Begin VB.TextBox Text4
  75. BeginProperty Font
  76. Name = "MS Sans Serif"
  77. Size = 12
  78. Charset = 0
  79. Weight = 700
  80. Underline = 0 'False
  81. Italic = 0 'False
  82. Strikethrough = 0 'False
  83. EndProperty
  84. ForeColor = &H000000FF&
  85. Height = 495
  86. IMEMode = 3 'DISABLE
  87. Left = 3000
  88. PasswordChar = "*"
  89. TabIndex = 5
  90. Top = 1560
  91. Width = 1935
  92. End
  93. Begin VB.TextBox Text3
  94. BeginProperty Font
  95. Name = "MS Sans Serif"
  96. Size = 12
  97. Charset = 0
  98. Weight = 700
  99. Underline = 0 'False
  100. Italic = 0 'False
  101. Strikethrough = 0 'False
  102. EndProperty
  103. ForeColor = &H000000FF&
  104. Height = 495
  105. Left = 3000
  106. TabIndex = 4
  107. Top = 600
  108. Width = 1935
  109. End
  110. Begin VB.Label Label2
  111. BackColor = &H00FF8080&
  112. BackStyle = 0 'Transparent
  113. Caption = "PASSWORD"
  114. BeginProperty Font
  115. Name = "MS Sans Serif"
  116. Size = 12
  117. Charset = 0
  118. Weight = 700
  119. Underline = 0 'False
  120. Italic = 0 'False
  121. Strikethrough = 0 'False
  122. EndProperty
  123. ForeColor = &H000000FF&
  124. Height = 495
  125. Left = 840
  126. TabIndex = 15
  127. Top = 1560
  128. Width = 1575
  129. End
  130. Begin VB.Label Label1
  131. BackColor = &H00FF8080&
  132. BackStyle = 0 'Transparent
  133. Caption = "USER NAME"
  134. BeginProperty Font
  135. Name = "MS Sans Serif"
  136. Size = 12
  137. Charset = 0
  138. Weight = 700
  139. Underline = 0 'False
  140. Italic = 0 'False
  141. Strikethrough = 0 'False
  142. EndProperty
  143. ForeColor = &H000000FF&
  144. Height = 495
  145. Left = 840
  146. TabIndex = 14
  147. Top = 600
  148. Width = 1815
  149. End
  150. End
  151. Begin VB.CommandButton Command2
  152. BackColor = &H00FF8080&
  153. Caption = "EXIT"
  154. BeginProperty Font
  155. Name = "MS Sans Serif"
  156. Size = 12
  157. Charset = 0
  158. Weight = 700
  159. Underline = 0 'False
  160. Italic = 0 'False
  161. Strikethrough = 0 'False
  162. EndProperty
  163. Height = 855
  164. Left = 7680
  165. MaskColor = &H00FF8080&
  166. Style = 1 'Graphical
  167. TabIndex = 10
  168. Top = 9720
  169. Width = 2055
  170. End
  171. Begin VB.CommandButton Command1
  172. BackColor = &H00FF8080&
  173. Caption = "GUEST"
  174. BeginProperty Font
  175. Name = "MS Sans Serif"
  176. Size = 12
  177. Charset = 0
  178. Weight = 700
  179. Underline = 0 'False
  180. Italic = 0 'False
  181. Strikethrough = 0 'False
  182. EndProperty
  183. Height = 855
  184. Left = 7680
  185. MaskColor = &H00FF8080&
  186. Style = 1 'Graphical
  187. TabIndex = 8
  188. Top = 8520
  189. Width = 2055
  190. End
  191. Begin VB.Frame Frame1
  192. BackColor = &H00FF8080&
  193. Caption = "LOG_IN_ADMIN"
  194. BeginProperty Font
  195. Name = "MS Sans Serif"
  196. Size = 12
  197. Charset = 0
  198. Weight = 400
  199. Underline = 0 'False
  200. Italic = 0 'False
  201. Strikethrough = 0 'False
  202. EndProperty
  203. Height = 3855
  204. Left = 1800
  205. TabIndex = 9
  206. Top = 3480
  207. Width = 5535
  208. Begin VB.CommandButton Command4
  209. BackColor = &H00FF8080&
  210. Caption = "&CANCEL"
  211. BeginProperty Font
  212. Name = "Times New Roman"
  213. Size = 12
  214. Charset = 0
  215. Weight = 700
  216. Underline = 0 'False
  217. Italic = 0 'False
  218. Strikethrough = 0 'False
  219. EndProperty
  220. Height = 855
  221. Left = 2880
  222. Style = 1 'Graphical
  223. TabIndex = 3
  224. Top = 2640
  225. Width = 1575
  226. End
  227. Begin VB.TextBox Text2
  228. BeginProperty Font
  229. Name = "MS Sans Serif"
  230. Size = 12
  231. Charset = 0
  232. Weight = 700
  233. Underline = 0 'False
  234. Italic = 0 'False
  235. Strikethrough = 0 'False
  236. EndProperty
  237. ForeColor = &H000000FF&
  238. Height = 495
  239. IMEMode = 3 'DISABLE
  240. Left = 2520
  241. PasswordChar = "*"
  242. TabIndex = 1
  243. Top = 1680
  244. Width = 2175
  245. End
  246. Begin VB.TextBox Text1
  247. BeginProperty Font
  248. Name = "MS Sans Serif"
  249. Size = 12
  250. Charset = 0
  251. Weight = 700
  252. Underline = 0 'False
  253. Italic = 0 'False
  254. Strikethrough = 0 'False
  255. EndProperty
  256. ForeColor = &H000000FF&
  257. Height = 495
  258. Left = 2520
  259. TabIndex = 0
  260. Top = 840
  261. Width = 2175
  262. End
  263. Begin VB.CommandButton Command3
  264. Appearance = 0 'Flat
  265. BackColor = &H00FF8080&
  266. Caption = "&LOGIN"
  267. BeginProperty Font
  268. Name = "Times New Roman"
  269. Size = 12
  270. Charset = 0
  271. Weight = 700
  272. Underline = 0 'False
  273. Italic = 0 'False
  274. Strikethrough = 0 'False
  275. EndProperty
  276. Height = 855
  277. Left = 720
  278. MaskColor = &H00FFC0C0&
  279. Style = 1 'Graphical
  280. TabIndex = 2
  281. ToolTipText = "click to login"
  282. Top = 2640
  283. UseMaskColor = -1 'True
  284. Width = 1575
  285. End
  286. Begin VB.Label Label4
  287. BackColor = &H00FFC0C0&
  288. BackStyle = 0 'Transparent
  289. Caption = "PASSWORD"
  290. BeginProperty Font
  291. Name = "Times New Roman"
  292. Size = 12
  293. Charset = 0
  294. Weight = 700
  295. Underline = 0 'False
  296. Italic = 0 'False
  297. Strikethrough = 0 'False
  298. EndProperty
  299. ForeColor = &H000000FF&
  300. Height = 495
  301. Left = 240
  302. TabIndex = 12
  303. Top = 1800
  304. Width = 1335
  305. End
  306. Begin VB.Label Label3
  307. BackColor = &H00FFC0C0&
  308. BackStyle = 0 'Transparent
  309. Caption = "ADMIN"
  310. BeginProperty Font
  311. Name = "Times New Roman"
  312. Size = 12
  313. Charset = 0
  314. Weight = 700
  315. Underline = 0 'False
  316. Italic = 0 'False
  317. Strikethrough = 0 'False
  318. EndProperty
  319. ForeColor = &H000000FF&
  320. Height = 495
  321. Left = 360
  322. TabIndex = 11
  323. Top = 960
  324. Width = 1335
  325. End
  326. End
  327. Begin VB.Shape Shape1
  328. BackColor = &H00FFC0C0&
  329. FillColor = &H00FFC0C0&
  330. FillStyle = 0 'Solid
  331. Height = 2775
  332. Left = 7080
  333. Shape = 4 'Rounded Rectangle
  334. Top = 8160
  335. Width = 3255
  336. End
  337. Begin VB.Label Label5
  338. BackStyle = 0 'Transparent
  339. Caption = "PROJECT ON MOBILE BILLING"
  340. BeginProperty Font
  341. Name = "Times New Roman"
  342. Size = 24
  343. Charset = 0
  344. Weight = 700
  345. Underline = 0 'False
  346. Italic = 0 'False
  347. Strikethrough = 0 'False
  348. EndProperty
  349. Height = 1095
  350. Left = 5280
  351. TabIndex = 16
  352. Top = 2040
  353. Width = 7695
  354. End
  355. Begin VB.Image Image1
  356. Height = 1380
  357. Left = 0
  358. Picture = "Form2.frx":0000
  359. Top = 0
  360. Width = 18855
  361. End
  362. End
  363. Attribute VB_Name = "form2"
  364. Attribute VB_GlobalNameSpace = False
  365. Attribute VB_Creatable = False
  366. Attribute VB_PredeclaredId = True
  367. Attribute VB_Exposed = False
  368. Dim cn As New ADODB.Connection
  369. Dim rs As New ADODB.Recordset
  370. Dim rs1 As New ADODB.Recordset
  371. Dim rs2 As New ADODB.Recordset
  372. Dim rs3 As New ADODB.Recordset
  373. Dim rs4 As New ADODB.Recordset
  374. Dim rs5 As New ADODB.Recordset
  375. Dim rs6 As New ADODB.Recordset
  376. Dim cnt
  377.  
  378.  
  379. Private Sub Command1_Click()
  380. g = 1
  381. Form14.Show
  382. Unload Me
  383. End Sub
  384.  
  385. Private Sub Command2_Click()
  386. Unload Me
  387. thanks.Show
  388.  
  389. End Sub
  390.  
  391. Private Sub Command3_Click()
  392. If (Text1.Text = "admin") And (Text2.Text = "admin") Then
  393. adminmenu.Show
  394. Unload Me
  395. Else
  396. MsgBox "invalid username or password"
  397. Text1.Text = ""
  398. Text2.Text = ""
  399. Text1.SetFocus
  400.  
  401. End If
  402. End Sub
  403.  
  404. Private Sub Command4_Click()
  405. thanks.Show
  406. Unload Me
  407. End Sub
  408.  
  409. Private Sub Command5_Click()
  410. e = 0
  411.  
  412. 'blank field
  413. If Text3.Text = Empty Or Text4.Text = Empty Then
  414. MsgBox "ENTER COMPLETE INFORMATION:"
  415. Text3.Locked = False
  416. Text4.Locked = False
  417. Text3.Text = ""
  418. Text4.Text = ""
  419. Text3.SetFocus
  420.  
  421. e = 1
  422. End If
  423.  
  424. If e = 0 Then
  425. Set rs6 = cn.Execute("select count(cid) from register where USERNAME='" & Text3.Text & "'")
  426. cnt = rs6.Fields(0)
  427. If cnt = 0 Then
  428. MsgBox "CUSTOMER WITH THIS USER NAME DOESN'T EXIST:", vbOKOnly
  429. Text3.Locked = False
  430. Text4.Locked = False
  431. Text3.Text = ""
  432. Text4.Text = ""
  433. Text3.SetFocus
  434.  
  435. Else
  436. Set rs6 = cn.Execute("select *from register where USERNAME='" & Text3.Text & "'")
  437. If rs6.EOF = False Then
  438. If StrComp(rs6.Fields("password"), Text4.Text, vbTextCompare) = 0 Then
  439.  
  440. customerlogin.Show
  441. Unload Me
  442. Else
  443. MsgBox "INVALID PASSWORD:"
  444. Text3.Text = ""
  445. Text4.Text = ""
  446. Text3.SetFocus
  447.  
  448.  
  449. End If
  450. End If
  451. End If
  452. End If
  453. End Sub
  454.  
  455. Private Sub Command6_Click()
  456. registration.Show
  457. Unload Me
  458. End Sub
  459.  
  460. Private Sub Form_Load()
  461.  
  462. dbname = App.Path & "\stddata.mdb"
  463. cn.Open "provider=microsoft.jet.oledb.4.0;data source=" & dbname & ";jet oledb:database password=jittdenishan"
  464.  
  465.  
  466.  
  467. End Sub
  468. Private Sub Label6_Click()
  469. registration.Show
  470. Unload Me
  471. End Sub
  472.  
  473.  
  474. Private Sub Timer1_Timer()
  475. Label5.ForeColor = QBColor(Rnd * 15)
  476. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement