home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / PRO98SRC.ZIP / GETCOMME.BAS < prev    next >
BASIC Source File  |  1993-12-21  |  4KB  |  112 lines

  1. SUB GetComment(TAX$)
  2. $IF NOT %NOCOMMENTS
  3. SHARED MailPath$
  4. DIM Coms(99)
  5. DIM Comix(99)
  6.     LET ComBuf = FREEFILE
  7.     LET BigBuf = FREEFILE
  8. OPEN MailPath$ + "comment.ix" FOR RANDOM ACCESS READ WRITE SHARED AS #ComBuf LEN = LEN(CommentIndex)
  9. x = 1: q = 0
  10.     DO
  11. GET #ComBuf, x, CommentIndex
  12.  IF INSTR(CommentIndex.TaxID, TAX$) AND LTRIM$(CommentIndex.TaxID) <> "" THEN
  13.       q = q + 1
  14.       Comix(q) = x
  15.       Coms(q) = CommentIndex.RecordNumber: IF q > 99 THEN EXIT DO
  16.  END IF
  17. x = x + 1
  18. LOOP WHILE NOT EOF(ComBuf)
  19.  
  20. CLOSE #ComBuf
  21.  
  22. IF q THEN
  23. OPEN MailPath$ + "comment.raf" FOR RANDOM ACCESS READ WRITE SHARED AS #BigBuf LEN = LEN(Comment)
  24. CY = 1
  25. DO
  26. GET #BigBuf, Coms(CY), Comment
  27. CALL PROZOL("COLOR 7,0:CLS")
  28. CALL PROZOL("Print '^0^gThere are^r" + STR$(q) + " ^gComment(s) posted for ^r" + TAX$+"'")
  29. CALL PROZOL("Print '^0'")
  30. CALL PROZOL("Print '^cCOMMENT #^F" + STR$(CY) + "^0'")
  31. CALL PROZOL("Print")
  32. CALL PROZOPrint("^B^cFrom ^b" + Comment.ComUser + "^cTo ^b" + Comment.TaxID + " ^cTime: ^b" + Comment.ComTime + " ^cDate: ^b" + Comment.ComDate + "^0"+CrLf$)
  33. CALL PROZOL("Print")
  34. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line1) +CrLf$)
  35. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line2) +CrLf$)
  36. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line3) +CrLf$)
  37. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line4) +CrLf$)
  38. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line5) +CrLf$)
  39. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line6) +CrLf$)
  40. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line7) +CrLf$)
  41. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line8) +CrLf$)
  42. CALL PROZOPrint("^B^y" + LTRIM$(Comment.Line9) +CrLf$)
  43. CALL PROZOPrint("^0"+CrLf$)
  44. CALL PROZOPrint("End of Comment"+CrLf$)
  45. CALL PROZOPrint(CrLf$)
  46. CALL PROZOL("PROMPT '^r^B(N)ext  (P)rev  (Q)uit  (G)oodbye  (R)eply  (K)ill  --> ^0")
  47. VALUE$=PROZOINPUT$
  48. IF Value$ = "" THEN Value$ = "N"
  49. IF LEN(Value$) = 1 THEN
  50. Value$ = UCASE$(Value$)
  51. IF Value$ = "N" THEN CY = CY + 1
  52. IF CY > q THEN EXIT DO
  53. IF Value$ = "P" THEN CY = CY - 1: IF CY = 0 THEN CY = 1
  54. IF Value$ = "Q" THEN EXIT DO
  55. IF Value$ = "G" THEN CALL SYSRESET
  56.  
  57.         IF Value$ = "K" THEN
  58.     LET ComBuf = FREEFILE
  59.     OPEN MailPath$ + "comment.ix" FOR RANDOM SHARED AS #ComBuf LEN = LEN(CommentIndex)
  60.     LET CommentIndex.TaxID = "KILLED"
  61.     LET CommentIndex.RecordNumber = Coms(CY)
  62.     PUT #ComBuf, Comix(CY), CommentIndex
  63.         CALL PROZOL("PRINT:PRINT ' *** This comment has been KILLED ***@CHR(7)':PRINT")
  64.     CY = CY + 1
  65.     IF CY > q THEN EXIT DO
  66.     CLOSE #ComBuf
  67.     END IF
  68.  
  69. IF Value$ = "R" THEN
  70.  
  71. CALL PROZOL("PRINT")
  72. CALL PROZOL("PRINT 'Select a destination for your response --> '")
  73. CALL PROZOPRINT ("1) " + Comment.ComUser+CrLf$)
  74. CALL PROZOPRINT ("2) " + TAX$+CrLf$)
  75. CALL PROZOL("PRINT '3) New Category or User Name...'")
  76. CALL PROZOL("PRINT '4) System Operator'")
  77. CALL PROZOL("PRINT '5) Everyone'")
  78. CALL PROZOL("PRINT")
  79. CALL PROZOL("PROMPT 'Select --> '")
  80. VALUE$=PROZOINPUT$
  81. A = VAL(Value$)
  82.    IF A > 0 THEN
  83.         IF A = 1 THEN s$ = Comment.ComUser
  84.         IF A = 2 THEN s$ = TAX$
  85.         IF A = 3 THEN
  86.                  CALL PROZOL("PRINT")
  87.                  CALL PROZOL("PRINT 'Personal mail must be addressed to the LOGIN NAME of the User.'")
  88.                  CALL PROZOL("PRINT 'If you don't know someone's LOGIN NAME, you cannot send them mail.'")
  89.                  CALL PROZOL("PRINT")
  90.                  CALL PROZOL("PROMPT 'Enter Category or User Name: '")
  91.                  VALUE$=PROZOINPUT$
  92.                  s$ = Value$
  93.         END IF
  94.  
  95.         IF A = 4 THEN s$ = "SYSOP"
  96.         IF A = 5 THEN s$ = "EVERYONE"
  97.         IF LEN(s$) THEN EditComment s$
  98.    ELSE
  99.        CALL PROZOL("PRINT:PRINT ' ...NO COMMENT!':PRINT CHR 7")
  100.     ProgDelay 2
  101.    END IF
  102. END IF
  103. END IF
  104. LOOP
  105. CLOSE #BigBuf
  106. ELSE
  107. CALL PROZOPrint("No mail posted for " + TAX$ + CrLf$)
  108. END IF
  109. $ENDIF
  110. END SUB
  111.  
  112.