2009-09-07 11:07:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  
						 
					
						
							
								
									
										
										
										
											2018-04-07 15:55:28 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-09-11 07:51:35 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								use  LibreNMS\Authentication\LegacyAuth ;  
						 
					
						
							
								
									
										
										
										
											2018-04-07 15:55:28 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:35:13 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								echo  " <h3>Authlog</h3> " ;  
						 
					
						
							
								
									
										
										
										
											2018-09-11 07:51:35 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if  ( LegacyAuth :: user () -> hasGlobalAdmin ())  {  
						 
					
						
							
								
									
										
										
										
											2017-06-09 21:50:56 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    echo  '<table id="authlogtable" class="table table-hover table-condensed">' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    echo  " <thead><th data-column-id='timestamp'>Timestamp</th><th data-column-id='user'>User</th><th data-column-id='ip'>IP Address</th><th data-column-id='authres'>Result</th></thead><tbody> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-23 00:29:12 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    foreach  ( dbFetchRows ( " SELECT *,DATE_FORMAT(datetime, ' "  .  \LibreNMS\Config :: get ( 'dateformat.mysql.compact' )  .  " ') as humandate  FROM `authlog` ORDER BY `datetime` DESC LIMIT 0,250 " )  as  $entry )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( $bg  ==  \LibreNMS\Config :: get ( 'list_colour.even' ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $bg  =  \LibreNMS\Config :: get ( 'list_colour.odd' ); 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-18 20:28:22 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-23 00:29:12 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $bg  =  \LibreNMS\Config :: get ( 'list_colour.even' ); 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:10:19 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-09-23 15:48:53 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        echo  " <tr>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:35:13 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            " . $entry['datetime'] .'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-09-23 15:48:53 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            < td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:35:13 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            '.$entry[' user '].' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-09-23 15:48:53 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            < td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:35:13 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            '.$entry[' address '].' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            </ td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-09-23 15:48:53 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            < td > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:35:13 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            '.$entry[' result '].' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            </ td > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } //end foreach
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $pagetitle []  =  'Authlog' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-06-09 21:50:56 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    echo  '</tbody></table>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-18 20:28:22 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  else  {  
						 
					
						
							
								
									
										
										
										
											2019-04-11 23:26:42 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    include  'includes/html/error-no-perm.inc.php' ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-29 22:35:13 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} //end if
  
						 
					
						
							
								
									
										
										
										
											2017-06-09 21:50:56 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '#authlogtable' ) . bootgrid ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        rowCount :  [ 50 ,  100 ,  250 ,  - 1 ], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        columnSelection :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >