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