<?php /* required functions */ if (!function_exists('getSubnetStatsDashboard')) { require_once dirname(__FILE__) . '/../../../functions/functions.php'; } /* if direct request that redirect to tools page */ if ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") { header("Location: " . BASE . "administration/logs/"); } /* print last 5 access logs */ $logs = getAllLogs(5, NULL, NULL, NULL, 1, 2, 2); print "<table class='table table-condensed table-hover table-top'>"; # headers print "<tr>"; print "\t<th>" . _('Severity') . "</th>"; print "\t<th>" . _('Command') . "</th>"; print "\t<th>" . _('Date') . "</th>"; print "\t<th>" . _('Username') . "</th>"; print "</tr>"; # logs foreach ($logs as $log) { # reformat severity if ($log['severity'] == 0) { $log['severityText'] = _("Info"); } else { if ($log['severity'] == 1) { $log['severityText'] = _("Warn"); } else { if ($log['severity'] == 2) { $log['severityText'] = _("Err");
<?php /* required functions */ if (!function_exists('getSubnetStatsDashboard')) { require_once dirname(__FILE__) . '/../../../functions/functions.php'; } /* if direct request that redirect to tools page */ if ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") { header("Location: " . BASE . "administration/logs/"); } /* print last 5 access logs */ $logs = getAllLogs(5, NULL, NULL, NULL, 0, 0, 0); print "<table class='table table-condensed table-hover table-top'>"; # headers print "<tr>"; print "\t<th>" . _('Severity') . "</th>"; print "\t<th>" . _('Command') . "</th>"; print "\t<th>" . _('Date') . "</th>"; print "\t<th>" . _('Username') . "</th>"; print "</tr>"; # logs foreach ($logs as $log) { # reformat severity if ($log['severity'] == 0) { $log['severityText'] = _("Info"); } else { if ($log['severity'] == 1) { $log['severityText'] = _("Warn"); } else { if ($log['severity'] == 2) { $log['severityText'] = _("Err");
if ($_POST['Warning'] == _("Warning")) { $_POST['WarningQuery'] = "2"; } else { $_POST['WarningQuery'] = "10"; } /* get highest lastId */ $highestId = getHighestLogId(); if (empty($_POST['lastId']) || $_POST['lastId'] == "undefined") { $_POST['lastId'] = $highestId; } /* set empty durection */ if (!isset($_POST['direction'])) { $_POST['direction'] = ""; } /* get requested logs */ $logs = getAllLogs($logCount, $_POST['direction'], $_POST['lastId'], $highestId, $_POST['InformationalQuery'], $_POST['NoticeQuery'], $_POST['WarningQuery']); $x = 0; foreach ($logs as $log) { if ($x < $logCount) { /* set classes based on severity */ if ($log['severity'] == 0) { $log['severityText'] = _("Informational"); $color = "success"; } else { if ($log['severity'] == 1) { $log['severityText'] = _("Notice"); $color = "warning"; } else { $log['severityText'] = _("Warning"); $color = "error"; }