; PAE ProDOS v4.5b ; Seg #3 (SysOp) on nocar goto link.term start input @0 \"SysOp command (?=Menu):"i$:if i$="A" goto link.pae push start if i$="?" f$=bd$+"pae.sysop":goto show.file if i$="Q" goto quit if i$="U" goto user.log if i$="I" goto tfer.pts if i$="N" goto add.drive if i$="C" goto convert if i$="*" pop:pop:gosub write.pts:clear:recall "l:variables":kill "l:variables":link ls$ if i$="G" goto give.acc if i$="H" goto hang if i$="R" goto rename if i$="L" goto list if i$="P" pop:pop:gosub write.pts:link l4$ if i$="S" goto secondary return ; List Every User's Points list print \"Show Every User's Points" input @2 \"Start at user #"a:if (not a) or (a>nu) return input @1 "Lowest point value to show: "gh list1 print:open #1,bd$+"pae.points":open #2,cd$+"users" for b=a to nu:position #1,12,b:input #1,x,up,dn if x Aborted <%":close #1:close #2:return list2 next:print \"Listing completed.":close #1:close #2:return ; Rename a Directory File rename print \"Modify a Directory File" input @2 \"Modify file: "f$:if not f$ return if left$(f$,1)<>"#" goto ren1 a=val(mid$(f$,2,(len(f$)-1))):if a<1 return gosub number:goto ren2 ren1 if f$="/" f$=fn$ fn$=f$ open #1,bd$+"dir"+lg$:position #1,95,0:input #1,a if not a close:print \"No files in this directory!":return for b=1 to a:position #1,95,b:input #1,i$,x$ if i$="EMPTY" next:close:print \"File not found":return x=len(f$):if left$(i$,x)=f$ x=b:b=a:next:close:goto ren2 next:close:print \"File not found":return ren2 open #1,bd$+"dir"+lg$:position #1,95,x:input #1,a$,fn$:close print \"Current file data - Enter new"\a$ input @3 a$:if (not a$) or (len(a$)>79) print \"File data unchanged":return input @0 \"Are you sure? "x$:if x$<>"Y" return open #1,bd$+"dir"+lg$:position #1,95,x:print #1,a$,fn$:close print \"New file data saved":return ; Secondary Rename secondary print \"Secondary File Rename" f$="":input @2 \"Rename file: "f$:if not f$ return if left$(f$,1)<>"#" goto sec1 a=val(mid$(f$,2,(len(f$)-1))):if a<1 return gosub number:goto sec2 sec1 if f$="/" f$=fn$ fn$=f$ open #1,bd$+"dir"+lg$:position #1,95,0:input #1,a if not a close:print \"No files in this directory!":return for b=1 to a:position #1,95,b:input #1,i$,x$ if i$="EMPTY" next:close:print \"File not found":return x=len(f$):if left$(i$,x)=f$ x=b:b=a:next:close:goto sec2 next:close:print \"File not found":return sec2 i$=bd$+"dir"+lg$:open #1,i$:position #1,95,x:input #1,a$,fn$:close print \"Current filename: "fn$ input @2 " New filename: "f$:if not f$ return if len(f$)>15 print \"Error - Filename too long":return if instr(":",f$) print \"Error - File must be on current drive":return open #1,i$:position #1,95,x:print #1,a$,f$:close use cd$+"xdos","rename "+lg$+":"+fn$+","+f$ d1$=left$("A"+str$(x)+"."+f$,15) use cd$+"xdos","rename "+lg$+":A"+str$(x)+"."+fn$+","+d1$ print \"File renamed":return ; Hang up hang print \"Hang up? ";:gosub get.key if i$<>"Y" print "No": return print "Yes":pop:pop:goto link.hang ; Exit to main quit print \"Quit PAE to BBS? ";:gosub get.key if i$<>"Y" print "No": return print "Yes":pop:pop:goto link.main ; Sysop User Log user.log print \"User log" print\"1> View user log" print "2> Kill user log" print\"Choice? ";:gosub get.key if (i$="") or ((i$<>"1") and (i$<>"2")) print:return push user.log f$=bd$+"pae.log":print i$; if i$="1" print\:gosub show.file:print\\:return print\\"Kill user log? ";:gosub get.key if i$<>"Y" print "No"\:return print "Yes":kill f$ print \"User log killed"\ return ; Sysop transfer point edit tfer.pts print \"Issue points" input @2 \"User ('C' = current ) #"ww$ ww=val(ww$):if ww$<>"C" goto tfer.pt1 ww=un tfer.pt1 if not ww return open #1,cd$+"users":position #1,vr,ww input #1,p1$,p2$:close if ww=un p3=pt:goto tfer.pt2 open #1,bd$+"pae.points" position #1,12,ww:input #1,p3,up,dn:close tfer.pt2 print \p1$" "p2$" (#"ww")" print \"Current: "p3 input @2 " New: "i$ if not i$ print \"No change":return i=val(i$):open #1,bd$+"pae.points" position #1,12,ww:print #1,i,up,dn:close tfer.pt3 if ww=un pt=i print \"Value changed":return ; Sysop Convert File convert print \"Convert a File to a Directory File" print \"[Type CAT for a catalog]" f$="":input @2 \"Convert file: "f$:if not f$ return if f$="CAT" print:f$=f$+" "+lg$+":":use cd$+"xdos",f$:goto convert if instr(":",f$) print ' Invalid filename - File must be on current drive':return if len(f$)>15 print \"Invalid filename - 15 chars max":return open #1,lg$+":"+f$:a=mark(1):close if a print \"Error - No such filename!":goto convert fn$=f$:input @2" To: "f$:if f$="" return if left$(f$,1)="#" or instr(":",f$) print \"Illegal filename":return if len(f$)>30 print"Invalid file name - max 30 chars":return x=0:open #1,bd$+"dir"+lg$:position #1,95,0:input #1,a if not a x=1:position #1,95,0:print #1,x:goto convert1 for b=1 to a:position #1,95,b:input #1,i$,x$:j$=left$(i$,len(f$)) if j$=f$ print \"File already exists!":b=a:next:close:return if (i$="EMPTY") and (not x) x=b next:if x goto convert1 x=a+1:position #1,95,0:print #1,x convert1 close:use cd$+"xdos","getinfo "+lg$+":"+fn$ gh=peek(edit(5)+7) sz=peek(edit(5)+21)+peek(edit(5)+22)*256 pb=peek(edit(5)+11)+peek(edit(5)+12)*256 open #1,bd$+"pae.filetypes":position #1,4,gh input #1,x$:close if len(x$)=3 print:goto convert3 convert2 input @1 \"Filetype: "x$:if len(x$)<>3 goto convert2 convert3 gosub rating f$=f$+chr$(32,30):f$=left$(f$,30) f$=f$+" "+x$+" ":x$=right$("00"+str$(pb),3) x$=x$+"/"+right$("000"+str$(sz),4) f$=f$+x$+" "+date$+" "+a1$+" "+a2$ open #1,bd$+"dir"+lg$:position #1,95,x:print #1,f$,fn$:close if not sz print \"File conversion unsuccessful.":return print \"File conversion successful.":return ; Sysop Give Access give.acc print \"Give access"\ input @2 "User ('C' = current) #"i$:if not i$ return gh=val(i$):if i$="C" gh=un if (gh<1) or (gh>nu) print \"No such user":return d1$=a1$:d2$=a2$ if gh=un goto give3 if vr=128 move ram,58 to ram2:else move ram,34 to ram2 a=gh:gosub rd.user give3 if d1$ goto give1 print \"No such user" if vr=64 move ram2,34 to ram:else move ram2,58 to ram return give1 open #1,bd$+"pae.points":position #1,12,gh input #1,p3,pb,sz:close give4 print \"User's name: "d1$" "d2$\ print "[1) PAE Access : ";:if flag(20) print "Yes":else print "NO" print "[2) D/L Access : ";:if flag(22) print "Yes":else print "NO" print "[3) U/L Access : ";:if flag(23) print "Yes":else print "NO" print "[4) View File Access: ";:if flag(24) print "Yes":else print "NO" print "[5) Copy File Access: ";:if flag(25) print "Yes":else print "NO" print "[6) Unlimited d/ling: ";:if flag(26) print "Yes":else print "NO" print "[7) U/L to D/L ratio: "pb":"sz input @0 \"Toggle access (0=quit) #"a:if not a goto give2 if (a<1) or (a>7) goto give4 if a=1 flag(20)=(not flag(20)) if a=2 flag(22)=(not flag(22)) if a=3 flag(23)=(not flag(23)) if a=4 flag(24)=(not flag(24)) if a=5 flag(25)=(not flag(25)) if a=6 flag(26)=(not flag(26)) if a=7 goto ratio goto give4 ratio input @2\"Enter new U/L ratio (1-9): "a:if (a<1) or (a>9) return input @2 "Enter new D/L ratio (1-9): "b:if (b<1) or (b>9) return open #1,bd$+"pae.points":position #1,12,gh:print #1,p3,a,b:close goto give1 give2 open #1,bd$+"pae.points":position #1,12,gh input #1,pt,up,dn:close if gh=un return a=gh:gosub wr.user if vr=64 move ram2,34 to ram:else move ram2,58 to ram return ; Add New Drives to Directories add.drive print ' Add New Directories Hit [RETURN] when done. *> NOTE: Do NOT use colons (:) <*' config input @2 "Drive: "a$:if a$="" return open #1,bd$+"drives":position #1,4,0:input #1,a:a=a+1 position #1,4,0:print #1,a:position #1,4,a:print #1,a$:close i$=bd$+"dir"+a$:open #1,i$:a=mark(1):close if not a print "Data file already exists for this drive; erase? "; if not a input @0 lg$:if lg$<>"Y" goto config kill i$:create i$:open #1,i$:position #1,95,0:print #1,0:close goto config ; Subroutines link.main gosub write.pts:gosub goodbye clear:recall "l:variables":kill "l:variables" link lm$,"fromsys" link.term gosub write.pts:gosub goodbye clear:recall "l:variables":kill "l:variables" link lm$,"term1" link.hang gosub write.pts:gosub goodbye pop:clear:recall "l:variables":kill "l:variables" link lm$,"termin2" write.pts open #1,bd$+"pae.points" position #1,12,un:print #1,pt,up,dn close:return goodbye print\ setint(1):copy bd$+"pae.goodbye":setint(""):return show.file setint(1):print:copy f$:setint(""):return rd.user if vr=128 goto rd.user1 open #1,cd$+"users":position #1,64,a:input #1,d1$,d2$\d3$ position #1,64,a,30:read #1,ram,34:close:return rd.user1 open #1,cd$+"users":position #1,128,a input #1,d1$,d2$\d3$\d4$,d5$ position #1,128,a,70 read #1,ram,58:close:return wr.user if vr=128 goto wr.user1 open #1,cd$+"users":position #1,64,a print #1,d1$","d2$\d3$:position #1,64,a,30:write #1,ram,34 close:return wr.user1 open #1,cd$+"users":position #1,128,a print #1,d1$","d2$\d3$\d4$","d5$ position #1,128,a,70 write #1,ram,58:close:return link.pae open #1,bd$+"pae.points":position #1,12,un input #1,pt,up,dn:close link l1$,"return" number open #1,bd$+"dir"+lg$:position #1,95,0:input #1,b if not b close:print \"No files on this drive!":pop:return if a>b close:print \"Error - Highest file # is "b:pop:return position #1,95,a:input #1,i$,x$:close if i$="EMPTY" print \"No such file":pop:return x=a:print " Filename: "left$(i$,30):return uploads i$=bd$+"uploads":open #1,i$:if not mark(1) goto nhere close:create i$:open #1,i$:position #1,80,0:print #1,0 for b=1 to nr:position #1,80,b:print #1,"EMPTY":next nhere position #1,80,0:input #1,bb:bb=bb+1:if bb>nr bb=1 position #1,80,0:print #1,bb:position #1,80,bb i$=lg$+":"+f$+chr$(32,34):f2$=a1$+" "+a2$+chr$(32,20) print #1,left$(i$,34)"|--|"left$(f2$,20)"|"date$"|local":close return rating input @1 "Rate it from 1-10 (?=N/A): "x5$ if x5$="?" x5$="[Not rated]" else if (bb<1) or (bb>10) goto rating d1$=f$+chr$(32,29):d1$=left$(d1$,30) d2$=str$(sz)+chr$(32,4):d2$=left$(d2$,4) d3$=a1$+" "+a2$+chr$(32,20):d3$=left$(d3$,20) open #1,bd$+"dir"+lg$:position #1,95,x print #1,d1$" "tp$" "d2$" "date$" "d3$,fn$:close print\"Enter a description for '"f$"'." print "Type 'DONE' when finished '.h' for help." edit(0):edit(1) if not edit(2) print\"No description provided." d1$="000"+str$(un):d1$=right$(d1$,4) i$=lg$+":"+left$("A"+str$(x)+"."+fn$,15):create i$:open #1,i$ print #1," Filename: "f$ print #1,"Times d/l'ed: 00" print #1," 1-10 rating: "x5$ print #1," Uploaded by: "a1$" "a2$" (#"d1$")" print #1," Upload date: "date$ print #1," Upload time: "time$ print #1," # of blocks: "sz print #1," Description: ";:if not edit(2) print #1,"None":goto upload4 print #1,\ copy #8,#1 upload4 close:goto uploads get.key ww=0 get.key1 gf=peek(-16384):if (gf=129) or (gf=150) get i$:print bs$;:return gf=key(0):if (gf>96) and (gf<123) gf=gf-32 if (gf=7) or (gf=15) or (gf=16) goto get.key2 if gf i$=chr$(gf):print " "bs$;:return get.key2 ww=ww+1:if ww=2000 print chr$(7,2); if ww=4000 pop:goto link.term goto get.key1