CWIS Developer Documentation
SPTEventLog.php
Go to the documentation of this file.
1 <?PHP
2 
3 #
4 # FILE: SPT--SPTEventLog.php
5 #
6 # METHODS PROVIDED:
7 # SPTEventLog()
8 # - constructor
9 # SomeMethod($SomeParameter, $AnotherParameter)
10 # - short description of method
11 #
12 # AUTHOR: Edward Almasy
13 #
14 # Part of the Scout Portal Toolkit
15 # Copyright 2007 Internet Scout Project
16 # http://scout.wisc.edu
17 #
18 
19 class SPTEventLog extends EventLog {
20 
21  # ---- PUBLIC INTERFACE --------------------------------------------------
22 
23  # define event types
24  const SPTEVENT_USERLOGIN = 1;
27  const SPTEVENT_SEARCH = 4;
31 
32  # define user types
33  const SPTUSERTYPE_ALL = 1;
37 
38  # object constructor
39  function SPTEventLog()
40  {
41  # create database for use by our parent
42  $DB = new Database();
43 
44  # invoke parent constructor
45  global $G_User;
46  $UserId = $G_User->IsLoggedIn() ? $G_User->Id() : -1;
47  $this->EventLog($DB, $UserId);
48  }
49 
50  # limit events to specific user type
51  function LimitFindToUserType($UserType)
52  {
53  # set search conditions based on user type
54  switch ($UserType)
55  {
57  $this->ExcludeUsersWithPrivileges("<", PRIV_POSTTOFORUMS);
58  $this->ExcludeUsersWithPrivileges(">", PRIV_USERDISABLED);
59  break;
60 
62  break;
63  }
64  }
65 
66 
67  # ---- PRIVATE INTERFACE -------------------------------------------------
68 
69 }
70 
71 
72 ?>