From f355e33b6431649d90fa8ec4e3beceba7f939d81 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 13 May 2011 09:45:05 +0000 Subject: [PATCH] fixes to routing/vrf/ menu and remove erroneous ) from print-vrf git-svn-id: http://www.observium.org/svn/observer/trunk@2297 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-vrf.inc.php | 2 +- html/pages/device/routing/vrf.inc.php | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/html/includes/print-vrf.inc.php b/html/includes/print-vrf.inc.php index 38dba870b..2bd34cbd2 100644 --- a/html/includes/print-vrf.inc.php +++ b/html/includes/print-vrf.inc.php @@ -9,7 +9,7 @@ echo("" . $vrf['mplsVpnVrfDescription'] . ""); echo("" . $vrf['mplsVpnVrfRouteDistinguisher'] . ""); echo(''); -foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVrf` = ?", array($device['device_id'], $vrf['vrf_id'])) as $port)) +foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVrf` = ?", array($device['device_id'], $vrf['vrf_id'])) as $port) { if ($_GET['optb'] == "graphs") { diff --git a/html/pages/device/routing/vrf.inc.php b/html/pages/device/routing/vrf.inc.php index 86d5ae12b..26c7b5fe4 100644 --- a/html/pages/device/routing/vrf.inc.php +++ b/html/pages/device/routing/vrf.inc.php @@ -10,12 +10,11 @@ if (!$_GET['opta']) { $_GET['opta'] = "basic"; } $sep = ""; foreach ($menu_options as $option => $text) { - echo($sep); - if ($_GET['opta'] == $option) { echo(""); } - echo('' . $text + if ($_GET['optb'] == $option) { echo(""); } + echo('' . $text . ''); - if ($_GET['opta'] == $option) { echo(""); } - $sep = " | "; + if ($_GET['optb'] == $option) { echo(""); } + echo(" | "); } unset($sep); @@ -47,8 +46,7 @@ print_optionbar_end(); echo("
"); $i = "0"; -$vrf_query = mysql_query("select * from vrfs WHERE device_id = '".$device['device_id']."' ORDER BY 'vrf_name'"); -while ($vrf = mysql_fetch_assoc($vrf_query)) +foreach (dbFetchRows("SELECT * FROM `vrfs` WHERE `device_id` = ? ORDER BY `vrf_name`", array($device['device_id'])) as $vrf) { include("includes/print-vrf.inc.php"); $i++;