home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PCBOARD
/
JOIN100.ZIP
/
JOIN.PPS
< prev
next >
Wrap
Text File
|
1993-01-14
|
4KB
|
155 lines
;JNET.PPE v1.00 - Jan 14 1994
;PCBoard 15.1 Join Conference By Network
;Written By Jeff Olesen
;The Viking's Cove PCBoard BBS - 613-394-0685
;Requires PPLC 2.0
;This code is public Domain.
;
;
STRING NET
STRING SCNFN
STRING C_HDR
INTEGER C_HDR_LEN
WORD C_LEN
WORD COLUMNS
WORD PAGE_LIMIT
WORD USER_SEC
STRING TEMP_IN
STRING C_LIN(40,2)
STRING C_LINE
STRING LINE_IN
STRING CONF_NUM
WORD VA1
WORD VA2
WORD PAGE_NUM
WORD LINE_NUM
BOOLEAN SHOW_PAGE
STRING SPAC_STR
INT COL_NUM
STRING LINE_POS
NEWLINE
IF (EXIST(PPEPATH() + "CNFM")) DISPFILE PPEPATH() + "CNFM", LANG + SEC + GRAPH
INPUTSTR "Display which Network ", NET, @X0E, 2,Mask_num(), FIELDLEN + GUIDE
IF (NET <> "") GOTO NET
NEWLINES 1
END
:NET
NEWLINE
SHOW_PAGE=TRUE ;
LET PAGE_NUM=1 ; setup empty string
SPAC_STR=" "
IF (EXIST(PPEPATH() + "NET_" + NET)) THEN
FOPEN 0,PPEPATH() + "NET_" + NET,O_RD,S_DN ; open it
FGET 0,C_HDR ; read header text
C_HDR_LEN=(79-(LEN(C_HDR))) ; calculate length of header
; center justify header string
C_HDR="@X71" + LEFT(SPAC_STR,C_HDR_LEN/2) + C_HDR + LEFT(SPAC_STR,C_HDR_LEN/2 + C_HDR_LEN%2) + "@X0F"
FGET 0,TEMP_IN ; read number of entries total
C_LEN=TOWORD(TEMP_IN) ; reduce it to a word
FGET 0,TEMP_IN ; read number of COLUMNS TO DISPLAY
COLUMNS=TOWORD(TEMP_IN) ; reduce it to a word
FGET 0,TEMP_IN ; read MINIMUM SECURITY TO DISPLAY
USER_SEC=TOWORD(TEMP_IN) ; reduce it to a word
VA1=C_LEN/(COLUMNS*10) ; number of pages (maybe)
VA2=C_LEN%(COLUMNS*10) ; number of entries on last page
IF (VA2 = 0) THEN
LET VA1 = VA1 ; if not 0 entries, add 1 page
ELSE VA1 = VA1 + 1
ENDIF
IF (CURSEC() < USER_SEC) THEN
PRINTLN "Sorry, your security is insufficient to access that Network."
NEWLINES 1
LET SHOW_PAGE=FALSE
ENDIF
WHILE ( SHOW_PAGE) DO ; now to show this stuff
GOSUB DISP_PAGE
INPUTSTR "Conf # to join (Enter=next page, 0 to exit)",CONF_NUM,@X0E,5,MASK_NUM(),FIELDLEN + GUIDE
IF (CONF_NUM <> "") LET SHOW_PAGE=FALSE ; did he select something??
IF (PAGE_NUM = VA1) THEN
LET SHOW_PAGE=FALSE
ELSE LET PAGE_NUM=PAGE_NUM+1
ENDIF
ENDWHILE
IF (CONF_NUM <> "") THEN ; Did he run out, or select something.....
IF (CONF_NUM <> "0") KBDSTUFF "J " + CONF_NUM + "^M" ; 0 TO ABANDON
ENDIF
ELSE
NEWLINES 1
PRINTLN "Sorry, that network is not in the above list."
NEWLINES 1
ENDIF
end
:temp
END
:DISP_PAGE ; calls to read a page and then display it.
GOSUB READ_PAGE ; read a page in
GOSUB DISP_HDR ; clear the screen and put up a header
GOSUB DISP_BODY ; put up the body of the page
GOSUB DISP_FTR ; and the footer
RETURN
END
:DISP_HDR
PRINTLN "@CLS@"
PRINTLN "@X0F▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄@X0F"
PRINTLN C_HDR
PRINTLN "@X08▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀@X0F"
NEWLINES 1
RETURN
END
:DISP_FTR
PRINTLN "@X0F▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄@X0F"
PRINTLN "@X71 Available Conferences Jnet v.1.0 @X0F"
PRINTLN "@X08▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀@X0F"
return
END
:DISP_BODY
FOR LINE_NUM=1 TO PAGE_LIMIT
LINE_POS = "@POS:" + TOSTRING((((LINE_NUM-1)%COLUMNS))*(80/COLUMNS)+1) + "@"
PRINT LINE_POS
PRINT "@X0B" + C_LIN(LINE_NUM,1) + "@X0E∙@X02"+ C_LIN(LINE_NUM,2) + "@X0F"
IF (LINE_NUM%COLUMNS = 0) PRINTLN " "
NEXT LINE_NUM
NEWLINES 1
RETURN
END
:READ_PAGE
IF (PAGE_NUM=VA1) THEN PAGE_LIMIT=VA2
ELSE PAGE_LIMIT=(COLUMNS*10)
ENDIF
FOR LINE_NUM=1 TO PAGE_LIMIT
LET C_LINE=READLINE(PPEPATH() + "NET_" + NET(),LINE_NUM+((PAGE_NUM-1)*(COLUMNS*10))+4)
LET C_LIN(LINE_NUM,1)= LEFT(C_LINE,5)
LET C_LIN(LINE_NUM,2)= RIGHT(C_LINE,LEN(C_LINE)-5)
NEXT
RETURN
END