Esempio n. 1
0
    <th colspan="2"><?php 
print _('Event');
?>
</th>
</tr>

<!-- print logs -->
<?php 
//fetch 40 logs at once
$logCount = 40;
//set severity queries
$_POST['InformationalQuery'] = @$_POST['Informational'] == _("Informational") ? 0 : 10;
$_POST['NoticeQuery'] = @$_POST['Notice'] == _("Notice") ? 1 : 10;
$_POST['WarningQuery'] = @$_POST['Warning'] == _("Warning") ? 1 : 10;
//get highest lastId */
$highestId = $Log->log_fetch_highest_id();
if (empty($_POST['lastId']) || $_POST['lastId'] == "undefined") {
    $_POST['lastId'] = $highestId;
}
//set empty direction
if (!isset($_POST['direction'])) {
    $_POST['direction'] = "";
}
/* get requested logs */
$logs = $Log->fetch_logs($logCount, $_POST['direction'], $_POST['lastId'], $highestId, $_POST['InformationalQuery'], $_POST['NoticeQuery'], $_POST['WarningQuery']);
$x = 0;
foreach ($logs as $log) {
    //cast
    $log = (array) $log;
    if ($x < $logCount) {
        //set classes based on severity