1 ' signon subsystem -- Subsystem Configurator
5 '	by dick lieber
7 DIM ACLARRAY%(6,11)
8 DIM TEXTFILE$(8)
9 %include CONFIG.CMN
30 VERSION$="1.4 {10/14/82}"	'initial release was 1.01
31 PWDFILE$="pwds"
32 BSTRING$=CHR$(8)+" "+CHR$(8)
33 DEFDRIVE$="A:"
34 POSYSFILE$="POSYS"
69 '
72 '
74 DIM PARAPROMPT$(6)
75 '
77 ON ERROR GOTO 1000
79 IF PWDSOPEN% <> 0 THEN GOTO 128
80 '	defaults - do not change here (see SIGNON.DOC)
81 '
82 PWD1$="PASS1"
84 PWD2$="PASS2"
86 PWD3$="PASS3"
88 BULLFILE$="BULLETIN"
89 INSTRFILE$="INSTRUCT"
90 SUCESSFILE$="SUCESS"
91 SPECIALFILE$="SPECIAL"
92 OPTIONFILE$="OPTION"
93 EXITFILE$="BYEBYE"
94 SIGNONMESS$="RCPM Signon Subsystem by Dick Lieber"
95 NEWCOMFILE$="NEWCOM"
96 OPTIONMESS$="Want information on new system features"
97 NOACCESSFILE$="NOACC"
98 ALLOWNEW%=1
99 PWDACL%=1
100 MAXPW%=3
101 SYSOPSLVL%=10
102 USERNUMBER%=1
103 DENIEDCOMMENT%=1
104 CLEARSCR$=CHR$(4)
105 MUSTQUALIFY%=1
106 QUALQUESTION$="What is the name of Digital Research's standard debugger"
107 QUALANSWER1$="DDT"
108 QUALANSWER2$="SID"
109 SKIPFILES%=0
110 RAMPOKE%=1
111 RAMPOKEADDRESS%=&H3F
112 QUALNONPWD%=1
113 NOCLOCK%=1
114 TESTADDRESS = &HF000
115 MGRDRIVE$="A:"
116 BYEPROG$="BYE81"
118 SPECIALEVEL%=4
119 BYEPOKE%=0: BYEPARAMS%=3
120 STATUSLINE%=0
121 WHEELOPTION%=0: WHEEL%=&H3E: RESTRICT%=123: UNRESTRICT%=0
122 MODEMCTLOPT%=1: MODEMPORT%=&HC3: DISCONNECT%=37
123 PAGESIZE%=24
124 FINISHFILE$="FINISH"
128 '
129 CRLF$=CHR$(&HA)+CHR$(&HD)
130 '	on-off function
131 DIM ONOFF$(1)
132 ONOFF$(0)="Off"
133 ONOFF$(1)="On "	'	#
134 DEF FNONOFF$(ONOFF%)=ONOFF$(ONOFF%)
135 DEF FNLINES$(NLINES%)=STRING$(NLINES%,CRLF$)
136 DEF FNMAKEHEX$(S$,POINTER%,SIZE%)=

	RIGHT$("0000"+HEX$(ASC(MID$(S$,POINTER%))), SIZE%)+"H "
137 DEF FNDISPHEX$(X%)=RIGHT$("00"+HEX$(X%),2)+"H "
399 GOTO 10000
400 %INCLUDE 400500.SSB
600 '
604 ' password code entry
608 ' get string (echo random Xes)
612 '1.5	special version for config
616 PWDSTRING$="!1QAZ@2WSX#3EDC$$RFV%5TGB^6YHN&7UJ"
620 PWDSTRING$=PWDSTRING$+"M*8IK,<(9OL.>)0P:;?/_-[=']+~`|\}{"
624 'GOSUB 1600
628 RANDOMIZE(VAL(RIGHT$(TIME$,1)))
632 MAX%=13
636 ANSWER$=""
640 KEY$="*"
644 NKEY%=0
648 WHILE NKEY% <= MAX%
652	KEY$=INPUT$(1)
656	PRINT STRING$(INT(RND(2) * 30 / 10)+1,88);
660	KEY%=ASC(KEY$)
664	IF KEY%=13 THEN RETURN
668	NKEY%=NKEY%+1
672	IF KEY% >= 97 AND KEY% <=122 THEN KEY%=KEY%-32
676	IF KEY% >=0 AND KEY% <=31 THEN KEY%=KEY%+64
680	KEY%=INSTR(PWDSTRING$,CHR$(KEY%))+&H20
684	ANSWER$=ANSWER$+CHR$(KEY%)
688 WEND
692 RETURN
700 '
705 '	get string into ANSWER$ then CRLF
710 '
715 GOSUB 500: PRINT: RETURN
1000 '
1005 '	Error handler
1010 ' 1.5
1015 A$="Error Trap":CR%=2: GOSUB 400
1031 IF ERR=53 THEN NOFILE%=1:RESUME NEXT
1032 IF ERR=62 THEN RESUME NEXT
1040 ON ERROR GOTO 0
1100 %INCLUDE 1100.SSB
1800 '
1804 '	choose a password
1808 '
1811 OLDPWD$=PWD$
1812 PRINT
1816 A$="Choose a password.   It may be any":CR%=2:GOSUB 400
1820 A$="combination of characters, except RETURN and may":GOSUB 400
1824 A$="be up to 13 characters in length.":GOSUB 400
1828 A$="Press RETURN after typing your password.":GOSUB 400
1832 PRINT
1836 A$="	> ":CR%=12: GOSUB 400
1840 MAX%=13
1844 GOSUB 600
1845 IF NKEY%=0 THEN PWD$=OLDPWD$: RETURN
1848 PWD$=ANSWER$
1852 PRINT
1856 IF PWD$=STRING$(13,42) THEN A$="Sorry that password isn't allowed.":

			CR%=2:GOSUB 400: GOTO 1812
1860 A$="To make sure, type it again.":CR%=2:GOSUB 400
1864 A$="	> ":CR%=1:GOSUB 400
1868 GOSUB 600
1872 PRINT
1876 IF PWD$<>ANSWER$ THEN A$="They don't match.": GOSUB 400: GOTO 1812
1880 PRINT
1884 A$="		ok":CR%=2:GOSUB 400
1886 CHANGED%=1
1888 RETURN
2300 %INCLUDE 2300.SSB
3000 '
3007 '	convert hex or decimal string to single variable
3014 '	ANSWER$ => ANSWER (0-0FFFFH)
3021 ' 1.1	#
3028 ANSWER=0
3035 IF RIGHT$(ANSWER$,1)<>"H" THEN ANSWER=VAL(ANSWER$): GOTO 3091
3042 ANSWER$=LEFT$(ANSWER$,LEN(ANSWER$)-1)
3049 FOR INDEX%=1 TO LEN(ANSWER$)
3056	PIXIE$=MID$(ANSWER$,(LEN(ANSWER$)-INDEX%+1),1)
3063	IF PIXIE$ => "A" THEN PIXIE$="1"+CHR$(&H30+(ASC(PIXIE$)-&H41))
3070	NUMBER=VAL(PIXIE$) * 16 ^ (INDEX%-1)
3077	ANSWER=ANSWER+NUMBER
3084 NEXT INDEX%
3091 IF ANSWER > 65535! THEN ANSWER=0
3092 IF ANSWER > 32768! THEN ANSWER = ANSWER - 65536!
3098 RETURN
3100 '
3105 '	clear screen
3110 '
3115 A$=CLEARSCR$:CR%=1:GOSUB 400: RETURN
3300 '
3305 '	get a single letter -- change to selection # fo menus etc.
3310 '
3315 MAX%=0:GOSUB 500
3320 IF ANSWER$="" THEN SELECTION%=0: RETURN
3325 SELECTION%=ASC(ANSWER$)-64
3327 IF SELECTION% < 0 THEN SELECTION%=0
3330 RETURN
3400 '
3402 '	edit authoriziation array
3404 ' 1.3	#
3406 DATA "Maximum User",

	  "Maximum Drive #",

	  "Total time",

	  "future opt 1",

	  "future opt 2",

	  "user 15 access"
3408 RESTORE 3406
3410 FOR INDEX%=0 TO 5
3412	READ PARAPROMPT$(INDEX%)
3414 NEXT INDEX%
3416 GOSUB 3100
3418 PRINT TAB(25);"Authorization Table Editor"
3420 PRINT
3422 PRINT
3424 PRINT " access level ===>";
3426 FOR INDEX%=0 TO 10
3428	PRINT USING "  ## ";INDEX%;
3430 NEXT INDEX%
3432 PRINT:PRINT TAB(20);"+"+STRING$(55,"-")+"+"
3434 FOR INDEX%=0 TO 5
3436	OVER%=18-LEN(PARAPROMPT$(INDEX%)):

		PRINT CHR$(INDEX%+97);TAB(OVER%); PARAPROMPT$(INDEX%);": |";
3438	FOR I%=0 TO 10
3440		IF INDEX% < 5 THEN

		PRINT USING "###  ";ACLARRAY%(INDEX%,I%);

		ELSE PRINT " ";FNONOFF$(ACLARRAY%(INDEX%,I%));" ";
3442	NEXT I%
3444	PRINT TAB(76);"|": IF INDEX% < 5 THEN PRINT TAB(20);"|";TAB(76);"|"
3446 NEXT INDEX%
3447 PRINT TAB(20); "+"+STRING$(55,"-")+"+"
3448 PRINT:PRINT TAB(20);"Type letter > ";
3450 GOSUB 3300
3452 IF SELECTION%=0 THEN RETURN
3454 IF SELECTION% > 6 THEN GOTO 3448 ELSE SELECTION%=SELECTION%-1
3456 PRINT TAB(20);"Access level > ";
3458 MAX%=2: GOSUB 500
3460 IF NKEY%=0 THEN GOTO 3448
3462 IF ANSWER$="ALL" THEN BULKLOAD%=1 

	ELSE

		BULKLOAD%=0:

		ACLVL%=VAL(ANSWER$)
3464 IF ACLVL% > 10 THEN 3456
3466 PRINT TAB(20);PARAPROMPT$(SELECTION%);" for ";
3468 IF BULKLOAD%=1 THEN PRINT "all ";
3470 PRINT "access level";
3472 IF BULKLOAD%=0 THEN PRINT ACLVL%;

	ELSE

	PRINT "s ";
3473 IF SELECTION% < 5 THEN PRINT "> ";

	ELSE

	PRINT "(y or n) > ";
3474 GOSUB 500
3476 IF NKEY%=0 THEN GOTO 3416
3477 VALUE%=0
3478 IF SELECTION% < 5 THEN VALUE%=VAL(ANSWER$)
3479 IF SELECTION% => 5 THEN IF ANSWER$="Y" THEN VALUE%=1
3480 IF VALUE% > 255 THEN 

	PRINT TAB(20);"Value must be in the range of 0 - 255.": GOTO 3466
3482 IF BULKLOAD%=0 THEN

	ACLARRAY%(SELECTION%,ACLVL%)=VALUE%

	ELSE

		FOR INDEX%=0 TO 10:

			ACLARRAY%(SELECTION%,INDEX%)=VALUE%:

		NEXT INDEX%
3484 CHANGED%=1
3486 GOTO 3416
3700 '
3702 '	SYSOP password editor
3704 '1.2
3706 GOSUB 3100
3708 PRINT TAB(30); "SYSOP Password Editor"
3710 PRINT FNLINES$(3)
3712 PRINT: PRINT TAB(20);"a	SYSOP First Name: "; PWD1$
3714 PRINT: PRINT TAB(20);"b	 SYSOP Last Name: "; PWD2$
3716 PRINT: PRINT TAB(20);"c	        Password: "; STRING$(13,42)
3740 PRINT FNLINES$(3); TAB(16); "Enter selection or press RETURN if done > ";
3744 GOSUB 3300 ' selection
3748 IF SELECTION%=0 THEN RETURN
3760 ON SELECTION% GOSUB 3768,3772,3776
3764 GOTO 3706
3768 PRINT FNLINES$(2); TAB(20);"Enter First Name for SYSOP > ";: MAX%=20:

	GOSUB 500: IF NKEY%=0 THEN RETURN ELSE

	PWD1$=ANSWER$: CHANGED%=1: RETURN
3772 PRINT FNLINES$(2); TAB(20); "Enter Last Name for SYSOP > ";: MAX%=20:

	GOSUB 500: IF NKEY%=0 THEN RETURN ELSE

	PWD2$=ANSWER$: CHANGED%=1:RETURN
3776 GOSUB 3100: GOSUB 1800: PWD3$=ANSWER$: CHANGED%=1: RETURN
4700 '
4705 '	pause 
4710 '
4715 PRINT TAB(25);
4720 LINE INPUT "Press RETURN to continue."; A$
4725 RETURN
5000 '
5005 '	test that user is the SYSOP
5010 '1.1
5015 OPEN "I", #1, DEFDRIVE$+"LASTCALR"
5017	IF NOFILE%= 1 THEN CLOSE #1:RETURN
5020	INPUT #1, FRNAME$,LNAME$,ACLVL%
5025 CLOSE #1
5030 IF FRNAME$+LANME$ = "SYSOP" AND ACLVL% => 9 THEN

	SYSOP%=1 ELSE SYSOP%=0
5035 RETURN
5100 '
5105 '	Subsystem Configurator - Main menu
5110 ' 1.3
5115 GOSUB 3100	'clear
5120 PRINT
5125 PRINT TAB(30);"Signon Subsystem Configurator"
5130 PRINT TAB(30);"<version ";VERSION$;">"
5135 PRINT
5140 PRINT TAB(20);"a	SYSOP Passwords"
5145 PRINT TAB(20);"b	Qualification options"
5150 PRINT TAB(20);"c	File names"
5155 PRINT TAB(20);"d	Authorization Editor"
5160 PRINT TAB(20);"e	Set Subsystem parameters"
5165 PRINT TAB(20);"f	Testing options"
5170 PRINT TAB(20);"g	Hardware parameters"
5180 PRINT: PRINT TAB(20);"q	Leave Configurator"
5181 PRINT TAB(20);"r	Go back to subsystem manager"
5185 PRINT:PRINT TAB(25);"Press the letter of your selection > ";
5190 GOSUB 3300	'selector
5195 RETURN
5200 '
5204 '	make textfile$ array
5208 '
5212 TEXTFILE$(1)=BULLFILE$
5216 TEXTFILE$(2)=SUCESSFILE$
5220 TEXTFILE$(3)=OPTIONFILE$
5224 TEXTFILE$(4)=INSTRFILE$
5228 TEXTFILE$(5)=NEWCOMFILE$
5232 TEXTFILE$(6)=NOACCESSFILE$
5236 TEXTFILE$(7)=EXITFILE$
5240 TEXTFILE$(8)=SPECIALFILE$
5244 RETURN
5300 '
5304 '	exit subsystem configurator
5308 ' 1.0
5312 GOSUB 5900	'put PWDFILE$
5316 END
5400 '
5402 '	edit file names
5404 ' 1.3
5406 GOSUB 3100	'clear
5408 PRINT TAB(15);"Names of various files"
5410 PRINT
5412 PRINT TAB(20);"a	This bulletin is a always     : ";TEXTFILE$(1)
5414 PRINT TAB(20);"	printed before signing on."
5416 PRINT TAB(20);"b	This message is always        : ";TEXTFILE$(2)
5418 PRINT TAB(20);"	printed after signon."
5420 PRINT TAB(20);"c	This message is printed before: ";TEXTFILE$(3)
5422 PRINT TAB(20);"	leaving if requested."
5424 PRINT TAB(20);"d	Displayed just before the     : ";TEXTFILE$(4)
5426 PRINT TAB(20);"	user enters CP/M."
5428 PRINT TAB(20);"e	This is the message given to  : ";TEXTFILE$(5)
5430 PRINT TAB(20);"	new users, on their first time."
5432 PRINT TAB(20);"f	This is the message file given: ";TEXTFILE$(6)
5434 PRINT TAB(20);"	to a non-user attempting access."
5436 PRINT TAB(20);"g	This is the message given a   : ";TEXTFILE$(7)
5438 PRINT TAB(20);"	user when leaving the system."
5440 PRINT TAB(20);"h	Message for special users     : ";TEXTFILE$(8)
5442 PRINT TAB(20);"	above access level";SPECIALEVEL%
5444 PRINT TAB(20);"i	Run name of BYEXX.ASM program : ";BYEPROG$;".COM"
5446 PRINT TAB(20);"j	Run name of FINISH program    : ";FINISHFILE$;".COM"
5448 PRINT:PRINT TAB(15);"Type letter or RETURN for main menu > ";
5450 GOSUB 3300	'selector
5452 IF SELECTION%=0 THEN RETURN
5454 IF SELECTION% = 9 THEN

	PRINT FNLINES$(1);TAB(20); "BYE program name (omit .COM) > ";:

	MAX%=8: GOSUB 500: IF NKEY%=0 THEN RETURN

	ELSE BYEPROG$=ANSWER$: GOTO 5400
5456 IF SELECTION% = 10 THEN

	PRINT FNLINES$(1);TAB(20); "Runtime name you've selected for the":

	PRINT TAB(20);"SIGNON module 'FINISH' (omit .COM) > ";:

	MAX%=8: GOSUB 500: IF NKEY%=0 THEN RETURN

	ELSE FINISHFILE$=ANSWER$: GOTO 5400
5458 PRINT FNLINES$(1); TAB(20);"Type NONE if no file."
5460 IF SELECTION% > 9 THEN GOTO 5400
5462 MAX%=0
5464 PRINT FNLINES$(1); "New file name > ";: GOSUB 500
5466 IF NKEY%=0 THEN GOTO 5400
5468 IF ANSWER$=CHR$(&H1B) THEN

	TEXTFILE$(SELECTION%)="NONE": GOSUB 3100: GOSUB 3100: GOTO 5400

	ELSE FIRST$=ANSWER$
5470 MAX%=7: GOSUB 500
5472 TEXTFILE$(SELECTION%)=FIRST$+ANSWER$
5474 GOTO 5400
5900 '
5904 '	put and close PWDFILE$
5908 ' 1.11
5912 CLOSE
5916 RO%=0: FCBNAME$=PWDFILE$: GOSUB 2300
5920 OPEN "O", #1, DEFDRIVE$+PWDFILE$
5924 PRINT #1, PWD1$;",";PWD2$;",";PWD3$;",";ALLOWNEW%;SIGNONMESS$;

	",";OPTIONMESS$
5928 PRINT #1, TEXTFILE$(1);",";

	TEXTFILE$(2);",";

	TEXTFILE$(3);",";

	TEXTFILE$(4);",";

	TEXTFILE$(5);",";

	TEXTFILE$(6);",";

	TEXTFILE$(7);",";

	TEXTFILE$(8)
5932 PRINT #1, PWDACL%; MAXPW%; SYSOPSLVL%; USERNUMBER%; DENIEDCOMMENT%
5936 PRINT #1, CLEARSCR$;",";NOCLOCK%;SPECIALEVEL%
5940 PRINT #1,MUSTQUALIFY%;",";QUALQUESTION$;",";QUALANSWER1$;",";

		QUALANSWER2$;",";QUALNONPWD%;",";MGRDRIVE$
5944 PRINT #1, SKIPFILES%, RAMPOKE%, RAMPOKEADDRESS%, TESTADDRESS
5948 PRINT #1,BYEPOKE%,BYEPARAMS%;",";BYEPROG$;",";FINISHFILE$
5952 PRINT #1,SYSOPONLY%,WHEELOPTION%,WHEEL%,RESTRICT%,UNRESTRICT%,

	MODEMCTLOPT%
5956 FOR INDEX%=0 TO 5
5960	FOR I%=0 TO 10
5964		PRINT #1, ACLARRAY%(INDEX%,I%)
5968	NEXT I%
5972 NEXT INDEX%
5976 PRINT #1, MODEMPORT%, DISCONNECT%, PAGESIZE%
5980 PRINT #1, STATUSLINE%;STATLEN%;",";STATINIT$;",";STATEND$;",";STATQUIT$;

	",";STATDATA%;",";STATSTATUS%;",";STATRDY%;",";STATPOLARITY%
5984 CLOSE #1
5988 RO%=1: FCBNAME$=PWDFILE$: GOSUB 2300
5992 RETURN
6900 '
6903 '	testing Subsystem options
6906 '
6909 GOSUB 3100
6912 PRINT: PRINT  TAB(20);"a	System clock available: ";

	FNONOFF$(1 XOR NOCLOCK%)
6915 PRINT:PRINT TAB(20);"b	Address of DRIVER module: ";

	HEX$(TESTADDRESS)+"H"
6918 PRINT:PRINT TAB(20);"c	Drive for Subsystem manager disk: "; MGRDRIVE$
6921 PRINT:PRINT TAB(20);"d	Poke parameters into BYE: ";

	FNONOFF$(BYEPOKE%)
6924 GOSUB 3300
6927 IF SELECTION%=0 THEN RETURN
6930 ON SELECTION% GOSUB 6936,6942,6960,6975
6933 CHANGED%=1: GOTO 6900
6936 IF NOCLOCK%=0 THEN NOCLOCK%=1 ELSE NOCLOCK%=0
6939 RETURN
6942 PRINT:

	PRINT TAB(20);"This address is where you put the assembly langauge":

	PRINT TAB(20);"module DRIVER, used when testing the Subsystem":

	PRINT TAB(20);"with the interpreter."
6945 PRINT:PRINT TAB(20);"Enter new adress in decimal or hex> ";:

	MAX%=5: GOSUB 500
6948 IF NKEY%=0 THEN RETURN
6951 GOSUB 3000
6954 TESTADDRESS=ANSWER
6957 RETURN
6960 PRINT:PRINT TAB(20);"This is the drive where you put the Subsystem":

	PRINT TAB(20);"Manager disk.  Usually B.":

	PRINT:PRINT TAB(20);"Type letter of drive > ";
6963 MAX%=0: GOSUB 700
6966 IF NKEY%=0 THEN RETURN
6969 MGRDRIVE$=ANSWER$+":"
6972 RETURN
6975 '
6978 GOSUB 3100
6981 PRINT FNLINES$(3);  TAB(20);"a	Poke parameters into bye: ";

	FNONOFF$(BYEPOKE%)
6984 IF BYEPOKE%<>0 THEN 

	PRINT : PRINT ;TAB(20);"b	Number of parameters: ";BYEPARAMS%
6987 PRINT:PRINT TAB(20);"Type letter > ";
6990 GOSUB 3300: IF SELECTION%=0 THEN RETURN
6993 IF SELECTION%=2 THEN

	PRINT TAB(20); "Number of parameters to poke > ";:

	MAX%=2: GOSUB 500:

	IF NKEY%=0 THEN GOTO 6900

		ELSE

		BYEPARAMS%=VAL(ANSWER$):

		GOTO 6975
6996 IF SELECTION% <> 1 THEN 6975
6999 IF BYEPOKE%=0 THEN BYEPOKE%=1: GOTO 6975 ELSE

	 BYEPOKE%=0: GOTO 6975
7200 '
7205 '	jumpout to POSYS
7210 ' 1.1
7211 GOSUB 5900
7215 RUN MGRDRIVE$+POSYSFILE$
7225 RETURN
7300 '
7304 '	edit subsystem configuration parameters
7308 ' 1.4
7312 GOSUB 3100	'clear
7316 PRINT TAB(20);"Misc. Parameters Menu"
7320 PRINT FNLINES$(2)

	 TAB(10);"a	Allow new users:";TAB(57); FNONOFF$(ALLOWNEW%)
7324 PRINT TAB(10);"b	Maximum access level without password:";

	TAB(57);PWDACL%
7328 PRINT TAB(10);"c	Access level that SYSOP gets:";

	TAB(57);SYSOPSLVL%
7332 PRINT TAB(10);"d	Clear screen string:"; TAB(57);
7336 FOR INDEX%=1 TO LEN(CLEARSCR$):

	PRINT FNMAKEHEX$(CLEARSCR$,INDEX%,2);:

	NEXT INDEX%
7340 PRINT: PRINT TAB(10);"e	Number of tries to get password correct:";

				TAB(57);MAXPW%
7344 PRINT TAB(10);"f	User number of ancillary files:";

	TAB(57);USERNUMBER%
7348 PRINT TAB(10);"g	Signon message:"
7352 PRINT TAB(24);"	";SIGNONMESS$
7356 PRINT TAB(10);"h	Ask for optional file message:"
7360 PRINT TAB(24);"	";OPTIONMESS$
7364 PRINT TAB(10);"i	Skip printing of message files:";

	TAB(57);FNONOFF$(SKIPFILES%)
7368 PRINT TAB(10);

	"j	Special users access level (minimum):";

	TAB(57); SPECIALEVEL%
7369 PRINT TAB(10);"k	Allow only SYSOP to use utilities:	";

	FNONOFF$(SYSOPONLY%)
7370 PRINT TAB(10);"l		Page size for listings:		";PAGESIZE%
7372 PRINT
7376 PRINT TAB(15);"Type letter of item to change or RETURN for main menu."
7380 GOSUB 3300	'selector
7384 IF SELECTION%=0 THEN RETURN
7388 ON SELECTION% GOSUB 7400,7405,7411,7417,7434,7441,7422,7428,7447,7449,

	7455,7460
7392 CHANGED%=CHANGED%+1
7396 GOTO 7300
7400 '	
7401 '	subsystem editor handler
7402 '1.2
7403 IF ALLOWNEW%<>0 THEN ALLOWNEW%=0 ELSE ALLOWNEW%=1
7404 RETURN
7405 PRINT:PRINT TAB(20); "Users with this access level or below"
7406 PRINT TAB(20);"do not require a password to access the system."
7407 PRINT:PRINT TAB(20);"Enter new access level > ";
7408 MAX%=3: GOSUB 500
7409 IF NKEY%<>0 THEN PWDACL%=VAL(ANSWER$)
7410 RETURN
7411 PRINT:PRINT TAB(20);"The SYSOP is automatically assigned this"
7412 PRINT TAB(20);"when he signs in."
7413 PRINT:PRINT TAB(20);"Enter new SYSOP access level > ";
7414 MAX%=3:GOSUB 500
7415 IF NKEY%<>0 THEN SYSOPSLVL%=VAL(ANSWER$)
7416 RETURN
7417 PRINT:PRINT TAB(20);"Type the characters that are used to clear"
7418 PRINT TAB(20);"the screen for your terminal then press RETURN > ";
7419 MAX%=3: CTRLOK%=1: GOSUB 500
7420 IF NKEY%<>0 THEN CLEARSCR$=ANSWER$
7421 RETURN
7422 PRINT:PRINT TAB(20); "This message is printed before the signon file"
7423 PRINT TAB(20);"is printed."
7424 PRINT:PRINT TAB(15);"New Message > ";
7425 MAX%=65: KEEPLOWER%=1: GOSUB 500
7426 IF ANSWER$<>"" THEN SIGNONMESS$=ANSWER$
7427 RETURN
7428 PRINT:PRINT TAB(20);"This message is the question asked before"
7429 PRINT TAB(20);"accepting a yes/no for the optional file."
7430 PRINT:PRINT TAB(15);"New Message > ";
7431 MAX%=65: KEEPLOWER%=1: GOSUB 500
7432 IF ANSWER$<>"" THEN OPTIONMESS$=ANSWER$
7433 RETURN
7434 PRINT:PRINT TAB(20);"This is the number of tries that the user gets"
7435 PRINT TAB(20);"to guess at his password."
7437 PRINT: PRINT TAB(20);"Type new number of tires > ";
7438 MAX%=2:  GOSUB 500
7439 IF NKEY%<>0 THEN MAXPW%=VAL(ANSWER$)
7440 RETURN
7441 PRINT:PRINT TAB(20);"This is the cp/m user number for all files,"
7442 PRINT TAB(20);"except pwds, the configuration file."
7443 PRINT:PRINT TAB(20);"Type user number > ";
7444 MAX%=2: GOSUB 500
7445 IF NKEY%<>0 THEN USERNUMBER%=VAL(ANSWER$)
7446 RETURN
7447 IF SKIPFILES%=0 THEN SKIPFILES%=1 ELSE SKIPFILES%=0
7448 RETURN
7449 PRINT : PRINT TAB(20);"Minimum level of special users > ";
7450 MAX%=3
7451 GOSUB 500
7452 IF NKEY%<>0 THEN SPECIALEVEL%=VAL(ANSWER$)
7453 RETURN
7455 IF SYSOPONLY%=0 THEN SYSOPONLY%=1: RETURN ELSE SYSOPONLY%=0: RETURN
7460 PRINT:PRINT TAB(10);"Number of lines on a a screen > ";
7462 MAX%=3: GOSUB 500
7464 IF NKEY%=0 THEN RETURN
7466 PAGESIZE%=VAL(ANSWER$): RETURN
7500 '
7504 '	new users options
7508 '
7512 GOSUB 3100
7516 PRINT FNLINES$(2); TAB(20);"a	Allow any new users: ";

	FNONOFF$(ALLOWNEW%)
7528 IF ALLOWNEW%=0 THEN 

	PRINT FNLINES$(3);

	TAB(20);"b	Let denied new users leave a message: ";

	FNONOFF$(DENIEDCOMMENT%)
7536 PRINT FNLINES$(2); TAB(20);"Press letter > ";
7540 GOSUB 3300
7544 IF SELECTION%=0 THEN RETURN
7548 IF SELECTION% = 1 THEN 

	IF ALLOWNEW%=0 THEN ALLOWNEW%=1 ELSE ALLOWNEW%=0
7552 IF SELECTION%=2 THEN 

	IF DENIEDCOMMENT%=0 THEN DENIEDCOMMENT%=1 ELSE DENIEDCOMMENT%=0
7556 RETURN
7600 '
7604 '	qualification options
7608 '
7612 GOSUB 3100
7616 PRINT TAB(30);"Qualification Question"
7624 PRINT FNLINES$(4); TAB(20);"a	Qualification test needed: ";

	FNONOFF$(MUSTQUALIFY%)
7628 IF MUSTQUALIFY%<>0 THEN GOSUB 7716
7632 PRINT:PRINT TAB(20);"Press letter or RETURN for last menu > ";
7636 GOSUB 3300
7640 IF SELECTION%=0 THEN RETURN
7644 IF SELECTION%=1 THEN 

	IF MUSTQUALIFY%=0 THEN MUSTQUALIFY%=1: GOTO 7600

	 ELSE MUSTQUALIFY%=0 : QUALNONPWD%=0: GOTO 7600
7648 ON SELECTION% GOSUB 7656,7656,7676,7696,7750
7649 CHANGED%=1
7652 GOTO 7600
7656 PRINT:PRINT TAB(20);"This is the question asked before allowing anyone on."
7660 PRINT:PRINT TAB(5);"New question > ";
7664 MAX%=64: KEEPLOWER%=1: GOSUB 700
7668 IF NKEY%<>0 THEN QUALQUESTION$=ANSWER$
7672 RETURN
7676 PRINT:PRINT TAB(20);"This is a correct answer to the question in b above."
7680 PRINT:PRINT TAB(20);"Type new answer > ";
7684 MAX%=20: GOSUB 700
7688 IF NKEY%<>0 THEN QUALANSWER1$=ANSWER$
7692 RETURN
7696 PRINT:PRINT TAB(20);"This is an alternate correct answer."
7700 PRINT:PRINT TAB(20);"Type new alternate answer > ";
7704 MAX%=20: GOSUB 700
7708 IF NKEY%<>0 THEN QUALANSWER2$=ANSWER$
7712 RETURN
7716 '	this is the rest of the qual menu - shown if qual on
7717 PRINT:PRINT TAB(20);"b	Qualification question:"
7720 PRINT TAB(20);"	";QUALQUESTION$+"?"
7724 PRINT:PRINT TAB(20);"c	Answer:"
7728 PRINT TAB(20);"	";QUALANSWER1$
7732 PRINT:PRINT TAB(20);"d	Alternate answer:"
7736 PRINT TAB(20);"	";QUALANSWER2$	
7738 PRINT: PRINT TAB(20);"e	Require all users below level ";PWDACL%+1:

	PRINT TAB(20);"	to answer qualification question: ";

	FNONOFF$(QUALNONPWD%)
7740 RETURN
7750 IF QUALNONPWD%=0 THEN QUALNONPWD%=1 ELSE QUALNONPWD%=0
7752 RETURN
7900 '
7901 '	hardware dependent paramaters
7905 gosub 3100
7910 PRINT fnlines$(10);tab(20);"Please Wait.";
7920 chain mgrdrive$+"CNFG1.OVR"
7930 print mgrdrive$+"CNFG1.OVR not found"
7940 gosub 4700
7950 return
10000 '
10010 '	main program starts here
10020 ' 1.0
10031 if pwdsopen% = 0 then GOSUB 1100: pwdsopen%=1 else goto 10070
10032 IF SYSOPONLY%=1 THEN GOSUB 5000: ELSE SYSOP%=1
10040 IF NOFILE%=1 THEN LINE INPUT "Password  > ";P$:

	IF P$<> "SIGNON" THEN END
10050 IF SYSOP%=0 THEN PRINT "CONFIG?": END
10055 GOSUB 5200
10070 GOSUB 5100	'make menu selection
10075 IF SELECTION%=17 GOTO 5300
10076 IF SELECTION%=18 THEN GOTO 7200
10080 ON SELECTION% GOSUB 3700,7600,5400,3400,7300,6900,7900
10090 GOTO 10070
10100 RETURN
20000 ' end
