2007-04-15 14:37:12 +00:00
|
|
|
<?php
|
|
|
|
|
2011-09-27 13:04:04 +00:00
|
|
|
$link_array = array('page' => 'device',
|
|
|
|
'device' => $device['device_id'],
|
|
|
|
'tab' => 'vlans');
|
|
|
|
|
2010-02-07 14:17:02 +00:00
|
|
|
print_optionbar_start();
|
|
|
|
|
2011-04-30 22:20:11 +00:00
|
|
|
echo("<span style='font-weight: bold;'>VLANs</span> » ");
|
|
|
|
|
2011-09-27 13:04:04 +00:00
|
|
|
if ($vars['view'] == 'graphs' || $vars['view'] == 'minigraphs')
|
|
|
|
{
|
|
|
|
if (isset($vars['graph'])) { $graph_type = "port_" . $vars['graph']; } else { $graph_type = "port_bits"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!$vars['view']) { $vars['view'] = "basic"; }
|
2011-09-27 13:22:38 +00:00
|
|
|
|
2011-09-27 13:04:04 +00:00
|
|
|
$menu_options['basic'] = 'Basic';
|
|
|
|
#$menu_options['details'] = 'Details';
|
|
|
|
|
|
|
|
$sep = "";
|
|
|
|
foreach ($menu_options as $option => $text)
|
|
|
|
{
|
|
|
|
echo($sep);
|
|
|
|
if ($vars['view'] == $option) { echo("<span class='pagemenu-selected'>"); }
|
|
|
|
echo(generate_link($text,$link_array,array('view'=>$option)));
|
|
|
|
if ($vars['view'] == $option) { echo("</span>"); }
|
|
|
|
$sep = " | ";
|
|
|
|
}
|
|
|
|
|
|
|
|
unset($sep);
|
|
|
|
|
|
|
|
echo(' | Graphs: ');
|
|
|
|
|
|
|
|
$graph_types = array("bits" => "Bits",
|
|
|
|
"upkts" => "Unicast Packets",
|
|
|
|
"nupkts" => "Non-Unicast Packets",
|
|
|
|
"errors" => "Errors");
|
|
|
|
|
|
|
|
foreach ($graph_types as $type => $descr)
|
|
|
|
{
|
|
|
|
echo("$type_sep");
|
|
|
|
if ($vars['graph'] == $type && $vars['view'] == "graphs") { echo("<span class='pagemenu-selected'>"); }
|
|
|
|
echo(generate_link($descr,$link_array,array('view'=>'graphs','graph'=>$type)));
|
|
|
|
if ($vars['graph'] == $type && $vars['view'] == "graphs") { echo("</span>"); }
|
|
|
|
|
|
|
|
/*
|
|
|
|
echo(' (');
|
|
|
|
if ($vars['graph'] == $type && $vars['type'] == "minigraphs") { echo("<span class='pagemenu-selected'>"); }
|
|
|
|
echo(generate_link('Mini',$link_array,array('type'=>'minigraphs','graph'=>$type)));
|
|
|
|
if ($vars['graph'] == $type && $vars['type'] == "minigraphs") { echo("</span>"); }
|
|
|
|
echo(')');
|
|
|
|
*/
|
|
|
|
$type_sep = " | ";
|
|
|
|
}
|
2010-02-07 14:17:02 +00:00
|
|
|
|
|
|
|
print_optionbar_end();
|
2009-08-05 16:05:14 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
echo('<table border="0" cellspacing="0" cellpadding="5" width="100%">');
|
2009-08-11 15:41:11 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
$i = "1";
|
2007-04-15 14:37:12 +00:00
|
|
|
|
2011-05-15 15:29:47 +00:00
|
|
|
foreach (dbFetchRows("SELECT * FROM `vlans` WHERE `device_id` = ? ORDER BY 'vlan_vlan'", array($device['device_id'])) as $vlan)
|
2011-03-16 23:10:10 +00:00
|
|
|
{
|
|
|
|
include("includes/print-vlan.inc.php");
|
2012-04-06 13:56:23 +00:00
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
echo("</table>");
|
|
|
|
|
2011-10-18 14:27:21 +00:00
|
|
|
$pagetitle[] = "VLANs";
|
|
|
|
|
2011-04-12 22:29:29 +00:00
|
|
|
?>
|