<?

/**
 * @package     JohnCMS
 * @link        http://johncms.com
 * @copyright   Copyright (C) 2008-2011 JohnCMS Community
 * @license     LICENSE.txt (see attached file)
 * @version     VERSION.txt (see attached file)
 * @author      http://johncms.com/about
 */

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

$mp = new mainpage();

/*
-----------------------------------------------------------------
Блок информации
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $lng['information'] . '</b></div>';
echo $mp->news;
echo '<ul class="linkes">';
echo '<li><a href="news/index.php">' . $lng['news_archive'] . '<span class="ch"> (' . $mp->newscount . ')</span></a></li>' .
    '<li><a href="pages/faq.php">' . $lng['information'] . ', FAQ</a></li>';
/*
-----------------------------------------------------------------
Блок общения
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $lng['dialogue'] . '</b></div>';
// Ссылка на гостевую
if ($set['mod_guest'] || $rights >= 7)
    echo '<li><a href="guestbook/index.php">' . $lng['guestbook'] . '<span class="ch">(' . counters::guestbook() . ')</span> </a> </li>';
// Ссылка на Форум
if ($set['mod_forum'] || $rights >= 7)
    echo '<li><a href="forum/">' . $lng['forum'] . ' <span class="ch">(' . counters::forum() . ')</span> </a> </li>';

/*
-----------------------------------------------------------------
Блок полезного
-----------------------------------------------------------------
*/    
echo '<div class="phdr"><b>' . $lng['useful'] . '</b></div>';
// Ссылка на загрузки
if ($set['mod_down'] || $rights >= 7)
    echo '<li><a href="download/">' . $lng['downloads'] . ' <span class="ch">(' . counters::downloads() . ')</span></a></li>';
// Ссылка на библиотеку
if ($set['mod_lib'] || $rights >= 7)
    echo '<li><a href="library/">' . $lng['library'] . ' <span class="ch">(' . counters::library() . ')</span></a></li>';
// Ссылка на библиотеку
if ($set['mod_gal'] || $rights >= 7)
    echo '<li><a href="gallery/">' . $lng['gallery'] . ' <span class="ch">(' . counters::gallery() . ')</span></a></li>';
if ($user_id || $set['active']) {
    echo '<div class="phdr"><b>' . $lng['community'] . '</b></div>' .
        '<li><a href="users/index.php">' . $lng['users'] . ' <span class="ch">(' . counters::users() . ')</span></a></li>' .
        '<li><a href="users/album.php">' . $lng['photo_albums'] . ' <span class="ch">(' . counters::album() . ')</span></a></li></ul>';
}
echo '<div class="phdr"><a href="http://gazenwagen.com">Gazenwagen</a></div>';
?>
