Local Port Remote Device Remote Port 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) { $neighbour = cleanPort($neighbour); echo '' . generate_port_link($neighbour) . '
' . $neighbour['ifAlias'] . ''; if (is_numeric($neighbour['remote_port_id']) && $neighbour['remote_port_id']) { $remote_port = cleanPort(get_port_by_id($neighbour['remote_port_id'])); $remote_device = device_by_id_cache($remote_port['device_id']); echo '' . generate_device_link($remote_device) . '
' . $remote_device['hardware'] . ' ' . generate_port_link($remote_port) . '
' . $remote_port['ifAlias'] . ''; } else { echo '' . $neighbour['remote_hostname'] . '
' . $neighbour['remote_platform'] . ' ' . $neighbour['remote_port'] . ''; } echo '' . strtoupper($neighbour['protocol']) . ''; } echo '';