From 02509b9638e1eaef6a540993f28b6df80b7833c1 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 1 Aug 2010 16:50:53 +0000 Subject: [PATCH] fix new billing graph, fix interface links git-svn-id: http://www.observium.org/svn/observer/trunk@1604 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/functions.inc.php | 1 + html/includes/graphs/bill/auth.inc.php | 5 ++--- html/includes/graphs/graph.inc.php | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index f241c1a9a..5f47a1148 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -260,6 +260,7 @@ function generate_if_link($args, $text = NULL) $graph_array['legend'] = "yes"; $graph_array['height'] = "100"; $graph_array['width'] = "340"; + $graph_array['to'] = $config['now']; $graph_array['from'] = $config['day']; $graph_array['id'] = $args['interface_id']; $content .= generate_graph_tag($graph_array); diff --git a/html/includes/graphs/bill/auth.inc.php b/html/includes/graphs/bill/auth.inc.php index eeda40913..785d835b8 100644 --- a/html/includes/graphs/bill/auth.inc.php +++ b/html/includes/graphs/bill/auth.inc.php @@ -9,9 +9,8 @@ if(is_numeric($_GET['id']) && bill_permitted($_GET['id'])) WHERE B.bill_id = '".mres($_GET['id'])."' AND P.interface_id = B.port_id AND D.device_id = P.device_id"); -} else { - echo("Unauthorised"); - exit; + $auth = TRUE; + } ?> diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index 3828f02d4..01df3370f 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -103,7 +103,9 @@ if(is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.ph } } } else { - $fd = fopen($config['install_dir']."/html/images/no-48.png",r);fpassthru($fd);fclose($fd); + header('Content-type: image/png'); + + $fd = fopen($config['install_dir']."/html/images/no-48.png", "r");fpassthru($fd);fclose($fd); }