From 965db1b350e70f637651910bfff719521d45cfb6 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sat, 30 Apr 2011 10:43:27 +0000 Subject: [PATCH] mac accounting fixes git-svn-id: http://www.observium.org/svn/observer/trunk@2209 61d68cd4-352d-0410-923a-c4978735b2b8 --- .../graphs/macaccounting/auth.inc.php | 2 +- html/pages/device/port/macaccounting.inc.php | 26 ++++++------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/html/includes/graphs/macaccounting/auth.inc.php b/html/includes/graphs/macaccounting/auth.inc.php index 147f13b088..d21dde9b11 100644 --- a/html/includes/graphs/macaccounting/auth.inc.php +++ b/html/includes/graphs/macaccounting/auth.inc.php @@ -3,7 +3,7 @@ if (is_numeric($id)) { - $query = mysql_query("SELECT * FROM `mac_accounting` AS M, `ports` AS I, `devices` AS D WHERE M.ma_id = '".mres($_GET['id'])."' + $query = mysql_query("SELECT * FROM `mac_accounting` AS M, `ports` AS I, `devices` AS D WHERE M.ma_id = '".mres($id)."' AND I.interface_id = M.interface_id AND I.device_id = D.device_id"); $acc = mysql_fetch_assoc($query); diff --git a/html/pages/device/port/macaccounting.inc.php b/html/pages/device/port/macaccounting.inc.php index 5e1e1a3f7b..080affbba8 100644 --- a/html/pages/device/port/macaccounting.inc.php +++ b/html/pages/device/port/macaccounting.inc.php @@ -193,25 +193,15 @@ if ($_GET['optd'] == "top10") $peer_info['astext']; - $daily_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=210&height=100"; - $daily_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150"; - $weekly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$week&to=$now&width=210&height=100"; - $weekly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150"; - $monthly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$month&to=$now&width=210&height=100"; - $monthly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150"; - $yearly_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$year&to=$now&width=210&height=100"; - $yearly_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150"; + $graph_array['type'] = $graph_type; + $graph_array['id'] = $acc['ma_id']; + $graph_array['height'] = "100"; + $graph_array['width'] = "216"; + $graph_array['to'] = $now; + echo(''); + include("includes/print-quadgraphs.inc.php"); + echo(""); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> - "); - - echo(""); $i++; } }