<?php

/**
 * This file is part of JohnCMS Content Management System.
 *
 * @copyright JohnCMS Community
 * @license   https://opensource.org/licenses/GPL-3.0 GPL-3.0
 * @link      https://johncms.com JohnCMS Project
 */

/**
 * @var $title
 * @var $page_title
 * @var $data
 */

$this->layout(
    'system::layout/default',
    [
        'title'      => $title,
        'page_title' => $page_title,
    ]
);
$this->sectionReplace('sidebar-menu', $this->fetch('admin::sidebar-admin-menu', ['module_menu' => ['forum' => true]]));
?>

<h3><?= __('Statistic') ?></h3>
<ul>
    <li><?= __('Categories') ?>:&#160;<?= $data['counters']['total_cat'] ?></li>
    <li><?= __('Sections') ?>:&#160;<?= $data['counters']['total_sub'] ?></li>
    <li><?= __('Topics') ?>:&#160;<?= $data['counters']['total_thm'] ?>&#160;/&#160;<span class="text-danger"><?= $data['counters']['total_thm_del'] ?></span></li>
    <li><?= __('Messages') ?>:&#160;<?= $data['counters']['total_msg'] ?>&#160;/&#160;<span class="text-danger"><?= $data['counters']['total_msg_del'] ?></span></li>
    <li><?= __('Files') ?>:&#160;<?= $data['counters']['total_files'] ?></li>
    <li><?= __('Votes') ?>:&#160;<?= $data['counters']['total_votes'] ?></li>
</ul>
<h3><?= __('Settings') ?></h3>
<ul>
    <?php if ($user->rights >= 9): ?>
        <li><a href="?act=forum&amp;mod=settings"><?= __('Settings') ?></a></li>
    <?php endif; ?>
    <li><a href="?act=forum&amp;mod=cat"><b><?= __('Forum structure') ?></b></a></li>
    <li><a href="?act=forum&amp;mod=hposts"><?= __('Hidden posts') ?></a> (<?= $data['counters']['total_msg_del'] ?>)</li>
    <li><a href="?act=forum&amp;mod=htopics"><?= __('Hidden topics') ?></a> (<?= $data['counters']['total_thm_del'] ?>)</li>
</ul>
<div class="mt-2">
    <a href="<?= $data['back_url'] ?>"><?= __('Back') ?></a>
</div>
