";
echo '
Vlan '.$vlan['vlan_vlan'].' | ';
echo ''.$vlan['vlan_name'].' | ';
echo '';
$vlan_ports = array();
$traverse_ifvlan = true;
$otherports = dbFetchRows('SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.port_id = V.port_id', array($device['device_id'], $vlan['vlan_vlan']));
foreach ($otherports as $otherport) {
if ($otherport['untagged']) {
$traverse_ifvlan = false;
}
$vlan_ports[$otherport['ifIndex']] = $otherport;
}
if ($traverse_ifvlan) {
$otherports = dbFetchRows('SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?', array($device['device_id'], $vlan['vlan_vlan']));
foreach ($otherports as $otherport) {
$vlan_ports[$otherport['ifIndex']] = array_merge($otherport, array('untagged' => '1'));
}
}
ksort($vlan_ports);
foreach ($vlan_ports as $port) {
$port = cleanPort($port, $device);
if ($vars['view'] == 'graphs') {
echo "\
'.display($port['ifAlias'])." \
\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >"."
".substr(short_port_descr($port['ifAlias']), 0, 22).'
';
} else {
echo $vlan['port_sep'].generate_port_link($port, makeshortif($port['label']));
$vlan['port_sep'] = ', ';
if ($port['untagged']) {
echo '(U)';
}
}
}//end foreach
echo ' | ';