rem user file maintenance program dim vfn$(250),vln$(250),vct$(250),vac$(250),vdt$(250),vtm$(250) dim vpw$(250),vcn$(250),vrs$(250),vdl$(250) %nolist hdr$="### First Last Location ACL Date Time CLS STAT EQ" def pdat$(x$)=mid$(x$,3,2)+"/"+right$(x$,2)+"/"+left$(x$,2) rem make MM/DD/YY def ptim$(x$)=left$(x$,2)+":"+mid$(x$,3,2)+":"+right$(x$,2) rem make HH:MM:SS def fill$(x$,n%) integer i for i=1 to n% x$=x$+" " next i fill$=left$(x$,n%) fend def header(x$) print chr$(27);"E" print x$ print : print : print fend dim eq$(9),os$(7) eq$(1)="KAYPRO" eq$(2)="OSBORNE" eq$(3)="NORTH STAR" eq$(4)="XEROX" eq$(5)="IBM" eq$(6)="IBM CLONE" eq$(7)="TANDY" eq$(8)="S-100" eq$(9)="OTHER" os$(1)="CP/M 2.2" os$(2)="CP/M Plus" os$(3)="MP/M" os$(4)="MSDOS" os$(5)="TurboDOS" os$(6)="xxNIX" os$(7)="other" os$(8)="CP/M-86" print "[RTDS (c) 1984 ESKAY]" print "[MAINT v2.00]" print "[";pdat$(date$);" - ";ptim$(time$);"]" print dim ac$(9) ac$(0) = "NEW CALLER" ac$(1) = "RESTRICTED" ac$(3) = "FULL USER" ac$(4) = ac$(3) ac$(5) = ac$(3) ac$(9) = "SYSOP" ufile$="USER"+CHR$(ASC("S")+128)+".SYS" open ufile$ recl 128 as 1 loop: print : print : print : print print "Select one:" : print print " a = Add a new user" print " b = Browse through file" print " d = Delete a user" print " e = Edit user data" print " l = List (by access level)" print " q = Query (search for user)" print " s = Sort file by # of calls" print print " x = eXit to TurboDOS" print input "Your Choice Please "; line sel$ sel$=ucase$(sel$)+" " jmp=match(left$(sel$,1),"ADELQXSB",1) if jmp=0 then print : goto loop on jmp goto add,delt,edit,lst,search,quit,sort,browse rem rem add a new user rem add: call header("[add new user]") print "CR returns to menu..." input "Enter user's FIRST NAME > ";line nfn$ input " LAST NAME > ";line nln$ if nfn$="" or nln$="" then goto loop nfn$=ucase$(nfn$) : nln$=ucase$(nln$) add.lp: for i%=1 to 250 read #1, i%; ufn$,uln$,uct$,uac$,udt$,utm$,upw$,ucn$,urs$,udl$ if udl$="*" then goto add.f.sp next i% print : print print "SORRY, NO MORE ROOM IN FILE!" print : goto loop add.f.sp: print "Found room for ";nfn$;" ";nln$;" at record # ";i% print "Please enter now:" input " location "; line nct$ : nct$=ucase$(nct$) input " password (or CR) "; line npw$ if npw$="" then npw$=" " input " access level 0..9 "; line nac$ print print #1, i%; nfn$,nln$,nct$,nac$,"000000","000000",npw$,"0","res"," " goto add search: call header("[search for name]") print "Enter LAST name (partial name may match more)" input "or press CR to return to menu > ";line sln$ if sln$="" then goto loop print : print sln$=ucase$(sln$) for i%=1 to 250 read #1, i%; ufn$,uln$,uct$,uac$,udt$,utm$,upw$,ucn$,urs$,udl$ if match(sln$,uln$,1) = 1 then gosub prt.dta :\ input "hit CR to continue"; line xx$ next i% goto search delt: call header("[delete user entry]") input "Enter LAST NAME or CR to quit > "; line dln$ if dln$="" then goto loop dln$=ucase$(dln$) yn$="" for i%=1 to 250 read #1, i%; ufn$,uln$,uct$,uac$,udt$,utm$,upw$,ucn$,urs$,udl$ if (uln$<>dln$) or (udl$<>" ") then goto no.dlt gosub prt.dta input ">>>>>>>>>>>> DELETE THIS ENTRY ? "; line yn$ yn$=ucase$(yn$)+"N" if left$(yn$,1)="Y" then udl$="*" : gosub wrt.dta : goto delt input " Continue search ? "; line yn$ yn$=ucase$(yn$)+"N" if left$(yn$,1)="N" then goto delt no.dlt: next i% if yn$="" then print ">>>>>> NO MATCH FOUND" goto delt wrt.dta: print #1, i%; ufn$,uln$,uct$,uac$,udt$,utm$,upw$,ucn$,urs$,udl$ return edit: call header("[edit record]") input "Enter LAST NAME or CR to exit > "; line eln$ if eln$="" then goto loop eln$=ucase$(eln$) yn$="" for i%=1 to 250 read #1, i%; ufn$,uln$,uct$,uac$,udt$,utm$,upw$,ucn$,urs$,udl$ if uln$<>eln$ then goto no.ed gosub prt.dta input "Edit this entry (n=search for next) "; line yn$ if left$(ucase$(yn$)+"N",1)="N" then goto no.ed print "Hit CR to keep data, else enter new" print "FIRST NAME : ";ufn$;tab(40);"> "; input line nfn$ : if nfn$<>"" then ufn$=ucase$(nfn$) print "LAST NAME : ";uln$;tab(40);"> "; input line nln$ : if nln$<>"" then uln$=ucase$(nln$) print "LOCATION : ";uct$;tab(40);"> "; input line nct$ : if nct$<>"" then uct$=ucase$(nct$) print "PASSWORD : ";upw$;tab(40);"> "; input line npw$ : if npw$<>"" then upw$=ucase$(npw$) print "ACCESS LEVEL : ";uac$;tab(40);"> "; input line nac$ : if nac$<>"" then uac$=ucase$(nac$) print "STATUS (ADT) :";udl$;tab(40);"> "; input line ndl$ : ndl$=ucase$(ndl$) if ndl$="A" then ndl$=" " if ndl$="D" then ndl$="*" if ndl$="T" then ndl$="-" if ndl$<>"" then udl$=ndl$ gosub wrt.dta goto edit no.ed: next i% if yn$="" then print ">>>>> NO MATCH FOUND" goto edit lst: call header("[list by acl]") input "Enter ACL (0..9, or ?=all [any other=menu]) "; line mac$ if match(mac$,"0123456789?",1) = 0 then goto loop prt%=0 input "List to
rinter or