home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / LC_20.ZIP / LAST.PPE (.txt) < prev   
PCBoard Programming Language Executable  |  1994-02-26  |  8KB  |  408 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     Integer  INTEGER005
  24.     Integer  INTEGER006
  25.     Integer  INTEGER007
  26.     String   STRING001
  27.     String   STRING002
  28.     String   STRING003
  29.     String   STRING004
  30.     String   STRING005
  31.     String   STRING006
  32.     String   STRING007
  33.     String   STRING008
  34.     String   STRING009
  35.     String   STRING010
  36.     String   STRING011
  37.     String   STRING012
  38.     String   STRING013
  39.     String   STRING014
  40.     String   STRING015
  41.     String   STRING016
  42.     String   STRING017
  43.     String   TSTRING018(1000)
  44.     String   STRING019
  45.     String   STRING020
  46.     String   STRING021
  47.     String   STRING022
  48.     String   STRING023
  49.     Time     TIME001
  50.  
  51. ;------------------------------------------------------------------------------
  52.  
  53.     GetUser
  54.     STRING019 = "@X0Fv@X082.0"
  55.     If (!Exist(PPEPath() + "last.dat")) Gosub LABEL009
  56.     If (!Exist(PPEPath() + "last.hdr")) Gosub LABEL010
  57.     :LABEL001
  58.     If (Exist(PPEPath() + "last.cfg")) Then
  59.         FOpen 1, PPEPath() + "last.cfg", 0, 0
  60.         FGet 1, STRING008
  61.         FGet 1, STRING009
  62.         FGet 1, STRING010
  63.         FGet 1, STRING011
  64.         FGet 1, STRING012
  65.         FGet 1, STRING013
  66.         FGet 1, STRING014
  67.         FGet 1, STRING015
  68.         FGet 1, STRING016
  69.         FGet 1, STRING023
  70.         FClose 1
  71.     Else
  72.         PrintLn "@BEEP@@BEEP@Configuration file LAST.CFG not found, creating a new file!"
  73.         FCreate 1, PPEPath() + "last.cfg", 1, 3
  74.         FPutLn 1, "[Unregistered]"
  75.         FPutLn 1, "[Unregistered]"
  76.         FPutLn 1, "@X0A"
  77.         FPutLn 1, "@X0B"
  78.         FPutLn 1, "@X0E"
  79.         FPutLn 1, "@X0D"
  80.         FPutLn 1, "@X09"
  81.         INTEGER002 = SysopSec()
  82.         STRING007 = I2S(INTEGER002, 10)
  83.         FPutLn 1, STRING007
  84.         FPutLn 1, "10"
  85.         FPutLn 1, "YES"
  86.         FPutLn 1, ";---------------------------------------------------------------------"
  87.         FPutLn 1, ";BoardName                      Line 1"
  88.         FPutLn 1, ";SysopName                      Line 2"
  89.         FPutLn 1, ";User Name Color                Line 3"
  90.         FPutLn 1, ";City/State Color               Line 4"
  91.         FPutLn 1, ";'Login at' Color               Line 5"
  92.         FPutLn 1, ";Node Color                     Line 6"
  93.         FPutLn 1, ";Connect Speed Color            Line 7"
  94.         FPutLn 1, ";Lowest level to exclude        Line 8"
  95.         FPutLn 1, ";Last Number of users to track  Line 9"
  96.         FPutLn 1, ";Allow Skipping Bulletin        Line 10"
  97.         FPutLn 1, ";---------------------------------------------------------------------"
  98.         FPutLn 1, ";Line 9 is the number of callers to report.  If set to 0, it will report all"
  99.         FPutLn 1, ";callers for the day, if set to a number less than 21, it will report the"
  100.         FPutLn 1, ";most recent N callers.  For example, if set to 20, it will report the LAST"
  101.         FPutLn 1, ";20 callers, from oldest to newest."
  102.         FPutLn 1, ";(This enhancement made by Maj)"
  103.         FClose 1
  104.         Goto LABEL001
  105.     Endif
  106.     If (Exist(PPEPath() + "last.lng")) Then
  107.         FOpen 3, PPEPath() + "last.lng", 0, 0
  108.         FGet 3, STRING020
  109.         FGet 3, STRING021
  110.         FGet 3, STRING022
  111.         FClose 3
  112.         STRING020 = RTrim(STRING020, " ")
  113.         STRING021 = RTrim(STRING021, " ")
  114.         STRING022 = RTrim(STRING022, " ")
  115.     Else
  116.         FCreate 4, PPEPath() + "last.lng", 1, 3
  117.         FPutLn 4, "@X0AWould you like to see the last @X0F10 @X0Acallers"
  118.         FPutLn 4, "@X0EShould we add your name to the list"
  119.         FPutLn 4, "@X0COops! @X0AForgot that it's disabled!"
  120.         FClose 4
  121.         PrintLn "@X0CNo Language (LAST.LNG) found! Using default prompts"
  122.         STRING020 = "@X0AWould you like to see the last @X0F10 @X0Acallers"
  123.         STRING021 = "@X0EShould we add your name to the list"
  124.         STRING022 = "@X0COops! @X0AForgot that it's disabled!"
  125.     Endif
  126.     STRING005 = YesChar()
  127.     Newline
  128.     STRING016 = Left(STRING016, 2)
  129.     Select Case (Left(STRING023, 1))
  130.         Case YesChar()
  131.             InputYN STRING020, STRING005, 0
  132.             If (STRING005 == NoChar()) Then
  133.                 Goto LABEL011
  134.             Else
  135.                 If (STRING016 <> "0") Goto LABEL012
  136.             Endif
  137.         Case NoChar()
  138.             Goto LABEL012
  139.     End Select
  140.     INTEGER001 = 1
  141.     FOpen 1, PPEPath() + "last.dat", 0, 0
  142.     :LABEL002
  143.     DispFile PPEPath() + "last.hdr", 0
  144.     PrintLn "@X0FL@X07as@X08t@X0FU@X07s@X08er By @X0FT@X07h@X08e @X0FT@X07hri@X08ll " + STRING019
  145.     Newline
  146.     :LABEL003
  147.     FGet 1, STRING001
  148.     If (STRING001 == "") Then
  149.         Goto LABEL011
  150.         Goto LABEL004
  151.     Endif
  152.     :LABEL004
  153.     PrintLn STRING001
  154.     Inc INTEGER001
  155.     If (INTEGER001 == 19) Then
  156.         Goto LABEL005
  157.     Else
  158.         Goto LABEL003
  159.     Endif
  160.     :LABEL005
  161.     INTEGER001 = 1
  162.     STRING005 = YesChar()
  163.     Newline
  164.     InputYN "@X0EWanna see more", STRING005, 0
  165.     If (STRING005 == NoChar()) Then
  166.         Goto LABEL011
  167.     Else
  168.         Goto LABEL002
  169.     Endif
  170.     :LABEL006
  171.     STRING005 = YesChar()
  172.     Newline
  173.     InputYN STRING021, STRING005, 0
  174.     If (STRING005 == NoChar()) Then
  175.         If (CurSec() >= STRING015) Then
  176.             Newline
  177.             PrintLn "@X0AOh! @X0EOk Mr. Sysop sir..."
  178.             End
  179.         Endif
  180.         Newline
  181.         PrintLn STRING022
  182.         Wait
  183.     Else
  184.         Goto LABEL007
  185.     Endif
  186.     :LABEL007
  187.     Newline
  188.     DispStr "@X09Adding your name to the log..."
  189.     Newline
  190.     STRING015 = Left(STRING015, 3)
  191.     If (U_Sec >= STRING015) Then
  192.         Goto LABEL008
  193.     Else
  194.         Newline
  195.         STRING001 = U_Name()
  196.         STRING001 = Left(STRING001, 15)
  197.         STRING001 = Mixed(STRING001)
  198.         STRING002 = UN_City()
  199.         STRING002 = Left(STRING002, 20)
  200.         STRING002 = Mixed(STRING002)
  201.         TIME001 = Time()
  202.         STRING003 = TimeAp(TIME001)
  203.         INTEGER006 = PcbNode()
  204.         STRING004 = String(INTEGER006)
  205.         STRING006 = Carrier()
  206.         STRING010 = Left(STRING010, 4)
  207.         STRING011 = Left(STRING011, 4)
  208.         STRING012 = Left(STRING012, 4)
  209.         STRING013 = Left(STRING013, 4)
  210.         STRING014 = Left(STRING014, 4)
  211.         If (STRING006 <= 9600) Then
  212.             STRING006 = STRING006 + STRING012 + "  bps"
  213.         Else
  214.             STRING006 = STRING006 + STRING012 + " bps"
  215.         Endif
  216.         FAppend 1, PPEPath() + "last.dat", 1, 3
  217.         FPutLn 1, "@POS:02@" + STRING010, STRING001 + "@POS:19@  " + STRING011, STRING002 + "@POS:43@" + STRING012, STRING003 + "@POS:61@" + STRING013, STRING004 + "@POS:67@" + STRING014 + STRING006
  218.         FClose 1
  219.     Endif
  220.     End
  221.     :LABEL008
  222.     Newline
  223.     PrintLn "@X0CRemoving all traces of your existance..."
  224.     End
  225.     :LABEL009
  226.     FCreate 1, PPEPath() + "last.dat", 1, 3
  227.     FPutLn 1, "@X0FT@X07h@X08e @X0FT@X07hri@X08ll @X0Fw@X07a@X08s @X0Fh@X07er@X08e! 02/21/94"
  228.     FClose 1
  229.     End
  230.     Return
  231.     :LABEL010
  232.     FCreate 1, PPEPath() + "last.hdr", 1, 3
  233.     FPutLn 1, "@CLS@"
  234.     FPutLn 1, "@X08▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄"
  235.     FPutLn 1, "@X71  User Name @X74@POS:21@Calling From@X70  @POS:41@Time Logged On @X7A@POS:57@On Node@X75@POS:70@Baud Rate @X07"
  236.     FPutLn 1, "@X0F▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀"
  237.     FClose 1
  238.     Return
  239.     :LABEL011
  240.     FClose 1
  241.     INTEGER007 = Len(Trim(Left(STRING009, 18), "  "))
  242.     STRING009 = Left(STRING009, INTEGER007)
  243.     INTEGER007 = Len(Trim(Left(STRING008, 18), "  "))
  244.     STRING008 = Left(STRING008, INTEGER007)
  245.     If (STRING017) Then
  246.         DispFile PPEPath() + "last.mid", 0
  247.         DispFile PPEPath() + "last.bot", 0
  248.     Endif
  249.     PrintLn "@X0FL@X07as@X08t@X0FU@X07s@X08er By @X0FT@X07h@X08e @X0FT@X07hri@X08ll " + STRING019
  250.     PrintLn "@POFF@               @POS:16@@X0F┌──@X07─────@X08────── ── ─ ·  · ── ─ ─────@X07────@X0F──╖"
  251.     PrintLn "@X0FR@X07egis@X08tered To: @X0F│ @X0A" + STRING009 + " @X0ESysOp @X0Cof @X0F" + STRING008 + "@X0F@POS:57@║"
  252.     PrintLn "               @POS:16@@X0F╘══@X07═════@X08══════ ══ ═ ·  · ══ ═ ═════@X07════@X0F══╝"
  253.     Goto LABEL006
  254.     End
  255.     :LABEL012
  256.     INTEGER003 = S2I(STRING016, 10)
  257.     DispFile PPEPath() + "last.hdr", 0
  258.     If (Exist(PPEPath() + "last.top")) Then
  259.         DispFile PPEPath() + "last.top", 0
  260.     Else
  261.         Print "@X01───────────────────────────────────────────────────────────────────────────────"
  262.         Newline
  263.     Endif
  264.     INTEGER004 = GetX()
  265.     INTEGER005 = GetY()
  266.     Print "@X04Gathering Stats..."
  267.     AnsiPos INTEGER004, INTEGER005 - 1
  268.     :LABEL013
  269.     INTEGER003 = INTEGER001
  270.     FOpen 1, PPEPath() + "last.dat", 0, 0
  271.     FCreate 2, PPEPath() + "last" + String(PcbNode()) + ".tmp", 1, 3
  272.     FGet 1, TSTRING018(INTEGER001)
  273.     For INTEGER001 = INTEGER001 + 1 To INTEGER003
  274.         FGet 1, TSTRING018(INTEGER001)
  275.     Next
  276.     If (TSTRING018(INTEGER003) <> "") Then
  277.         Goto LABEL013
  278.         Goto LABEL014
  279.     Endif
  280.     :LABEL014
  281.     While (TSTRING018(INTEGER001) == "") Do
  282.         INTEGER001 = INTEGER001 - 1
  283.     EndWhile
  284.     FClose 1
  285.     FPutLn 2, "@X03" + String(INTEGER001 - 9) + "@X04) " + TSTRING018(INTEGER001 - 9)
  286.     FPutLn 2, "@X03" + String(INTEGER001 - 8) + "@X04) " + TSTRING018(INTEGER001 - 8)
  287.     FPutLn 2, "@X03" + String(INTEGER001 - 7) + "@X04) " + TSTRING018(INTEGER001 - 7)
  288.     FPutLn 2, "@X03" + String(INTEGER001 - 6) + "@X04) " + TSTRING018(INTEGER001 - 6)
  289.     FPutLn 2, "@X03" + String(INTEGER001 - 5) + "@X04) " + TSTRING018(INTEGER001 - 5)
  290.     FPutLn 2, "@X03" + String(INTEGER001 - 4) + "@X04) " + TSTRING018(INTEGER001 - 4)
  291.     FPutLn 2, "@X03" + String(INTEGER001 - 3) + "@X04) " + TSTRING018(INTEGER001 - 3)
  292.     FPutLn 2, "@X03" + String(INTEGER001 - 2) + "@X04) " + TSTRING018(INTEGER001 - 2)
  293.     FPutLn 2, "@X03" + String(INTEGER001 - 1) + "@X04) " + TSTRING018(INTEGER001 - 1)
  294.     FPutLn 2, "@X03" + String(INTEGER001) + "@X04) " + TSTRING018(INTEGER001)
  295.     If (INTEGER001 == 0) Then
  296.         AnsiPos 1, 12
  297.         Print "@X0EHey! You are the first caller of the day!"
  298.         Delay 30
  299.         AnsiPos INTEGER004, INTEGER005 - 1
  300.     Endif
  301.     If (Exist(PPEPath() + "last.mid") && PPEPath() + "last.bot") Then
  302.         STRING017 = 1
  303.         Goto LABEL015
  304.     Else
  305.         FPutLn 2, "@X01───────────────────────────────────────────────────────────────────────────────"
  306.         FPutLn 2, "@X08Number of Users Tracked Today @X02" + String(INTEGER001)
  307.         FPutLn 2, "@X01───────────────────────────────────────────────────────────────────────────────"
  308.         STRING017 = 0
  309.     Endif
  310.     :LABEL015
  311.     FClose 2
  312.     Newline
  313.     ClrEol
  314.     DispFile PPEPath() + "last" + String(PcbNode()) + ".tmp", 0
  315.     Delete PPEPath() + "last" + String(PcbNode()) + ".tmp"
  316.     Goto LABEL011
  317.  
  318. ;------------------------------------------------------------------------------
  319. ;
  320. ; Usage report (before postprocessing)
  321. ;
  322. ; ■ Statements used :
  323. ;
  324. ;    5       End
  325. ;    1       ClrEol
  326. ;    1       Wait
  327. ;    49      Goto 
  328. ;    47      Let 
  329. ;    3       Print 
  330. ;    11      PrintLn 
  331. ;    22      If 
  332. ;    6       DispFile 
  333. ;    5       FCreate 
  334. ;    4       FOpen 
  335. ;    1       FAppend 
  336. ;    10      FClose 
  337. ;    16      FGet 
  338. ;    49      FPutLn 
  339. ;    1       GetUser
  340. ;    1       Delete 
  341. ;    3       InputYN 
  342. ;    2       Gosub 
  343. ;    2       Return
  344. ;    1       Delay 
  345. ;    1       Inc 
  346. ;    12      Newline
  347. ;    1       DispStr 
  348. ;    3       AnsiPos 
  349. ;
  350. ;
  351. ; ■ Functions used :
  352. ;
  353. ;    83      +
  354. ;    21      -
  355. ;    9       ==
  356. ;    2       <>
  357. ;    1       <
  358. ;    2       <=
  359. ;    4       >=
  360. ;    21      !
  361. ;    3       &&
  362. ;    1       ||
  363. ;    2       Len(
  364. ;    15      Left()
  365. ;    3       RTrim()
  366. ;    2       Trim()
  367. ;    1       Time()
  368. ;    1       U_Name()
  369. ;    1       TimeAp()
  370. ;    4       NoChar()
  371. ;    4       YesChar()
  372. ;    15      String()
  373. ;    24      PPEPath()
  374. ;    4       PcbNode()
  375. ;    1       SysopSec()
  376. ;    1       UN_City()
  377. ;    1       CurSec()
  378. ;    6       Exist()
  379. ;    1       I2S()
  380. ;    1       S2I()
  381. ;    1       Carrier()
  382. ;    1       GetX()
  383. ;    1       GetY()
  384. ;    2       Mixed()
  385. ;
  386. ;------------------------------------------------------------------------------
  387. ;
  388. ; Analysis flags : s
  389. ;
  390. ; s - Sysop level access ■ 5
  391. ;     Program is reading the sysop access level, this may be normal
  392. ;     but still it is very suspect. It is the best way to give a user
  393. ;     all priviledges. Check!
  394. ;     ■ Search for : SYSOPSEC()
  395. ;
  396. ;------------------------------------------------------------------------------
  397. ;
  398. ; Postprocessing report
  399. ;
  400. ;    1       For/Next
  401. ;    1       While/EndWhile
  402. ;    15      If/Then or If/Then/Else
  403. ;    1       Select Case
  404. ;
  405. ;------------------------------------------------------------------------------
  406. ;                 AEGiS Corp - Break the routines, code against the machines!
  407. ;------------------------------------------------------------------------------
  408.