home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
183.LOGBOEK.PRG
< prev
next >
Wrap
Text File
|
1986-08-31
|
8KB
|
305 lines
* -- LOGBOEK.PRG
* -- Procedures Generated By FlashCode V1.00 on 08/26/1986 - 11:32:49
* -- (C) Copyright 1985, The Software Bottling Company Of New York
* -- This Program may not be used without the above Copyright Notice
*
*
* -- Main Program For LOGBOEK --
*
CLEAR
SET TALK OFF
SET ECHO OFF
SET EXACT OFF
SET SAFETY OFF
SET DEFAULT TO B:
SET ESCAPE OFF
SET COLOR TO 15/0
@ 22,0 SAY "DBASE III Program Generated By FlashCode"
@ 23,0 SAY "(C) Copyright The Software Bottling Company of New York, 1985"
@ 8,16 SAY "Please Wait While Initializing System For LOGBOEK ..."
SET PROCEDURE TO LOGBOEK.PRC
PUBLIC ScrnNumFL, MaxScrnFL, OldScrnFL
ScrnNumFL = 1
MaxScrnFL = 1
OldScrnFL = 0
IndexFL = "STATION"
* -- Initialize Field File If File Does Not Exist --
IF .NOT. FILE("LOGBOEK.FLD")
USE LOGBOEK
COPY STRU EXTENDED TO LOGBOEK.FLD
USE
ENDIF
* -- Initialize Variable File If File Does Not Exist --
IF .NOT. FILE("LOGBOEK.PUB")
* -- B:LOGBOEK
PUBLIC XDATUM,XFREQ,XSTATION,XTIME,XSEND,XRECEIVED,XQRA,XAFSTAND,XMODE,XVIA
PUBLIC XNAAM,XRIG,XWATT,XREMARKS
XDATUM = CTOD(" / / ")
XFREQ = 144
XSTATION = SPACE(12)
XTIME = " ."+SPACE(2)
XSEND = " ( )"
XRECEIVED = " ( )"
XQRA = SPACE(6)
XAFSTAND = 0
XMODE = "T"+SPACE(2)
XVIA = SPACE(10)
XNAAM = SPACE(19)
XRIG = SPACE(19)
XWATT = 0
XREMARKS = SPACE(47)
SAVE TO LOGBOEK.PUB
ELSE
RESTORE FROM LOGBOEK.PUB ADDITIVE
ENDIF
* -- Initialize Index File If File Does Not Exist --
IF .NOT. FILE("LOGBOEK.NDX")
USE LOGBOEK
INDEX ON UPPER(&IndexFL) TO LOGBOEK
USE
ENDIF
*
* -- Modification #1 See Manual --
*
* -- Display Main Menu --
CLEAR
@ 10,0 SAY "If menu does not appear, press '0' and make sure FLASHUP module";
+ " has been loaded."
DO WHILE .T.
CLEAR
@ 1,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 2,0 SAY "║"
@ 2,30 SAY "MAIN SELECTION MENU"
@ 2,79 SAY "║"
@ 3,0 SAY "║ FILE: "+"LOGBOEK"
@ 3,79 SAY "║"
@ 4,0 SAY "╟──────────────────────────────────────────────────────────────────────────────╢"
@ 5,0 SAY "║"
@ 5,79 SAY "║"
@ 6,0 SAY "║"
@ 6,24 SAY "[1] Add new record to the file"
@ 6,79 SAY "║"
@ 7,0 SAY "║"
@ 7,79 SAY "║"
@ 8,0 SAY "║"
@ 8,24 SAY "[2] Look up record"
@ 8,79 SAY "║"
@ 9,0 SAY "║"
@ 9,31 SAY "- Browse, Edit or Delete"
@ 9,79 SAY "║"
@ 10,0 SAY "║"
@ 10,79 SAY "║"
@ 11,0 SAY "║"
@ 11,24 SAY "[3] Create new report"
@ 11,79 SAY "║"
@ 12,0 SAY "║"
@ 12,79 SAY "║"
@ 13,0 SAY "║"
@ 13,24 SAY "[4] Run existing report"
@ 13,79 SAY "║"
@ 14,0 SAY "║"
@ 14,79 SAY "║"
@ 15,0 SAY "║"
@ 15,24 SAY "[5] Display Database information"
@ 15,79 SAY "║"
@ 16,0 SAY "║"
@ 16,31 SAY "- Size, Fields, Pack, Re-index"
@ 16,79 SAY "║"
@ 17,0 SAY "║"
@ 17,79 SAY "║"
@ 18,0 SAY "║"
@ 18,24 SAY "[0] Exit to DOS"
@ 18,79 SAY "║"
@ 19,0 SAY "║"
@ 19,79 SAY "║"
@ 20,0 SAY "║"
@ 20,79 SAY "║"
@ 21,0 SAY "║"
@ 21,24 SAY "Enter number of your choice:"
@ 21,79 SAY "║"
@ 22,0 SAY "║"
@ 22,79 SAY "║"
@ 23,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
@ 3,8 SAY "LOGBOEK"
@ 3,69 SAY DATE()
* -- Wait For User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"012345"
@ 21,53 GET AnsFL PICT "!"
READ
ENDDO
DO CASE
* -- Quit To DOS --
CASE AnsFL = "0"
QUIT
* -- Add Records To File --
CASE AnsFL = "1"
DO AddRecFL
LOOP
* -- Find or Locate Records To Browse, Edit, Delete --
CASE AnsFL = "2"
DO FindLocFL
LOOP
*
* -- Modification #2 See Manual --
*
* -- Create Report --
CASE AnsFL = "3"
USE LOGBOEK
CLEAR
@ 4,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 5,0 SAY "║"
@ 5,79 SAY "║"
@ 6,0 SAY "║ CREATE/DELETE REPORTS "
@ 6,79 SAY "║"
@ 7,0 SAY "║"
@ 7,79 SAY "║"
@ 8,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
* -- Display Directory of Report Files on Disk --
@ 9,0 SAY "DIRECTORY OF REPORT FILES ON B:"
DIR B:*.FRM
@ 24,0
? "┌─────────────────────────────────────────────────────────────────────────────┐"
? "│ Please enter report name: │"
? "└─────────────────────────────────────────────────────────────────────────────┘"
NameFL = .T.
RepNameFL = SPACE(8)
DO WHILE NameFL
@ 23,28 GET RepNameFL PICT "!!!!!!!!"
READ
IF RepNameFL = " "
NameFL = .F.
LOOP
ENDIF
IF FILE("&RepNameFL..FRM")
AnsFL = " "
DO WHILE .NOT. AnsFL$"YN"
@ 23,40 SAY "Report Already Exists, Delete Y/N: " GET AnsFL PICT "!"
READ
ENDDO
@ 23,40 SAY SPACE(37)
IF AnsFL = "Y"
TRepNameFL = TRIM("&RepNameFL")
@ 23,40 SAY SPACE(37)
@ 23,40 SAY "Deleting File ..."
ERASE &TRepNameFL..FRM
RELE TRepNameFL
@ 23,40 SAY SPACE(37)
ENDIF
LOOP
ELSE
CLEAR
CREATE REPORT &RepNameFL
NameFL = .F.
ENDIF
ENDDO
USE
RELE RepNameFL, NameFL
LOOP
*
* -- Modification #3 See Manual --
*
* -- Run Existing Report --
CASE AnsFL = "4"
USE LOGBOEK
CLEAR
@ 4,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 5,0 SAY "║"
@ 5,79 SAY "║"
@ 6,0 SAY "║ RUN REPORTS "
@ 6,79 SAY "║"
@ 7,0 SAY "║"
@ 7,79 SAY "║"
@ 8,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
* -- Display Directory of Report Files on Disk --
@ 9,0 SAY "DIRECTORY OF REPORT FILES ON B:"
DIR B:*.FRM
@ 24,0
? "┌─────────────────────────────────────────────────────────────────────────────┐"
? "│ Please enter report name: │"
? "└─────────────────────────────────────────────────────────────────────────────┘"
NameFL = .T.
RepNameFL = SPACE(8)
DO WHILE NameFL
@ 23,28 GET RepNameFL PICT "!!!!!!!!"
READ
IF RepNameFL = " "
EXIT
ENDIF
IF .NOT. FILE("&RepNameFL..FRM")
@ 23,40 SAY "Report Does Not Exists, Press Any Key"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 23,40 SAY SPACE(37)
LOOP
ENDIF
NameFL = .F.
ENDDO
IF RepNameFL = " "
RELE RepNameFL, NameFL
LOOP
ENDIF
@ 23,40 SAY SPACE(37)
AnsFL = " "
DO WHILE .NOT. AnsFL$"PSQ"
@ 23,40 SAY "[P]rinter, [S]creen, [Q]uit" GET AnsFL PICT "!"
READ
ENDDO
@ 23,40 SAY SPACE(37)
IF AnsFL = "Q"
RELE RepNameFL, NameFL
LOOP
ENDIF
IF AnsFL = "P"
@ 23,40 SAY "Ready Printer, Hit Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 23,40 SAY SPACE(37)
@ 23,40 SAY "Printing, Please Wait ..."
SET CONSOLE OFF
REPORT FORM &RepNameFL TO PRINT
SET CONSOLE ON
@ 23,40 SAY SPACE(37)
@ 23,40 SAY "Finished Printing, Hit Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ELSE
CLEAR
REPORT FORM &RepNameFL
@ 24,0 SAY "Finished Printing, Hit Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 24,0
ENDIF
USE
RELE RepNameFL, NameFL
LOOP
* -- Display DataBase Information --
CASE AnsFL = "5"
DO DBInfFL
LOOP
ENDCASE
RELEASE ALL
ENDDO .T.