require_once dirname(__FILE__).'/include/config.inc.php';
require_once dirname(__FILE__).'/include/audit.inc.php';
require_once dirname(__FILE__).'/include/actions.inc.php';
require_once dirname(__FILE__).'/include/users.inc.php';
$page['title'] = _('Action log');
$page['file'] = 'auditacts.php';
$page['scripts'] = ['class.calendar.js', 'gtlc.js', 'flickerfreescreen.js', 'multiselect.js'];
$page['type'] = detect_page_type(PAGE_TYPE_HTML);
require_once dirname(__FILE__).'/include/page_header.php';
'filter_rst' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
'filter_set' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
'filter_userids' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
'from' => [T_ZBX_RANGE_TIME, O_OPT, P_SYS, null, null],
'to' => [T_ZBX_RANGE_TIME, O_OPT, P_SYS, null, null]
validateTimeSelectorPeriod(getRequest('from'), getRequest('to'));
if ($page['type'] == PAGE_TYPE_JS || $page['type'] == PAGE_TYPE_HTML_BLOCK) {
require_once dirname(__FILE__).'/include/page_footer.php';
if (hasRequest('filter_set')) {
CProfile::updateArray('web.auditacts.filter.userids', getRequest('filter_userids', []), PROFILE_TYPE_ID);
elseif (hasRequest('filter_rst')) {
CProfile::deleteIdx('web.auditacts.filter.userids');
$timeselector_options = [
'profileIdx' => 'web.auditacts.filter',
'from' => getRequest('from'),
updateTimeSelectorPeriod($timeselector_options);
'filter_userids' => CProfile::getArray('web.auditacts.filter.userids', []),
'timeline' => getTimeSelectorPeriod($timeselector_options),
'active_tab' => CProfile::get('web.auditacts.filter.active', 1)
if ($data['filter_userids']) {
$data['users'] = API::User()->get([
'output' => ['userid', 'username', 'name', 'surname'],
'userids' => $data['filter_userids'],