2009-09-07 11:07:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  
						 
					
						
							
								
									
										
										
										
											2007-04-03 14:10:23 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if  ( $vars [ 'tab' ]  ==  " port "  &&  is_numeric ( $vars [ 'device' ])  &&  port_permitted ( $vars [ 'port' ]))  
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-05-16 13:25:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $check_device  =  get_device_id_by_port_id ( $vars [ 'port' ]); 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-19 11:12:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $permit_ports  =  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-21 18:17:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if  ( device_permitted ( $vars [ 'device' ])  ||  $check_device  ==  $vars [ 'device' ])  
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $selected [ 'iface' ]  =  " selected " ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-12 18:09:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $tab  =  str_replace ( " . " ,  " " ,  mres ( $vars [ 'tab' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-03 14:10:23 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( ! $tab ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  { 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $tab  =  " overview " ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-03 14:10:23 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 22:33:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $select [ $tab ]  =  " active " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-05-11 13:43:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $device   =  device_by_id_cache ( $vars [ 'device' ]); 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-03 20:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $attribs  =  get_dev_attribs ( $device [ 'device_id' ]); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-11-14 18:28:00 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $entity_state  =  get_dev_entity_state ( $device [ 'device_id' ]); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#  print_r($entity_state);
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-18 14:27:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $pagetitle []  =  $device [ 'hostname' ]; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( $config [ 'os' ][ $device [ 'os' ]][ 'group' ])  {  $device [ 'os_group' ]  =  $config [ 'os' ][ $device [ 'os' ]][ 'group' ];  } 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-15 14:38:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-19 02:20:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  echo ( '<table style="margin: 0px 7px 7px 7px;" cellspacing="0" class="devicetable" width="99%">' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-21 12:59:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  #include("includes/hostbox.inc.php");
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  include ( " includes/device-header.inc.php " ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-06 13:56:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  echo ( '</table>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-11 15:30:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 16:52:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( device_permitted ( $device [ 'device_id' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 22:33:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  echo ( '<ul class="nav nav-tabs">' ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-19 10:36:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if  ( $config [ 'show_overview_tab' ]) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( ' 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < li  class = " ' .  $select['overview']  . ' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'overview')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/server_lightning.png "  align = " absmiddle "  border = " 0 " >  Overview 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-19 11:12:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-15 14:38:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    echo ( '<li class="'  .  $select [ 'graphs' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'graphs')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/server_chart.png "  align = " absmiddle "  border = " 0 " >  Graphs 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2009-04-23 21:13:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $health  =   dbFetchCell ( " SELECT COUNT(*) FROM storage WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               dbFetchCell ( " SELECT COUNT(sensor_id) FROM sensors WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               dbFetchCell ( " SELECT COUNT(*) FROM processors WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $health ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'health' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < a  href = " '.generate_device_url( $device , array('tab' => 'health')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < img  src = " images/icons/sensors.png "  align = " absmiddle "  border = " 0 "  />  Health 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(app_id) FROM applications WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'apps' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'apps')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/icons/apps.png "  align = " absmiddle "  border = " 0 "  />  Apps 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2015-01-15 07:18:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT 1 FROM processes WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'processes' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'processes')).' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < img  src = " images/16/application_osx_terminal.png "  align = " absmiddle "  border = " 0 "  />  Processes 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-11 14:46:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 19:46:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( isset ( $config [ 'collectd_dir' ])  &&  is_dir ( $config [ 'collectd_dir' ]  .  " / "  .  $device [ 'hostname' ]  . " / " )) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'collectd' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'collectd')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/chart_line.png "  align = " absmiddle "  border = " 0 "  />  CollectD 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2007-11-21 14:26:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 13:26:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(mplug_id) FROM munin_plugins WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'munin' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'munin')). ' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < img  src = " images/16/chart_line.png "  align = " absmiddle "  border = " 0 "  />  Munin 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 13:25:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(port_id) FROM ports WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-28 15:03:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'ports' ]  .  $select [ 'port' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'ports')). ' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/connect.png "  align = " absmiddle "  border = " 0 "  />  Ports 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-03 14:10:23 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-04-09 12:53:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(sla_id) FROM slas WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'slas' ]  .  $select [ 'sla' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'slas')). ' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < img  src = " images/16/chart_line.png "  align = " absmiddle "  border = " 0 "  />  SLAs 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-02-18 21:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(accesspoint_id) FROM access_points WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-21 18:17:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'accesspoints' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'accesspoints')). ' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < img  src = " images/icons/wireless.png "  align = " absmiddle "  border = " 0 "  />  Access  Points 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 10:10:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( isset ( $config [ 'smokeping' ][ 'dir' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $smokeping_files  =  array (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( $handle  =  opendir ( $config [ 'smokeping' ][ 'dir' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        while  ( false  !==  ( $file  =  readdir ( $handle ))) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( $file  !=  " . "  &&  $file  !=  " .. " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( eregi ( " .rrd " ,  $file )) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              if  ( eregi ( " ~ " ,  $file )) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                list ( $target , $slave )  =  explode ( " ~ " ,  str_replace ( " .rrd " ,  " " ,  $file )); 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-09 13:03:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $target  =  str_replace ( " _ " ,  " . " ,  $target ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 10:10:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $smokeping_files [ 'in' ][ $target ][ $slave ]  =  $file ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $smokeping_files [ 'out' ][ $slave ][ $target ]  =  $file ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $target  =  str_replace ( " .rrd " ,  " " ,  $file ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-09 13:03:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $target  =  str_replace ( " _ " ,  " . " ,  $target ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 10:10:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $smokeping_files [ 'in' ][ $target ][ $config [ 'own_hostname' ]]  =  $file ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $smokeping_files [ 'out' ][ $config [ 'own_hostname' ]][ $target ]  =  $file ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 19:46:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 10:10:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 19:46:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 10:10:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 19:46:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-11-25 13:57:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( count ( $smokeping_files [ 'in' ][ $device [ 'hostname' ]])  ||  count ( $smokeping_files [ 'out' ][ $device [ 'hostname' ]])) 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 19:46:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'latency' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'latency')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 09:26:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/arrow_undo.png "  align = " absmiddle "  border = " 0 "  />  Ping 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 19:46:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(vlan_id) FROM vlans WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'vlans' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'vlans')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/vlans.png "  align = " absmiddle "  border = " 0 "  />  VLANs 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2010-03-12 17:46:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-12 11:17:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(id) FROM vminfo WHERE device_id = ' "  .  $device [ " device_id " ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'vm' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'vm')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-26 17:16:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/server_cog.png "  align = " absmiddle "  border = " 0 "  />  Virtual  Machines 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-26 17:16:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-25 12:24:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // $loadbalancer_tabs is used in device/loadbalancer/ to build the submenu. we do it here to save queries
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-17 15:55:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-25 12:24:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $device [ 'os' ]  ==  " netscaler " )  // Netscaler
 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 08:12:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 09:25:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $device_loadbalancer_count [ 'netscaler_vsvr' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `netscaler_vservers` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( $device_loadbalancer_count [ 'netscaler_vsvr' ])  {  $loadbalancer_tabs []  =  'netscaler_vsvr' ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 08:12:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-25 12:24:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $device [ 'os' ]  ==  " acsw " )   // Cisco ACE
 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 08:12:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 09:25:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $device_loadbalancer_count [ 'loadbalancer_vservers' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `loadbalancer_vservers` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( $device_loadbalancer_count [ 'loadbalancer_vservers' ])  {  $loadbalancer_tabs []  =  'loadbalancer_vservers' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( is_array ( $loadbalancer_tabs )) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'loadbalancer' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'loadbalancer')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 12:03:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/icons/loadbalancer.png "  align = " absmiddle "  border = " 0 "  />  Load  Balancer 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 09:25:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 08:12:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-12 11:09:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-25 12:24:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // $routing_tabs is used in device/routing/ to build the tabs menu. we built it here to save some queries
 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-18 09:25:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-01-12 11:09:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $device_routing_count [ 'loadbalancer_rservers' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `loadbalancer_rservers` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $device_routing_count [ 'loadbalancer_rservers' ])  {  $routing_tabs []  =  'loadbalancer_rservers' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-12 13:53:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $device_routing_count [ 'ipsec_tunnels' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `ipsec_tunnels` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $device_routing_count [ 'ipsec_tunnels' ])  {  $routing_tabs []  =  'ipsec_tunnels' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $device_routing_count [ 'bgp' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `bgpPeers` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $device_routing_count [ 'bgp' ])  {  $routing_tabs []  =  'bgp' ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 13:38:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $device_routing_count [ 'ospf' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled' AND `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $device_routing_count [ 'ospf' ])  {  $routing_tabs []  =  'ospf' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $device_routing_count [ 'cef' ]  =  dbFetchCell ( " SELECT COUNT(*) FROM `cef_switching` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $device_routing_count [ 'cef' ])  {  $routing_tabs []  =  'cef' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $device_routing_count [ 'vrf' ]  =  @ dbFetchCell ( " SELECT COUNT(*) FROM `vrfs` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $device_routing_count [ 'vrf' ])  {  $routing_tabs []  =  'vrf' ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-27 01:46:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( is_array ( $routing_tabs )) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-17 15:55:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'routing' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'routing')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-17 15:55:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/arrow_branch.png "  align = " absmiddle "  border = " 0 "  />  Routing 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-03 14:10:23 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-02 17:23:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $device_pw_count  =  @ dbFetchCell ( " SELECT COUNT(*) FROM `pseudowires` WHERE `device_id` = ? " ,  array ( $device [ 'device_id' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-03 09:07:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $device_pw_count ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-02 17:23:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'pseudowires' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'pseudowires')).' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < img  src = " images/16/arrow_switch.png "  align = " absmiddle "  border = " 0 "  />  Pseudowires 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 13:25:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $_SESSION [ 'userlevel' ]  >=  " 5 "  &&  dbFetchCell ( " SELECT COUNT(*) FROM links AS L, ports AS I WHERE I.device_id = ' " . $device [ 'device_id' ] . " ' AND I.port_id = L.local_port_id " )) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-23 15:59:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $discovery_links  =  TRUE ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'map' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'map')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/chart_organisation.png "  align = " absmiddle "  border = " 0 "  />  Map 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-26 09:37:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-04-22 12:24:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(*) FROM `packages` WHERE device_id = ' " . $device [ 'device_id' ] . " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-26 09:37:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'packages' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'packages')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 09:26:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/package.png "  align = " absmiddle "  border = " 0 "  />  Pkgs 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-26 09:37:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2010-02-16 20:45:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-12 11:17:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $config [ 'enable_inventory' ]  &&  @ dbFetchCell ( " SELECT * FROM `entPhysical` WHERE device_id = ' " . $device [ 'device_id' ] . " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'entphysical' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'entphysical')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/bricks.png "  align = " absmiddle "  border = " 0 "  />  Inventory 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-12 11:17:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    elseif  ( device_permitted ( $device [ 'device_id' ])  &&  $config [ 'enable_inventory' ]  &&  @ dbFetchCell ( " SELECT * FROM `hrDevice` WHERE device_id = ' " . $device [ 'device_id' ] . " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'hrdevice' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'hrdevice')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/bricks.png "  align = " absmiddle "  border = " 0 "  />  Inventory 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( dbFetchCell ( " SELECT COUNT(service_id) FROM services WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-14 13:38:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'services' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'services')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/icons/services.png "  align = " absmiddle "  border = " 0 "  />  Services 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2010-02-16 20:45:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-13 08:57:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( @ dbFetchCell ( " SELECT COUNT(toner_id) FROM toner WHERE device_id = ' "  .  $device [ 'device_id' ]  .  " ' " )  >  '0' ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'toner' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'toner')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/icons/toner.png "  align = " absmiddle "  border = " 0 "  />  Toner 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( device_permitted ( $device [ 'device_id' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-11-07 19:39:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'logs' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  href = " '.generate_device_url( $device , array('tab' => 'logs')).' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < img  src = " images/16/report_magnify.png "  align = " absmiddle "  border = " 0 "  />  Logs 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-31 17:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 09:26:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( device_permitted ( $device [ 'device_id' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'alerts' ]  .  ' " >
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  href = " '.generate_device_url( $device , array('tab' => 'alerts')).' " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < img  src = " images/16/bell.png "  align = " absmiddle "  border = " 0 "  />  Alerts 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 20:29:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $_SESSION [ 'userlevel' ]  >=  " 7 " ) 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-26 19:12:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 20:29:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if  ( ! is_array ( $config [ 'rancid_configs' ]))  {  $config [ 'rancid_configs' ]  =  array ( $config [ 'rancid_configs' ]);  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      foreach  ( $config [ 'rancid_configs' ]  as  $configs ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( $configs [ strlen ( $configs ) - 1 ]  !=  '/' )  {  $configs  .=  '/' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( is_file ( $configs  .  $device [ 'hostname' ]))  {  $device_config_file  =  $configs  .  $device [ 'hostname' ];  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 20:29:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $device_config_file ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'showconfig' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'showconfig')).'/ " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/page_white_text.png "  align = " absmiddle "  border = " 0 "  />  Config 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 20:29:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-07 19:07:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $config [ 'nfsen_enable' ]) 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-07 19:07:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if  ( ! is_array ( $config [ 'nfsen_rrds' ]))  {  $config [ 'nfsen_rrds' ]  =  array ( $config [ 'nfsen_rrds' ]);  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      foreach  ( $config [ 'nfsen_rrds' ]  as  $nfsenrrds ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( $configs [ strlen ( $nfsenrrds ) - 1 ]  !=  '/' )  {  $nfsenrrds  .=  '/' ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-11 14:37:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $nfsensuffix  =  " " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( $config [ 'nfsen_suffix' ])  {  $nfsensuffix  =  $config [ 'nfsen_suffix' ];  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-07 19:07:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $basefilename_underscored  =  preg_replace ( '/\./' ,  $config [ 'nfsen_split_char' ],  $device [ 'hostname' ]); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-11 14:37:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $nfsen_filename  =  ( strstr ( $basefilename_underscored ,  $nfsensuffix ,  true )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( is_file ( $nfsenrrds  .  $nfsen_filename  .  " .rrd " ))  {  $nfsen_rrd_file  =  $nfsenrrds  .  $basefilename_underscored  .  " .rrd " ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-07 19:07:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $nfsen_rrd_file ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'nfsen' ]  .  ' " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'nfsen')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-07 19:07:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/rainbow.png "  align = " absmiddle "  border = " 0 "  />  Netflow 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-26 19:12:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $_SESSION [ 'userlevel' ]  >=  " 7 " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 16:52:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( '<li class="'  .  $select [ 'edit' ]  .  ' "  style= " float :  right ; " >
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  href = " '.generate_device_url( $device , array('tab' => 'edit')).' " > 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 09:26:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < img  src = " images/16/wrench.png "  align = " absmiddle "  border = " 0 "  /> 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ a > 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-28 20:29:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  </ li > ' ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-26 16:06:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     echo ( " </ul> " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 16:52:44 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-23 10:47:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( device_permitted ( $device [ 'device_id' ])  ||  $check_device  ==  $vars [ 'device' ])  { 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 15:20:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    echo ( '<div class="tabcontent">' ); 
							 
						 
					
						
							
								
									
										
										
										
											2007-04-03 14:10:23 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-18 13:11:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    include ( " pages/device/ " . mres ( basename ( $tab )) . " .inc.php " ); 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-06 14:53:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    echo ( " </div> " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-23 10:47:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    include ( " includes/error-no-perm.inc.php " ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-07 16:23:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2011-03-28 20:29:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-07 19:07:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								?>