getAuthUser(); if (!$au || $au->company()->comptype != 'OWNER') { $this->jerrAuth(); } return true; } function get($id) { $ev = DB_DataObject::Factory('Events'); if (!$ev->get((int)$id)) { $this->jerr("invalid id"); } // verify if not admin, then they should $g = DB_DataObject::Factory('group_members'); if (is_a($g, 'DB_DataObject')) { $grps = $g->listGroupMembership($this->authUser); //var_dump($grps); $isAdmin = $g->inAdmin; if (!$isAdmin && $ev->person_id != $this->authUser->id) { $this->jerrAuth(); } } // we have 2 bits of data available at present: // core_event_audit // the event file.. $d= DB_DataObject::factory('core_event_audit'); if (is_a($d,'DB_DataObject')) { echo "
' . htmlspecialchars(print_r(json_decode(file_get_contents($file)), true)) . ''; echo '
'. htmlspecialchars($ev->remarks) . ''; $filesJ = json_decode(file_get_contents($file)); echo '
Images Preview'; foreach($filesJ->FILES as $f){ $ip = $ff->baseURL."/Images/events/". $f->tmp_name; echo ''; } exit; } }