<?php

defined('_IN_JOHNCMS') or die('Error: restricted access');

$mp = new mainpage();

/*
-----------------------------------------------------------------
Блок информации
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $lng['information'] . '</b></div>';
echo $mp->news;
echo '<div class="menus"><i class="fas fa-rss-square"></i> <a href="news/index.php">' . $lng['news_archive'] . '</a> <span class="count float-right">' . $mp->newscount . '</span></div>' .
    '<div class="menus"><i class="far fa-info"></i> <a href="pages/faq.php">' . $lng['information'] . ', FAQ</a></div>';

/*
-----------------------------------------------------------------
Блок общения
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $lng['dialogue'] . '</b></div>';
// Ссылка на гостевую
if ($set['mod_guest'] || $rights >= 7)
    echo '<div class="menus"><i class="fas fa-comment"></i> <a href="guestbook/index.php">' . $lng['guestbook'] . '</a><span class="count float-right">' . counters::guestbook() . '</span></div>';
// Ссылка на Форум
if ($set['mod_forum'] || $rights >= 7)
    echo '<div class="menus"><i class="fas fa-comments"></i> <a href="forum/">' . $lng['forum'] . '</a><span class="count float-right">' . counters::forum() . '</span></div>';

/*
-----------------------------------------------------------------
Блок полезного
-----------------------------------------------------------------
*/    
echo '<div class="phdr"><b>' . $lng['useful'] . '</b></div>';
// Ссылка на загрузки
if ($set['mod_down'] || $rights >= 7)
    echo '<div class="menus"><i class="fas fa-folder"></i> <a href="download/">' . $lng['downloads'] . '</a><span class="count float-right">' . counters::downloads() . '</span></div>';
// Ссылка на библиотеку
if ($set['mod_lib'] || $rights >= 7)
    echo '<div class="menus"><i class="fas fa-book"></i> <a href="library/">' . $lng['library'] . '</a><span class="count float-right">' . counters::library() . '</span></div>';
// Ссылка на библиотеку
if ($set['mod_gal'] || $rights >= 7)
    echo '<div class="menus"><i class="far fa-images"></i> <a href="gallery/">' . $lng['gallery'] . '</a><span class="count float-right">' . counters::gallery() . '</span></div>';
if ($user_id || $set['active']) {
    echo '<div class="phdr"><b>' . $lng['community'] . '</b></div>' .
        '<div class="menus"><i class="fas fa-users"></i> <a href="users/index.php">' . $lng['users'] . '</a><span class="count float-right">' . counters::users() . '</span></div>' .
        '<div class="menus"><i class="far fa-image"></i> <a href="users/album.php">' . $lng['photo_albums'] . '</a><span class="count float-right">' . counters::album() . '</span></div>';
}

?>
