Initial revision
[citadel.git] / wincit / validate.frm
1 VERSION 4.00
2 Begin VB.Form Validation 
3    Appearance      =   0  'Flat
4    BackColor       =   &H00C0C0C0&
5    BorderStyle     =   3  'Fixed Dialog
6    Caption         =   "Validate new users"
7    ClientHeight    =   4890
8    ClientLeft      =   2415
9    ClientTop       =   2880
10    ClientWidth     =   6855
11    ClipControls    =   0   'False
12    ControlBox      =   0   'False
13    BeginProperty Font 
14       name            =   "MS Sans Serif"
15       charset         =   0
16       weight          =   700
17       size            =   9.75
18       underline       =   0   'False
19       italic          =   0   'False
20       strikethrough   =   0   'False
21    EndProperty
22    ForeColor       =   &H80000008&
23    Height          =   5295
24    Left            =   2355
25    LinkTopic       =   "Form1"
26    MaxButton       =   0   'False
27    MDIChild        =   -1  'True
28    MinButton       =   0   'False
29    ScaleHeight     =   4890
30    ScaleWidth      =   6855
31    Top             =   2535
32    Width           =   6975
33    Begin VB.CommandButton save_button 
34       Appearance      =   0  'Flat
35       BackColor       =   &H80000005&
36       Caption         =   "&Save"
37       BeginProperty Font 
38          name            =   "MS Sans Serif"
39          charset         =   0
40          weight          =   400
41          size            =   8.25
42          underline       =   0   'False
43          italic          =   0   'False
44          strikethrough   =   0   'False
45       EndProperty
46       Height          =   495
47       Index           =   6
48       Left            =   3480
49       TabIndex        =   22
50       Top             =   4320
51       Width           =   1575
52    End
53    Begin VB.CommandButton save_button 
54       Appearance      =   0  'Flat
55       BackColor       =   &H80000005&
56       Caption         =   "&Save"
57       BeginProperty Font 
58          name            =   "MS Sans Serif"
59          charset         =   0
60          weight          =   400
61          size            =   8.25
62          underline       =   0   'False
63          italic          =   0   'False
64          strikethrough   =   0   'False
65       EndProperty
66       Height          =   495
67       Index           =   5
68       Left            =   1800
69       TabIndex        =   21
70       Top             =   4320
71       Width           =   1575
72    End
73    Begin VB.CommandButton save_button 
74       Appearance      =   0  'Flat
75       BackColor       =   &H80000005&
76       Caption         =   "&Save"
77       BeginProperty Font 
78          name            =   "MS Sans Serif"
79          charset         =   0
80          weight          =   400
81          size            =   8.25
82          underline       =   0   'False
83          italic          =   0   'False
84          strikethrough   =   0   'False
85       EndProperty
86       Height          =   495
87       Index           =   4
88       Left            =   120
89       TabIndex        =   20
90       Top             =   4320
91       Width           =   1575
92    End
93    Begin VB.CommandButton save_button 
94       Appearance      =   0  'Flat
95       BackColor       =   &H80000005&
96       Caption         =   "&Save"
97       BeginProperty Font 
98          name            =   "MS Sans Serif"
99          charset         =   0
100          weight          =   400
101          size            =   8.25
102          underline       =   0   'False
103          italic          =   0   'False
104          strikethrough   =   0   'False
105       EndProperty
106       Height          =   495
107       Index           =   3
108       Left            =   5160
109       TabIndex        =   19
110       Top             =   3720
111       Width           =   1575
112    End
113    Begin VB.CommandButton save_button 
114       Appearance      =   0  'Flat
115       BackColor       =   &H80000005&
116       Caption         =   "&Save"
117       BeginProperty Font 
118          name            =   "MS Sans Serif"
119          charset         =   0
120          weight          =   400
121          size            =   8.25
122          underline       =   0   'False
123          italic          =   0   'False
124          strikethrough   =   0   'False
125       EndProperty
126       Height          =   495
127       Index           =   2
128       Left            =   3480
129       TabIndex        =   18
130       Top             =   3720
131       Width           =   1575
132    End
133    Begin VB.CommandButton save_button 
134       Appearance      =   0  'Flat
135       BackColor       =   &H80000005&
136       Caption         =   "&Save"
137       BeginProperty Font 
138          name            =   "MS Sans Serif"
139          charset         =   0
140          weight          =   400
141          size            =   8.25
142          underline       =   0   'False
143          italic          =   0   'False
144          strikethrough   =   0   'False
145       EndProperty
146       Height          =   495
147       Index           =   1
148       Left            =   1800
149       TabIndex        =   17
150       Top             =   3720
151       Width           =   1575
152    End
153    Begin VB.CommandButton cancel_button 
154       Appearance      =   0  'Flat
155       BackColor       =   &H80000005&
156       Caption         =   "&Cancel"
157       BeginProperty Font 
158          name            =   "MS Sans Serif"
159          charset         =   0
160          weight          =   700
161          size            =   8.25
162          underline       =   0   'False
163          italic          =   0   'False
164          strikethrough   =   0   'False
165       EndProperty
166       Height          =   495
167       Left            =   5160
168       TabIndex        =   5
169       Top             =   4320
170       Width           =   1575
171    End
172    Begin VB.CommandButton save_button 
173       Appearance      =   0  'Flat
174       BackColor       =   &H80000005&
175       Caption         =   "&Save"
176       BeginProperty Font 
177          name            =   "MS Sans Serif"
178          charset         =   0
179          weight          =   400
180          size            =   8.25
181          underline       =   0   'False
182          italic          =   0   'False
183          strikethrough   =   0   'False
184       EndProperty
185       Height          =   495
186       Index           =   0
187       Left            =   120
188       TabIndex        =   8
189       Top             =   3720
190       Width           =   1575
191    End
192    Begin VB.Label Label8 
193       Appearance      =   0  'Flat
194       AutoSize        =   -1  'True
195       BackColor       =   &H80000005&
196       BackStyle       =   0  'Transparent
197       Caption         =   "Please choose an access level for this user:"
198       BeginProperty Font 
199          name            =   "MS Sans Serif"
200          charset         =   0
201          weight          =   400
202          size            =   12
203          underline       =   0   'False
204          italic          =   -1  'True
205          strikethrough   =   0   'False
206       EndProperty
207       ForeColor       =   &H80000008&
208       Height          =   300
209       Left            =   1080
210       TabIndex        =   23
211       Top             =   3240
212       Width           =   4725
213    End
214    Begin VB.Label TheAxLevel 
215       Appearance      =   0  'Flat
216       BackColor       =   &H80000005&
217       BackStyle       =   0  'Transparent
218       Caption         =   "Access level"
219       ForeColor       =   &H80000008&
220       Height          =   255
221       Left            =   1560
222       TabIndex        =   16
223       Top             =   2880
224       Width           =   4695
225    End
226    Begin VB.Label Label7 
227       Alignment       =   1  'Right Justify
228       Appearance      =   0  'Flat
229       BackColor       =   &H80000005&
230       BackStyle       =   0  'Transparent
231       Caption         =   "Current access:"
232       BeginProperty Font 
233          name            =   "MS Sans Serif"
234          charset         =   0
235          weight          =   700
236          size            =   8.25
237          underline       =   0   'False
238          italic          =   0   'False
239          strikethrough   =   0   'False
240       EndProperty
241       ForeColor       =   &H80000008&
242       Height          =   255
243       Left            =   0
244       TabIndex        =   15
245       Top             =   2880
246       Width           =   1455
247    End
248    Begin VB.Label Phone 
249       Appearance      =   0  'Flat
250       BackColor       =   &H80000005&
251       BackStyle       =   0  'Transparent
252       Caption         =   "Phone"
253       ForeColor       =   &H80000008&
254       Height          =   255
255       Left            =   1560
256       TabIndex        =   14
257       Top             =   2520
258       Width           =   4695
259    End
260    Begin VB.Label ZIP 
261       Appearance      =   0  'Flat
262       BackColor       =   &H80000005&
263       BackStyle       =   0  'Transparent
264       Caption         =   "ZIP"
265       ForeColor       =   &H80000008&
266       Height          =   255
267       Left            =   1560
268       TabIndex        =   13
269       Top             =   2160
270       Width           =   4695
271    End
272    Begin VB.Label TheState 
273       Appearance      =   0  'Flat
274       BackColor       =   &H80000005&
275       BackStyle       =   0  'Transparent
276       Caption         =   "State"
277       ForeColor       =   &H80000008&
278       Height          =   255
279       Left            =   1560
280       TabIndex        =   12
281       Top             =   1800
282       Width           =   4695
283    End
284    Begin VB.Label City 
285       Appearance      =   0  'Flat
286       BackColor       =   &H80000005&
287       BackStyle       =   0  'Transparent
288       Caption         =   "City"
289       ForeColor       =   &H80000008&
290       Height          =   255
291       Left            =   1560
292       TabIndex        =   11
293       Top             =   1440
294       Width           =   4695
295    End
296    Begin VB.Label Address 
297       Appearance      =   0  'Flat
298       BackColor       =   &H80000005&
299       BackStyle       =   0  'Transparent
300       Caption         =   "Address"
301       ForeColor       =   &H80000008&
302       Height          =   255
303       Left            =   1560
304       TabIndex        =   10
305       Top             =   1080
306       Width           =   4695
307    End
308    Begin VB.Label RealName 
309       Appearance      =   0  'Flat
310       BackColor       =   &H80000005&
311       BackStyle       =   0  'Transparent
312       Caption         =   "Real Name"
313       ForeColor       =   &H80000008&
314       Height          =   255
315       Left            =   1560
316       TabIndex        =   9
317       Top             =   720
318       Width           =   4695
319    End
320    Begin VB.Label UserName 
321       Alignment       =   2  'Center
322       Appearance      =   0  'Flat
323       BackColor       =   &H00FFFFFF&
324       BackStyle       =   0  'Transparent
325       Caption         =   "UserName"
326       BeginProperty Font 
327          name            =   "MS Sans Serif"
328          charset         =   0
329          weight          =   700
330          size            =   18
331          underline       =   0   'False
332          italic          =   0   'False
333          strikethrough   =   0   'False
334       EndProperty
335       ForeColor       =   &H80000008&
336       Height          =   492
337       Left            =   120
338       TabIndex        =   7
339       Top             =   120
340       Width           =   6252
341    End
342    Begin VB.Label Label6 
343       Alignment       =   1  'Right Justify
344       Appearance      =   0  'Flat
345       BackColor       =   &H80000005&
346       BackStyle       =   0  'Transparent
347       Caption         =   "Telephone:"
348       BeginProperty Font 
349          name            =   "MS Sans Serif"
350          charset         =   0
351          weight          =   700
352          size            =   8.25
353          underline       =   0   'False
354          italic          =   0   'False
355          strikethrough   =   0   'False
356       EndProperty
357       ForeColor       =   &H80000008&
358       Height          =   252
359       Left            =   0
360       TabIndex        =   6
361       Top             =   2520
362       Width           =   1452
363    End
364    Begin VB.Label Label5 
365       Alignment       =   1  'Right Justify
366       Appearance      =   0  'Flat
367       BackColor       =   &H80000005&
368       BackStyle       =   0  'Transparent
369       Caption         =   "State/Province:"
370       BeginProperty Font 
371          name            =   "MS Sans Serif"
372          charset         =   0
373          weight          =   700
374          size            =   8.25
375          underline       =   0   'False
376          italic          =   0   'False
377          strikethrough   =   0   'False
378       EndProperty
379       ForeColor       =   &H80000008&
380       Height          =   252
381       Left            =   0
382       TabIndex        =   4
383       Top             =   1800
384       Width           =   1452
385    End
386    Begin VB.Label Label4 
387       Alignment       =   1  'Right Justify
388       Appearance      =   0  'Flat
389       BackColor       =   &H80000005&
390       BackStyle       =   0  'Transparent
391       Caption         =   "ZIP Code:"
392       BeginProperty Font 
393          name            =   "MS Sans Serif"
394          charset         =   0
395          weight          =   700
396          size            =   8.25
397          underline       =   0   'False
398          italic          =   0   'False
399          strikethrough   =   0   'False
400       EndProperty
401       ForeColor       =   &H80000008&
402       Height          =   252
403       Left            =   0
404       TabIndex        =   3
405       Top             =   2160
406       Width           =   1452
407    End
408    Begin VB.Label Label3 
409       Alignment       =   1  'Right Justify
410       Appearance      =   0  'Flat
411       BackColor       =   &H80000005&
412       BackStyle       =   0  'Transparent
413       Caption         =   "City/Town:"
414       BeginProperty Font 
415          name            =   "MS Sans Serif"
416          charset         =   0
417          weight          =   700
418          size            =   8.25
419          underline       =   0   'False
420          italic          =   0   'False
421          strikethrough   =   0   'False
422       EndProperty
423       ForeColor       =   &H80000008&
424       Height          =   252
425       Left            =   0
426       TabIndex        =   2
427       Top             =   1440
428       Width           =   1452
429    End
430    Begin VB.Label Label2 
431       Alignment       =   1  'Right Justify
432       Appearance      =   0  'Flat
433       BackColor       =   &H80000005&
434       BackStyle       =   0  'Transparent
435       Caption         =   "Address:"
436       BeginProperty Font 
437          name            =   "MS Sans Serif"
438          charset         =   0
439          weight          =   700
440          size            =   8.25
441          underline       =   0   'False
442          italic          =   0   'False
443          strikethrough   =   0   'False
444       EndProperty
445       ForeColor       =   &H80000008&
446       Height          =   252
447       Left            =   0
448       TabIndex        =   1
449       Top             =   1080
450       Width           =   1452
451    End
452    Begin VB.Label Label1 
453       Alignment       =   1  'Right Justify
454       Appearance      =   0  'Flat
455       BackColor       =   &H00FFFFFF&
456       BackStyle       =   0  'Transparent
457       Caption         =   "Real name:"
458       BeginProperty Font 
459          name            =   "MS Sans Serif"
460          charset         =   0
461          weight          =   700
462          size            =   8.25
463          underline       =   0   'False
464          italic          =   0   'False
465          strikethrough   =   0   'False
466       EndProperty
467       ForeColor       =   &H80000008&
468       Height          =   252
469       Left            =   0
470       TabIndex        =   0
471       Top             =   720
472       Width           =   1452
473    End
474 End
475 Attribute VB_Name = "Validation"
476 Attribute VB_Creatable = False
477 Attribute VB_Exposed = False
478
479 Private Sub cancel_button_Click()
480     Unload Validation
481     Load RoomPrompt
482 End Sub
483
484 Private Sub Form_Load()
485     Show
486     Validation.WindowState = 0
487     Validation.Top = Int((MainWin.Height - Validation.Height) / 3)
488     Validation.Left = Int((MainWin.Width - Validation.Width) / 2)
489     
490     For i = 0 To 6
491         save_button(i).Caption = Str$(i) + " (" + axdefs$(i) + ")"
492         Next i
493     
494     Call GetNextUnregisteredUser
495
496 End Sub
497
498 Private Sub GetNextUnregisteredUser()
499
500     RealName.Caption = ""
501     Address.Caption = ""
502     City.Caption = ""
503     TheState.Caption = ""
504     ZIP.Caption = ""
505     Phone.Caption = ""
506     TheAxLevel.Caption = ""
507     
508     If begin_trans() = True Then
509     
510         serv_puts ("GNUR")
511         a$ = serv_gets()
512
513         If Left$(a$, 1) = "2" Then
514             Call end_trans
515             'Unload Validation
516             'Load RoomPrompt
517             End If
518
519         UserName.Caption = Right$(a$, Len(a$) - 4)
520         
521         If Left$(a$, 1) <> "3" Then
522         
523             For i = 0 To 6
524                 save_button(i).Enabled = False
525                 Next i
526         
527
528         Else
529
530             serv_puts ("GREG " + UserName.Caption)
531             a$ = serv_gets()
532             If Left$(a$, 1) = "1" Then
533                 UserName.Caption = Right$(a$, Len(a$) - 4)
534                 b% = 0
535                 Do
536                     a$ = serv_gets()
537                     If b% = 2 Then RealName.Caption = a$
538                     If b% = 3 Then Address.Caption = a$
539                     If b% = 4 Then City.Caption = a$
540                     If b% = 5 Then TheState.Caption = a$
541                     If b% = 6 Then ZIP.Caption = a$
542                     If b% = 7 Then Phone.Caption = a$
543                     If b% = 8 Then TheAxLevel.Caption = a$ + " (" + axdefs$(Val(a$)) + ")"
544                     b% = b% + 1
545                     Loop Until a$ = "000"
546                 End If
547             Call end_trans
548             For i = 0 To 6
549                 save_button(i).Enabled = True
550                 Next i
551
552             End If
553
554         Call end_trans
555         End If
556
557 End Sub
558
559 Private Sub save_button_Click(axl As Integer)
560     
561     If begin_trans() = True Then
562         serv_puts ("VALI " + UserName.Caption + "|" + Str$(axl))
563         a$ = serv_gets()
564         Call end_trans
565         If Left$(a$, 1) = "2" Then
566             Call GetNextUnregisteredUser
567         Else
568             MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
569             End If
570         End If
571
572 End Sub
573