home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / QFMAIL1A.ZIP / QF-MAIL.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1993-08-29  |  7KB  |  344 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  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.     If (Exist(PPEPath() + "qf-mail.cnf") == 0) Then
  54.         PrintLn 
  55.         PrintLn "Error: File qf-mail.cnf Not Found!  Please Nodify Sysop..."
  56.         PrintLn 
  57.         Wait
  58.         End
  59.     Endif
  60.     FOpen 1, PPEPath() + "qf-mail.cnf", 0, 0
  61.     FGet 1, STRING010
  62.     FGet 1, STRING011
  63.     FGet 1, STRING012
  64.     FGet 1, STRING014
  65.     FGet 1, STRING015
  66.     FGet 1, STRING016
  67.     FGet 1, STRING017
  68.     FClose 1
  69.     FCreate 1, STRING010 + "\qfsearch.bat", 2, 0
  70.     FPutLn 1, "@echo off"
  71.     FPutLn 1, Left(STRING010, 2)
  72.     FPutLn 1, "CD" + Mid(STRING010, 3, 20)
  73.     FPutLn 1, "QFRONT" + " /C" + STRING011 + " /MAX:" + STRING012 + " /SEARCH:" + "%1"
  74.     FClose 1
  75.     If (STRING001 == "1") Goto LABEL002
  76.     If (STRING001 == "2") Goto LABEL012
  77.     If (STRING001 <> "") STRING002 = ""
  78.     If (STRING001 == "B") Goto LABEL003
  79.     :LABEL001
  80.     Cls
  81.     STRING002 = ""
  82.     PrintLn " QF-MAIL version 1.0a       UNREGISTERED VERSION       Written by: John Lundell"
  83.     If (Exist(PPEPath() + "net_in")) DispFile PPEPath() + "net_in", 1 + 2 + 4
  84.     InputStr "@X0F(@X0AQ@X0F)@X0Auit, Netmail Selection Command", STRING002, 15, 1, "q, Q, 1, 2@X0F", 2 + 4 + 128 + 8
  85.     If (STRING002 == "1") Goto LABEL002
  86.     If (STRING002 == "2") Goto LABEL012
  87.     If (STRING002 == "Q") Goto LABEL013
  88.     If (STRING002 == "") Goto LABEL013
  89.     Goto LABEL001
  90.     :LABEL002
  91.     Cls
  92.     If (Exist(PPEPath() + "fido_a")) DispFile PPEPath() + "fido_a", 1 + 2 + 4
  93.     Newline
  94.     DispText 199, 32768
  95.     InputText "", STRING004, 14, 60
  96.     PrintLn 
  97.     DispText 200, 32768
  98.     InputText "", STRING005, 14, 60
  99.     If (Len(STRING005) < 1) Goto LABEL013
  100.     GetUser
  101.     Select Case (U_FSEP)
  102.         Case 0
  103.             STRING003 = NoChar()
  104.         Case 1
  105.             STRING003 = YesChar()
  106.     End Select
  107.     Newline
  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.         STRING018 = Replace(STRING018, " ", "_")
  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 + "\qfsearch.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.             InputYN "Would you like to continue your browsing (Y/N)", STRING019, 10
  155.             If (STRING019 == YesChar()) Goto LABEL003
  156.             Goto LABEL013
  157.         Endif
  158.         STRING009 = "N"
  159.         InputYN "Would You Like to Continue Searching (Y/N)", STRING009, 10
  160.         If (STRING009 == NoChar()) Goto LABEL006
  161.         Delete STRING010 + "\qfsearch.dat"
  162.         Goto LABEL003
  163.         :LABEL006
  164.         Newline
  165.         INTEGER002 = ""
  166.         InputStr "@X0A[@X0F@X0F1-@X0F" + STRING013 + "@X0A]@X0F@X0F" + " Enter the Number Next to Entry Containing Correct Address", INTEGER002, 14, 3, "1234567890", 0
  167.         Newline
  168.         STRING008 = "N"
  169.         If ((INTEGER002 == "") || (INTEGER002 > STRING013)) Then
  170.             InputYN "Valid Choices Are From 1 to " + STRING013 + ". Do You Wish To Abort Your Message (Y/N)", STRING008, 10
  171.             If (STRING008 == YesChar()) Goto LABEL013
  172.             Goto LABEL006
  173.         Endif
  174.         FOpen 1, STRING010 + "\qfsearch.dat", 2, 0
  175.         If (Ferr(1)) Then
  176.             PrintLn "Error, Exiting..."
  177.             End
  178.         Endif
  179.         INTEGER001 = 0
  180.         FGet 1, STRING021
  181.         :LABEL007
  182.         If (Ferr(1)) Goto LABEL008
  183.         If (INTEGER001 == INTEGER002 - 1) Then
  184.             Goto LABEL008
  185.         Endif
  186.         Inc INTEGER001
  187.         FGet 1, STRING022
  188.         FGet 1, STRING023
  189.         FGet 1, STRING024
  190.         FGet 1, STRING025
  191.         FGet 1, STRING021
  192.         Goto LABEL007
  193.         :LABEL008
  194.         STRING006 = STRING021
  195.     Endif
  196.     FClose 1
  197.     Newline
  198.     Newline
  199.     PrintLn "@X0FValid Transfer Modes@X0A:@X0F"
  200.     Newline
  201.     PrintLn "(A) @X0AIMMEDIATE@X0F = @X0EImmediate. Message Had Top Priority. No Cost Accounting.@X0B@X0D@X02@X0F"
  202.     PrintLn "(B) @X0ACRASH@X0F     = @X0EImmediate. Message Has Top Priority. Cost In Effect.@X0B@X0F"
  203.     PrintLn "(C) @X0AHOLD @X0F     = @X0EMessage Remains on System Until Destination System Calls.@X0B@X0F"
  204.     PrintLn "(D) @X0ADIRECT @X0F   = @X0EDo Not Use any Host or Hub Routing.@X0B@X0F"
  205.     PrintLn "(E) @X0ANONE @X0F     = @X0ENo Transfer Mode Desired.@X0B@X0F"
  206.     Newline
  207.     InputStr "Enter Letter of Transfer Mode", STRING007, 14, 1, "ABCDE", 8
  208.     If (STRING007 == "A") STRING007 = "IMMEDIATE"
  209.     If (STRING007 == "B") STRING007 = "CRASH"
  210.     If (STRING007 == "C") STRING007 = "HOLD"
  211.     If (STRING007 == "D") STRING007 = "DIRECT"
  212.     If (STRING007 == "E") STRING007 = "NONE"
  213.     If (STRING007 == "IMMEDIATE") Then
  214.         If (STRING014 > U_Sec) Goto LABEL009
  215.     Endif
  216.     If (STRING007 == "CRASH") Then
  217.         If (STRING015 > U_Sec) Goto LABEL009
  218.     Endif
  219.     If (STRING007 == "HOLD") Then
  220.         If (STRING016 > U_Sec) Goto LABEL009
  221.     Endif
  222.     If (STRING007 == "DIRECT") Then
  223.         If (STRING017 > U_Sec) Goto LABEL009
  224.     Endif
  225.     Goto LABEL010
  226.     :LABEL009
  227.     Newline
  228.     PrintLn "Insufficient Security for " + STRING007 + " Transfer Mode."
  229.     Wait
  230.     STRING007 = "NONE"
  231.     :LABEL010
  232.     If (U_FSEP == 0) Goto LABEL011
  233.     KbdStuff "e " + Chr(13) + STRING004 + Chr(13) + STRING005 + Chr(13) + STRING003 + Chr(13)
  234.     KbdStuff "(" + STRING006 + ")" + Chr(13)
  235.     If (STRING007 == "NONE") Then
  236.         Goto LABEL013
  237.     Endif
  238.     If (STRING007 == "") Then
  239.         Goto LABEL013
  240.     Endif
  241.     KbdStuff "(" + STRING007 + ")" + Chr(13)
  242.     Goto LABEL013
  243.     :LABEL011
  244.     KbdStuff "e " + Chr(13) + STRING004 + Chr(13) + STRING005 + Chr(13) + Chr(13)
  245.     KbdStuff "(" + STRING006 + ")" + Chr(13)
  246.     If (STRING007 == "NONE") Then
  247.         Goto LABEL013
  248.     Endif
  249.     If (STRING007 == "") Then
  250.         Goto LABEL013
  251.     Endif
  252.     KbdStuff "(" + STRING007 + ")" + Chr(13)
  253.     Goto LABEL013
  254.     :LABEL012
  255.     Cls
  256.     If (Exist(PPEPath() + "normal")) DispFile PPEPath() + "normal", 1 + 2 + 4
  257.     KbdStuff "e" + Chr(13)
  258.     End
  259.     :LABEL013
  260.     Delete STRING010 + "\qfsearch.bat"
  261.     FOpen 1, STRING010 + "\qfsearch.dat", 1, 0
  262.     FClose 1
  263.     Delete STRING010 + "\qfsearch.dat"
  264.     End
  265.  
  266. ;------------------------------------------------------------------------------
  267. ;
  268. ; Usage report (before postprocessing)
  269. ;
  270. ; ■ Statements used :
  271. ;
  272. ;    5       End
  273. ;    4       Cls
  274. ;    2       Wait
  275. ;    51      Goto 
  276. ;    21      Let 
  277. ;    3       Print 
  278. ;    19      PrintLn 
  279. ;    45      If 
  280. ;    4       DispFile 
  281. ;    1       FCreate 
  282. ;    4       FOpen 
  283. ;    5       FClose 
  284. ;    19      FGet 
  285. ;    4       FPutLn 
  286. ;    1       GetUser
  287. ;    3       Delete 
  288. ;    5       InputStr 
  289. ;    4       InputYN 
  290. ;    2       Inc 
  291. ;    15      Newline
  292. ;    1       GetToken 
  293. ;    1       Shell 
  294. ;    2       DispText 
  295. ;    2       InputText 
  296. ;    7       KbdStuff 
  297. ;
  298. ;
  299. ; ■ Functions used :
  300. ;
  301. ;    69      +
  302. ;    1       -
  303. ;    31      ==
  304. ;    1       <>
  305. ;    1       <
  306. ;    5       >
  307. ;    19      !
  308. ;    1       ||
  309. ;    1       Len(
  310. ;    1       Mid()
  311. ;    2       Left()
  312. ;    4       Ferr()
  313. ;    14      Chr()
  314. ;    1       Trim()
  315. ;    2       NoChar()
  316. ;    4       YesChar()
  317. ;    1       Replace()
  318. ;    1       Mask_Ascii()
  319. ;    10      PPEPath()
  320. ;    5       Exist()
  321. ;
  322. ;------------------------------------------------------------------------------
  323. ;
  324. ; Analysis flags : S
  325. ;
  326. ; S - Shell to DOS ■ 5
  327. ;     This may be normal if the PPE need to execute an external command,
  328. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  329. ;     or usefull (sorting, maintenance,...). Check!
  330. ;     ■ Search for : SHELL
  331. ;
  332. ;------------------------------------------------------------------------------
  333. ;
  334. ; Postprocessing report
  335. ;
  336. ;    0       For/Next
  337. ;    0       While/EndWhile
  338. ;    15      If/Then or If/Then/Else
  339. ;    1       Select Case
  340. ;
  341. ;------------------------------------------------------------------------------
  342. ;                 AEGiS Corp - Break the routines, code against the machines!
  343. ;------------------------------------------------------------------------------
  344.