git-svn-id: http://www.observium.org/svn/observer/trunk@2323 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-15 14:49:26 +00:00
parent b0e02918ef
commit 5483e5c4d8
4 changed files with 8 additions and 12 deletions

View File

@@ -6,18 +6,17 @@ 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";
$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 = ? ORDER BY `datetime` DESC LIMIT 0,250";
$param = array($_SESSION['user_id']);
}
$data = mysql_query($query);
echo('<table cellspacing="0" cellpadding="1" width="100%">');
while ($entry = mysql_fetch_assoc($data))
foreach (dbFetchRows($query, $param) as $entry)
{
include("includes/print-event.inc.php");
}
echo("</table>");
?>
?>