');
echo(" Vlan " . $vlan['vlan'] . " | ");
echo("" . $vlan['vlan_descr'] . " | ");
echo("".$vlan['cost']." | ".$vlan['priority']." | ".$vlan['state']." | ");
$vlan_ports = array();
$otherports = dbFetchRows("SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.interface_id = V.interface_id", array($device['device_id'], $vlan['vlan']));
foreach($otherports as $otherport)
{
$vlan_ports[$otherport[ifIndex]] = $otherport;
}
$otherports = dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?", array($device['device_id'], $vlan['vlan']));
foreach($otherports as $otherport)
{
$vlan_ports[$otherport[ifIndex]] = array_merge($otherport, array('access' => '1'));
}
ksort($vlan_ports);
echo("");
$vsep='';
foreach($vlan_ports as $otherport)
{
echo($vsep.generate_port_link($otherport, makeshortif($otherport['ifDescr'])));
if($otherport['access']) { echo("(A)"); }
$vsep=", ";
}
echo(" | ");
echo("
");
}
echo("");
?>