$v) { if ($k != 'vlan_vlan') { $vlans_data[$vlan['vlan_vlan']][$k] = $v; } } } $otherports = dbFetchRows('SELECT * FROM `ports_vlans` AS V, `ports` AS P WHERE V.`device_id` = ? AND P.port_id = V.port_id', [$device['device_id']]); foreach ($otherports as $n => $otherport) { if (! $otherport['untagged']) { if ($otherport['ifvlan'] == $otherport['vlan']) { $otherport['untagged'] = 1; } } $vlan_ports[$otherport['vlan']][$otherport['ifIndex']] = $otherport; } ksort($vlan_ports); $i = 0; foreach ($vlan_ports as $vlan => $ports) { $bg_colour = \LibreNMS\Config::get('list_colour.odd'); if (! is_integer($i / 2)) { $bg_colour = \LibreNMS\Config::get('list_colour.even'); } echo ""; echo ' Vlan ' . $vlan . ''; echo '' . $vlans_data[$vlan]['vlan_name'] . ''; echo ''; foreach ($ports as $port_id => $port) { $port = cleanPort($port, $device); if ($vars['view'] == 'graphs') { echo "
" . makeshortif($port['ifDescr']) . "
" . $device['hostname'] . ' - ' . $port['ifDescr'] . '
\ ' . 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 $vlans_data[$vlan]['port_sep'] . generate_port_link($port, makeshortif($port['label'])); $vlans_data[$vlan]['port_sep'] = ', '; if ($port['untagged']) { echo '(U)'; } } } echo ''; $i++; }