-
Notifications
You must be signed in to change notification settings - Fork 0
/
UE.PAS
821 lines (757 loc) · 20.4 KB
/
UE.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
{$I DIRECT.INC}
{$M 15000,1024,10024}
Program User_Editor;
Uses Dos,
Crt,
GenTypes,
DosMem,
FileLock,
Video,
Gensubs,
ConfigRt,
DispEdit,
Little;
Type U_Rec = Record
User_Num : Integer;
Tagged : Boolean;
Name : MStr;
Level : String[8];
Calls : String[3];
Number : SStr;
ULK,
DLK : String[6];
Posts,
PCR : String[4];
LTime,
LDate : String[9];
End;
U_Array = Array[1..500] Of U_Rec;
Const LArrow = #203;
RArrow = #205;
UArrow = #200;
DArrow = #208;
Home = #199;
EndKey = #207;
PGUp = #201;
PGDown = #209;
Space = #32;
F9 = #195;
F10 = #196;
F2 = #188;
F3 = #189;
SF10 = #221;
SF2 = #213;
F5 = #191;
SF5 = #216;
ListType : Byte = 1;
ListState: Boolean = True;
Var Use : ^U_Array;
U : UserRec;
UFile : File of UserRec;
MFile : File of MailRec;
Total : Integer;
Current : Integer;
Fore,Back : Byte;
SaveProc : Pointer;
Saved : Screens;
Quick : BOOLEAN;
Procedure Def_Colors;
Begin
PColor := 31;
NormColor := 30;
InColor := 14;
Def_Fill := #32;
End;
Procedure Ask_Colors;
Begin
PColor := 5 * 16 + 14;
NormColor := 5 * 16 + 15;
InColor := 14;
Def_Fill := #32;
End;
Procedure Ask(X1,Y1,X2,Y2 : Byte; { Where }
Title : Lstr; { Title of Box }
Question : Lstr; { Da Question }
Len : Byte; { Max Input Length }
VAR Result : Mstr); { User Input }
Var S : Screens;
K : Char;
X : Byte;
Begin
ReadScr(S);
Ask_Colors;
Color(5,15);
GrowBOX(X1,Y1,X2,Y2);
Color(13,15);
GotoXy(X1 + 1,Y1 + 1);
For X := (X1 - 1) to (X2 - 3)
Do Write(#32);
Center_Write(Title,Y1 + 1);
GotoXy(X1 + 3,Y1 + 2);
Raw_Editor(Edit,X1 + 3,Y1 + 3,Question,Result,Len,K,False,'',True);
If K = ESC
Then Result := '';
WriteScr(S);
Def_Colors;
End;
Procedure Message(M : Lstr; Wait:Boolean);
Var S : Screens;
X : Word;
K : Char;
Begin
ReadScr(Saved);
Color(4,12);
GrowBOX(10,12,70,14);
Color(12,15);
GotoXy(11,13);
For X := 11 to 69
Do Write(#32);
Center_Write(M,13);
For X := 4500 to 5500
Do Sound(X);
For X := 3500 to 4500
Do Sound(X);
NoSound;
If Wait Then
K := GetKey;
End;
Procedure Un_Message;
Begin
WriteScr(Saved);
End;
Function SearchMail (Startpt,UserNum:integer) : Integer;
Var Cnt : Integer;
M : MailRec;
Begin
SearchMail := 0;
if startpt>=filesize(mfile)-1 then exit;
Inc(StartPt);
Seek (mfile,startpt);
for cnt:=startpt to filesize(mfile)-1 do begin
NRead (mfile,m);
If M.Sentto = Usernum then begin
searchmail:=cnt;
exit
end
end
end;
Procedure DelMail (N:integer);
Var M : MailRec;
C : Integer;
Begin
Seek (MFile,n);
NRead (MFile,m);
For C := N To FileSize(MFile) - 2 Do Begin
Seek (mfile,c+1);
NRead (mfile,m);
Seek (mfile,c);
NWrite (mfile,m)
End;
Seek (Mfile,Filesize(Mfile) - 1);
Truncate (MFile);
If FileSize(Mfile) = 0 Then Begin
M.SentTo := 0;
M.Line := -1;
Seek (MFile,0);
NWrite (MFile,m)
End
End;
Procedure Delete_User(Who : Word);
Const Null : Mstr = '';
Var Result : Mstr;
Cnt : Integer;
Begin
Seek(UFile,Who);
NRead(UFile,U);
Result := 'N';
Ask(9,9,71,15,'úù Automatic User Annihilator! ùú',
'You Really Want to Delete '+U.Handle+' Now? ',3,Result);
If Upcase(Result[1]) <> 'Y' Then
Exit;
FillChar(U,SizeOf(U),0);
For Cnt := 1 to 5 do U.InfoForm[Cnt] := -1;
U.EmailAnnounce := -1;
U.AutoSig := -1;
Seek(UFile,Who);
nWrite(UFile,U);
If Not Exist(Cfg.DataDir + 'MAIL')
Then Exit;
Assign(MFile,Cfg.DataDir + 'MAIL');
Reset(MFile);
Cnt := -1;
Repeat
Cnt := SearchMail(Cnt,Who);
If Cnt > 0 Then Begin
DelMail(Cnt);
Dec(Cnt)
End;
Until Cnt = 0;
Close(MFile);
End;
Procedure Super_Nuker;
Var Result : Mstr;
X,Y : Word;
Begin
Y := 0;
For X := 1 to (Total-1) Do
If Use^[X].Tagged Then Inc(Y);
If Y = 0
Then Begin
Message('You have not tagged anyone to Delete!',True);
Un_Message;
Exit;
End;
Result := 'N';
Ask(9,9,71,15,'úù Super Duper User Nuker ùú',
'REALLY Delete All Tagged ('+Strr(Y)+') Users? ',3,Result);
If Upcase(Result[1]) <> 'Y' Then
Exit;
For X := 1 to (Total-1) Do
If Use^[X].Tagged Then Delete_User(Use^[X].User_Num);
End;
Procedure Set_Defaults;
Begin
U.Level := Cfg.Deflevel;
U.Udpoints := Cfg.Defudpoints;
U.Udlevel := Cfg.defudlevel;
U.Udfratio := Cfg.defudratio;
U.Udkratio := Cfg.defudkratio;
U.Pcr := Cfg.defpcr;
U.Msglength := Cfg.defmsglength;
U.Dailykblimit := cfg.defdailykblimit;
U.Flags := Cfg.DefFlags;
If (Cfg.ChangeNote = False) Or (U.SysOpNote = '')
Then U.SysopNote := Cfg.DefUserNote;
End;
Procedure Alphabetize(Numerical : Boolean);
Var
I, J, Bottom, Top, Middle : Integer;
Temp : U_Rec;
Begin
Case Numerical Of
True : Message('Restoring User List to Original Order!',False);
False : Message('Alphabetizing User List.. Weeee!',False);
End;
For i := 2 to (Total-1) Do
Begin
Temp := Use^[i];
Bottom := 1;
Top := i - 1;
While Bottom <= Top Do
Begin
Middle := (Bottom + Top) Div 2;
Case Numerical Of
True : If Temp.User_Num < Use^[Middle].User_Num
Then Top := Middle - 1
Else Bottom := Middle + 1;
False : If UpString(Temp.Name) < UpString(Use^[Middle].Name)
Then Top := Middle - 1
Else Bottom := Middle + 1;
End;
End;
For j := i - 1 DownTo Bottom
Do Use^[j + 1] := Use^[J];
Use^[Bottom] := Temp;
End;
Delay(1000);
Un_Message;
ListState := Numerical;
End;
Procedure Fix_Number(VAR S : SStr);
Var Final : SStr;
P : Byte;
K : Char;
Begin
If (Upcase(S[1]) In ['+','X'])
Then P := 2
Else P := 1;
While P <= Length(S) Do Begin
K := S[p];
If K in ['0'..'9']
Then Inc(P)
Else Delete (S,P,1);
End;
Final := '('+Copy(S,1,3)+') ';
Final := Final + Copy(S,4,3) + '-';
Final := Final + Copy(S,7,$FE);
If Copy(Final,1,2) = '()'
Then Final := '- No Number -';
S := Final;
End;
Function Percentage(A,B:Integer):Real;
Begin
If (A>0) and (B>0)
Then Percentage := (A/B) * 100
Else percentage := 0;
End;
Procedure Init(VAR UD:U_REC; X:INTEGER);
BEGIN
FillChar(UD,SizeOf(UD),0);
UD.User_Num := X;
If U.Handle <> ''
Then UD.Name := U.Handle
Else UD.Name := '[ Open User Record ]';
UD.Level := Strr(U.Level);
UD.Calls := Strr(U.Numon);
UD.Number := U.PhoneNum;
Fix_Number(UD.Number);
UD.ULK := Strr(U.KUp);
UD.DLK := Strr(U.KDown);
UD.Posts := Strr(U.NBu);
UD.PCR := Streal(Percentage(U.nbu,U.numon)) + '%';
UD.LDate := DateStr(U.LastOn);
UD.LTime := TimeStr(U.LastOn);
END;
Procedure Auto_Validate(Who : Word);
Var Result : Mstr;
Begin
Seek(UFile,Who);
NRead(UFile,U);
Result := 'N';
Ask(9,9,71,15,'úù Automatic User Quick Validation ùú',
'Set '+U.Handle+'''s Account to Default? ',3,Result);
If Upcase(Result[1]) <> 'Y' Then
Exit;
Set_Defaults;
Seek(UFile,Who);
NWrite(UFile,U);
End;
Procedure Default_Colors;
Var X : Integer;
OK : Mstr;
BEGIN
OK := 'N';
Ask(9,9,71,15,'úù Change Everyone to Default Colors ùú',
'Mass Change Colors [y/N]? ',1,OK);
If Upcase(Ok[1]) <> 'Y' Then EXIT;
For X := 1 to (FileSize(UFILE)-1)
Do Begin
Seek(UFile,X);
NRead(UFile,U);
U.Color1 := Cfg.DefColor1;
U.Color2 := Cfg.DefColor2;
U.Color3 := Cfg.DefColor3;
U.Color4 := Cfg.DefColor4;
U.Color5 := Cfg.DefColor5;
U.Color6 := Cfg.DefColor6;
U.Color7 := Cfg.DefColor7;
Seek(UFile,X);
NWrite(UFile,U);
End;
END;
Procedure Super_Validate;
Var Result : Mstr;
X,Y : Word;
Begin
Y := 0;
For X := 1 to (Total-1) Do
If Use^[X].Tagged Then Inc(Y);
If Y = 0
Then Begin
Message('You have not tagged anyone to Quick-Validate!',True);
Un_Message;
Exit;
End;
Result := 'N';
Ask(9,9,71,15,'úù Super Duper User Validation ùú',
'Set All Tagged ('+Strr(Y)+') Users to Defaults? ',3,Result);
If Upcase(Result[1]) <> 'Y' Then
Exit;
For X := 1 to Total Do
If Use^[X].Tagged
Then Auto_Validate(Use^[X].User_Num);
End;
Procedure Help_Screen;
Var S : Screens;
K : Char;
Begin
ReadScr(S);
Color(4,15);
GrowBox(18,4,62,20);
Color(4,14);
Center_Write('PiPELiNE User Editor Help (c)1994',5);
Color(4,15);
Center_Write('Enter - Edit Highlited User',7);
Center_Write('Up/Down/End/Home/PgUp/PgDn - Scroll Users',8);
Center_Write('Left/Right Arrow: Scroll User Data',9);
Center_Write('F3 - Alphabetize List / De-Alphabetize List',10);
Center_Write('F2 - Delete Highlited User',11);
Center_Write('Shift-F2 - Delete All Tagged Users',12);
Center_Write('F5 - Auto Validate Highlited Users',13);
Center_Write('Shift-F5 - Auto Validate All Tagged Users',14);
Center_Write('Alt-F10 - Reset Colors to CONFIG defaults',15);
Center_Write('ESC - Exits Program',16);
Center_Write('HIT A KEY.',19);
K := GetKEY;
WriteScr(S);
End;
Procedure EditUser(Who : Word; OverRide:Boolean);
Label
Start;
Const
MaxEnt = 28;
Var
PEntry : Integer;
Entry,UNUM,Total : Integer;
Current : Word;
Prompt1,Prompt2:string;
K : Char;
Procedure Write_UserNum;
Begin
Color(1,9);
GotoXy(50,18);
Write('User Number: ');
Color(1,14);
If OVERRIDE
THEN Write(UNum)
ELSE Write(Use^[Current].User_Num);
Write(' of ');
Write(Total);
Write(#32#32);
End;
Procedure Proc_Entry(Func : Edit_Functions);
Begin
Case Entry Of
1 : Edit_String(Func,3,3,'User Handle : ',U.Handle,30,K);
2 : Edit_String(Func,3,4,'Password : ',U.Password,30,K);
3 : Edit_String(Func,3,5,'Real Name : ',U.Realname,30,K);
4 : Edit_String(Func,3,6,'Phone Number : ',U.PhoneNum,15,K);
5 : Edit_Integer(Func,3,7,'Main Level : ',U.Level,5,-1,32767,K);
6 : Edit_Integer(Func,3,8,'Total Calls : ',U.Numon,5,0,32767,K);
7 : Edit_String(Func,3,9,'Public Note : ',U.SysOpNote,30,K);
8 : Edit_String(Func,3,10,'Access Flags : ',U.Flags,26,K);
9 : Edit_String(Func,3,11,'Private Note : ',U.PrivateNote,30,K);
10 : Edit_Integer(Func,3,12,'File Level : ',U.UDLevel,5,0,32767,K);
11 : Edit_Integer(Func,3,13,'File Points : ',U.UDPoints,5,0,32767,K);
12 : Edit_Integer(Func,3,14,'Uploads : ',U.Uploads,6,-32767,32767,K);
13 : Edit_Integer(Func,3,15,'Downloads : ',U.Downloads,6,-32767,32767,K);
14 : Edit_Long(Func,3,16,'Uploaded Bytes : ',U.KUp,10,0,MaxLongint,K);
15 : Edit_Long(Func,3,17,'Downloaded Bytes : ',U.KDown,10,0,MaxLongint,K);
16 : Edit_Integer(Func,3,18,'Total Posts : ',U.Nbu,6,-32767,32767,K);
17 : Edit_String(Func,3,19,'Prompt : ',Prompt1,66,K);
18 : Edit_String(Func,3,20,'Prompt (2nd Part) : ',Prompt2,13,K);
19 : Edit_Integer(Func,3,21,'Time Per Day : ',U.TimePerDay,6,0,32767,K);
20 : Edit_Integer(Func,3,22,'Time Left Today : ',U.TimeToday,6,0,32767,K);
21 : Edit_Integer(Func,50,3,'UDRatio : ',U.UDFRatio,5,0,32767,K);
22 : Edit_Integer(Func,50,4,'UD K Ratio : ',U.UDKRatio,5,0,32767,K);
23 : Edit_Integer(Func,50,5,'PCR : ',U.Pcr,5,0,32767,K);
24 : Edit_Integer(Func,50,6,'Daily K Limit : ',U.DailyKBLimit,5,0,32767,K);
25 : Edit_Long(Func,50,7,'K Down Today : ',U.KDownToday,7,0,9999999,K);
26 : Edit_Integer(Func,50,8,'Msg. Length : ',U.MsgLength,5,0,32767,K);
27 : Edit_YesNo(Func,50,9,'Time Lock : ',U.TimeLock,K);
28 : Edit_String(Func,50,10,'Internet Name : ',U.InternetName,8,K);
End;
Select_Next_Entry(Func,Entry,MaxEnt,K);
End;
Function Upstring(S : Mstr) : Mstr;
Var X : Byte;
Begin
For X := 1 to Length(S)
Do S[x] := Upcase(S[x]);
UpString := S;
End;
Var X : Byte;
L : Lstr;
Begin
Def_Colors;
Current := Who;
Total := FileSize(UFile) - 1;
Start:
If OverRide
Then UNum := Current
Else UNum := Use^[Current].User_Num;
Seek(UFile,UNum);
NRead(UFile,U);
Prompt1:=Copy(U.prompt,1,66);
Prompt2:=Copy(U.prompt,67,13);
{ L := U.Prompt;}
K := PGDN;
Entry := 0;
For X := 1 to MaxEnt Do Begin
Inc(Entry);
Proc_Entry(Display);
End;
Write_UserNum;
Entry := 1;
Repeat
Proc_Entry(Edit);
U.Flags := UpString(U.Flags);
Until (K <> UP) and (K <> DOWN);
If K <> DispEdit.F10 Then Begin
{ U.Prompt := L; }
U.Prompt:=Prompt1+Prompt2;
Seek(UFile,UNum);
NWrite(UFile,U);
End;
If Not OVERRIDE
Then Init(Use^[Current],UNum);
Case K Of
DispEdit.PGDN : Begin
Inc(Current);
If Current > Total
Then Current := 1;
Goto Start;
End;
DispEdit.PGUP : Begin
Dec(Current);
If Current < 1
Then Current := Total;
Goto Start;
End;
DispEdit.F2 : Begin
Delete_User(Current);
Goto Start;
End;
DispEdit.F5 : Begin
Auto_Validate(Current);
Goto Start;
End;
End;
End;
Procedure Edit_User(Who : Word; OverRide:Boolean);
Var K : Char;
S : Screens;
Begin
ReadScr(S);
Color(8,15);
GotoXy(1,1); ClrEOL;
Center_Write('úù PiPELiNE Quick & Easy User Editor v1.0á ùú',1);
GotoXy(1,25); ClrEOL;
Center_Write('F2 - Delete F5 - Set Defaults F10 - Aborts ESC - Save Changes',25);
Color(1,9);
GrowBOX(1,2,78,23);
EditUser(Who,OverRide);
WriteScr(S);
End;
Procedure Write_Title;
Const NameStr = ' # User Name / Handle ';
Const Title : Array[1..5] Of String[20] = (
'Level Calls',
'Phone Number ',
'UL K DL K',
'Posts PCR',
'Last Date Online');
Begin
{ GotoXy(11,8); }
Color(9,15);
fastwrite(11,8,textattr,Tab(NameStr + Title[ListType],58));
End;
Procedure Back_Ground;
Begin
Fill_Screen('²',7,1);
End;
Procedure Init_Pick_Screen;
Begin
Back_Ground;
GotoXy(1,1);
Color(8,15); ClrEol;
Center_Write('úù PiPELiNE User Editor v0.1á - Written by Net Distortion (c) 1994 ùú',1);
GotoXy(1,25); Color(8,15); ClrEOL;
Center_Write('Press Alt-H for Pop-Up Help Screen.',25);
Color(1,9);
GrowBox(10,5,70,22);
Color(1,14);
Center_Write('úù Bash (CR) to Edit High-Lighted User Now ùú',6);
Write_Title;
End;
Procedure Display_Group;
Var X, Start, Finish, Where : Integer;
Begin
Cursor_Off;
Start := Current - 6;
Finish := Start + 12;
Where := 9;
For X := Start to Finish Do Begin
{ GotoXy(12,Where); }
Color(1,15);
If (X < 1) or (X >= Total)
then fastwrite(12,where,textattr,tab('',57))
Else Begin
Color(1,14);
If Where = 15
Then Color(0,9);
If Use^[X].Tagged
Then fastWrite(12,where,textattr,#251)
Else fastWrite(12,where,textattr,#32);
If Where = 15
Then Color(0,14)
Else Color(1,15);
fastwrite(13,where,textattr,Tab(Strr(X),4));
fastwrite(17,where,textattr,Tab(Use^[X].Name,30)); { 47 }
Case ListType Of
1 : Begin
fastwrite(47,where,textattr,Tab(Use^[X].Level,8));
fastwrite(55,where,textattr,Tab(Use^[X].Calls,11));
End;
2 : fastwrite(47,where,textattr,Tab(Use^[X].Number,19));
3 : Begin
fastwrite(47,where,textattr,Tab(Use^[X].ULK,8));
fastwrite(55,where,textattr,Tab(Use^[X].DLK,11));
End;
4 : Begin
fastwrite(47,where,textattr,Tab(Use^[X].Posts,8));
fastwrite(55,where,textattr,Tab(Use^[X].PCR,11));
End;
5 : Begin
fastwrite(47,where,textattr,Tab(Use^[X].LDate,11));
fastwrite(58,where,textattr,Tab(Use^[X].LTime,8));
End;
End;
End;
Inc(Where);
End;
Cursor_On;
End;
Procedure Tag_All(T : Boolean);
Var X : Integer;
Begin
For X := 1 to Total
Do Use^[X].Tagged := T;
Display_Group;
End;
Procedure Do_Keys;
Var K : Char;
Begin
Repeat
K := GetKey;
Case K Of
UArrow : If Current > 1
Then Begin
Dec(Current);
Display_Group;
End;
DArrow : If Current < (Total - 1)
Then Begin
Inc(Current);
Display_Group;
End;
Home : If Current > 1
Then Begin
Current := 1;
Display_Group;
End;
EndKey : If Current < (Total - 1)
Then Begin
Current := Total - 1;
Display_Group;
End;
PgUp : If Current > 1 Then Begin
Dec(Current,12);
If Current < 1
Then Current := 1;
Display_Group;
End;
PgDown : If Current < (Total - 1) Then Begin
Inc(Current,12);
If Current > (Total - 1)
Then Current := Total - 1;
Display_Group;
End;
RArrow : If ListType < 5 Then Begin
Inc(ListType);
Write_Title;
Display_Group;
End;
LArrow : If ListType > 1 Then Begin
Dec(ListType);
Write_Title;
Display_Group;
End;
Space : Begin
Use^[Current].Tagged := Not Use^[Current].Tagged;
If Current < (Total - 1)
Then Inc(Current);
Display_Group;
End;
F10 : Tag_All(True);
SF10 : Tag_All(False);
F2 : Delete_User(Use^[Current].User_Num);
SF2 : Super_Nuker;
F5 : Auto_Validate(Use^[Current].User_Num);
SF5 : Super_Validate;
F3 : Begin
Alphabetize(Not ListState);
Display_Group;
End;
#13 : Edit_User(Current,False);
#241 : Default_Colors;
#163 : Help_Screen;
End;
IF K IN [#32,F2,SF2,F5,SF5] THEN Display_Group;
Until K = #27;
End;
Procedure OpenLoad_UserRec;
Var X,Y : Word;
Numb : Word;
Begin
TextAttr := 7;
ClrScr;
Assign(UFile,Cfg.DataDir + 'USERS');
Reset(UFile);
If IoResult <> 0 Then Begin
Writeln('þ Unable to open User Records!');
Halt;
End;
Numb := FileSize(UFile) - 1;
If (ParamCount > 0) and (Valu(ParamStr(1)) <= Numb)
Then Begin
QUICK := TRUE;
Current := Valu(ParamStr(1));
Back_Ground;
Edit_User(Current,True);
Close(UFile);
TextAttr := 1;
ClrScr;
Halt;
End;
Total := 1;
Dos_GetMem(Use,SizeOf(Use^));
Color(1,9);
GrowBox(25,9,55,15);
Color(9,15);
Center_Write(' PiPELiNE User Editor v0.1á ',10);
Color(1,15);
Center_Write('Scanning Users...',13);
Y := 0;
Current := 1;
For X := 1 to (FileSize(UFile) - 1)
Do Begin
Seek(UFile,X);
NRead(UFile,U);
Init(Use^[Total],Total);
Inc(Total);
End;
End;
Procedure Aborted;
Begin
QUICK := FALSE;
ExitProc := SaveProc;
TextAttr := 1;
ClrScr; GotoXy(1,1); Color(1,15); ClrEOL;
Center_Write('PiPELiNE User Editor v0.1á (c)1994 Propaganda Software / Net Distortion',1);
Writeln;
Close(UFile);
Hi_Back_Off;
Cursor_On;
End;
Begin
If Not ShareInstalled then begin
ClrScr;
Writeln('SHARE.EXE MUST BE INSTALLED FOR PiPELiNE AND ITS PROGRAMS!');
HALT(4);
END;
Filemode:=66;
DirectVideo := True;
ReadCfg(False);
SaveProc := ExitProc;
ExitProc := @Aborted;
Hi_Back_On;
OpenLoad_UserRec;
Init_Pick_Screen;
Display_Group;
Do_Keys;
TextAttr := 1;
ClrScr;
Close(UFile);
Hi_Back_Off;
End.