librenms/html/pages/routing.inc.php
2011-09-26 14:39:07 +00:00

54 lines
1.2 KiB
PHP

<?php
if ($_GET['optb'] == "graphs" || $_GET['optc'] == "graphs") { $graphs = "graphs"; } else { $graphs = "nographs"; }
#$datas[] = 'overview';
### $routing_count is populated by print-menubar.inc.php
#$type_text['overview'] = "Overview";
$type_text['bgp'] = "BGP";
$type_text['cef'] = "CEF";
$type_text['ospf'] = "OSPF";
$type_text['vrf'] = "VRFs";
print_optionbar_start();
#if (!$vars['protocol']) { $vars['protocol'] = "overview"; }
echo("<span style='font-weight: bold;'>Routing</span> &#187; ");
unset($sep);
foreach ($routing_count as $type => $value)
{
if (!$vars['protocol']) { $vars['protocol'] = $type; }
echo($sep);
if ($vars['protocol'] == $type)
{
echo('<span class="pagemenu-selected">');
}
echo(generate_link($type_text[$type] ." (".$routing_count[$type].")",array('page'=> 'routing', 'protocol' => $type)));
if ($vars['protocol'] == $type) { echo("</span>"); }
$sep = " | ";
}
print_optionbar_end();
switch ($vars['protocol'])
{
case 'overview':
case 'bgp':
case 'vrf':
case 'cef':
case 'ospf':
include('pages/routing/'.$vars['protocol'].'.inc.php');
break;
default:
echo("<h2>Error. Please report this to observium developers.</h2>");
break;
}
?>