diff --git a/html/includes/print-vrf.inc.php b/html/includes/print-vrf.inc.php index 38dba870ba..2bd34cbd24 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 86d5ae12b3..26c7b5fe42 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++;