2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								< ? php 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if  ( $_SESSION [ 'userlevel' ]  <  '5' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  include ( " includes/error-no-perm.inc.php " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  $link_array  =  array ( 'page'  =>  'routing' ,  'protocol'  =>  'bgp' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  print_optionbar_start ( '' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( '<span style="font-weight: bold;">BGP</span> » ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( ! $vars [ 'type' ])  {  $vars [ 'type' ]  =  " all " ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " all " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " All " , $vars ,  array ( 'type'  =>  'all' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " all " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( "  |  " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " internal " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:53:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " iBGP " , $vars ,  array ( 'type'  =>  'internal' ))); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " internal " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( "  |  " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " external " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:53:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " eBGP " , $vars ,  array ( 'type'  =>  'external' ))); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " external " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( "  |  " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'adminstatus' ]  ==  " stop " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( " <span class='pagemenu-selected'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( generate_link ( " Shutdown " , $vars ,  array ( 'adminstatus'  =>  NULL ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( " </span> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( generate_link ( " Shutdown " , $vars ,  array ( 'adminstatus'  =>  'stop' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-27 13:04:04 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( "  |  " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:53:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'adminstatus' ]  ==  " start " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( " <span class='pagemenu-selected'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( generate_link ( " Enabled " , $vars ,  array ( 'adminstatus'  =>  NULL ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( " </span> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( generate_link ( " Enabled " , $vars ,  array ( 'adminstatus'  =>  'start' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( "  |  " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 16:06:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'state' ]  ==  " down " ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( " <span class='pagemenu-selected'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( generate_link ( " Down " , $vars ,  array ( 'state'  =>  NULL ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( " </span> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    echo ( generate_link ( " Down " , $vars ,  array ( 'state'  =>  'down' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ## End BGP Menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 16:06:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( ! isset ( $vars [ 'view' ]))  {  $vars [ 'view' ]  =  'details' ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( '<div style="float: right;">' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'view' ]  ==  " details " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " No Graphs " , $vars ,  array ( 'view'  =>  'details' ,  'graph'  =>  'NULL' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'view' ]  ==  " details " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( "  |  " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " updates " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " Updates " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'updates' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " updates " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( "  | Prefixes: Unicast ( " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv4unicast " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " IPv4 " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'prefixes_ipv4unicast' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv4unicast " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " | " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv6unicast " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " IPv6 " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'prefixes_ipv6unicast' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv6unicast " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " | " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv4vpn " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " VPNv4 " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'prefixes_ipv4vpn' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv4vpn " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " ) " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( "  | Multicast ( " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv4multicast " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " IPv4 " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'prefixes_ipv4multicast' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv4multicast " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " | " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv6multicast " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " IPv4 " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'prefixes_ipv6multicast' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " prefixes_ipv6multicast " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " ) " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( "  | MAC ( " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " macaccounting_bits " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " Bits " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'macaccounting_bits' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " macaccounting_bits " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " | " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " macaccounting_pkts " )  {  echo ( " <span class='pagemenu-selected'> " );  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( generate_link ( " Packets " , $vars ,  array ( 'view'  =>  'graphs' ,  'graph'  =>  'macaccounting_pkts' ))); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'graph' ]  ==  " macaccounting_pkts " )  {  echo ( " </span> " );  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " ) " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( '</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  print_optionbar_end (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  echo ( " <table border=0 cellspacing=0 cellpadding=5 width=100% class='sortable'> " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( '<tr style="height: 30px"><td width=1></td><th>Local address</th><th></th><th>Peer address</th><th>Type</th><th>Family</th><th>Remote AS</th><th>State</th><th width=200>Uptime / Updates</th></tr>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-10 14:55:28 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 16:06:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'type' ]  ==  " external " ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-26 19:12:24 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								   $where  =  " AND D.bgpLocalAs != B.bgpPeerRemoteAs " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  }  elseif  ( $vars [ 'type' ]  ==  " internal " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								   $where  =  " AND D.bgpLocalAs = B.bgpPeerRemoteAs " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 16:06:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'adminstatus' ]  ==  " stop " ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:53:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $where  .=  "  AND (B.bgpPeerAdminStatus = 'stop') " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-02-16 17:34:28 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  }  elseif  ( $vars [ 'adminstatus' ]  ==  " start " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $where  .=  "  AND (B.bgpPeerAdminStatus = 'start') " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:53:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 16:06:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if  ( $vars [ 'state' ]  ==  " down " ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:53:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $where  .=  "  AND (B.bgpPeerState != 'established') " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-16 09:38:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  $peer_query  =  " select * from bgpPeers AS B, devices AS D WHERE B.device_id = D.device_id  " . $where . "  ORDER BY D.hostname, B.bgpPeerRemoteAs, B.bgpPeerIdentifier " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-04 09:10:21 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  foreach  ( dbFetchRows ( $peer_query )  as  $peer ) 
							 
						 
					
						
							
								
									
										
										
										
											2010-02-16 00:08:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  { 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 11:28:42 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    unset  ( $alert ,  $bg_image ); 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $peer [ 'bgpPeerState' ]  ==  " established " )  {  $col  =  " green " ;  }  else  {  $col  =  " red " ;  $peer [ 'alert' ] = 1 ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $peer [ 'bgpPeerAdminStatus' ]  ==  " start "  ||  $peer [ 'bgpPeerAdminStatus' ]  ==  " running " )  {  $admin_col  =  " green " ;  }  else  {  $admin_col  =  " gray " ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 16:56:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $peer [ 'bgpPeerAdminStatus' ]  ==  " stop " )  {  $peer [ 'alert' ] = 0 ;  $peer [ 'disabled' ] = 1 ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $peer [ 'bgpPeerRemoteAs' ]  ==  $peer [ 'bgpLocalAs' ])  {  $peer_type  =  " <span style='color: #00f;'>iBGP</span> " ;  }  else  {  $peer_type  =  " <span style='color: #0a0;'>eBGP</span> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								     if  ( $peer [ 'bgpPeerRemoteAS' ]  >=  '64512'  &&  $peer [ 'bgpPeerRemoteAS' ]  <=  '65535' )  {  $peer_type  =  " <span style='color: #f00;'>Priv eBGP</span> " ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-16 09:38:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $peerhost  =  dbFetchRow ( " SELECT * FROM ipaddr AS A, ports AS I, devices AS D WHERE A.addr = ? AND I.interface_id = A.interface_id AND D.device_id = I.device_id " ,  array ( $peer [ 'bgpPeerIdentifier' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $peerhost )  {  $peername  =  generate_device_link ( $peerhost ,  shorthost ( $peerhost [ 'hostname' ]));  }  else  {  unset ( $peername );  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-03 17:07:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    // display overlib graphs
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-01 12:37:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $graph_type        =  " bgp_updates " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-06 18:38:11 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $local_daily_url   =  " graph.php?id= "  .  $peer [ 'bgpPeer_id' ]  .  " &type= "  .  $graph_type  .  " &from= " . $config [ 'time' ][ 'day' ] . " &to= " . $config [ 'time' ][ 'now' ] . " &width=500&height=150&&afi=ipv4&safi=unicast " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 14:17:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $localaddresslink  =  " <span class=list-large><a href='device/device= "  .  $peer [ 'device_id' ]  .  " /tab=routing/proto=bgp/' onmouseover= \" return overlib('<img src= \ ' $local_daily_url\ '>', LEFT " . $config [ 'overlib_defaults' ] . " ); \"  onmouseout= \" return nd(); \" > "  .  $peer [ 'bgpLocalAddr' ]  .  " </a></span> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-03 17:07:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $graph_type        =  " bgp_updates " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-06 18:38:11 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $peer_daily_url    =  " graph.php?id= "  .  $peer [ 'bgpPeer_id' ]  .  " &type= "  .  $graph_type  .  " &from= " . $config [ 'time' ][ 'day' ] . " &to= " . $config [ 'time' ][ 'now' ] . " &width=500&height=150 " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 14:17:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $peeraddresslink   =  " <span class=list-large><a href='device/device= "  .  $peer [ 'device_id' ]  .  " /tab=routing/proto=bgp/' onmouseover= \" return overlib('<img src= \ ' $peer_daily_url\ '>', LEFT " . $config [ 'overlib_defaults' ] . " ); \"  onmouseout= \" return nd(); \" > "  .  $peer [ 'bgpPeerIdentifier' ]  .  " </a></span> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-03 17:07:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-04-10 17:21:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    echo ( '<tr class="bgp"'  .  ( $peer [ 'alert' ]  ?  ' bordercolor="#cc0000"'  :  '' )  .  ( $peer [ 'disabled' ]  ?  ' bordercolor="#cccccc"'  :  '' )  .  " > " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-19 21:54:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    unset ( $sep ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-16 09:38:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    foreach  ( dbFetchRows ( " SELECT * FROM `bgpPeers_cbgp` WHERE `device_id` = ? AND bgpPeerIdentifier = ? " ,  array ( $peer [ 'device_id' ],  $peer [ 'bgpPeerIdentifier' ]))  as  $afisafi ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      $afi  =  $afisafi [ 'afi' ]; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      $safi  =  $afisafi [ 'safi' ]; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      $this_afisafi  =  $afi . $safi ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      $peer [ 'afi' ]  .=  $sep  .  $afi  . " . " . $safi ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      $sep  =  " <br /> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      $peer [ 'afisafi' ][ $this_afisafi ]  =  1 ;  ## Build a list of valid AFI/SAFI for this peer
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    unset ( $sep ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-19 21:54:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    echo ( "   <td></td>
 
							 
						 
					
						
							
								
									
										
										
										
											2012-02-16 16:43:11 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td  width = 150 > "  .  $localaddresslink  .  " < br  /> " .generate_device_link( $peer , shorthost( $peer['hostname'] ), array('tab' => 'routing', 'proto' => 'bgp')). " </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td  width = 30 >< b >& #187;</b></td>
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-03 17:07:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td  width = 150 > "  .  $peeraddresslink  .  " </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td  width = 50 >< b > $peer_type </ b ></ td > 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td  width = 50 > " . $peer['afi'] . " </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td >< strong > AS "  .  $peer['bgpPeerRemoteAs']  .  " </ strong >< br  /> "  .  $peer['astext']  .  " </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 09:11:05 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td >< strong >< span  style = 'color: $admin_col;' > "  .  $peer['bgpPeerAdminStatus']  .  " </ span >< br  />< span  style = 'color: $col;' > "  .  $peer['bgpPeerState']  .  " </ span ></ strong ></ td > 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < td > "  .formatUptime( $peer['bgpPeerFsmEstablishedTime'] ).  " < br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 09:11:05 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                Updates  < img  src = 'images/16/arrow_down.png'  align = absmiddle  />  "  . format_si( $peer['bgpPeerInUpdates'] ) .  " 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-10 17:21:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        < img  src = 'images/16/arrow_up.png'  align = absmiddle  />  "  . format_si( $peer['bgpPeerOutUpdates'] ) .  " </ td ></ tr > " );
 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    unset ( $invalid ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    switch  ( $vars [ 'graph' ]) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-18 11:28:42 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      case  'prefixes_ipv4unicast' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      case  'prefixes_ipv4multicast' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      case  'prefixes_ipv4vpn' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      case  'prefixes_ipv6unicast' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      case  'prefixes_ipv6multicast' : 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        list (, $afisafi )  =  explode ( " _ " ,  $vars [ 'graph' ]); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        if  ( isset ( $peer [ 'afisafi' ][ $afisafi ]))  {  $peer [ 'graph' ]  =  1 ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      case  'updates' : 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $graph_array [ 'type' ]    =  " bgp_ "  .  $vars [ 'graph' ]; 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $graph_array [ 'id' ]      =  $peer [ 'bgpPeer_id' ]; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    switch  ( $vars [ 'graph' ]) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      case  'macaccounting_bits' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      case  'macaccounting_pkts' : 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-16 09:38:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $acc  =  dbFetchRow ( " SELECT * FROM `ipv4_mac` AS I, `mac_accounting` AS M, `ports` AS P, `devices` AS D WHERE I.ipv4_address = ? AND M.mac = I.mac_address AND P.interface_id = M.interface_id AND D.device_id = P.device_id " ,  array ( $peer [ 'bgpPeerIdentifier' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $database  =  $config [ 'rrd_dir' ]  .  " / "  .  $device [ 'hostname' ]  .  " /cip- "  .  $acc [ 'ifIndex' ]  .  " - "  .  $acc [ 'mac' ]  .  " .rrd " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( is_array ( $acc )  &&  is_file ( $database )) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          $peer [ 'graph' ]        =  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          $graph_array [ 'id' ]    =  $acc [ 'ma_id' ]; 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          $graph_array [ 'type' ]  =  $vars [ 'graph' ]; 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 14:39:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $vars [ 'graph' ]  ==  'updates' )  {  $peer [ 'graph' ]  =  1 ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-11 08:11:28 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( $peer [ 'graph' ]) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $graph_array [ 'height' ]  =  " 100 " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-02-17 00:19:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $graph_array [ 'width' ]   =  " 218 " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-06 18:38:11 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $graph_array [ 'to' ]      =  $config [ 'time' ][ 'now' ]; 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-10 17:21:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        echo ( '<tr></tr><tr class="bgp"'  .  ( $bg_image  ?  ' background="' . $bg_image . '"'  :  '' )  .  '"><td colspan="9">' ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-06 13:56:23 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-04-26 16:49:38 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        include ( " includes/print-graphrow.inc.php " ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-06 13:56:23 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-29 16:32:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        echo ( " </td></tr> " ); 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-19 21:54:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  echo ( " </table> " ); 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-13 00:23:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-19 01:43:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								?>