; newvote.seg.s ; modified for ACOS on 03/30/87 on nocar goto no.car goto start no.car link "a:main.seg","term1" link.main link "a:vote.seg","fromsys" validate d1$=a1$:d2$=a2$:d3$=a3$ move ram,34 to ram2 open #2,"b:users" position #2,64,y input #2,d1$,d2$\d3$ position #2,64,y,30 read #2,ram,34 close if d1$="" move ram2,34 to ram:return flag(f)=1:if y>nu then nu=y open #2,"b:users":position #2,64,y x$=d1$+","+d2$ print #2,x$\d3$:position #2,64,y,30 write #2,ram,34:close #2 move ram2,34 to ram return wr.com print \"Enter message now -"\".s = save|.h = help|'done' to edit msg." edit(0):edit(1):if not edit(2) print \"":return print \"Saving..."; f$=a$+str$(gf)+".1msg":create f$:open #1,f$ append #1:print #1,\"Comment from: "a4$ print #1,"Date/time: "date$" "time$\ copy #8,#1:close #1:print chr$(8,6)"ed. ":return voting f$=a$+str$(gf) create f$:open #1,f$ mark(1)=(un/512)*64:x=mark(1):fill ram2,64,0 read #1,ram2,64:z=flag:flag=ram2:a=flag(un) flag(un)=1:flag=z:mark(1)=x:write #1,ram2,64 x=1:z=byte:byte=ram2 open #2,a$+str$(gf)+"."+str$(x) input #2,y:if a setint(1) print \md$\:copy #2:close #2 position #1,32,x+7 fill ram2,32,0:read #1,ram2,32 b=byte(0)+byte(1)*256:if a=0 goto vote3 if info(5)=0 goto vote4 print \"Vote again? ";:gosub get.key if i$="Y" print "Yes":goto vote3 print "No":print "Change vote count? ";:gosub get.key if i$<>"Y" print "No":goto vote4 print "Yes":print \"Currently set at: "b input @2 "Change to: "d:if (d<1) or (d>10) print \"Aborted":goto vote4 b=d-1:print \"Value changed." vote3 if left$(a$,4)="h:uv" print \"Vote (1-"y",A):";:goto v2 open #2,a$+str$(gf)+".1msg":d=mark(2):close #2 if d print \"Vote (1-"y",A,W):";:goto v2 print \"Vote (1-"y",A,R,W):"; v2 if y=0 goto vote.error v4 clear key:if y>9 input @1 i$:else gosub get.key if i$="A" print 'Again Total answers: ';:close #1:copy a$+str$(gf)+"."+str$(x) if i$="A" open #1,a$+str$(gf):goto vote3 if left$(a$,4)="h:uv" goto v3 if i$="R" print "Read comments":close #1:copy a$+str$(gf)+".1msg" if i$="R" open #1,a$+str$(gf):goto vote3 if i$="W" print "Write comment":close #1 if i$="W" gosub wr.com:open #1,a$+str$(gf):goto vote3 if not info(5) goto v3 if i$="+" f$=a$+str$(gf)+"lock":create f$:goto vote3 if i$="-" f$=a$+str$(gf)+"kill":create f$:goto vote3 v3 d=val(i$):if (d<1) or (d>y) goto v4 if y<10 print d b=b+1:byte(0)=b mod 256:byte(1)=b/256 c=byte(d*2)+byte(d*2+1)*256:c=c+1 byte(d*2)=c mod 256:byte(d*2+1)=c/256 position #1,32,x+7:write #1,ram2,32 if left$(a$,4)="h:uv" goto vote4 i$=a$+str$(gf)+"who":create i$:open #2,i$:append #2 print #2,a4$" - "; if d=1 print #2,"Yes":else print #2,"No" close #2 vote4 setint(""):if (left$(a$,4)="h:uv") or (not a) goto vote5 open #2,a$+str$(gf)+".1msg":d=mark(2):close #2 if not d print \"User comments:":close #1:copy a$+str$(gf)+".1msg" if not d open #1,a$+str$(gf) print \"Write comment? ";:gosub get.key if i$="Y" close #1:print "Yes":gosub wr.com:open #1,a$+str$(gf) if i$<>"Y" print "No" vote5 print \"Results from "b" users:"\:md=b:m1=y:b=b+(b=0) clear #10:for c=1 to y:y=byte(c*2)+byte(c*2+1)*256 print "Answer #"c" - "(y*100)/b"% ("y")" print #10,(y*100)/b,y:next if info(5) close #1:copy a$+str$(gf)+"who":open #1,a$+str$(gf) if (b>4) and ((left$(a$,4)="h:nu") or (left$(a$,4)="h:ae")) gosub vote.delete if (b>9) and left$(a$,4)="h:uv" gosub vote.delete close vote6 byte=z:gf=gf+1:if gf>999 gf=1 return vote.error print \\"Vote Error - Attempting to fix..."; close:open #1,a$+str$(gf)+".1":y=mark(1):close if y=0 print "failed.":goto error1 f$=a$+".data":open #1,f$:input #1,b,c:close #1 if gf>b y=0:print "failed.":goto error1 kill a$+str$(gf):kill f$ create f$:open #1,f$:print #1,b+1,c:close #1 print "successful." error1 print "Notifying System Operator." edit(0):ready "e:mail":print #msg(1),0 print #6,' -%> A System Letter <%- Letter From -%>Newvote Segment Date Mailed -%>'date$' 'time$\ print #6,"A vote error occured in the "; if a$="h:nu" print #6,"New User"; if a$="h:ae" print #6,"PAE"; if a$="h:uv" print #6,"User Vote"; print #6," section." print #6,"Automatic fix attempt "; if y print #6,"was successful." if y=0 print #6,"failed." copy #8,#6:print #msg(1),chr$(4);chr$(0);:msg(1)=msg(1)+1:update if y goto vote6 byte=z:pop:goto link.main start an=0 if a$="h:uv" lm=9 if a$="h:nu" lm=13 if a$="h:ae" lm=6 open #1,"f:u."+str$(un):position #1,5,lm input #1,gh:close ; X=lower votes ; A=last vote jmp open #1,a$+".data":input #1,x,a:close if (x>900) and (a<100) goto start2 if aa) goto start2 print \\"Total votes: "(a-x)+1\" New votes: "a-gh if a-gh=0 print \"[A]ll votes, or [Q]uit? ";:gosub get.key:print i$:if i$="Q" goto link.main if a-gh=0 an=1:goto start2 print \"[N]ew votes only, or [A]ll? ";:gosub get.key if i$="A" print "All":goto start2 x=gh+1:print "New" start2 print sc$:gf=x:vb=a:if vb>999 vb=1 v1 gosub voting:if (gf>900) and (vb<100) goto v1 if gf<=vb goto v1 print \"[ End of votes ]":if a$="h:nu" flag(31)=0 gh=vb:open #1,"f:u."+str$(un) position #1,5,lm:print #1,gh if an=1 goto no.credit position #1,5,2:input #1,a a=a+10:if a>9500 a=9500 position #1,5,2:print #1,a no.credit close:goto link.main vote.delete print \"This vote completed, deleting..."; if left$(a$,4)<>"h:uv" kill a$+str$(gf)+"who" f$=a$+".data":open #2,f$:input #2,x,a:close:x=x+1:if x>999 x=1 kill f$:create f$:open #2,f$:print #2,x,a:close #2 f$=a$+str$(gf)+".user":open #2,f$:input #2,y:close #2 kill f$ kill a$+str$(gf) kill a$+str$(gf)+".1msg" print "vote deleted." if a$="h:uv" goto del1 kill a$+str$(gf)+".1" mark(10)=0:input #10,r1,a\r2,a if a$="h:ae" goto del2 f$=a$+str$(gf)+"lock":open #1,f$:a=mark(1):close:if not a r1=1:r2=0:kill f$ if not a print "SysOp override active." f$=a$+str$(gf)+"kill":open #1,f$:a=mark(1):close:if not a r1=0:r2=1:kill f$ if not a print "SysOp override active." if r1=50 print "Equal votes error!"\"Denial of access active.":goto userdel if r1>r2 print "Validating new user." if r2>r1 print "User's access request refused.":goto userdel f=1:gosub validate:print "Notifying user of vote results." nw$="Y":edit(0) ready "e:gmail":print #msg(y),0 print #6,'Letter From -%>Voting Booth #3 Date Mailed -%>'date$' 'time$' You have been given access. The final vote from 'md' users was - [1) Yes, let him on..........'r1'% [2) No, delete him...........'r2'% 100 time credits were also added to your account. For more information on how the system operates, be sure to read the system files.' copy #8,#6 print #msg(y),chr$(4);chr$(0);:msg(y)=msg(y)+1:update open #2,"f:u."+str$(y):position #2,5,2:input #2,a a=a+100:if a>9500 a=9500 position #2,5,2:print #2,a:close #2 val.log print "Updating system files." open #2,"b:data3":position #2,80,4:input #2,a,b:if a>500 a=0:b=0 a=a+1:if r1>r2 b=b+1 position #2,80,4:print #2,a,b:close #2 open #2,"b:val.log":position #2,80,0:input #2,a:a=a+1:if a=100 a=1 position #2,80,0:print #2,a:position #2,80,a goto logs del1 print "Notifying user of vote results..."; edit(0):f$=a$+str$(gf)+".1" ready "e:gmail":print #msg(y),0 print #6,'Letter From -%>Voting Booth #2 Date Mailed -%>'date$' 'time$' The results of your voting poll - Total votes: 'md\ copy f$,#6:print #msg(y),\"Results from "b" users -"\ mark(10)=0:for a=1 to m1 input #10,r1,c print #6,"Answer #"a" - "r1"% ("c")":next copy #8,#6:print #msg(y),chr$(4);chr$(0);:msg(y)=msg(y)+1:update print "done.":bb=22:bl=0 print "Posting vote results on sub-board #"bb print #3,"[ User #"y" ]" gosub bl.ldinf:if bl=0 print " - Operation aborted.":return print #3,"[ User #"y" ]":goto bl.post del2 if r1Voting Booth #4 Date Mailed -%>'date$' 'time$' You have been given PAE access. The final vote from 'md' users was - [1) Give him PAE access...........'r1'% [2) Do not give him PAE access....'r2'%' copy #8,#6:print #msg(y),chr$(4);chr$(0);:msg(y)=msg(y)+1:update print "Updating system file." aelog open #2,"b:ae.log":position #2,80,0:input #2,a:a=a+1:if a=100 a=1 position #2,80,0:print #2,a:position #2,80,a logs i$=d1$+" "+d2$+chr$(32,24) print #2,left$(i$,24); print #2,"|";:if md<10 print #2," "; print #2,md"|"nw$"|";:if r1<10 print #2," "; if r1<100 print #2," "; print #2,r1"|";:if r2<10 print #2," "; if r2<100 print #2," "; print #2,r2"|"date$"|"time$,y close #2:print "Complete.":return noae edit(0):ready "e:gmail":print #msg(y),0 print #6,'Letter From -%>Voting Booth #4 Date Mailed -%>'date$' 'time$' You did not gain PAE access. The final vote from 'md' users was - [1) Give him PAE access...........'r1'% [2) Do not give him PAE access....'r2'% Suggestion: Try again at some later date.' copy #8,#6:print #msg(y),chr$(4);chr$(0);:msg(y)=msg(y)+1:update open #2,"b:users":position #2,64,y:input #2,d1$,d2$:close #2 print "Updating system file.":goto aelog userdel nw$="N":open #2,"b:users":position #2,64,y input #2,d1$,d2$\d3$:if d1$="" d1$="<< Deleted":d2$=">>" position #2,64,y:print #2,""\d3$:close #2 kill "f:u."+str$(y) kill "f:r."+str$(y) kill "f:b."+str$(y) goto val.log bl.ldinf if bb=0 bf$="":bl=0:return me=0:if bl=bb ready bf$:return bl=bb:open #2,"b:data2" mark(2)=1120:input #2,ab if bb>ab close #2:bf$="":bl=0:return position #2,128,bb+8 input #2,bn$\bf$\b3,b4\bs,bs$\mb,kl,kb b1=1:if b3 b1=flag(b3) b2=1:if b4 b2=flag(b4) close #2:if bf$="" bl=0:return ready bf$:nn=nb:return bl.post open #2,"b:data3":position #2,80,5:input #2,mn:close #2 open #2,"b:users":position #2,64,y:input #2,d1$,d2$:close #2 d3$=d1$:if d2$<>"." d3$=d3$+" "+d2$ d3$=d3$+" (#"+str$(y)+")":if d1$="" d3$="" if (kl>0) and (kl<=msg(0)) kill #msg(kb):crunch a=msg(0)+1:print #msg(a),y,"Vote Result #"gf print #6,"Name %>"d3$ print #6,"From %>Voting Booth #2" gosub date1:print #6,"Date %>"i$\md$\\"Total answers: "; copy f$,#6:print #msg(a),\"Results from "b" users -"\ mark(10)=0:for b=1 to m1 input #10,r1,y print #6,"Answer #"b" - "r1"% ("y")":next:print #6,md$ copy #8,#6:msg(a)=mn:mn=mn+1:update open #2,"b:data3":position #2,80,5:print #2,mn:close #2 kill f$:print "Operation completed.":return date1 q=val(left$(date$,2)):q1=val(mid$(date$,4,2)):q2=val(right$(date$,2)) m$="000031059090120151181212243273304334":if q>1 q3=val(mid$(m$,q*3-2,3)) q1=q1+q3:m$="46012356":q1=q1+val(mid$(m$,8-(94-q2),1)):q1=q1 mod 7 m$="BobMonTueWedThuFriSat":if q1>1 td$=mid$(m$,q1*3-2,3):else td$="Sun" ml$="085534469788":q3=0:for q4=1 to q-1:q3=q3+val(mid$(ml$,q4,1):next mt$="FebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember" if q>1 m$=mid$(mt$,q3+1,val(mid$(ml$,q4+1,1))):else m$="January" min$=mid$(time$,4,2):if len(time$)>8 tm$=time$:goto date2 if val(left$(time$,2))<12 tm$=left$(time$,2)+":"+min$+"AM":goto date2 q4=val(left$(time$,2)):tm$=str$(12-(24-q4))+":"+min$+"PM" date2 i$=td$+", "+m$+" "+mid$(date$,4,2)+" "+tm$ return get.key ww=0:wx=0 get.key1 gg=peek(-16384):if (gg=129) or (gg=150) get i$:print chr$(8);:return gg=key(0):if (gg>96) and (gg<123) gg=gg-32 if (gg>31) or (gg=13) i$=chr$(gg):return ww=ww+1:if flag(33)=0 goto get.key2 wx=wx+1:if wx>16 wx=1 print mid$("!/-\!/-\!\-/!\-/",wx,1);chr$(8); get.key2 if ww=2000 print chr$(7,2); if ww=4000 pop:goto no.car if (not info(0)) and (not info(5)) and (eu<>1) pop:goto no.car goto get.key1