home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pcboard / entr_msg.zip / ENTR_MSG.PPS < prev    next >
Text File  |  1993-03-24  |  6KB  |  177 lines

  1. ; *****************************************************************
  2. ; *                                                               *
  3. ; *                      Enter Message   V1.0                     *
  4. ; *                                                               *
  5. ; *                                                               *
  6. ; *                    Written in PPL for PCBoard                 *
  7. ; *                                                               *
  8. ; *                    Designed By:  Steve Catmull                *
  9. ; *                                                               *
  10. ; *                    Began development: 02-??-93                *
  11. ; *                                                               *
  12. ; *****************************************************************
  13. ;
  14. ; This executable will test messages in conferences 0 and 1 to see
  15. ; if they are addressed to ALL.  If so, the user is warned that
  16. ; they are about to leave a message to ALL in a conference where
  17. ; all mail is forced to be private.
  18. ;
  19. ; In addition, this executable can ask in the Alpha and Beta
  20. ; conferences, if the message is a report regarding test software.
  21. ; If so, the caller is asked what software to user, etc.
  22. ;
  23.  
  24. STRING  beta_report ; Used to determine if message is a beta report
  25. INTEGER product     ; Product number the beta report is for.
  26. DATE    exe_date
  27. TIME    exe_time
  28. STRING  to_who      ; If not a report, check to see if addressing to ALL.
  29. STRING  user(8,2)   ; Number of products in beta testing
  30. STRING  other_desc  ; Description for "other product"
  31. STRING  valid_test  ; valid chars for beta & alpha code
  32. STRING  type_test   ; ALPHA or BETA
  33. STRING  why_all     ; Used to store response if user address to ALL in priv.
  34. STRING  temp        ; Used to get next command line token
  35. STRING  command_line; Used to store command line.
  36. BOOLEAN error
  37.  
  38. ;/* Initalize the Variables */
  39. exe_date   = 0
  40. exe_time   = 0
  41. other_desc = ""
  42. error      = 0
  43. why_all    = "A"
  44. GETUSER
  45.  
  46. IF (!(CURCONF()=6 | CURCONF()=7)) goto abort
  47. IF (CURCONF()=6) type_test="BETA"
  48. IF (CURCONF()=7) type_test="DevBeta"
  49. IF (CURSEC() > 100 & !(U_NAME() = "STEVE CATMULL")) goto abort
  50.  
  51. PRINTLN
  52. INPUTYN "Is this a "+type_test+" report",beta_report,0Eh
  53. LOG "ENTR_MSG: Asked if alpha/beta report",0
  54. IF (UPPER(beta_report)=YESCHAR()) GOTO yes_test
  55. IF (UPPER(beta_report)=NOCHAR()) GOTO abort
  56. IF (beta_report="") GOTO abort
  57. END
  58.  
  59. :yes_test
  60. IF (CURCONF()=6) valid_test="679"
  61. IF (CURCONF()=7) valid_test="123456789"
  62. product = LEFT(valid_test,1)
  63.  
  64. GOSUB Initialize_Products
  65. DISPFILE PPEPATH()+LEFT(type_test,5)+"MSG",111b
  66. INPUTSTR "Which product is the report for",product,0Eh,1,valid_test,110011110b
  67. IF (product = 1) goto know_product
  68. IF (product = 2) goto know_product
  69. IF (product = 3) goto know_product
  70. IF (product = 4) goto know_product
  71. IF (product = 5) goto know_product
  72. IF (product = 6) goto know_product
  73. IF (product = 7) goto know_product
  74. IF (product = 8) goto know_product
  75. IF (product = 9) goto unknown
  76.  
  77. :abort
  78. GETTOKEN temp
  79. IF (temp = "") goto abort2
  80. command_line=command_line+" "+temp
  81. goto abort
  82.  
  83. :abort2
  84. IF (!command_line = "") GOTO abort_params
  85. IF (!(CURCONF() = 0 | CURCONF() = 1)) THEN
  86.    KBDSTUFF "E"+command_line+chr(13)
  87.    END
  88. ENDIF
  89. INPUTSTR "     To (Enter)=`ALL'",to_who,0Eh,25,MASK_ASCII(),110011110b
  90. IF (!(UPPER(to_who) = "ALL" | to_who = "")) THEN 
  91.    PRINTLN "@X0AMaking sure message is not addressed to @X0FALL@X0A."+chr(13)
  92.    KBDSTUFF "E "+to_who+command_line+chr(13)+chr(13)
  93.    END
  94. ENDIF
  95. DISPFILE PPEPATH()+"PRIVALL",111b
  96. LOG "Entr_Msg: Warned about addressing message to ALL",0
  97. INPUTSTR "Would you like to (@X00@X0FC@XFF)ontinue or (@X00@X0FA@XFF)bort your message",why_all,0Eh,1,"CA",110011110b
  98. IF (why_all = "C") KBDSTUFF "E ALL"+chr(13)+chr(13)
  99. END
  100.  
  101. :abort_params
  102. IF (!(CURCONF() = 0 | CURCONF() = 1)) THEN
  103.    KBDSTUFF "E"+command_line+chr(13)
  104.    END
  105. ENDIF
  106. IF (!UPPER(command_line) = " ALL") THEN
  107.    PRINTLN
  108.    PRINTLN "@X0AMaking sure message is not addressed to @X0FALL@X0A."+chr(13)
  109.    KBDSTUFF "E "+command_line+chr(13)+chr(13)
  110.    END
  111. ENDIF
  112. DISPFILE PPEPATH()+"PRIVALL",111b
  113. INPUTSTR "Would you like to (@X00@X0FC@XFF)ontinue or (@X00@X0FA@XFF)bort your message",why_all,0Eh,1,"CA",110011110b
  114. IF (why_all = "C") KBDSTUFF "E ALL"+chr(13)+chr(13)
  115. END
  116.  
  117.  
  118. :know_product
  119. GOSUB date_time
  120. KBDSTUFF "E"+chr(13)+user(product,1)+chr(13)+type_test+" report"+chr(13)+chr(13)+chr(13)
  121. KBDSTUFF "@X40┌────────────────────────────────────────────────────────@X4C┐@X07"+chr(13)
  122. KBDSTUFF "@X40│@X4F "+user(product,2)+" "+string(exe_date)+" "
  123. IF (!exe_time = 0)  KBDSTUFF string(exe_time)
  124. KBDSTUFF "@X4C@POS:57@ │@X07"+chr(13)
  125. KBDSTUFF "@X40└@X4C────────────────────────────────────────────────────────┘@X07"+chr(13)
  126. KBDSTUFF chr(13)
  127.  
  128. END
  129.  
  130. :unknown
  131. GOSUB date_time
  132. INPUTSTR "Enter description of product",other_desc,0Eh,10,MASK_ALNUM(),000000010011110b
  133. KBDSTUFF "E"+chr(13)+user(product,1)+chr(13)+user(product,2)+" "+other_desc+" "+string(exe_date)+" "
  134. IF (!exe_time = 0) THEN
  135.    KBDSTUFF string(exe_time)+chr(13)
  136.    KBDSTUFF chr(13)
  137. ENDIF
  138. END
  139.  
  140. :date_time
  141. NEWLINES 2
  142. :not
  143. error=0
  144. INPUTDATE "Enter date of executable",exe_date,0Eh
  145. IF (exe_date = 000000) error = 1
  146. IF (error) THEN
  147.    PRINTLN chr(13)+"@X00@X0CYou must enter the date of the executable you are testing.@XFF"+chr(13)
  148.    GOTO not
  149. ENDIF
  150. PRINTLN
  151. INPUTTIME "Enter time of executable",exe_time,0Eh
  152. PRINTLN
  153. RETURN
  154.  
  155.  
  156. :Initialize_Products
  157.  
  158. user(1,1)="DAVID TERRY"    ; Author of PCBoard
  159. user(1,2)="PCBOARD.EXE -"
  160. user(2,1)="DAVID TERRY"    ; Author of PCBSetup
  161. user(2,2)="PCBSETUP.EXE -"
  162. user(3,1)="DAVID TERRY"    ; Author of PCBSysMgr
  163. user(3,2)="PCBSM.EXE -"
  164. user(4,1)="DAVID TERRY"    ; Author of PCBFiler
  165. user(4,2)="PCBFILER.EXE -"
  166. user(5,1)="LOUIS ZIRKEL"   ; Author of PCBPack
  167. user(5,2)="PCBPACK.EXE -"
  168. user(6,1)="SCOTT ROBISON"  ; Author of PCBEdit
  169. user(6,2)="PCBEDIT.EXE -"
  170. user(7,1)="SYSOP"          ; Author of PCBModem
  171. user(7,2)="PCBMODEM.EXE -"
  172. user(8,1)="SCOTT ROBISON"  ; Author of PPL/PPLC.EXE
  173. user(8,2)="PPL(C): -"
  174. user(9,1)="SYSOP"          ; Author of Other Package
  175. user(9,2)="OTHER: "
  176. RETURN
  177.