Adam Amstrong bfc9f845ce replacing <? with <?php
git-svn-id: http://www.observium.org/svn/observer/trunk@466 61d68cd4-352d-0410-923a-c4978735b2b8
2009-09-07 11:07:59 +00:00

21 lines
602 B
PHP

<?php
if($_SESSION['userlevel'] >= '5') {
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` ORDER BY `datetime` DESC LIMIT 0,250";
} else {
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` AS E, devices_perms AS P WHERE E.host = P.device_id AND P.user_id = " . $_SESSION['user_id'] . " ORDER BY `datetime` DESC LIMIT 0,250";
}
$data = mysql_query($query);
echo("<table cellspacing=0 cellpadding=1 width=100%>");
while($entry = mysql_fetch_array($data)) {
include("includes/print-event.inc");
}
echo("</table>");
?>