From 2e1b13273787164650f4a7380719242a8689d810 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 24 Apr 2006 20:24:05 +0000 Subject: MFC from -HEAD --- usr/local/www/status_rrd_graph.php | 21 ++++++++++++++++++--- usr/local/www/status_rrd_graph_img.php | 11 ++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index bf5778a..6ddf106 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -52,6 +52,9 @@ include("head.inc"); ?> + + +

@@ -95,15 +98,27 @@ $periods = array("2h", "6h", "48h", "14d", "2m", "18m"); foreach($periods as $period => $interval) { PRINT "Analysis for $curif -- $interval $curgraph
"; - PRINT "\"$ifname

"; + PRINT "\n\"$ifname

"; } ?> - + diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index 55477c0..c3a7c9e 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -61,12 +61,13 @@ for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { } $periods = array("2h", "6h", "48h", "14d", "2m", "18m"); -/* -if(! array_key_exists($interval, $periods)) { - PRINT "Graph interval $interval is not valid
\n"; - die(); + +$found = 0; +foreach($periods as $period) if($period == $interval) $found = 1; +if($found == 0) { + PRINT "Graph interval $interval is not valid
\n"; + die(); } -*/ $graphs['2h']['seconds'] = 7200; $graphs['2h']['average'] = 60; -- cgit v1.1