X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=EventView.php;h=bf0d1a4305043147216ab614df11b490634d89c0;hp=9de703561fc05eb4ef4ec8d2695529f0a585d30a;hb=HEAD;hpb=0190c2d043d528a3409ad38026e034ab6a0c3a8f diff --git a/EventView.php b/EventView.php index 9de7035..bf0d1a4 100644 --- a/EventView.php +++ b/EventView.php @@ -14,11 +14,10 @@ class Pman_Admin_EventView extends Pman $this->jerrAuth(); } return true; - - + } - function get($id, $opts = Array)) + function get($id, $opts = Array()) { $ev = DB_DataObject::Factory('Events'); if (!$ev->get((int)$id)) { @@ -43,9 +42,10 @@ class Pman_Admin_EventView extends Pman // core_event_audit // the event file.. $d= DB_DataObject::factory('core_event_audit'); - if (is_a($d,'DB_DataObject')) { + $d->event_id = $ev->id; // we can set that as the above returns error or dataobject.. + if (is_a($d,'DB_DataObject') && $d->count()) { echo "
' . htmlspecialchars(print_r(json_decode(file_get_contents($file)), true)) . ''; - echo '
'. htmlspecialchars($ev->remarks) . ''; + if (!empty($ev->remarks)) { + echo "
'. htmlspecialchars($ev->remarks) . ''; + } + $json = json_decode($ev->remarks, JSON_PRETTY_PRINT); @@ -80,18 +85,21 @@ class Pman_Admin_EventView extends Pman echo "
' . print_r($json, true) . ''; } - $filesJ = json_decode(file_get_contents($file)); - echo '
Download files'; - - - foreach($filesJ->FILES as $k=>$f){ - $ip = $ff->baseURL."/Images/events/". $ev->id . '/'. $f->tmp_name; - echo '' . htmlspecialchars( $k . ' - ' . $f->name ) . '