home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MAXMAILP.ZIP / MAX_UTP.H < prev    next >
Text File  |  1990-10-12  |  3KB  |  83 lines

  1. /*
  2.   {   Maximus USER.BBS structure definition for PASCAL... I Hope !! }
  3.  
  4. TYPE
  5.   UserRecord  = Record
  6.     name           : ARRAY[1..36] OF CHAR;       { Caller's name             }
  7.     city           : ARRAY[1..36] OF CHAR;       { Caller's location         }
  8.     realname       : ARRAY[1..21] OF CHAR;       { MAX: user's real name     }
  9.     phone          : ARRAY[1..15] OF CHAR;       { MAX: user's phone number  }
  10.     lastread_ptr   : WORD;                       { Last Read Pointer         }
  11.  
  12.     { file -- Offset of lastread pointer will be   }
  13.     {         lastread_ptr*sizeof(int).            }
  14.  
  15.     timeremaining : WORD;  { MAX: time left for current call (xternal prog)   }
  16.     pwd           : ARRAY[1..16] OF CHAR;  { Password                         }
  17.     times,                                 { Num prev calls the sys           }
  18.     help,                                  { Help level (see below)           }
  19.     tabs,                                  { 0=transmit <sp> instead of <tab> }
  20.     nulls,                                 { Number Nulls(delays) after <cr>  }
  21.     msg           : WORD;                  { Last message area visited        }
  22.     flags,
  23.     key           : BYTE;
  24.     priv          : INTEGER;               { Access level                     }
  25.     ldate         : ARRAY[1..19] OF CHAR;  { Date of prev call (AsciiZ str)   }
  26.     struct_len    : BYTE;                  { MAX: len of struct, divided by   }
  27.                                            { 20. SEE ABOVE!                   }
  28.     time,                                  { Time on-line so far today        }
  29.     flag,                                  { Hold baud rate for O)utside cmnd }
  30.     upld,                                  { K-bytes uploaded, all calls      }
  31.     dnld,                                  { K-bytes downloaded, all calls    }
  32.     dnldl,                                 { K-bytes downloaded, today        }
  33.     files         : WORD;                  { Last file area visited           }
  34.     width,                                 { Width of the caller's screen     }
  35.     len           : BYTE;                  { Height of the caller's screen    }
  36.     credit,                                { Matrix credit, in cents          }
  37.     debit         : WORD;                  { Current matrix debit, in cents   }
  38. END;
  39.  
  40.  
  41.  
  42. PROCEDURE Read_The_Users;
  43.  
  44. { Read Users.BBS and toss make a message to everybody above a certain }
  45. { Security Level                                                      }
  46.  
  47. {$I MAX.INC}
  48.  
  49. VAR ss,fill           : BYTE;
  50.     code,
  51.     Lo_sec,Sec,
  52.     Hi_sec            : INTEGER;
  53.     user              : UserRecord;
  54.     userfile          : file of UserRecord;
  55.  
  56. BEGIN
  57.   Sec := 0;
  58.  
  59. {I edited out a bunch of stuff hear to save people money}
  60. {You of course must open the userfile etc first}
  61.   WHILE NOT EOF(UserFile) DO
  62.     BEGIN
  63.       READ (userfile,user);
  64. {Each time you read a record you have all of the info in that record}       
  65. WITH user DO
  66.  
  67. {Hear you access the actual records}
  68.  
  69.         BEGIN
  70.           IF (Priv >= Lo_sec) AND (Priv <= Hi_sec) THEN
  71.             BEGIN
  72. {Commands is an array of String}
  73.             Commands[2] := Name;
  74.               IF Commands[2][1] <> #0 THEN
  75.         END;
  76.     END;
  77.     CLOSE (userfile);
  78.     IF Sec = 0 THEN Abort('Invalid Security Level');
  79.     END;
  80.  
  81. */
  82.  
  83.