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.

39 lines
760 B
PHTML

<?php
/**
* @return string
*/
8 years ago
function admin_log_title()
{
return _('Log');
}
/**
* @return string
*/
8 years ago
function admin_log()
{
$filter = '';
if (request()->has('keyword')) {
8 years ago
$filter = strip_request_item('keyword');
}
$log_entries = LogEntries_filter($filter);
8 years ago
foreach ($log_entries as &$log_entry) {
$log_entry['date'] = date('d.m.Y H:i', $log_entry['timestamp']);
8 years ago
}
8 years ago
8 years ago
return page_with_title(admin_log_title(), [
8 years ago
msg(),
form([
form_text('keyword', _('Search'), $filter),
form_submit(_('Search'), 'Go')
8 years ago
]),
table([
'date' => 'Time',
'level' => 'Type',
'message' => 'Log Entry'
8 years ago
], $log_entries)
]);
}