2011-06-03 14:44:01 +02:00
|
|
|
<?php
|
2016-09-29 10:53:17 +02:00
|
|
|
|
2017-01-03 03:22:48 +01:00
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
2017-01-02 03:57:23 +01:00
|
|
|
function admin_log_title()
|
|
|
|
{
|
|
|
|
return _("Log");
|
2013-11-25 21:04:58 +01:00
|
|
|
}
|
|
|
|
|
2017-01-03 03:22:48 +01:00
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
2017-01-02 03:57:23 +01:00
|
|
|
function admin_log()
|
|
|
|
{
|
|
|
|
$filter = "";
|
|
|
|
if (isset($_REQUEST['keyword'])) {
|
|
|
|
$filter = strip_request_item('keyword');
|
|
|
|
}
|
|
|
|
$log_entries_source = LogEntries_filter($filter);
|
2017-01-02 15:43:36 +01:00
|
|
|
|
2017-01-02 03:57:23 +01:00
|
|
|
$log_entries = [];
|
|
|
|
foreach ($log_entries_source as $log_entry) {
|
|
|
|
$log_entry['date'] = date("d.m.Y H:i", $log_entry['timestamp']);
|
|
|
|
$log_entries[] = $log_entry;
|
|
|
|
}
|
2017-01-02 15:43:36 +01:00
|
|
|
|
2017-01-02 03:57:23 +01:00
|
|
|
return page_with_title(admin_log_title(), [
|
2017-01-02 15:43:36 +01:00
|
|
|
msg(),
|
|
|
|
form([
|
|
|
|
form_text('keyword', _("Search"), $filter),
|
|
|
|
form_submit(_("Search"), "Go")
|
|
|
|
]),
|
|
|
|
table([
|
|
|
|
'date' => "Time",
|
|
|
|
'nick' => "Angel",
|
|
|
|
'message' => "Log Entry"
|
|
|
|
], $log_entries)
|
|
|
|
]);
|
2011-06-03 14:44:01 +02:00
|
|
|
}
|