2011-06-03 14:44:01 +02:00
|
|
|
<?php
|
2016-09-29 10:53:17 +02:00
|
|
|
|
2013-11-25 21:04:58 +01:00
|
|
|
function admin_log_title() {
|
|
|
|
return _("Log");
|
|
|
|
}
|
|
|
|
|
2011-06-03 14:44:01 +02:00
|
|
|
function admin_log() {
|
2016-09-30 18:49:33 +02:00
|
|
|
$filter = "";
|
|
|
|
if (isset($_REQUEST['keyword'])) {
|
|
|
|
$filter = strip_request_item('keyword');
|
2014-12-15 21:23:57 +01:00
|
|
|
}
|
2016-11-17 13:03:28 +01:00
|
|
|
$log_entries_source = LogEntries_filter($filter);
|
2016-09-29 10:53:17 +02:00
|
|
|
|
|
|
|
$log_entries = [];
|
2014-08-22 22:34:13 +02:00
|
|
|
foreach ($log_entries_source as $log_entry) {
|
2014-12-15 19:08:40 +01:00
|
|
|
$log_entry['date'] = date("d.m.Y H:i", $log_entry['timestamp']);
|
2012-12-26 20:36:31 +01:00
|
|
|
$log_entries[] = $log_entry;
|
|
|
|
}
|
2016-09-29 10:53:17 +02:00
|
|
|
|
|
|
|
return page_with_title(admin_log_title(), [
|
2014-08-22 22:34:13 +02:00
|
|
|
msg(),
|
2016-09-29 10:53:17 +02:00
|
|
|
form([
|
|
|
|
form_text('keyword', _("Search"), $filter),
|
|
|
|
form_submit(_("Search"), "Go")
|
|
|
|
]),
|
|
|
|
table([
|
2014-08-22 22:34:13 +02:00
|
|
|
'date' => "Time",
|
|
|
|
'nick' => "Angel",
|
2016-09-29 10:53:17 +02:00
|
|
|
'message' => "Log Entry"
|
|
|
|
], $log_entries)
|
|
|
|
]);
|
2011-06-03 14:44:01 +02:00
|
|
|
}
|
|
|
|
?>
|