auth->makePermissions([ dcAuth::PERMISSION_ADMIN, ])); $super = dcCore::app()->auth->isSuperAdmin() && !empty($_REQUEST['super']); if ($super) { dcCore::app()->activityReport->setGlobal(); } $logs = dcCore::app()->activityReport->getLogs([]); if ($super) { $breadcrumb = [ __('Current blog') => dcCore::app()->adminurl->get('admin.plugin.activityReport', ['super' => 0]), '' . __('All blogs') . '' => '', ]; } else { $breadcrumb = ['' . __('Current blog') . '' => '']; if (dcCore::app()->auth->isSuperAdmin()) { $breadcrumb[__('All blogs')] = dcCore::app()->adminurl->get('admin.plugin.activityReport', ['super' => 1]); } } echo '' . __('Activity report') . '' . dcPage::breadcrumb(array_merge([__('Activity report') => '', __('Logs') => ''], $breadcrumb), ['hl' => false]) . dcPage::notices(); if ($logs->isEmpty()) { echo '

' . __('No log') . '

'; } else { echo '
'; if ($super) { echo ''; } echo ''; while ($logs->fetch()) { $action = dcCore::app()->activityReport->getGroups($logs->activity_group, $logs->activity_action); if (empty($action)) { continue; } $off = $super && $logs->activity_blog_status == 1 ? ' offline' : ''; $date = dt::str( dcCore::app()->blog->settings->system->date_format . ', ' . dcCore::app()->blog->settings->system->time_format, strtotime($logs->activity_dt), dcCore::app()->auth->getInfo('user_tz') ); $msg = vsprintf(__($action['msg']), dcCore::app()->activityReport->decode($logs->activity_logs)); echo ' '; if ($super) { echo ''; } echo ''; } echo '
' . __('Action') . ' ' . __('Message') . ' ' . __('Date') . '' . __('Blog') . '
' . __($action['title']) . ' ' . $msg . ' ' . $date . '' . $logs->blog_id . '
'; } dcCore::app()->activityReport->unsetGlobal(); echo '';