activityReport/index.php

53 lines
1.5 KiB
PHP
Raw Normal View History

<?php
2021-09-02 22:18:08 +00:00
/**
* @brief activityReport, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2021-09-02 22:51:23 +00:00
if (!defined('DC_CONTEXT_ADMIN')) {
return null;
}
2021-09-02 22:51:23 +00:00
if (!defined('ACTIVITY_REPORT')) {
return null;
}
dcPage::check('admin');
2021-09-02 22:51:23 +00:00
require_once dirname(__FILE__) . '/inc/lib.activity.report.index.php';
2021-09-03 07:45:21 +00:00
$tab = $_REQUEST['tab'] ?? 'blog_settings';
$section = $_REQUEST['section'] ?? '';
2021-09-02 22:51:23 +00:00
echo '
2021-09-03 07:45:21 +00:00
<html><head><title>'. __('Activity report') . '</title>' .
2021-09-02 22:51:23 +00:00
dcPage::jsLoad('js/_posts_list.js') .
dcPage::jsToolBar() .
dcPage::jsPageTabs($tab) .
dcPage::jsLoad('index.php?pf=activityReport/js/main.js') .
'<script type="text/javascript">'."\n//<![CDATA[\n" .
dcPage::jsVar('jcToolsBox.prototype.text_wait',__('Please wait')) .
dcPage::jsVar('jcToolsBox.prototype.section',$section) .
"\n//]]>\n</script>\n" . '
</head><body>
<h2>' . html::escapeHTML($core->blog->name) . ' &rsaquo; ' . __('Activity report') . '</h2>';
if (!activityReport::hasMailer()) {
echo '<p class="error">' . __('This server has no mail function, activityReport not send email report.') . '</p>';
}
2021-09-03 07:45:21 +00:00
activityReportLib::settingTab($core, __('Settings'));
activityReportLib::logTab($core, __('Logs'));
2021-09-02 22:51:23 +00:00
if ($core->auth->isSuperAdmin()) {
activityReportLib::settingTab($core, __('Super settings'), true);
activityReportLib::logTab($core, __('Super logs'), true);
}
2021-09-03 07:45:21 +00:00
echo '</body></html>';