4 require_once 'Pman.php';
6 class Pman_Admin_EventView extends Pman
12 $au = $this->getAuthUser();
13 if (!$au || $au->company()->comptype != 'OWNER') {
23 $ev = DB_DataObject::Factory('Events');
24 if (!$ev->get((int)$id)) {
25 $this->jerr("invalid id");
28 // verify if not admin, then they should
29 $g = DB_DataObject::Factory('group_members');
30 if (is_a($g, 'DB_DataObject')) {
31 $grps = $g->listGroupMembership($this->authUser);
33 $isAdmin = $g->inAdmin;
35 if (!$isAdmin && $ev->person_id != $this->authUser->id) {
39 // we have 2 bits of data available at present:
42 $d= DB_DataObject::factory('core_event_audit');
43 if (is_a($d,'DB_DataObject')) {
44 echo "<H2>Changed Data:</H2>";
45 $d->event_id = $ev->id;
46 foreach($d->fetchAll() as $d) {
47 echo "{$d->name} SET TO: " . htmlspecialchars($d->newvalue) . "<br/>\n";
50 echo "<HR><H2>Posted Data:</H2>";