Metropoli BBS
VIEWER: bbslist.pps MODE: TEXT (ASCII)
boolean prevnext
string polje(2)
string lightb
string boardname
string boardnumber
string boardsysop
string seek
string POSTOJI
integer pos
string uzeoname(108)
string uzeonam1(108)
string uzeophone(108)
string uzeophon1(108)
string uzeosysop(108)
string uzeosyso1(108)
string config_file(20)

int i,ty,r,ry,do,m


Integer v_int1, v_int2, v_int3, v_int4, v_int5, v_int6, v_int7
String v_str1
Declare Procedure PrintFade(String v_arg)
Declare Procedure EffCurseur()
Declare Procedure Synchronize()


fopen 1,ppepath()+ppename()+".cfg",2,0
for m=1 to 40
fget 1,config_File(m)
next

if (exist(ppepath()+ppename()+".dbf"))  then goto label001
 else goto label000
endif


:label000
let polje(0)="BOARDN,C,25,0"
let polje(1)="PHONEN,N,19,0"
let polje(2)="SYSOP,C,22,0"
dcreate 1,ppepath()+ppename(),0,polje
dclose 1

:label001
cls
dispfile ppepath()+ppename()+".pcb",0
goto label777

:label777
GOSUB CLEAR
dopen 1,ppepath()+ppename(),0
ty=dreccount(1)

:labeln1
do=0
gosub clear
goto ceo

:labeln2
do=9
gosub clear
goto ceo

:labeln3
do=18
gosub clear
goto ceo

:labeln4
do=27
gosub clear
goto ceo

:labeln5
do=36
gosub clear
goto ceo

:labeln6
do=45
gosub clear
goto ceo

:labeln7
do=54
gosub clear
goto ceo

:labeln8
do=63
gosub clear
goto ceo

:labeln9
do=70
gosub clear
goto ceo

:labeln10
do=79
gosub clear
goto ceo


:ceo
for i=1 to ty
dgo 1,i
dget 1,"BOARDN",uzeoname(i)
dget 1,"PHONEN",uzeophone(i)
dget 1,"SYSOP",uzeosysop (i)
pos=11
ansipos 3,pos
print "@POS:3@"+uzeoname(1+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(1+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(1+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(2+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(2+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(2+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(3+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(3+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(3+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(4+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(4+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(4+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(5+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(5+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(5+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(6+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(6+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(6+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(7+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(7+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(7+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(8+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(8+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(8+do)
inc pos
ansipos 3,pos
print "@POS:3@"+uzeoname(9+do)+"@POS:28@"+"@X02|@X07"+"@POS:29@"+uzeophone(9+do)+"@POS:56@"+"@X02|@X07"+"@POS:57@"+uzeosysop(9+do)
inc pos

goto label021

:label021

next i

;dclose 1




:label002
ansipos 3,21
print "                                                                 "
ansipos 2,22
print config_file(7)+" ADD ENTRY "+config_File(8)+"  DELETE ENTRY@X07 "+config_file(8)+"  DOWNLOAD LIST "+config_file(8)+"  NEXT PAGE "+config_File(8)+"  PREVIOUS PAGE "+config_file(8)+"  QUIT!@X07"

:label003
lightb=inkey()
if (lightb="LEFT") goto label012
if (lightb="RIGHT") goto label004
if (lightb=chr(13)) goto label014
goto label003

:label004
ansipos 3,21
print "                                                                 "
ansipos 2,22
print config_file(8)+" ADD ENTRY "+config_File(7)+"  DELETE ENTRY@X07 "+config_file(8)+"  DOWNLOAD LIST "+config_file(8)+"  NEXT PAGE "+config_File(8)+"  PREVIOUS PAGE "+config_file(8)+"  QUIT!@X07"

:label005
lightb=inkey()
if (lightb="LEFT") goto label002
if (lightb="RIGHT") goto label006
if (lightb=chr(13)) goto label015
goto label005

:label006
ansipos 2,22
print config_file(8)+" ADD ENTRY "+config_File(8)+"  DELETE ENTRY@X07 "+config_file(7)+"  DOWNLOAD LIST "+config_file(8)+"  NEXT PAGE "+config_File(8)+"  PREVIOUS PAGE "+config_file(8)+"  QUIT!@X07"


:label007
lightb=inkey()
if (lightb="LEFT") goto label004
if (lightb="RIGHT") goto label008
if (lightb=chr(13)) goto label016
goto label007

:label008
ansipos 2,22
print config_file(8)+" ADD ENTRY "+config_File(8)+"  DELETE ENTRY@X07 "+config_file(8)+"  DOWNLOAD LIST "+config_file(7)+"  NEXT PAGE "+config_File(8)+"  PREVIOUS PAGE "+config_file(8)+"  QUIT!@X07"

:label009
lightb=inkey()
if (lightb="LEFT") goto label006
if (lightb="RIGHT") goto label010
if (lightb=chr(13)) goto label017
goto label009

:label010
ansipos 2,22
print config_file(8)+" ADD ENTRY "+config_File(8)+"  DELETE ENTRY@X07 "+config_file(8)+"  DOWNLOAD LIST "+config_file(8)+"  NEXT PAGE "+config_File(7)+"  PREVIOUS PAGE "+config_file(8)+"  QUIT!@X07"

:label011
lightb=inkey()
if (lightb="LEFT") goto label008
if (lightb="RIGHT") goto label012
if (lightb=chr(13)) goto label018
goto label011

:label012
ansipos 2,22
print config_file(8)+" ADD ENTRY "+config_File(8)+"  DELETE ENTRY@X07 "+config_file(8)+"  DOWNLOAD LIST "+config_file(8)+"  NEXT PAGE "+config_File(8)+"  PREVIOUS PAGE "+config_file(7)+"  QUIT!@X07"


:label013
lightb=inkey()
if (lightb="LEFT") goto label010
if (lightb="RIGHT") goto label002
if (lightb=chr(13)) goto label019
goto label013



:label014
IF (config_file(1)=<CURSEC()) THEN GOTO ADD
ELSE
ANSIPOS 27,21
PRINTFADE("U'r 2 lAME tO aDD eNTRY")
DELAY 15
GOTO LABEL002
ENDIF
:ADD

BOARDNAME=""
BOARDNUMBER=""
BOARDSYSOP=""
ANSIPOS 3,21
print config_file(3)+config_file(4) + " : "
inputstr "_",boardname,0,25,mask_alpha()+" ",UPCASE
if (boardname="" | BOARDNAME=" ") goto label002
if (exist(ppepath()+"bbsl.ndx")) delete ppepath()+"bbsl.ndx"
dopen 7,ppepath()+ppename(),0
dncreate 7,ppepath()+"bbsl","BOARDN"
dnopen 7,ppepath()+"bbsl"
dtag 7,"bbsl"
dseek 7,boardname
if (dseek(7,boardname)) then goto label664
else  goto label665
:label664
ansipos 3,21
print "                                                           "
ansipos 3,21
printfade("That board already exist")
dncloseall 7
dclose 7
goto label002
endif

:label665
dncloseall 7
dclose 7
ansipos 3,21
print "                                                            "
ansipos 3,21
print config_file(3)+config_file(5)+ " : "
;inputstr "_",boardnumber,0,20,"0123456789-+()",auto
inputstr "_",boardnumber,0,35,mask_num()+" "+"-"+"+"+"("+")",auto
IF (BOARDNUMBER="" | BOARDNUMBER=" ") GOTO LABEL002
ansipos 3,21
print "                                                           "
ansipos 3,21
print config_file(3)+config_file(6)+ " : "
inputstr "_",boardsysop,0,21,mask_alpha()+" "+"/",auto
IF (BOARDSYSOP="" | BOARDSYSOP=" ") GOTO LABEL002
ansipos 3,21
print "                                                           "
;dclose 0
:ADDB
dopen 0,ppepath()+ppename(),0
dnew 0
dput 0,"BOARDN",boardname
dput 0,"PHONEN",boardnumber
dput 0,"SYSOP",boardsysop
dadd 0
dclose 0
DCLOSE 1
goto label001

:label015 ;delete entry
ansipos 3,21
print "                                                           "
if (config_file(2)=<cursec()) then goto sekk
else
ANSIPOS 3,21
PRINTFADE("U'r 2 lAME tO dELETE eNTRY")
DELAY 10
GOTO LABEL004
ENDIF
:SEKK
ansipos 3,21
PRINT "                                                           "
ANSIPOS 3,21
print CONFIG_FILE(3)+"Enter Board Name (2 char.minimum) : "
inputstr "_",seek,0,24,mask_alpha()+" ",UPCASE
if (seek="") goto label002
if (exist(ppepath()+"bbsl.ndx")) delete ppepath()+"bbsl.ndx"
dopen 5,ppepath()+ppename(),0
dncreate 5,ppepath()+"bbsl","BOARDN"
dnopen 5,ppepath()+"bbsl"
dtag 5,"bbsl"
dseek 5,seek
IF (DSEEK(5,SEEK))  THEN GOTO LABEL567
ELSE GOTO LABEL566
:LABEL566
ANSIPOS 3,21
PRINT "                                                           "
ANSIPOS 3,21
PRINTFADE("tHAT bOARD dOESN noT eXIST")
GOTO LABEL002
ENDIF
:LABEL567
ddelete 5
dncloseall 5
dpack 5
GOSUB CLEAR
DCLOSE 5
DCLOSE 1
;DOPEN 6,PPEPATH()+PPENAME(),0
;DCLOSE 6
;GOSUB CLEAR
goto label777


:label016
if (exist(ppepath()+ppename()+".LST")) delete ppepath()+ppename()+".LST"
fcreate 2,ppepath()+ppename()+".LST",2,0
dopen 3,ppepath()+ppename(),0
ry=dreccount(3)
fputln 2,".-------------------------+---------------------------+----------------------."
fputln 2,"| bOARD nAME              | pHONE nUMBER              | sYSOP                |"
fputln 2,"`-------------------------+---------------------------+----------------------'"
for r=1 to ry
dgo 3,r
dget 3,"BOARDN",uzeonam1(r)
dget 3,"PHONEN",uzeophon1(r)
dget 3,"SYSOP",uzeosyso1(r)
fputln 2,"   "+uzeonam1(r)+uzeophon1(r)+"         "+uzeosyso1(r)
next r
fputln 2,".----------------------------------------------------------------------------."
fputln 2,"|     !#:.fUCK OFf Or Die.:#:.bBS.lISTER.:#:.cODED.bY.<pUBLIC.eNEMY>.:#!     |"
fputln 2,"`----------------------------------------------------------------------------'"
fclose 2
dclose 3
cls
flag ppepath()+ppename()+".LST"
download ""
wait
DCLOSE 1
GOTO LABEL001

:label017
if (do=0) goto labeln2
if (do=9) goto labeln3
if (do=18) goto labeln4
if (do=27) goto labeln5
if (do=36) goto labeln6
if (do=45) goto labeln7
if (do=54) goto labeln8
if (do=63) goto labeln9
if (do=70) goto labeln10
if (do=79) goto labeln1
goto label002

:label018
if (do=0) goto  labeln10
if (do=9) goto  labeln1
if (do=18) goto  labeln2
if (do=27) goto  labeln3
if (do=36) goto  labeln4
if (do=45) goto  labeln5
if (do=54) goto  labeln6
if (do=63) goto  labeln7
if (do=70) goto  labeln8
if (do=79) goto  labeln9
goto label010



:label019
ANSIPOS 34,21
PRINTFADE("fUCK oFF Or dIE")
DELAY 5
ansipos 34,21
print "                      "
ansipos 25,21
print "@X08Coded By Public Enemy [@X0Ctly@X08.@X0Csvn@X08.@X0Cfood@X08]"
DELAY 15
CLS
end

:clear
ansipos 3,11
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,12
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,13
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,14
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,15
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,16
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,17
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,18
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
ansipos 3,19
print "@POS:3@"+"                         "+"@POS:28@"+"@X02|@X07"+"@POS:29@"+"                           "+"@POS:56@"+"@X02|@X07"+"@POS:57@"+"                    "
return

Procedure EffCurseur()
AnsiPos 1,21
Color 0
Print " "
Backup 1
EndProc
Procedure Synchronize()
While (Outbytes() > 0) Do
EndWhile
EndProc
Procedure PrintFade(String v_arg)
For v_int1 = 1 to len(v_arg)                 ; for each character
        If (Mid(v_arg, v_int1, 1) = " ") Then    ; if this is a space, no fade
                Print config_File(7)+" "
                Continue
        Endif
        Print config_file(7)+"" + Mid(v_arg, v_int1, 1)     ; print in color 8
        v_int2 = getX()                          ; backup position
        v_int3 = getY()
        EffCurseur()                             ; remove cursor
        Delay 1                                  ; wait one tick
        AnsiPos v_int2, v_int3                   ; restore position
        Backup 1                                 ; move cursor back 1 char
        Print "@X07" + Mid(v_arg, v_int1, 1)     ; print in color 7
        v_int2 = getX()
        v_int3 = getY()
        EffCurseur()
        Delay 1
        AnsiPos v_int2, v_int3
        Backup 1
        Print "@X08" + Mid(v_arg, v_int1, 1)     ; print in color 15
        v_int2 = getX()
        v_int3 = getY()
        EffCurseur()
        Delay 1
        Synchronize()                            ; wait for other end
        AnsiPos v_int2, v_int3
Next

Endproc

[ RETURN TO DIRECTORY ]