X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=EventView.php;h=bf0d1a4305043147216ab614df11b490634d89c0;hp=3b6ef90adb047a3152d83bd3507d1d2fd2e9cc7b;hb=HEAD;hpb=edd2f6bb3baa038b8d5cc24da4f34e20f3a950f6 diff --git a/EventView.php b/EventView.php index 3b6ef90..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) + 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 ) . '