'; $i = '1'; echo 'Local Port Remote Port Remote Device Protocol '; foreach (dbFetchRows('SELECT * FROM links AS L, ports AS I WHERE I.device_id = ? AND I.port_id = L.local_port_id', array($device['device_id'])) as $neighbour) { if ($bg_colour == $list_colour_b) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } echo ''; echo ''.generate_port_link($neighbour).'
'.display($neighbour['ifAlias']).''; if (is_numeric($neighbour['remote_port_id']) && $neighbour['remote_port_id']) { $remote_port = get_port_by_id($neighbour['remote_port_id']); $remote_device = device_by_id_cache($remote_port['device_id']); echo ''.generate_port_link($remote_port).'
'.display($remote_port['ifAlias']).''; echo ''.generate_device_link($remote_device).'
'.$remote_device['hardware'].''; } else { echo ''.$neighbour['remote_port'].''; echo ''.$neighbour['remote_hostname'].'
'.$neighbour['remote_platform'].''; } echo ''.strtoupper($neighbour['protocol']).''; echo ''; $i++; }//end foreach echo '';