Files

64 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2011-04-17 15:55:38 +00:00
<?php
$pagetitle[] = 'Routing';
2011-10-18 14:41:19 +00:00
if ($_GET['optb'] == 'graphs' || $_GET['optc'] == 'graphs') {
$graphs = 'graphs';
2016-08-18 20:28:22 -05:00
} else {
$graphs = 'nographs';
}
2011-04-17 15:55:38 +00:00
// $datas[] = 'overview';
2012-05-25 12:24:34 +00:00
// $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';
2016-01-21 22:04:20 +10:00
$type_text['cisco-otv'] = 'OTV';
2011-04-29 16:32:55 +00:00
print_optionbar_start();
// if (!$vars['protocol']) { $vars['protocol'] = "overview"; }
echo "<span style='font-weight: bold;'>Routing</span> &#187; ";
2011-04-29 16:32:55 +00:00
unset($sep);
foreach ($routing_count as $type => $value) {
if (!$vars['protocol']) {
$vars['protocol'] = $type;
}
echo $sep;
unset($sep);
if ($vars['protocol'] == $type) {
echo '<span class="pagemenu-selected">';
}
if ($routing_count[$type]) {
echo generate_link($type_text[$type].' ('.$routing_count[$type].')', array('page' => 'routing', 'protocol' => $type));
$sep = ' | ';
}
if ($vars['protocol'] == $type) {
echo '</span>';
}
}//end foreach
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 ($vars['protocol']) {
case 'overview':
case 'bgp':
case 'vrf':
case 'cef':
case 'ospf':
2016-01-21 22:04:20 +10:00
case 'cisco-otv':
include 'pages/routing/'.$vars['protocol'].'.inc.php';
2016-08-18 20:28:22 -05:00
break;
default:
echo report_this('Unknown protocol '.$vars['protocol']);
2016-08-18 20:28:22 -05:00
break;
2011-04-17 15:55:38 +00:00
}