From 63526da3205990fc75553381f0d5719c1484d43a Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 9 Oct 2018 15:05:49 +0800 Subject: [PATCH] EventView.php --- EventView.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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; } -- 2.39.2