engelsystem/includes/pages/admin_log.php

41 lines
836 B
PHP
Raw Normal View History

2011-06-03 14:44:01 +02:00
<?php
2017-01-03 03:22:48 +01:00
/**
* @return string
*/
2017-01-02 03:57:23 +01:00
function admin_log_title()
{
2017-01-03 14:12:17 +01:00
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()
{
2017-01-03 14:12:17 +01:00
$filter = '';
2017-01-02 03:57:23 +01:00
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) {
2017-01-03 14:12:17 +01:00
$log_entry['date'] = date('d.m.Y H:i', $log_entry['timestamp']);
2017-01-02 03:57:23 +01:00
$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([
2017-01-03 14:12:17 +01:00
form_text('keyword', _('Search'), $filter),
form_submit(_('Search'), 'Go')
2017-01-02 15:43:36 +01:00
]),
table([
2017-01-03 14:12:17 +01:00
'date' => 'Time',
'nick' => 'Angel',
'message' => 'Log Entry'
2017-01-02 15:43:36 +01:00
], $log_entries)
]);
2011-06-03 14:44:01 +02:00
}