home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
pcboard
/
edsqt101.zip
/
ADDQUOTE.PPE
(
.txt
)
next >
Wrap
PCBoard Programming Language Executable
|
1993-05-06
|
6KB
|
310 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Boolean BOOLEAN001
Boolean BOOLEAN002
Boolean BOOLEAN003
Boolean BOOLEAN004
Boolean BOOLEAN005
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
Integer INTEGER004
Integer INTEGER005
Integer INTEGER006
Integer INTEGER007
Integer INTEGER008
Integer INTEGER009
String STRING001
String STRING002
String STRING003
String STRING004
;------------------------------------------------------------------------------
If (Exist(PPEPath() + "EDSQUOTE.QTS")) Then
If (Exist(PPEPath() + "EDSQUOTE.CNF")) Then
FOpen 1, PPEPath() + "EDSQUOTE.CNF", 2, 2
FGet 1, STRING002
INTEGER002 = S2I(STRING002, 10)
STRING002 = 0
FGet 1, STRING002
INTEGER001 = S2I(STRING002, 10)
STRING002 = 0
FGet 1, STRING003
FGet 1, STRING004
FClose 1
Gosub LABEL002
BOOLEAN003 = 1
Gosub LABEL003
While (BOOLEAN003 == 1) Do
Cls
PrintLn " @X10┌──────────────────────────────────────────────@X19┐@X0F"
PrintLn " @X10│ @X1BAdd-A-Quote @X1Cv@X1F1@X1C.@X1F0 @X19│@X0F"
PrintLn " @X10│ @X1AC@X12opyright @X1D(@X19C@X1D) @X1F1993 by @X1EE@X16ric @X1ED@X16. @X1ES@X16cales @X19│@X0F"
PrintLn " @X10│ @X19│@X0F"
PrintLn " @X10│ @X1EUse with @X1BEDSQuote @X1Cv@X1F1@X1C.@X1F0 @X19│@X0F"
PrintLn " @X10└@X19──────────────────────────────────────────────┘@X0F"
PrintLn
PrintLn
PrintLn
PrintLn
PrintLn " @X09[@X0FA@X09]@X0Fdd a Quote to Database"
PrintLn " @X09[@X0FQ@X09]@X0Fuit back to BBS"
PrintLn
PrintLn
STRING002 = "A"
InputStr "Enter selection", STRING002, 11, 1, "aqAQ", 2 + 4 + 8 + 64
If (STRING002 == "Q") Goto LABEL008
PrintLn
PrintLn "@X0CPlease enter quote below. (Max 75 chars.) Enter=Abort"
STRING002 = " "
InputText "", STRING002, 14, 75
BOOLEAN002 = 1
If ((STRING002 == " ") || (STRING002 == "")) BOOLEAN002 = 0
Newline
If (BOOLEAN002 == 1) Then
STRING001 = "Y"
Log "(" + STRING002 + ")", 0
Log "AddQuote v1.0: User entered new quote. (See Below)", 0
InputYN "Do you wish to save this quote", STRING001, 9
If (STRING001 == NoChar()) BOOLEAN002 = 0
Endif
Newline
BOOLEAN004 = 1
If (BOOLEAN002 == 1) Then
PrintLn "@X0CSaving changes to @X0FEDSQUOTE.QTS@X0F"
PrintLn
Gosub LABEL004
Goto LABEL001
Endif
BOOLEAN004 = 0
PrintLn "@X8CChanges have not been saved!"
PrintLn
Delay 20
:LABEL001
If (BOOLEAN004 == 1) Then
Endif
EndWhile
Goto LABEL008
:LABEL002
INTEGER003 = INTEGER001 * 4
Inc INTEGER003
INTEGER003 = INTEGER003 + 2491
INTEGER003 = INTEGER003 - 8503
Inc INTEGER003
INTEGER003 = INTEGER003 + 9947
INTEGER003 = INTEGER003 / 2
Inc INTEGER003
INTEGER003 = INTEGER003 + 1211
Inc INTEGER003
BOOLEAN001 = 0
For INTEGER004 = 1 To Len(STRING003)
INTEGER003 = INTEGER003 + Asc(Mid(STRING003, INTEGER004, 1))
Next
If (INTEGER003 == INTEGER002) BOOLEAN001 = 1
Return
:LABEL003
BOOLEAN005 = 0
INTEGER004 = 0
INTEGER005 = 0
INTEGER006 = 0
INTEGER007 = 0
If (!Exist(PPEPath() + "EDSTRASH.USR")) Return
FOpen 1, PPEPath() + "EDSTRASH.USR", 0, 2
While (!Ferr(1) && (BOOLEAN005 == 0)) Do
Gosub LABEL007
STRING002 = ""
STRING001 = ""
FGet 1, STRING002
STRING002 = Upper(STRING002)
STRING001 = U_Name()
STRING001 = Upper(STRING001)
If (InStr(STRING001, STRING002) <> 0) BOOLEAN005 = 1
EndWhile
FClose 1
If (BOOLEAN005) Then
PrintLn
PrintLn "@X0BSorry, system files need updating..."
Log "AddQuote v1.0: User was denied access...", 0
PrintLn "@X0FYour SysOp has been notified..."
Goto LABEL008
Endif
Return
:LABEL004
INTEGER004 = 0
INTEGER005 = 0
INTEGER006 = 0
INTEGER008 = 0
STRING001 = ""
INTEGER009 = 0
INTEGER007 = 0
FOpen 1, PPEPath() + "EDSQUOTE.QTS", 0, 2
FCreate 2, TempPath() + "EDSQWORK." + I2S(PcbNode(), 10), 1, 3
FGet 1, INTEGER008
INTEGER009 = S2I(INTEGER008, 10)
Inc INTEGER009
FPutLn 2, I2S(INTEGER009, 10)
:LABEL005
If (Ferr(1)) Goto LABEL006
Gosub LABEL007
FGet 1, STRING001
If (!(STRING001 == "")) FPutLn 2, STRING001
Goto LABEL005
:LABEL006
FClose 1
FPutLn 2, STRING002
Frewind 2
FClose 2
Shell 1, INTEGER004, "copy ", TempPath() + "EDSQWORK." + I2S(PcbNode(), 10) + " " + PPEPath() + "EDSQUOTES.QTS"
Delete TempPath() + "EDSQWORK." + I2S(PcbNode(), 10)
Return
:LABEL007
Inc INTEGER004
INTEGER007 = INTEGER004
If (INTEGER004 == 10) Print "@X09Please wait, reading files @X0F."
If (INTEGER007 % 15 == 0) Then
Inc INTEGER005
Print "."
If (INTEGER005 >= 6) Then
Backup 1
Print " "
Backup 2
Inc INTEGER006
If (INTEGER006 >= 5) Then
INTEGER006 = 0
INTEGER005 = 0
Endif
Endif
Endif
Return
Endif
PrintLn
PrintLn "@X0C AddQuote v1.0 ERROR: Your SysOp does not have the EDSQUOTE.QTS file installed!"
Log "AddQuote ERROR: EDSQUOTE.QTS not found.. Please consult docs..", 1
PrintLn "@X0F Sysop has been notified, you may continue..."
Goto LABEL008
Endif
PrintLn
PrintLn "@X0C AddQuote v1.0 ERROR: Your SysOp does not have the EDSQUOTE.CNF file installed!"
Log "AddQuote ERROR: EDSQUOTE.CNF not found.. Please consult docs..", 1
PrintLn "@X0F SysOp has been notified, you may continue..."
:LABEL008
PrintLn
PrintLn
If (BOOLEAN001 == 1) Then
PrintLn "@X09Thanks to the following person who has supported EDSQuote & AddQuote."
PrintLn
PrintLn "@X0E " + STRING003
PrintLn "@X0E " + STRING004
PrintLn
PrintLn "@X0CIt is illegal for anyone besides the above person to possess AddQuote!"
Else
PrintLn "@X09Please ask your SysOp how you can help support shareware..."
PrintLn "@X0EAsk how you can register EDSQuote (AddQuote)..."
Log "AddQuote v1.0: [UNREGISTERED EVALUATION COPY]", 0
Delay 19
Endif
End
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 1 End
; 1 Cls
; 25 Goto
; 46 Let
; 3 Print
; 39 PrintLn
; 22 If
; 1 FCreate
; 3 FOpen
; 4 FClose
; 7 FGet
; 3 FPutLn
; 1 Delete
; 6 Log
; 1 InputStr
; 1 InputYN
; 5 Gosub
; 5 Return
; 2 Delay
; 8 Inc
; 2 Newline
; 1 Shell
; 1 InputText
; 2 Backup
; 1 Frewind
;
;
; ■ Functions used :
;
; 1 *
; 1 /
; 1 %
; 27 +
; 1 -
; 14 ==
; 1 <>
; 1 <
; 1 <=
; 4 >=
; 17 !
; 3 &&
; 2 ||
; 2 Len(
; 2 Upper()
; 1 Mid()
; 2 Ferr()
; 1 Asc()
; 1 InStr()
; 1 U_Name()
; 1 NoChar()
; 7 PPEPath()
; 3 PcbNode()
; 3 Exist()
; 4 I2S()
; 3 S2I()
; 3 TempPath()
;
;------------------------------------------------------------------------------
;
; Analysis flags : S
;
; S - Shell to DOS ■ 5
; This may be normal if the PPE need to execute an external command,
; but may be actually anything... nasty (formating HD, rebooting,...)
; or usefull (sorting, maintenance,...). Check!
; ■ Search for : SHELL
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 1 For/Next
; 2 While/EndWhile
; 10 If/Then or If/Then/Else
; 0 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------