'device', 'device' => $device['device_id'], 'tab' => 'ports', ); print_optionbar_start(); $menu_options['basic'] = 'Basic'; $menu_options['details'] = 'Details'; $menu_options['arp'] = 'ARP Table'; if (dbFetchCell("SELECT * FROM links AS L, ports AS I WHERE I.device_id = '".$device['device_id']."' AND I.port_id = L.local_port_id")) { $menu_options['neighbours'] = 'Neighbours'; } if (dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `ifType` = 'adsl'")) { $menu_options['adsl'] = 'ADSL'; } $sep = ''; foreach ($menu_options as $option => $text) { echo $sep; if ($vars['view'] == $option) { echo "
'; } $sep = ' | '; } unset($sep); echo ' | Graphs: '; $graph_types = array( 'bits' => 'Bits', 'upkts' => 'Unicast Packets', 'nupkts' => 'Non-Unicast Packets', 'errors' => 'Errors', 'etherlike' => 'Etherlike', ); foreach ($graph_types as $type => $descr) { echo "$type_sep"; if ($vars['graph'] == $type && $vars['view'] == 'graphs') { echo " '; } echo ' ('; if ($vars['graph'] == $type && $vars['view'] == 'minigraphs') { echo " '; } echo ')'; $type_sep = ' | '; }//end foreach print_optionbar_end(); if ($vars['view'] == 'minigraphs') { $timeperiods = array( '-1day', '-1week', '-1month', '-1year', ); $from = '-1day'; echo "">Port | ">Traffic | Speed | Media | Mac Address |
---|