home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / ANSR.ZIP / ANSR.PPE (.txt) < prev    next >
Encoding:
PCBoard Programming Language Executable  |  1994-07-02  |  4.4 KB  |  310 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 1.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER003
  20.     Integer  INTEGER004
  21.     Integer  INTEGER005
  22.     Integer  INTEGER006
  23.     Integer  INTEGER007
  24.     Integer  INTEGER008
  25.     Integer  INTEGER009
  26.     Integer  INTEGER010
  27.     Integer  INTEGER011
  28.     Integer  INTEGER012
  29.     String   STRING001
  30.     String   STRING002
  31.     String   STRING003
  32.     String   STRING004
  33.     String   STRING005
  34.     String   STRING006
  35.     String   STRING007
  36.     String   STRING008
  37.     String   STRING009
  38.     String   STRING010
  39.     String   STRING011
  40.     String   STRING012
  41.     String   STRING013
  42.     String   STRING014
  43.  
  44. ;------------------------------------------------------------------------------
  45.  
  46.     STRING007 = PPEPath() + "MSG.TXT"
  47.     STRING008 = PPEPath() + "NO.LOG"
  48.     STRING014 = PPEPath() + "YES.LOG"
  49.     STRING011 = ""
  50.     STRING006 = "**************************************************"
  51.     If (TokCount() == 0) Then
  52.         Log "Did not detect a command-line CFG filename (ANSR.PPE)!", 1
  53.         End
  54.     Endif
  55.     STRING003 = GetToken()
  56.     GetUser
  57.     If (Exist(STRING003)) Then
  58.         FOpen 1, STRING003, 0, 0
  59.         Newline
  60.         SPrintLn "...Loading CFG Records...(ANSR.PPE)."
  61.         Newline
  62.         FGet 1, STRING001
  63.         FGet 1, STRING002
  64.         FGet 1, STRING004
  65.         FGet 1, STRING005
  66.         FGet 1, INTEGER012
  67.         FGet 1, INTEGER008
  68.         FGet 1, STRING011
  69.         FGet 1, INTEGER003
  70.         FGet 1, INTEGER010
  71.         FGet 1, INTEGER004
  72.         FGet 1, INTEGER009
  73.         FGet 1, INTEGER011
  74.         FGet 1, INTEGER007
  75.         FGet 1, INTEGER006
  76.         FGet 1, INTEGER005
  77.         FGet 1, STRING009
  78.         FClose 1
  79.     Else
  80.         Log "Cannot find ANSR.PPE CFG file!", 1
  81.         PrintLn "Tell SysOp ANSR.PPE CFG file is missing!"
  82.         End
  83.     Endif
  84.     If (STRING009 == "ABC5592f1") Then
  85.         STRING012 = "@X0AREGISTERED Version@X07"
  86.     Else
  87.         STRING012 = "@X0CUNREGISTERED Version@X07"
  88.     Endif
  89.     PrintLn "@X0B..Running ANSR.PPE v1.0 @X0D(c) by Al Segura..." + STRING012
  90.     :LABEL001
  91.     If (Exist(STRING001)) Then
  92.         StartDisp 1
  93.         StartDisp 0
  94.         DispFile STRING001, 2 + 1 + 4
  95.     Else
  96.         Log "Could not find ASKF file (ANSR.PPE)!", 1
  97.         End
  98.     Endif
  99.     Newline
  100.     If (INTEGER012) Then
  101.         InputYN STRING005, STRING013, 15
  102.         If (INTEGER008) Then
  103.             If (STRING013 == YesChar()) STRING013 = NoChar()
  104.             If (STRING013 == NoChar()) STRING013 = YesChar()
  105.         Endif
  106.         Select Case (STRING013)
  107.             Case YesChar()
  108.                 StartDisp 0
  109.                 If (Exist(STRING004)) DispFile STRING004, 2 + 1 + 4
  110.                 If (INTEGER009) Then
  111.                     If (U_Sec < INTEGER010) Then
  112.                         U_Sec = INTEGER010
  113.                         PutUser
  114.                         Log "ANSR.PPE Upgraded user to Level: " + String(INTEGER010), 1
  115.                         Newline
  116.                         PrintLn "You have been upgraded to Level " + String(INTEGER010)
  117.                         Newline
  118.                     Endif
  119.                 Endif
  120.                 If (INTEGER011) Then
  121.                     FAppend 1, STRING014, 2, 0
  122.                     STRING010 = "User responded affirmatively!"
  123.                     Gosub LABEL002
  124.                 Endif
  125.             Case NoChar()
  126.                 If (INTEGER007) Then
  127.                     FAppend 1, STRING008, 2, 0
  128.                     STRING010 = "User responded NEGATIVELY!!!"
  129.                     Gosub LABEL002
  130.                 Endif
  131.                 StartDisp 0
  132.                 If (Exist(STRING002)) DispFile STRING002, 2 + 1 + 4
  133.                 If (INTEGER004) Then
  134.                     If (U_Sec > INTEGER003) Then
  135.                         U_Sec = INTEGER003
  136.                         If (U_ExpSec > INTEGER003) U_ExpSec = INTEGER003
  137.                         PutUser
  138.                         Log "ANSR.PPE Downgraded user to Level: " + String(INTEGER003), 1
  139.                         FCreate 2, STRING007, 2, 0
  140.                         FPutLn 2, U_Name() + " replied negatively to request."
  141.                         FClose 2
  142.                         Message 0, "SYSOP", "ANSR.PPE", "Negative Answer", "R", 0, 0, 0, STRING007
  143.                         Newline
  144.                         PrintLn "You have been downgraded to Level " + String(INTEGER003)
  145.                         PrintLn "due to your negative response.  If incorrect, you must"
  146.                         PrintLn "leave the SysOp a (C)omment of explaination."
  147.                         Newline
  148.                         If (INTEGER006) Then
  149.                             Hangup
  150.                             End
  151.                         Endif
  152.                         More
  153.                     Endif
  154.                 Endif
  155.             Case Else
  156.                 If (INTEGER007) Then
  157.                     FAppend 1, STRING008, 2, 0
  158.                     STRING010 = "User probably just hit <Enter>."
  159.                     Gosub LABEL002
  160.                 Endif
  161.                 Newlines 2
  162.                 PrintLn "You must respond 'Y' or 'N' !!"
  163.                 Newline
  164.                 If (INTEGER005) Then
  165.                     Hangup
  166.                     End
  167.                 Endif
  168.                 More
  169.                 Cls
  170.                 Goto LABEL001
  171.         End Select
  172.     Else
  173.         Input STRING005, STRING013
  174.         STRING013 = Upper(STRING013)
  175.         STRING011 = Upper(STRING011)
  176.         Select Case (STRING013)
  177.             Case STRING011
  178.                 StartDisp 0
  179.                 If (Exist(STRING004)) DispFile STRING004, 2 + 1 + 4
  180.                 If (INTEGER009) Then
  181.                     If (U_Sec < INTEGER010) Then
  182.                         U_Sec = INTEGER010
  183.                         PutUser
  184.                         Log "ANSR.PPE Upgraded user to Level: " + String(INTEGER010), 1
  185.                         Newline
  186.                         PrintLn "You have been upgraded to Level " + String(INTEGER010)
  187.                         Newline
  188.                     Endif
  189.                 Endif
  190.                 If (INTEGER011) Then
  191.                     FAppend 1, STRING014, 2, 0
  192.                     STRING010 = "User answered affirmatively."
  193.                     Gosub LABEL002
  194.                 Endif
  195.             Case "ABORT"
  196.                 If (INTEGER007) Then
  197.                     FAppend 1, STRING008, 2, 0
  198.                     STRING010 = "User entered ABORT to answer request."
  199.                     Gosub LABEL002
  200.                 Endif
  201.                 Log "User entered ABORT to answer request. (ANSR.PPE)", 1
  202.                 End
  203.             Case Else
  204.                 If (INTEGER007) Then
  205.                     FAppend 1, STRING008, 2, 0
  206.                     STRING010 = "User entered: " + STRING013
  207.                     Gosub LABEL002
  208.                 Endif
  209.                 Newline
  210.                 PrintLn "That is not an accepted response.  Respond properly or type"
  211.                 PrintLn "'ABORT' to quit!"
  212.                 Newline
  213.                 More
  214.                 Cls
  215.                 Goto LABEL001
  216.             Endif
  217.     End Select
  218.     Newline
  219.     SPrintLn "ANSR.PPE Successfully Completed!"
  220.     StartDisp 2
  221.     End
  222.     :LABEL002
  223.     FPutLn 1, STRING006
  224.     FPutLn 1, U_Name()
  225.     FPutLn 1, "Date: ", Date(), " / ", "TIME: ", Time()
  226.     FPutLn 1, STRING010
  227.     FClose 1
  228.     Return
  229.  
  230. ;------------------------------------------------------------------------------
  231. ;
  232. ; Usage report (before postprocessing)
  233. ;
  234. ; ■ Statements used :
  235. ;
  236. ;    7       End
  237. ;    2       Cls
  238. ;    3       More
  239. ;    34      Goto 
  240. ;    22      Let 
  241. ;    10      PrintLn 
  242. ;    30      If 
  243. ;    4       DispFile 
  244. ;    1       Input 
  245. ;    1       FCreate 
  246. ;    1       FOpen 
  247. ;    6       FAppend 
  248. ;    3       FClose 
  249. ;    16      FGet 
  250. ;    5       FPutLn 
  251. ;    6       StartDisp 
  252. ;    2       Hangup
  253. ;    1       GetUser
  254. ;    3       PutUser
  255. ;    7       Log 
  256. ;    1       InputYN 
  257. ;    6       Gosub 
  258. ;    1       Return
  259. ;    13      Newline
  260. ;    1       Newlines 
  261. ;    1       Message 
  262. ;    2       SPrintLn 
  263. ;
  264. ;
  265. ; ■ Functions used :
  266. ;
  267. ;    20      +
  268. ;    8       ==
  269. ;    2       <
  270. ;    2       >
  271. ;    24      !
  272. ;    2       Upper()
  273. ;    1       Date()
  274. ;    1       Time()
  275. ;    2       U_Name()
  276. ;    3       NoChar()
  277. ;    3       YesChar()
  278. ;    6       String()
  279. ;    3       PPEPath()
  280. ;    1       GetToken()
  281. ;    5       Exist()
  282. ;    1       TokCount()
  283. ;
  284. ;------------------------------------------------------------------------------
  285. ;
  286. ; Analysis flags : WB
  287. ;
  288. ; W - Write user ■ 5
  289. ;     Program writes a user record. Although this may be normal for a
  290. ;     User Editor, it may also be a way to modify an account level.
  291. ;     ■ Search for : PUTUSER
  292. ;
  293. ; B - Brute hangup ■ 1
  294. ;     Program hangup without notification. This may be a good way to
  295. ;     disconnect a user, but if used randomly, may be very nasty
  296. ;     ■ Search for : HANGUP, DTROFF
  297. ;
  298. ;------------------------------------------------------------------------------
  299. ;
  300. ; Postprocessing report
  301. ;
  302. ;    0       For/Next
  303. ;    0       While/EndWhile
  304. ;    20      If/Then or If/Then/Else
  305. ;    2       Select Case
  306. ;
  307. ;------------------------------------------------------------------------------
  308. ;                 AEGiS Corp - Break the routines, code against the machines!
  309. ;------------------------------------------------------------------------------
  310.