| 
									
										
										
										
											2011-04-17 15:55:38 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $link_array = array( | 
					
						
							|  |  |  |     'page'   => 'device', | 
					
						
							|  |  |  |     'device' => $device['device_id'], | 
					
						
							|  |  |  |     'tab'    => 'routing', | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2011-09-19 08:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | // $type_text['overview'] = "Overview";
 | 
					
						
							|  |  |  | $type_text['ipsec_tunnels'] = 'IPSEC Tunnels'; | 
					
						
							| 
									
										
										
										
											2012-01-18 08:12:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // Cisco ACE
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $type_text['loadbalancer_rservers'] = 'Rservers'; | 
					
						
							|  |  |  | $type_text['loadbalancer_vservers'] = 'Serverfarms'; | 
					
						
							| 
									
										
										
										
											2012-01-18 08:12:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // Citrix Netscaler
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $type_text['netscaler_vsvr'] = 'VServers'; | 
					
						
							| 
									
										
										
										
											2012-01-18 08:12:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $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-17 15:55:38 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | print_optionbar_start(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | $pagetitle[] = 'Routing'; | 
					
						
							| 
									
										
										
										
											2011-10-18 14:27:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | echo "<span style='font-weight: bold;'>Routing</span> » "; | 
					
						
							| 
									
										
										
										
											2011-04-17 15:55:38 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | unset($sep); | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | foreach ($routing_tabs as $type) { | 
					
						
							|  |  |  |     if (!$vars['proto']) { | 
					
						
							|  |  |  |         $vars['proto'] = $type; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2011-04-29 22:29:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |     echo $sep; | 
					
						
							| 
									
										
										
										
											2011-04-29 22:29:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |     if ($vars['proto'] == $type) { | 
					
						
							|  |  |  |         echo '<span class="pagemenu-selected">'; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2011-04-17 15:55:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |     echo generate_link($type_text[$type].' ('.$device_routing_count[$type].')', $link_array, array('proto' => $type)); | 
					
						
							|  |  |  |     if ($vars['proto'] == $type) { | 
					
						
							|  |  |  |         echo '</span>'; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2011-04-17 15:55:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  |     $sep = ' | '; | 
					
						
							| 
									
										
										
										
											2011-04-17 15:55:38 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | print_optionbar_end(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | if (is_file('pages/device/routing/'.mres($vars['proto']).'.inc.php')) { | 
					
						
							|  |  |  |     include 'pages/device/routing/'.mres($vars['proto']).'.inc.php'; | 
					
						
							| 
									
										
										
										
											2011-04-17 15:55:38 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2015-07-10 13:36:21 +02:00
										 |  |  | else { | 
					
						
							|  |  |  |     foreach ($routing_tabs as $type) { | 
					
						
							|  |  |  |         if ($type != 'overview') { | 
					
						
							|  |  |  |             if (is_file('pages/device/routing/overview/'.mres($type).'.inc.php')) { | 
					
						
							|  |  |  |                 $g_i++; | 
					
						
							|  |  |  |                 if (!is_integer($g_i / 2)) { | 
					
						
							|  |  |  |                     $row_colour = $list_colour_a; | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 else { | 
					
						
							|  |  |  |                     $row_colour = $list_colour_b; | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 echo '<div style="background-color: '.$row_colour.';">'; | 
					
						
							|  |  |  |                 echo '<div style="padding:4px 0px 0px 8px;"><span class=graphhead>'.$type_text[$type].'</span>'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 include 'pages/device/routing/overview/'.mres($type).'.inc.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 echo '</div>'; | 
					
						
							|  |  |  |                 echo '</div>'; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							|  |  |  |                 $graph_title = $type_text[$type]; | 
					
						
							|  |  |  |                 $graph_type  = 'device_'.$type; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 include 'includes/print-device-graph.php'; | 
					
						
							|  |  |  |             }//end if
 | 
					
						
							|  |  |  |         }//end if
 | 
					
						
							|  |  |  |     }//end foreach
 | 
					
						
							|  |  |  | }//end if
 |