2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< table  border = 0  cellpadding = 10  cellspacing = 10  width = 100 %>  
						 
					
						
							
								
									
										
										
										
											2011-08-19 14:45:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < tr > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < td  colspan = 2 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo ( " <table><tr> " );  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$dev_list  =  array ( '6'   =>  'Central Fileserver' ,  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  '7'   =>  'NE61 Fileserver' , 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-19 14:45:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                  '34'  =>  'DE56 Fileserver' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-04 09:10:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								foreach  ( $dev_list  as  $device_id  =>  $descr )  
						 
					
						
							
								
									
										
										
										
											2011-08-19 14:45:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " <td> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " <div style='font-size: 16px; font-weight: bold; color: #555555;'> " . $descr . " </div> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'height' ]  =  " 100 " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'width' ]   =  " 310 " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-06 18:38:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $graph_array [ 'to' ]      =  $config [ 'time' ][ 'now' ]; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-13 18:57:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $graph_array [ 'device' ]      =  $device_id ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-19 14:45:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $graph_array [ 'type' ]    =  " device_bits " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-06 18:38:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $graph_array [ 'from' ]    =  $config [ 'time' ][ 'day' ]; 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-19 14:45:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $graph_array [ 'legend' ]  =  " no " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'popup_title' ]  =  $descr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#  $graph_array['link']   = generate_device_link($device_id);
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  print_graph_popup ( $graph_array ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'height' ]  =  " 50 " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'width' ]   =  " 180 " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " <div style='margin: 1px; float: left; padding: 5px; background-color: #e5e5e5;'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'type' ]    =  " device_ucd_memory " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  print_graph_popup ( $graph_array ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " </div> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " <div style='margin: 1px; float: left; padding: 5px; background-color: #e5e5e5;'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'type' ]    =  " device_processor " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  print_graph_popup ( $graph_array ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " </div> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " <div style='margin: 1px; float: left; padding: 5px; background-color: #e5e5e5;'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'type' ]    =  " device_storage " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  print_graph_popup ( $graph_array ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " </div> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " <div style='margin: 1px; float: left; padding: 5px; background-color: #e5e5e5;'> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $graph_array [ 'type' ]    =  " device_diskio " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  print_graph_popup ( $graph_array ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " </div> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  echo ( " </td> " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo ( " </tr></table> " );  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ td > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ tr > 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  < tr > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < td  bgcolor = #e5e5e5 valign=top>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$nodes  =  array ();  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$sql  =  mysql_query ( " SELECT * FROM `devices` AS D, `devices_attribs` AS A WHERE D.status = '1' AND A.device_id = D.device_id AND A.attrib_type = 'uptime' AND A.attrib_value > '0' AND A.attrib_value < '86400' " );  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								while  ( $device  =  mysql_fetch_array ( $sql ))  {  
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  unset ( $already ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $i  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  while  ( $i  <=  count ( $nodes ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $thisnode  =  $device [ 'device_id' ]; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $nodes [ $i ]  ==  $thisnode )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     $already  =  " yes " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $i ++ ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( ! $already )  {  $nodes []  =  $device [ 'device_id' ];  } 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$sql  =  mysql_query ( " SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0' " );  
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								while  ( $device  =  mysql_fetch_array ( $sql ))  {  
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   if  ( device_permitted ( $device [ 'device_id' ]))  { 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      echo ( " <div style='text-align: center; margin: 2px; border: solid 2px #d0D0D0; float: left; margin-right: 2px; padding: 3px; width: 118px; height: 85px; background: #ffbbbb;'>
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-02 22:09:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       < strong > " .generate_device_link( $device , shorthost( $device['hostname'] )). " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       < span  style = 'font-size: 14px; font-weight: bold; margin: 5px; color: #c00;' > Device  Down </ span >< br  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       < span  class = body - date - 1 > " .truncate( $device['location'] , 35). " </ span > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      </ div > " );
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   } 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if  ( $config [ 'warn' ][ 'ifdown' ])  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $sql  =  mysql_query ( " SELECT * FROM `ports` AS I, `devices` AS D WHERE I.device_id = D.device_id AND ifOperStatus = 'down' AND ifAdminStatus = 'up' AND D.ignore = '0' AND I.ignore = '0' " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  while  ( $interface  =  mysql_fetch_array ( $sql )) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-16 13:25:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     if  ( port_permitted ( $interface [ 'port_id' ])) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       echo ( " <div style='text-align: center; margin: 2px; border: solid 2px #D0D0D0; float: left; margin-right: 2px; padding: 3px; width: 118px; height: 85px; background: #ffddaa;'>
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-02 22:09:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       < strong > " .generate_device_link( $interface , shorthost( $interface['hostname'] )). " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       < span  style = 'font-size: 14px; font-weight: bold; margin: 5px; color: #c00;' > Port  Down </ span >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-02 22:09:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       < strong > " .generate_port_link( $interface , makeshortif( $interface['ifDescr'] )). " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       < span  class = body - date - 1 > " .truncate( $interface['ifAlias'] , 15). " </ span > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      </ div > " );
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$sql  =  mysql_query ( " SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id AND service_status = 'down' AND D.ignore = '0' AND S.service_ignore = '0' " );  
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								while  ( $service  =  mysql_fetch_array ( $sql ))  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( device_permitted ( $service [ 'device_id' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    echo ( " <div style='text-align: center; margin: 2px; border: solid 2px #D0D0D0; float: left; margin-right: 2px; padding: 3px; width: 118px; height: 85px; background: #ffddaa;'>
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-02 22:09:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < strong > " .generate_device_link( $service , shorthost( $service['hostname'] )). " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < span  style = 'font-size: 14px; font-weight: bold; margin: 5px; color: #c00;' > Service  Down </ span >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      < strong > " . $service['service_type'] . " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < span  class = body - date - 1 > " .truncate( $interface['ifAlias'] , 15). " </ span > 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      </ center ></ div > " );
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$sql  =  mysql_query ( " SELECT * FROM `devices` AS D, bgpPeers AS B WHERE bgpPeerAdminStatus = 'start' AND bgpPeerState != 'established' AND B.device_id = D.device_id " );  
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								while  ( $peer  =  mysql_fetch_array ( $sql ))  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( device_permitted ( $peer [ 'device_id' ])) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     echo ( " <div style='text-align: center; margin: 2px; border: solid 2px #D0D0D0; float: left; margin-right: 2px; padding: 3px; width: 118px; height: 85px; background: #ffddaa;'>
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-02 22:09:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < strong > " .generate_device_link( $peer , shorthost( $peer['hostname'] )). " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < span  style = 'font-size: 14px; font-weight: bold; margin: 5px; color: #c00;' > BGP  Down </ span >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < strong > " . $peer['bgpPeerIdentifier'] . " </ strong >< br  /> 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								      < span  class = body - date - 1 > AS " . $peer['bgpPeerRemoteAs'] . "  " .truncate( $peer['astext'] , 10). " </ span > 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      </ div > " );
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if  ( filter_var ( $config [ 'uptime_warning' ],  FILTER_VALIDATE_FLOAT )  !==  FALSE  &&  $config [ 'uptime_warning' ]  >  0 )  
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2011-09-20 09:55:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $sql  =  mysql_query ( " SELECT * FROM devices_attribs AS A, `devices` AS D WHERE
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-13 16:37:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  A . attrib_value  <  '" . $config[' uptime_warning '] . "'  AND  A . attrib_type  =  'uptime'  AND  A . device_id  =  D . device_id  AND  ignore  =  '0'  AND  disabled  =  '0' " );
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  while  ( $device  =  mysql_fetch_array ( $sql )) 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  { 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-13 16:37:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( device_permitted ( $device [ 'device_id' ])  &&  $device [ 'attrib_value' ]  <  $config [ 'uptime_warning' ]  &&  $device [ 'attrib_type' ]  ==  " uptime " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      echo ( " <div style='text-align: center; margin: 2px; border: solid 2px #D0D0D0; float: left; margin-right: 2px; padding: 3px; width: 118px; height: 85px; background: #ddffdd;'>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < strong > " .generate_device_link( $device , shorthost( $device['hostname'] )). " </ strong >< br  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < span  style = 'font-size: 14px; font-weight: bold; margin: 5px; color: #090;' > Device < br  /> Rebooted </ span >< br  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < span  class = body - date - 1 > " .formatUptime( $device['attrib_value'] ). " </ span > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        </ div > " );
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo ( " 
  
						 
					
						
							
								
									
										
										
										
											2011-09-20 14:37:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < div  style = 'clear: both;' > $errorboxes </ div >  < div  style = 'margin: 0px; clear: both;' > 
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< h3 > Recent  Syslog  Messages </ h3 >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								" );
  
						 
					
						
							
								
									
										
										
										
											2010-04-20 15:46:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-23 19:17:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$sql  =  " SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from `syslog` ORDER BY seq DESC LIMIT 20 " ;  
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								$query  =  mysql_query ( $sql );  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo ( " <table cellspacing=0 cellpadding=2 width=100%> " );  
						 
					
						
							
								
									
										
										
										
											2011-03-17 00:09:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								while  ( $entry  =  mysql_fetch_array ( $query ))  
						 
					
						
							
								
									
										
										
										
											2010-06-23 19:17:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $entry  =  array_merge ( $entry ,  device_by_id_cache ( $entry [ 'device_id' ])); 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-06 13:56:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-17 16:35:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  include ( " includes/print-syslog.inc.php " ); 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-23 19:17:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2011-04-06 13:54:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-11-04 13:55:01 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								echo ( " </table> " );  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ td >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ tr > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < tr > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ tr ></ table >