");
echo("
 Vlan " . $vlan['vlan_vlan'] . " | ");
echo("" . $vlan['vlan_name'] . " | ");
echo("");
  $vlan_ports = array();
  $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)
  {
   $vlan_ports[$otherport[ifIndex]] = $otherport;
  }
  $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 = ifLabel($port, $device);
  if ($vars['view'] == "graphs")
  {
    echo("\
    ".$port['ifAlias']." \
     \
    ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\"  >".
    " 
    
    ".truncate(short_port_descr($port['ifAlias']), 22, '')." 
   ");
  }
  else
  {
    echo($vlan['port_sep'] . generate_port_link($port, makeshortif($port['label'])));
    $vlan['port_sep'] = ", ";
    if ($port['untagged']) { echo("(U)"); }
  }
}
echo(' | ');
?>