Files
librenms-librenms/html/pages/authlog.inc.php

39 lines
1.0 KiB
PHP
Raw Normal View History

<?php
2015-08-29 22:35:13 +05:30
echo "<h3>Authlog</h3>";
echo "<hr>";
if ($_SESSION['userlevel'] >= '10') {
echo '<table cellspacing=0 cellpadding=1 width=100%>';
2015-08-29 22:35:13 +05:30
foreach (dbFetchRows("SELECT *,DATE_FORMAT(datetime, '".$config['dateformat']['mysql']['compact']."') as humandate FROM `authlog` ORDER BY `datetime` DESC LIMIT 0,250") as $entry) {
if ($bg == $list_colour_a) {
$bg = $list_colour_b;
2015-07-13 20:10:26 +02:00
}
else {
2015-08-29 22:35:13 +05:30
$bg = $list_colour_a;
2015-08-29 22:10:19 +05:30
}
2015-08-29 22:35:13 +05:30
echo "<tr style=\"background-color: $bg\">
<td class=syslog width=160>
".$entry['datetime'].'
</td>
<td class=list-bold width=125>
'.$entry['user'].'
</td>
<td class=syslog width=250>
'.$entry['address'].'
</td>
<td class=syslog width=150>
'.$entry['result'].'
</td>
<td></td>
';
}//end foreach
$pagetitle[] = 'Authlog';
echo '</table>';
2015-08-29 22:10:19 +05:30
}
2015-08-29 22:35:13 +05:30
else {
include 'includes/error-no-perm.inc.php';
}//end if