home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / bcon110.zip / LOGOFF.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-05-19  |  6KB  |  418 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.     Boolean  BOOLEAN001
  20.     Boolean  BOOLEAN002
  21.     Integer  INTEGER001
  22.     Integer  INTEGER002
  23.     Integer  INTEGER003
  24.     Integer  INTEGER004
  25.     Integer  INTEGER005
  26.     Integer  INTEGER006
  27.     Integer  INTEGER007
  28.     Integer  INTEGER008
  29.     Integer  INTEGER009
  30.     Integer  INTEGER010
  31.     Integer  INTEGER011
  32.     Integer  INTEGER012
  33.     Integer  INTEGER013
  34.     Integer  INTEGER014
  35.     String   STRING001
  36.     String   STRING002
  37.     String   STRING003
  38.     String   STRING004
  39.     String   STRING005
  40.     String   STRING006
  41.     String   STRING007
  42.     String   STRING008
  43.     String   STRING009
  44.     String   STRING010
  45.     String   STRING011
  46.     String   STRING012
  47.     String   STRING013
  48.     String   STRING014
  49.     String   STRING015
  50.     String   STRING016
  51.     String   TSTRING017(6)
  52.     String   STRING018
  53.     String   STRING019
  54.     Time     TIME001
  55.     Time     TIME002
  56.     Time     TIME003
  57.  
  58. ;------------------------------------------------------------------------------
  59.  
  60.     INTEGER011 = 5
  61.     INTEGER013 = "@X1F"
  62.     STRING019 = INTEGER013
  63.     STRING009 = TokenStr()
  64.     GetUser
  65.     PutUser
  66.     BOOLEAN001 = 0
  67.     If (BOOLEAN001) Then
  68.         PrintLn "Cmdline = " + STRING009
  69.         Wait
  70.     Endif
  71.     STRING014 = PPEPath() + "\" + "logoff.cfg"
  72.     STRING013 = PPEPath() + "work\whotmp"
  73.     STRING015 = PPEPath() + "graph\offtext"
  74.     STRING011 = PPEPath() + "offmenus.cfg"
  75.     If (LangExt() <> "") Then
  76.         If (Exist(STRING015 + LangExt())) Then
  77.             STRING015 = STRING015 + LangExt()
  78.         Endif
  79.     Endif
  80.     INTEGER009 = ReadLine(STRING014, 1)
  81.     If (INTEGER009 > 0) Then
  82.         BOOLEAN002 = 1
  83.     Else
  84.         BOOLEAN002 = 0
  85.     Endif
  86.     INTEGER005 = ReadLine(STRING011, 1)
  87.     STRING003 = PPEPath() + "graph\off"
  88.     STRING018 = ReadLine(STRING014, 2)
  89.     INTEGER006 = ReadLine(STRING014, 3)
  90.     If (U_Sec < ToInteger(ReadLine(STRING014, 4))) Then
  91.         Bye
  92.         End
  93.     Endif
  94.     STRING007 = Upper(ReadLine(STRING014, 5))
  95.     STRING005 = ReadLine(STRING015, 1)
  96.     STRING001 = ReadLine(STRING015, 6)
  97.     TIME001 = Time()
  98.     TIME002 = ReadLine(PCBDat(), 189)
  99.     TIME003 = ReadLine(PCBDat(), 190)
  100.     STRING002 = Chr(13)
  101.     If (AnsiOn()) Goto LABEL001
  102.     PrintLn 
  103.     PrintLn "Sorry but you have to have ansi capabilities to use the lightbar"
  104.     PrintLn "logoff matrix, please make sure you have ansi installed and call back"
  105.     End
  106.     :LABEL001
  107.     StartDisp 1
  108.     If (STRING007 == "LIGHTBAR") Then
  109.         Gosub LABEL002
  110.     Else
  111.         Gosub LABEL008
  112.     Endif
  113.     End
  114.     :LABEL002
  115.     Tokenize STRING009
  116.     STRING012 = ""
  117.     If (TokCount() >= 1) Then
  118.         If (BOOLEAN001) Then
  119.             PrintLn "tokcount == 1"
  120.         Endif
  121.         STRING008 = GetToken()
  122.         If (BOOLEAN001) Then
  123.             PrintLn "token = " + STRING008
  124.             Wait
  125.         Endif
  126.         If (Upper(STRING008) == "UPDATE") Then
  127.             End
  128.         Endif
  129.         If (((STRING008 >= "1") && (STRING008 <= String(INTEGER011))) || (Upper(STRING008) == "Y")) Then
  130.             If (BOOLEAN001) Then
  131.                 PrintLn "token =", STRING008
  132.                 Wait
  133.             Endif
  134.             STRING012 = STRING008
  135.             INTEGER012 = STRING008
  136.             If (Upper(STRING008) == "Y") Then
  137.                 STRING012 = "1"
  138.                 INTEGER012 = 1
  139.             Endif
  140.         Else
  141.             :LABEL003
  142.             INTEGER008 = Random(INTEGER005 - 1) + 1
  143.             DispFile STRING003 + String(INTEGER008), 1 + 4
  144.             STRING016 = ReadLine(STRING011, 1 + INTEGER008)
  145.             Tokenize STRING016
  146.             INTEGER003 = GetToken()
  147.             INTEGER004 = GetToken()
  148.             STRING010 = ""
  149.             STRING010 = GetToken()
  150.             INTEGER014 = STRING010
  151.             INTEGER007 = INTEGER004
  152.             TSTRING017(5) = ScrText(INTEGER003, INTEGER007, INTEGER014, 1)
  153.             TSTRING017(4) = ScrText(INTEGER003, INTEGER007 - 1, INTEGER014, 1)
  154.             TSTRING017(3) = ScrText(INTEGER003, INTEGER007 - 2, INTEGER014, 1)
  155.             TSTRING017(2) = ScrText(INTEGER003, INTEGER007 - 3, INTEGER014, 1)
  156.             TSTRING017(1) = ScrText(INTEGER003, INTEGER007 - 4, INTEGER014, 1)
  157.             STRING019 = GetToken()
  158.             INTEGER012 = 1
  159.             INTEGER001 = INTEGER003
  160.             INTEGER002 = INTEGER004
  161.             For INTEGER007 = INTEGER011 To 1 Step -1
  162.                 AnsiPos INTEGER001, INTEGER002 - INTEGER011 - INTEGER007
  163.                 Print TSTRING017(INTEGER007)
  164.             Next
  165.             AnsiPos INTEGER001, INTEGER002 - INTEGER011 - INTEGER012
  166.             Print STRING019, StripAtx(TSTRING017(INTEGER012))
  167.             :LABEL004
  168.             STRING012 = Inkey()
  169.         Endif
  170.     Endif
  171.     Select Case (STRING012)
  172.         Case "a", "UP", "LEFT"
  173.             AnsiPos INTEGER001, INTEGER002 - INTEGER011 - INTEGER012
  174.             Print TSTRING017(INTEGER012)
  175.             If (INTEGER012 == 1) Then
  176.                 INTEGER012 = INTEGER011
  177.             Else
  178.                 INTEGER012 = INTEGER012 - 1
  179.             Endif
  180.             AnsiPos INTEGER001, INTEGER002 - INTEGER011 - INTEGER012
  181.             Print STRING019, StripAtx(TSTRING017(INTEGER012))
  182.             Goto LABEL004
  183.         Case "z", "DOWN", "RIGHT"
  184.             AnsiPos INTEGER001, INTEGER002 - INTEGER011 - INTEGER012
  185.             Print "@X0F", TSTRING017(INTEGER012)
  186.             If (INTEGER012 == INTEGER011) Then
  187.                 INTEGER012 = 1
  188.             Else
  189.                 INTEGER012 = INTEGER012 + 1
  190.             Endif
  191.             AnsiPos INTEGER001, INTEGER002 - INTEGER011 - INTEGER012
  192.             Print STRING019, StripAtx(TSTRING017(INTEGER012))
  193.             Goto LABEL004
  194.         Case ||, "1", String(INTEGER011)
  195.             If (STRING012 <> STRING002) INTEGER012 = STRING012
  196.             Select Case (INTEGER012)
  197.                 Case 1
  198.                     Goto LABEL005
  199.                 Case 2
  200.                     DefColor
  201.                     Cls
  202.                     End
  203.                 Case 3
  204.                     Call STRING018
  205.                     StartDisp 1
  206.                 Case 4
  207.                     Call PPEPath() + "feedback.ppe"
  208.                     FClose -1
  209.                     StartDisp 1
  210.                 Case 5
  211.                     Gosub LABEL006
  212.             End Select
  213.             Goto LABEL003
  214.         Case Else
  215.             If (BOOLEAN001) If (STRING012 <> "") PrintLn STRING012
  216.             Goto LABEL004
  217.     End Select
  218.     Goto LABEL003
  219.     :LABEL005
  220.     DefColor
  221.     Cls
  222.     PrintLn 
  223.     PrintLn 
  224.     PrintLn STRING005
  225.     If (BOOLEAN002) Then
  226.         INTEGER010 = Random(INTEGER009 - 1) + 1
  227.         DispFile PPEPath() + "graph\bye" + String(INTEGER010), 1 + 4
  228.     Endif
  229.     Bye
  230.     End
  231.     :LABEL006
  232.     DefColor
  233.     Cls
  234.     STRING006 = ReadLine(STRING015, 19)
  235.     PrintLn STRING006 + String(INTEGER006) + ReadLine(STRING015, 16)
  236.     STRING006 = ReadLine(STRING015, 15)
  237.     PrintLn STRING006 + U_Name()
  238.     FCreate 1, PPEPath() + "work\offtmp" + "." + String(PcbNode()), 1, 0
  239.     INTEGER007 = 0
  240.     STRING006 = ReadLine(STRING015, 17)
  241.     While (1) Do
  242.         If (INTEGER007 >= INTEGER006) Break
  243.         STRING004 = ""
  244.         InputStr STRING006 + "_", STRING004, 3, 79, Mask_Ascii(), 2 + 512
  245.         If (STRING004 == "") Break
  246.         FPutLn 1, STRING004
  247.         PrintLn 
  248.         Inc INTEGER007
  249.     EndWhile
  250.     Newline
  251.     STRING012 = "S"
  252.     STRING006 = ReadLine(STRING015, 7)
  253.     InputStr STRING006, STRING012, 1, 1, "AaSsTt", 2
  254.     If (STRING012 == "") Then
  255.         FClose 1
  256.         Return
  257.     Else
  258.         Select Case (Upper(STRING012))
  259.             Case "A"
  260.                 FClose 1
  261.                 Goto LABEL007
  262.             Case "T"
  263.                 FClose 1
  264.                 Goto LABEL006
  265.             Endif
  266.     End Select
  267.     Newline
  268.     STRING012 = Upper(NoChar())
  269.     InputYN ReadLine(STRING015, 20), STRING012, 1
  270.     If (Upper(STRING012) == Upper(NoChar())) Then
  271.         FPutLn 1, ""
  272.         FPutLn 1, ReadLine(STRING015, 21) + U_Name()
  273.     Else
  274.         FPutLn 1, ""
  275.         FPutLn 1, ReadLine(STRING015, 21) + ReadLine(STRING015, 22)
  276.     Endif
  277.     FClose 1
  278.     Copy PPEPath() + "work\offtmp" + "." + String(PcbNode()), PPEPath() + "graph\msg"
  279.     Return
  280.     :LABEL007
  281.     Return
  282.     :LABEL008
  283.     STRING012 = YesChar()
  284.     Newline
  285.     InputYN ReadLine(STRING015, 23), STRING012, 1
  286.     If (Upper(STRING012) == Upper(NoChar())) Then
  287.         Return
  288.     ElseIf (Upper(STRING012) <> Upper(YesChar())) Then
  289.         Return
  290.     Endif
  291.     Newline
  292.     STRING012 = NoChar()
  293.     InputYN ReadLine(STRING015, 24), STRING012, 1
  294.     If (Upper(STRING012) == Upper(YesChar())) Then
  295.         Call PPEPath() + "feedback.ppe"
  296.         FClose -1
  297.     Endif
  298.     Newline
  299.     STRING012 = NoChar()
  300.     InputYN ReadLine(STRING015, 25), STRING012, 1
  301.     If (Upper(STRING012) == Upper(YesChar())) Then
  302.         Gosub LABEL006
  303.     Endif
  304.     PrintLn STRING005
  305.     If (BOOLEAN002) Then
  306.         INTEGER010 = Random(INTEGER009 - 1) + 1
  307.     Endif
  308.     DispFile PPEPath() + "graph\bye" + String(INTEGER010), 1 + 4
  309.     Bye
  310.     Return
  311.  
  312. ;------------------------------------------------------------------------------
  313. ;
  314. ; Usage report (before postprocessing)
  315. ;
  316. ; ■ Statements used :
  317. ;
  318. ;    6       End
  319. ;    3       Cls
  320. ;    3       Wait
  321. ;    64      Goto 
  322. ;    68      Let 
  323. ;    6       Print 
  324. ;    15      PrintLn 
  325. ;    41      If 
  326. ;    3       DispFile 
  327. ;    1       FCreate 
  328. ;    6       FClose 
  329. ;    5       FPutLn 
  330. ;    3       StartDisp 
  331. ;    1       GetUser
  332. ;    1       PutUser
  333. ;    3       DefColor
  334. ;    2       InputStr 
  335. ;    4       InputYN 
  336. ;    4       Gosub 
  337. ;    6       Return
  338. ;    1       Inc 
  339. ;    5       Newline
  340. ;    2       Tokenize 
  341. ;    3       Call 
  342. ;    3       Bye
  343. ;    6       AnsiPos 
  344. ;    1       Copy 
  345. ;
  346. ;
  347. ; ■ Functions used :
  348. ;
  349. ;    5       -
  350. ;    40      +
  351. ;    20      -
  352. ;    26      ==
  353. ;    4       <>
  354. ;    2       <
  355. ;    3       <=
  356. ;    1       >
  357. ;    6       >=
  358. ;    36      !
  359. ;    4       &&
  360. ;    7       ||
  361. ;    17      Upper()
  362. ;    1       Chr()
  363. ;    3       Random()
  364. ;    1       Time()
  365. ;    2       U_Name()
  366. ;    5       NoChar()
  367. ;    4       YesChar()
  368. ;    3       StripAtx()
  369. ;    1       Inkey()
  370. ;    8       String()
  371. ;    1       Mask_Ascii()
  372. ;    2       PCBDat()
  373. ;    12      PPEPath()
  374. ;    2       PcbNode()
  375. ;    23      ReadLine()
  376. ;    5       GetToken()
  377. ;    1       Exist()
  378. ;    1       TokenStr()
  379. ;    3       LangExt()
  380. ;    1       AnsiOn()
  381. ;    1       TokCount()
  382. ;    5       ScrText()
  383. ;    1       ToInteger()
  384. ;
  385. ;------------------------------------------------------------------------------
  386. ;
  387. ; Analysis flags : WCd
  388. ;
  389. ; W - Write user ■ 5
  390. ;     Program writes a user record. Although this may be normal for a
  391. ;     User Editor, it may also be a way to modify an account level.
  392. ;     ■ Search for : PUTUSER
  393. ;
  394. ; C - Call child PPE ■ 3
  395. ;     This is usually normal, but may be a tricky way to launch some
  396. ;     sysop-only commands.
  397. ;     ■ Search for : CALL
  398. ;
  399. ; d - Access PCBOARD.DAT ■ 2
  400. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  401. ;     for many PPE so they can find various informations on the system
  402. ;     (system paths, max number of lines in messages, ...) but it may also
  403. ;     be a way to gather vital informations.
  404. ;     ■ Search for : PCBDAT()
  405. ;
  406. ;------------------------------------------------------------------------------
  407. ;
  408. ; Postprocessing report
  409. ;
  410. ;    1       For/Next
  411. ;    1       While/EndWhile
  412. ;    23      If/Then or If/Then/Else
  413. ;    3       Select Case
  414. ;
  415. ;------------------------------------------------------------------------------
  416. ;                 AEGiS Corp - Break the routines, code against the machines!
  417. ;------------------------------------------------------------------------------
  418.