Disabled"; } if ($port['ifAdminStatus'] == "up" && $port['ifOperStatus'] == "down") { $status = "Enabled / Disconnected"; } if ($port['ifAdminStatus'] == "up" && $port['ifOperStatus'] == "up") { $status = "Enabled / Connected"; } $i = 1; $inf = fixifName($ifname); $bg="#ffffff"; $show_all = 1; echo("
"); include("includes/print-interface.inc.php"); echo("
"); $pos = strpos(strtolower($ifname), "vlan"); if ($pos !== false ) { $broke = yes; } $pos = strpos(strtolower($ifname), "loopback"); if ($pos !== false ) { $broke = yes; } echo("
"); print_optionbar_start(); $link_array = array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'port', 'port' => $port['interface_id']); $menu_options['graphs'] = 'Graphs'; $menu_options['realtime'] = 'Real time'; ### FIXME CONDITIONAL $menu_options['arp'] = 'ARP Table'; $menu_options['events'] = 'Eventlog'; if (dbFetchCell("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$port['interface_id']."'") ) { $menu_options['adsl'] = 'ADSL'; } if (dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `pagpGroupIfIndex` = '".$port['ifIndex']."' and `device_id` = '".$device['device_id']."'") ) { $menu_options['pagp'] = 'PAgP'; } if (dbFetchCell("SELECT COUNT(*) FROM `ports_vlans` WHERE `interface_id` = '".$port['interface_id']."' and `device_id` = '".$device['device_id']."'") ) { $menu_options['vlans'] = 'VLANs'; } $sep = ""; foreach ($menu_options as $option => $text) { echo($sep); if ($vars['view'] == $option) { echo(""); } echo(generate_link($text,$link_array,array('view'=>$option))); if ($vars['view'] == $option) { echo(""); } $sep = " | "; } unset($sep); if (dbFetchCell("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$port['interface_id']."'") > "0" ) { echo(generate_link($descr,$link_array,array('view'=>'macaccounting','graph'=>$type))); echo(" | Mac Accounting : "); if ($vars['view'] == "macaccounting" && $vars['graph'] == "bits" && $vars['subview'] == "graphs") { echo(""); } echo(generate_link("Bits",$link_array,array('view' => 'macaccounting', 'subview' => 'graphs', 'graph'=>'bits'))); if ($vars['view'] == "macaccounting" && $vars['graph'] == "bits" && $vars['subview'] == "graphs") { echo(""); } echo("("); if ($vars['view'] == "macaccounting" && $vars['graph'] == "bits" && $vars['subview'] == "minigraphs") { echo(""); } echo(generate_link("Mini",$link_array,array('view' => 'macaccounting', 'subview' => 'minigraphs', 'graph'=>'bits'))); if ($vars['view'] == "macaccounting" && $vars['graph'] == "bits" && $vars['subview'] == "minigraphs") { echo(""); } echo('|'); if ($vars['view'] == "macaccounting" && $vars['graph'] == "bits" && $vars['subview'] == "top10") { echo(""); } echo(generate_link("Top10",$link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>'bits'))); if ($vars['view'] == "macaccounting" && $vars['graph'] == "bits" && $vars['subview'] == "top10") { echo(""); } echo(") | "); if ($vars['view'] == "macaccounting" && $vars['graph'] == "pkts" && $vars['subview'] == "graphs") { echo(""); } echo(generate_link("Packets",$link_array,array('view' => 'macaccounting', 'subview' => 'graphs', 'graph'=>'pkts'))); if ($vars['view'] == "macaccounting" && $vars['graph'] == "pkts" && $vars['subview'] == "graphs") { echo(""); } echo("("); if ($vars['view'] == "macaccounting" && $vars['graph'] == "pkts" && $vars['subview'] == "minigraphs") { echo(""); } echo(generate_link("Mini",$link_array,array('view' => 'macaccounting', 'subview' => 'minigraphs', 'graph'=>'pkts'))); if ($vars['view'] == "macaccounting" && $vars['graph'] == "pkts" && $vars['subview'] == "minigraphs") { echo(""); } echo('|'); if ($vars['view'] == "macaccounting" && $vars['graph'] == "pkts" && $vars['subview'] == "top10") { echo(""); } echo(generate_link("Top10",$link_array,array('view' => 'macaccounting', 'subview' => 'top10', 'graph'=>'pkts'))); if ($vars['view'] == "macaccounting" && $vars['graph'] == "pkts" && $vars['subview'] == "top10") { echo(""); } echo(")"); } if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE interface_id = '".$port['interface_id']."'") > "0" ) { ### FIXME ATM VPs ### FIXME URLs BROKEN echo(" | ATM VPs : "); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo(""); } echo("Bits"); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo(""); } echo(" | "); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "packets") { echo(""); } echo("Packets"); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo(""); } echo(" | "); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "cells") { echo(""); } echo("Cells"); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo(""); } echo(" | "); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "errors") { echo(""); } echo("Errors"); if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo(""); } } if ($_SESSION['userlevel'] == '10') { echo(" Create Bill"); } print_optionbar_end(); echo("
"); include("pages/device/port/".mres($vars['view']).".inc.php"); echo("
"); ?>