Files
librenms-librenms/html/pages/routing.inc.php
T

55 lines
1.1 KiB
PHP
Raw Normal View History

2011-04-17 15:55:38 +00:00
<?php
if ($_GET['optb'] == "graphs" || $_GET['optc'] == "graphs") { $graphs = "graphs"; } else { $graphs = "nographs"; }
2011-04-17 15:55:38 +00:00
#$datas[] = 'overview';
2011-04-17 15:55:38 +00:00
### $routing_count is populated by print-menubar.inc.php
2011-04-17 15:55:38 +00:00
#$type_text['overview'] = "Overview";
2011-04-29 16:32:55 +00:00
$type_text['bgp'] = "BGP";
$type_text['cef'] = "CEF";
$type_text['ospf'] = "OSPF";
$type_text['vrf'] = "VRFs";
2011-04-29 16:32:55 +00:00
print_optionbar_start();
#if (!$_GET['opta']) { $_GET['opta'] = "overview"; }
2011-04-29 16:32:55 +00:00
echo("<span style='font-weight: bold;'>Routing</span> &#187; ");
2011-04-29 16:32:55 +00:00
unset($sep);
2011-05-16 12:48:50 +00:00
foreach ($routing_count as $type => $value)
2011-04-29 16:32:55 +00:00
{
if (!$_GET['opta']) { $_GET['opta'] = $type; }
2011-04-29 16:32:55 +00:00
echo($sep);
2011-04-29 16:32:55 +00:00
if ($_GET['opta'] == $type)
{
echo('<span class="pagemenu-selected">');
}
echo("<a href='routing/" . $type . "/'> " . $type_text[$type] ." (".$routing_count[$type].")</a>");
2011-04-29 16:32:55 +00:00
if ($_GET['opta'] == $type) { echo("</span>"); }
$sep = " | ";
}
2011-04-17 15:55:38 +00:00
2011-04-29 16:32:55 +00:00
print_optionbar_end();
2011-04-17 15:55:38 +00:00
switch ($_GET['opta'])
{
case 'overview':
case 'bgp':
case 'vrf':
2011-04-29 16:32:55 +00:00
case 'cef':
case 'ospf':
2011-04-17 15:55:38 +00:00
include('pages/routing/'.$_GET['opta'].'.inc.php');
break;
default:
echo("<h2>Error. Please report this to observium developers.</h2>");
break;
}
?>