diff options
author | Pim van den Berg | 2014-07-25 22:05:44 +0200 |
---|---|---|
committer | Pim van den Berg | 2014-07-25 22:05:44 +0200 |
commit | 9c1afbca92af650a216ea39de1fe75278eeae418 (patch) | |
tree | 0f91ea6ea13eec990643be2ebcda46e5af21d0bb /inc/html.inc.php | |
parent | jsrrdgraph: Fix get reponseText in FetchBinaryURL (diff) | |
download | apt-panopticon_cgp-9c1afbca92af650a216ea39de1fe75278eeae418.zip apt-panopticon_cgp-9c1afbca92af650a216ea39de1fe75278eeae418.tar.gz apt-panopticon_cgp-9c1afbca92af650a216ea39de1fe75278eeae418.tar.bz2 apt-panopticon_cgp-9c1afbca92af650a216ea39de1fe75278eeae418.tar.xz |
support php versions without json support and show a warning message
Diffstat (limited to '')
-rw-r--r-- | inc/html.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php index 9107269..c8cfbaf 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php | |||
@@ -54,6 +54,19 @@ echo <<<EOT | |||
54 | <h1><a href="{$html_weburl}">Collectd Graph Panel</a></h1> | 54 | <h1><a href="{$html_weburl}">Collectd Graph Panel</a></h1> |
55 | </div> | 55 | </div> |
56 | 56 | ||
57 | EOT; | ||
58 | |||
59 | if(!function_exists('json_decode')) { | ||
60 | echo <<<EOT | ||
61 | <div id="warnheader"> | ||
62 | Your php version doesn't support <a href="http://php.net/json">JSON</a>. Your graphs would have looked more beautiful if it did. | ||
63 | </div> | ||
64 | |||
65 | EOT; | ||
66 | |||
67 | } | ||
68 | |||
69 | echo <<<EOT | ||
57 | <div id="content"> | 70 | <div id="content"> |
58 | 71 | ||
59 | EOT; | 72 | EOT; |