CWIS Developer Documentation
SPTEventLog.php
Go to the documentation of this file.
1 <?PHP
2 
3 #
4 # FILE: SPT--SPTEventLog.php
5 #
6 # Part of the Collection Workflow Integration System (CWIS)
7 # Copyright 2007-2013 Edward Almasy and Internet Scout Research Group
8 # http://scout.wisc.edu/cwis/
9 #
10 
11 class SPTEventLog extends EventLog {
12 
13  # ---- PUBLIC INTERFACE --------------------------------------------------
14 
15  # define event types
16  const SPTEVENT_USERLOGIN = 1;
19  const SPTEVENT_SEARCH = 4;
23 
24  # define user types
25  const SPTUSERTYPE_ALL = 1;
29 
30  # object constructor
31  function __construct()
32  {
33  # create database for use by our parent
34  $DB = new Database();
35 
36  # invoke parent constructor
37  global $G_User;
38  $UserId = $G_User->IsLoggedIn() ? $G_User->Id() : -1;
39  parent::__construct($DB, $UserId);
40  }
41 
42  # limit events to specific user type
43  function LimitFindToUserType($UserType)
44  {
45  # set search conditions based on user type
46  switch ($UserType)
47  {
49  $this->ExcludeUsersWithPrivileges("<", PRIV_POSTTOFORUMS);
50  $this->ExcludeUsersWithPrivileges(">", PRIV_USERDISABLED);
51  break;
52 
54  break;
55  }
56  }
57 
58 
59  # ---- PRIVATE INTERFACE -------------------------------------------------
60 
61 }
62 
63 
64 ?>
const SPTUSERTYPE_PRIVILEGED
Definition: SPTEventLog.php:28
const SPTEVENT_OAIHARVEST
Definition: SPTEventLog.php:22
Class for storing and retrieving event information from database.
Definition: EventLog.php:22
SQL database abstraction object with smart query caching.
Definition: Database.php:22
const SPTEVENT_USERLOGIN
Definition: SPTEventLog.php:16
const SPTEVENT_ADVANCEDSEARCH
Definition: SPTEventLog.php:20
const SPTEVENT_NEWACCOUNTCONFIRM
Definition: SPTEventLog.php:18
const SPTUSERTYPE_NONPRIVILEGED
Definition: SPTEventLog.php:27
const SPTEVENT_NEWACCOUNTSIGNUP
Definition: SPTEventLog.php:17
LimitFindToUserType($UserType)
Definition: SPTEventLog.php:43
const SPTEVENT_SEARCH
Definition: SPTEventLog.php:19
const SPTEVENT_RESOURCELINKCLICK
Definition: SPTEventLog.php:21
const SPTUSERTYPE_ALL
Definition: SPTEventLog.php:25
const SPTUSERTYPE_ANONYMOUS
Definition: SPTEventLog.php:26