home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / MAVO15ZA.ZIP / MAUSER.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-11-27  |  4KB  |  238 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.     Integer  INTEGER008
  27.     Integer  INTEGER009
  28.     Integer  INTEGER010
  29.     Integer  INTEGER011
  30.     Integer  INTEGER012
  31.     String   STRING002
  32.     String   STRING003
  33.     String   STRING004
  34.     String   STRING005
  35.     String   STRING006
  36.  
  37. ;------------------------------------------------------------------------------
  38.  
  39.     If (Psa(6) == 0) Then
  40.         PrintLn "Enable your Notes PSA in the PCB Setup!"
  41.     Else
  42.         GetUser
  43.         For INTEGER008 = 0 To 4
  44.             If (Left(U_Notes(INTEGER008), 2) == "MV") Then
  45.                 INTEGER012 = INTEGER008
  46.                 Goto LABEL001
  47.             Endif
  48.         Next
  49.         INTEGER007 = 0
  50.         For INTEGER008 = 0 To 4
  51.             If (U_Notes(INTEGER008) == 0) Then
  52.                 INTEGER007 = INTEGER008
  53.             Endif
  54.         Next
  55.         If (INTEGER007 == 0) Then
  56.             PrintLn "@X0CYour account does not have any Notes PSA available!!"
  57.         Else
  58.             U_Notes(INTEGER007) = "MV00000000000000000000000000000000000000000"
  59.             INTEGER012 = INTEGER007
  60.             :LABEL001
  61.             FOpen 1, PPEPath() + "mavote.cfg", 0, 0
  62.             FGet 1, INTEGER003
  63.             FGet 1, INTEGER004
  64.             FGet 1, INTEGER005
  65.             FGet 1, STRING006
  66.             FGet 1, STRING003
  67.             Print "@X0AWelcome to @X0B"
  68.             PrintLn STRING003
  69.             If (Len(U_Notes(INTEGER012)) > 43) Then
  70.                 If (Mid(U_Notes(INTEGER012), 1 + 21 * 2, 2) == "NO") Then
  71.                 Else
  72.                 Endif
  73.                 FClose 1
  74.                 If (Exist(PPEPath() + "mavote.bin") == 0) Then
  75.                     PrintLn PPEPath() + "MAVOTE.BIN not found!  Creating new MAVOTE.BIN......"
  76.                     FOpen 1, PPEPath() + "mavote.bin", 2, 0
  77.                     STRING005 = ""
  78.                     INTEGER010 = 0
  79.                     For INTEGER008 = 1 To 20
  80.                         FWrite 1, STRING005, 60
  81.                         For INTEGER009 = 1 To 10
  82.                             FWrite 1, STRING005, 40
  83.                             FWrite 1, INTEGER010, 5
  84.                         Next
  85.                     Next
  86.                     FClose 1
  87.                 Endif
  88.                 If (Exist(PPEPath() + "mavote.dat") == 1) Then
  89.                     PrintLn PPEPath() + "MAVOTE.DAT found!  Converting......."
  90.                     FOpen 1, PPEPath() + "mavote.bin", 2, 0
  91.                     FOpen 2, PPEPath() + "mavote.dat", 0, 0
  92.                     FGet 2, INTEGER011
  93.                     If (INTEGER011 <> 0) Then
  94.                         For INTEGER001 = 1 To INTEGER011
  95.                             FGet 2, STRING005
  96.                             FWrite 1, STRING005, 60
  97.                             For INTEGER002 = 1 To 15
  98.                                 FGet 2, STRING005
  99.                                 FGet 2, INTEGER010
  100.                                 If (INTEGER002 < 11) Then
  101.                                     FWrite 1, STRING005, 40
  102.                                     FWrite 1, INTEGER010, 5
  103.                                 Endif
  104.                             Next
  105.                         Next
  106.                     Endif
  107.                     FClose 2
  108.                     FClose 1
  109.                     Rename PPEPath() + "MAVOTE.DAT", PPEPath() + "MAVOTE.OLD"
  110.                     PrintLn PPEPath() + "MAVOTE.DAT renamed to " + PPEPath() + "MAVOTE.OLD."
  111.                 Endif
  112.                 FOpen 1, PPEPath() + "mavote.bin", 0, 0
  113.                 INTEGER006 = 0
  114.                 For INTEGER010 = 1 To 20
  115.                     FSeek 1, 510 * INTEGER010 - 510, 0
  116.                     FRead 1, STRING003, 60
  117.                     If (STRING003 <> "") Then
  118.                         If (ToInt(Mid(U_Notes(INTEGER012), 1 + INTEGER010 * 2, 2)) == 0) Then
  119.                             INTEGER006 = INTEGER006 + 1
  120.                         Endif
  121.                     Endif
  122.                 Next
  123.                 If (INTEGER006 == 0) Then
  124.                     Goto LABEL003
  125.                 Endif
  126.                 If (INTEGER006 > 0) Then
  127.                     PrintLn 
  128.                     Print "@X0AYou have not voted on @X0B"
  129.                     Print INTEGER006
  130.                     PrintLn " @X0Aquestions."
  131.                     PrintLn 
  132.                     Goto LABEL002
  133.                 Endif
  134.                 :LABEL002
  135.                 PrintLn " @X0B[@X0AV@X0B]ote now"
  136.                 PrintLn " @X0B[@X0AT@X0B]urn off voting notice"
  137.                 PrintLn 
  138.                 PrintLn " @X0AOr @X0D[@X0FENTER@X0D] @X0Ato continue"
  139.                 PrintLn 
  140.                 STRING002 = ""
  141.                 InputText "@X09[@X0BTime Left:@X0E@TIMELEFT@ @X0BMin.@X09] @X0AVote Command", STRING002, 11, 1
  142.                 STRING002 = Lower(STRING002)
  143.                 If (STRING002 == "v") Then
  144.                     Call STRING006
  145.                 Endif
  146.                 If (STRING002 == "t") Then
  147.                     STRING004 = "MV"
  148.                     For INTEGER008 = 1 To 20
  149.                         STRING004 = STRING004 + Mid(U_Notes(INTEGER012), 1 + INTEGER008 * 2, 2)
  150.                     Next
  151.                     STRING004 = STRING004 + "NO"
  152.                     U_Notes(INTEGER012) = STRING004
  153.                     PrintLn 
  154.                     PrintLn "@X0CYour voting notification has been deactivated."
  155.                     PutUser
  156.                 Endif
  157.             Endif
  158.         Endif
  159.     Endif
  160.     :LABEL003
  161.     FClose 1
  162.     End
  163.  
  164. ;------------------------------------------------------------------------------
  165. ;
  166. ; Usage report (before postprocessing)
  167. ;
  168. ; ■ Statements used :
  169. ;
  170. ;    1       End
  171. ;    38      Goto 
  172. ;    31      Let 
  173. ;    3       Print 
  174. ;    16      PrintLn 
  175. ;    24      If 
  176. ;    5       FOpen 
  177. ;    5       FClose 
  178. ;    9       FGet 
  179. ;    1       GetUser
  180. ;    1       PutUser
  181. ;    1       InputText 
  182. ;    1       Call 
  183. ;    1       Rename 
  184. ;    1       FSeek 
  185. ;    1       FRead 
  186. ;    6       FWrite 
  187. ;
  188. ;
  189. ; ■ Functions used :
  190. ;
  191. ;    4       *
  192. ;    28      +
  193. ;    1       -
  194. ;    11      ==
  195. ;    2       <>
  196. ;    9       <
  197. ;    8       <=
  198. ;    2       >
  199. ;    16      >=
  200. ;    24      !
  201. ;    16      &&
  202. ;    8       ||
  203. ;    1       Len(
  204. ;    1       Lower()
  205. ;    3       Mid()
  206. ;    1       Left()
  207. ;    13      PPEPath()
  208. ;    2       Exist()
  209. ;    1       Psa()
  210. ;    1       ToInt()
  211. ;
  212. ;------------------------------------------------------------------------------
  213. ;
  214. ; Analysis flags : WC
  215. ;
  216. ; W - Write user ■ 5
  217. ;     Program writes a user record. Although this may be normal for a
  218. ;     User Editor, it may also be a way to modify an account level.
  219. ;     ■ Search for : PUTUSER
  220. ;
  221. ; C - Call child PPE ■ 3
  222. ;     This is usually normal, but may be a tricky way to launch some
  223. ;     sysop-only commands.
  224. ;     ■ Search for : CALL
  225. ;
  226. ;------------------------------------------------------------------------------
  227. ;
  228. ; Postprocessing report
  229. ;
  230. ;    8       For/Next
  231. ;    0       While/EndWhile
  232. ;    16      If/Then or If/Then/Else
  233. ;    0       Select Case
  234. ;
  235. ;------------------------------------------------------------------------------
  236. ;                 AEGiS Corp - Break the routines, code against the machines!
  237. ;------------------------------------------------------------------------------
  238.