From: Alan Knowles Date: Tue, 9 Oct 2018 07:05:49 +0000 (+0800) Subject: EventView.php X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=63526da3205990fc75553381f0d5719c1484d43a EventView.php --- diff --git a/EventView.php b/EventView.php index ac0deed..761756e 100644 --- a/EventView.php +++ b/EventView.php @@ -81,17 +81,19 @@ 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 = $this->baseURL."/Images/events/". $ev->id . '/'. $f->tmp_name; - echo '' . htmlspecialchars( $k . ' - ' . $f->name ) . '
'; + if (!empty($filesJ->FILES )) { + $filesJ = json_decode(file_get_contents($file)); + echo '
Download files
'; + + + foreach($filesJ->FILES as $k=>$f){ + $ip = $this->baseURL."/Images/events/". $ev->id . '/'. $f->tmp_name; + echo '' . htmlspecialchars( $k . ' - ' . $f->name ) . '
'; + } + } - exit; }