home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / QFMAIL2C.ZIP / QF-MAIL.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-01-07  |  8KB  |  403 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.     String   STRING001
  23.     String   STRING002
  24.     String   STRING003
  25.     String   STRING004
  26.     String   STRING005
  27.     String   STRING006
  28.     String   STRING007
  29.     String   STRING008
  30.     String   STRING009
  31.     String   STRING010
  32.     String   STRING011
  33.     String   STRING012
  34.     String   STRING013
  35.     String   STRING014
  36.     String   STRING015
  37.     String   STRING016
  38.     String   STRING017
  39.     String   STRING018
  40.     String   STRING019
  41.     String   STRING020
  42.     String   STRING021
  43.     String   STRING022
  44.     String   STRING023
  45.     String   STRING024
  46.     String   STRING025
  47.     String   STRING026
  48.  
  49. ;------------------------------------------------------------------------------
  50.  
  51.     GetToken STRING001
  52.     STRING001 = Trim(Left(STRING001, 1), Chr(32))
  53.     Log "User " + U_Name() + " into qf-mail.ppe on node " + String(PcbNode()), 1
  54.     If (Exist(PPEPath() + "qf-mail.cnf") == 0) Then
  55.         PrintLn 
  56.         PrintLn "Error: File qf-mail.cnf Not Found!  Please Nodify Sysop..."
  57.         PrintLn 
  58.         Wait
  59.         End
  60.     Endif
  61.     FOpen 1, PPEPath() + "qf-mail.cnf", 0, 0
  62.     FGet 1, STRING010
  63.     FGet 1, STRING011
  64.     FGet 1, STRING012
  65.     FGet 1, STRING014
  66.     FGet 1, STRING015
  67.     FGet 1, STRING016
  68.     FGet 1, STRING017
  69.     FClose 1
  70.     FCreate 1, STRING010 + "\qfsearch.bat", 2, 0
  71.     FPutLn 1, "@echo off"
  72.     FPutLn 1, Left(STRING010, 2)
  73.     FPutLn 1, "CD" + Mid(STRING010, 3, 20)
  74.     FPut 1, "QFRONT" + " /C" + STRING011 + " /MAX:" + STRING012 + " /SEARCH:"
  75.     FPutLn 1, +"%1" + " /NODE:" + String(PcbNode())
  76.     FClose 1
  77.     If (STRING001 == "1") Goto LABEL002
  78.     If (STRING001 == "2") Goto LABEL013
  79.     If (STRING001 <> "") STRING002 = ""
  80.     If (STRING001 == "B") Goto LABEL003
  81.     :LABEL001
  82.     Cls
  83.     STRING002 = ""
  84.     PrintLn " QF-MAIL version 2.0c       UNREGISTERED VERSION       Written by: John Lundell"
  85.     If (Exist(PPEPath() + "net_in")) DispFile PPEPath() + "net_in", 1 + 2 + 4
  86.     STRING002 = 1
  87.     InputStr "@X0F(@X0AQ@X0F)@X0Auit, Netmail Selection Command", STRING002, 15, 1, "q, Q, 1, 2@X0F", 2 + 4 + 128 + 8
  88.     If (STRING002 == "1") Goto LABEL002
  89.     If (STRING002 == "2") Goto LABEL013
  90.     If (STRING002 == "Q") Goto LABEL014
  91.     If (STRING002 == "") Goto LABEL014
  92.     Goto LABEL001
  93.     :LABEL002
  94.     Cls
  95.     If (Exist(PPEPath() + "fido_a")) DispFile PPEPath() + "fido_a", 1 + 2 + 4
  96.     Newline
  97.     DispText 199, 32768
  98.     InputText "", STRING004, 14, 60
  99.     PrintLn 
  100.     DispText 200, 32768
  101.     InputText "", STRING005, 14, 60
  102.     If (Len(STRING005) < 1) Goto LABEL014
  103.     GetUser
  104.     If (U_FSEP == 0) STRING003 = NoChar()
  105.     If (U_FSEP == 1) STRING003 = YesChar()
  106.     Newline
  107.     STRING019 = "N"
  108.     InputYN "Do you know the correct FIDOnet Address (Y/N)", STRING019, 10
  109.     If (STRING019 == YesChar()) Then
  110.         Newline
  111.         InputStr "Enter FIDOnet Address", STRING006, 14, 15, "1234567890:/", 0
  112.     Else
  113.         Newline
  114.         :LABEL003
  115.         If (Exist(PPEPath() + "browse")) DispFile PPEPath() + "browse", 1 + 2 + 4
  116.         Newline
  117.         InputStr "Enter Search Text: _", STRING018, 14, 20, Mask_Ascii(), 0
  118.         If (STRING018 == "") Goto LABEL003
  119.         Newline
  120.         PrintLn "@X0FPlease be patient while we find matches to your search text ...@X0F"
  121.         STRING026 = STRING010 + "\qfsearch.bat"
  122.         STRING020 = STRING018
  123.         Shell 1, INTEGER003, STRING026, STRING020
  124.         FOpen 1, STRING010 + "\qsrch" + String(PcbNode()) + ".dat", 2, 0
  125.         If (Ferr(1)) Then
  126.             PrintLn "Error, Exiting..."
  127.             End
  128.         Endif
  129.         Cls
  130.         PrintLn "@X0FHere are the nodes that matched your ", STRING018, " search string...@X0F"
  131.         PrintLn "@X0EMaximum possible matches is ", STRING012, ".@X0F"
  132.         INTEGER001 = 0
  133.         FGet 1, STRING021
  134.         :LABEL004
  135.         If (Ferr(1)) Goto LABEL005
  136.         Inc INTEGER001
  137.         Newline
  138.         Print "[", INTEGER001, "] @X0AFIDOnet Address:@X0F ", STRING021
  139.         FGet 1, STRING022
  140.         Print "@POS:35@@X0ABBS:@X0F ", STRING022
  141.         FGet 1, STRING023
  142.         PrintLn ", ", STRING023
  143.         FGet 1, STRING024
  144.         Print "    @X0ESysop:@X0F ", STRING024
  145.         FGet 1, STRING025
  146.         PrintLn "@X0E@POS:35@BBS Phone:@X0F ", STRING025
  147.         FGet 1, STRING021
  148.         Goto LABEL004
  149.         :LABEL005
  150.         STRING013 = INTEGER001
  151.         FClose 1
  152.         Newline
  153.         If (STRING001 == "B") Then
  154.             If (STRING013 == 0) Then
  155.                 PrintLn "@X0ENo Matches Were Found.@X0F"
  156.             Endif
  157.             InputYN "Would you like to continue your browsing (Y/N)", STRING019, 10
  158.             If (STRING019 == YesChar()) Goto LABEL003
  159.             Goto LABEL014
  160.         Endif
  161.         If (STRING013 == 0) Then
  162.             PrintLn "@X0ENo Matches Were Found.@X0F"
  163.             STRING009 = "N"
  164.             InputYN "Would You Like to Continue Searching (Y/N)", STRING009, 10
  165.             If (STRING009 == NoChar()) Goto LABEL014
  166.             Delete STRING010 + "\qsrch" + String(PcbNode()) + ".dat"
  167.             Goto LABEL003
  168.         Endif
  169.         STRING009 = "N"
  170.         InputYN "Would You Like to Continue Searching (Y/N)", STRING009, 10
  171.         If (STRING009 == NoChar()) Goto LABEL006
  172.         Delete STRING010 + "\qsrch" + String(PcbNode()) + ".dat"
  173.         Goto LABEL003
  174.         :LABEL006
  175.         Newline
  176.         Log "A Successful Search in QF-MAIL...", 0
  177.         INTEGER002 = ""
  178.         Newline
  179.         InputStr "@X0A[@X0F@X0F1-@X0F" + STRING013 + "@X0A]@X0F@X0F" + " Enter the Number Next to Entry Containing Correct Address: _", INTEGER002, 14, 3, "1234567890", 0
  180.         Newline
  181.         STRING008 = "N"
  182.         If ((INTEGER002 == "") || (INTEGER002 > STRING013)) Then
  183.             InputYN "Valid Choices Are From 1 to " + STRING013 + ". Do You Wish To Abort Your Message (Y/N)", STRING008, 10
  184.             If (STRING008 == YesChar()) Goto LABEL014
  185.             Goto LABEL006
  186.         Endif
  187.         FOpen 1, STRING010 + "\qsrch" + String(PcbNode()) + ".dat", 2, 0
  188.         If (Ferr(1)) Then
  189.             PrintLn "Error, Exiting..."
  190.             Log "An Error Occured.. Exiting QF-MAIL...", 1
  191.             End
  192.         Endif
  193.         INTEGER001 = 0
  194.         FGet 1, STRING021
  195.         :LABEL007
  196.         If (Ferr(1)) Goto LABEL008
  197.         If (INTEGER001 == INTEGER002 - 1) Then
  198.             Goto LABEL008
  199.         Endif
  200.         Inc INTEGER001
  201.         FGet 1, STRING022
  202.         FGet 1, STRING023
  203.         FGet 1, STRING024
  204.         FGet 1, STRING025
  205.         FGet 1, STRING021
  206.         Goto LABEL007
  207.         :LABEL008
  208.         STRING006 = STRING021
  209.     Endif
  210.     FClose 1
  211.     Newline
  212.     If (STRING014 > U_Sec) Then
  213.         Goto LABEL009
  214.     Endif
  215.     If (STRING015 > U_Sec) Then
  216.         Goto LABEL009
  217.     Endif
  218.     If (STRING016 > U_Sec) Then
  219.         Goto LABEL009
  220.     Endif
  221.     If (STRING017 > U_Sec) Then
  222.         Goto LABEL011
  223.     Endif
  224.     :LABEL009
  225.     PrintLn "@X0FValid Transfer Modes@X0A:@X0F"
  226.     Newline
  227.     If (STRING014 <= U_Sec) Then
  228.         PrintLn "(A) @X0AIMMEDIATE@X0F = @X0EImmediate. Message Had Top Priority. No Cost Accounting.@X0B@X0D@X02@X0F"
  229.     Endif
  230.     If (STRING015 <= U_Sec) Then
  231.         PrintLn "(B) @X0ACRASH@X0F     = @X0EImmediate. Message Has Top Priority. Cost In Effect.@X0B@X0F"
  232.     Endif
  233.     If (STRING016 <= U_Sec) Then
  234.         PrintLn "(C) @X0AHOLD @X0F     = @X0EMessage Remains on System Until Destination System Calls.@X0B@X0F"
  235.     Endif
  236.     If (STRING017 <= U_Sec) Then
  237.         PrintLn "(D) @X0ADIRECT @X0F   = @X0EDo Not Use any Host or Hub Routing.@X0B@X0F"
  238.     Endif
  239.     PrintLn "(E) @X0ANONE @X0F     = @X0ENo Transfer Mode Desired.@X0B@X0F"
  240.     Newline
  241.     InputStr "Enter Letter of Transfer Mode: _", STRING007, 14, 1, "ABCDE", 8
  242.     If (STRING007 == "A") STRING007 = "IMMEDIATE"
  243.     If (STRING007 == "B") STRING007 = "CRASH"
  244.     If (STRING007 == "C") STRING007 = "HOLD"
  245.     If (STRING007 == "D") STRING007 = "DIRECT"
  246.     If (STRING007 == "E") STRING007 = "NONE"
  247.     If (STRING007 == "IMMEDIATE") Then
  248.         If (STRING014 > U_Sec) Goto LABEL010
  249.     Endif
  250.     If (STRING007 == "CRASH") Then
  251.         If (STRING015 > U_Sec) Goto LABEL010
  252.     Endif
  253.     If (STRING007 == "HOLD") Then
  254.         If (STRING016 > U_Sec) Goto LABEL010
  255.     Endif
  256.     If (STRING007 == "DIRECT") Then
  257.         If (STRING017 > U_Sec) Goto LABEL010
  258.     Endif
  259.     Goto LABEL011
  260.     :LABEL010
  261.     Newline
  262.     PrintLn "Insufficient Security for " + STRING007 + " Transfer Mode."
  263.     Wait
  264.     Goto LABEL009
  265.     :LABEL011
  266.     If (U_FSEP == 1) Goto LABEL012
  267.     KbdStuff "e " + Chr(13) + STRING004 + Chr(13) + STRING005 + Chr(13) + STRING003 + Chr(13)
  268.     KbdStuff "(" + STRING006 + ")" + Chr(13)
  269.     If (STRING007 == "NONE") Then
  270.         Goto LABEL014
  271.     Endif
  272.     If (STRING007 == "") Then
  273.         Goto LABEL014
  274.     Endif
  275.     KbdStuff "(" + STRING007 + ")" + Chr(13)
  276.     Goto LABEL014
  277.     :LABEL012
  278.     KbdStuff "e " + Chr(13) + STRING004 + Chr(13) + STRING005 + Chr(13) + Chr(13) + Chr(13)
  279.     KbdStuff "(" + STRING006 + ")" + Chr(13)
  280.     If (STRING007 == "NONE") Then
  281.         Goto LABEL014
  282.     Endif
  283.     If (STRING007 == "") Then
  284.         Goto LABEL014
  285.     Endif
  286.     KbdStuff "(" + STRING007 + ")" + Chr(13)
  287.     Goto LABEL014
  288.     :LABEL013
  289.     Cls
  290.     If (Exist(PPEPath() + "normal")) DispFile PPEPath() + "normal", 1 + 2 + 4
  291.     KbdStuff "e" + Chr(13)
  292.     End
  293.     :LABEL014
  294.     Delete STRING010 + "qfsearch.bat"
  295.     FOpen 1, STRING010 + "\qsrch" + String(PcbNode()) + ".dat", 1, 0
  296.     FClose 1
  297.     Delete STRING010 + "\qsrch" + String(PcbNode()) + ".dat"
  298.     Newlines 2
  299.     Print "@X0AThis copy of QF-Mail is unregistered"
  300.     Delay 16
  301.     Print "@X0E."
  302.     Delay 16
  303.     Print "@X0F."
  304.     Delay 14
  305.     Print "@X0A."
  306.     Delay 14
  307.     Print "@X0E."
  308.     Delay 12
  309.     Print "@X0F."
  310.     Delay 12
  311.     Print "@X0A."
  312.     Delay 10
  313.     Print "@X0E."
  314.     Delay 10
  315.     End
  316.  
  317. ;------------------------------------------------------------------------------
  318. ;
  319. ; Usage report (before postprocessing)
  320. ;
  321. ; ■ Statements used :
  322. ;
  323. ;    5       End
  324. ;    4       Cls
  325. ;    2       Wait
  326. ;    66      Goto 
  327. ;    22      Let 
  328. ;    11      Print 
  329. ;    21      PrintLn 
  330. ;    57      If 
  331. ;    4       DispFile 
  332. ;    1       FCreate 
  333. ;    4       FOpen 
  334. ;    5       FClose 
  335. ;    19      FGet 
  336. ;    1       FPut 
  337. ;    4       FPutLn 
  338. ;    1       GetUser
  339. ;    4       Delete 
  340. ;    3       Log 
  341. ;    5       InputStr 
  342. ;    5       InputYN 
  343. ;    8       Delay 
  344. ;    2       Inc 
  345. ;    15      Newline
  346. ;    1       Newlines 
  347. ;    1       GetToken 
  348. ;    1       Shell 
  349. ;    2       DispText 
  350. ;    2       InputText 
  351. ;    7       KbdStuff 
  352. ;
  353. ;
  354. ; ■ Functions used :
  355. ;
  356. ;    1       +
  357. ;    87      +
  358. ;    1       -
  359. ;    35      ==
  360. ;    1       <>
  361. ;    1       <
  362. ;    4       <=
  363. ;    9       >
  364. ;    27      !
  365. ;    1       ||
  366. ;    1       Len(
  367. ;    1       Mid()
  368. ;    2       Left()
  369. ;    4       Ferr()
  370. ;    15      Chr()
  371. ;    1       Trim()
  372. ;    1       U_Name()
  373. ;    3       NoChar()
  374. ;    4       YesChar()
  375. ;    8       String()
  376. ;    1       Mask_Ascii()
  377. ;    10      PPEPath()
  378. ;    8       PcbNode()
  379. ;    5       Exist()
  380. ;
  381. ;------------------------------------------------------------------------------
  382. ;
  383. ; Analysis flags : S
  384. ;
  385. ; S - Shell to DOS ■ 5
  386. ;     This may be normal if the PPE need to execute an external command,
  387. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  388. ;     or usefull (sorting, maintenance,...). Check!
  389. ;     ■ Search for : SHELL
  390. ;
  391. ;------------------------------------------------------------------------------
  392. ;
  393. ; Postprocessing report
  394. ;
  395. ;    0       For/Next
  396. ;    0       While/EndWhile
  397. ;    25      If/Then or If/Then/Else
  398. ;    0       Select Case
  399. ;
  400. ;------------------------------------------------------------------------------
  401. ;                 AEGiS Corp - Break the routines, code against the machines!
  402. ;------------------------------------------------------------------------------
  403.