You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
836 B
PHP
41 lines
836 B
PHP
<?php
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
function admin_log_title()
|
|
{
|
|
return _('Log');
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
function admin_log()
|
|
{
|
|
$filter = '';
|
|
if (isset($_REQUEST['keyword'])) {
|
|
$filter = strip_request_item('keyword');
|
|
}
|
|
$log_entries_source = LogEntries_filter($filter);
|
|
|
|
$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;
|
|
}
|
|
|
|
return page_with_title(admin_log_title(), [
|
|
msg(),
|
|
form([
|
|
form_text('keyword', _('Search'), $filter),
|
|
form_submit(_('Search'), 'Go')
|
|
]),
|
|
table([
|
|
'date' => 'Time',
|
|
'nick' => 'Angel',
|
|
'message' => 'Log Entry'
|
|
], $log_entries)
|
|
]);
|
|
}
|