File size: 3.96Kb
<?
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Форум
=============================================
Official website: http://shcms.ru
=============================================
Данный код защищен авторскими правами
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/system_core.php';
$shcmsengine['title'] = Lang::get('Форум');
include_once'../template/head.php';
$allfield = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_cat`"),0);
$newlist = new Navigation($allfield, 10, true);
$forums = mysql_query("SELECT * FROM `forum_cat` ORDER BY `id` DESC ". $newlist->limit()."");
$forum = mysql_fetch_array($forums);
//Cчетчик файлов
$count_files = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_files`"),0);
//Счетчик Новых тем
$count_them = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_them` WHERE `time` > ".(time()-86400).""),0);
//Счетчик Моих тем
$my_them = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_them` WHERE `user_id` = '$user_id'"),0);
//Счетчик моих постов
$my_message = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_mess` WHERE `id_user` = '$user_id'"),0);
//Счетчик новых сообщений
$my_message1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_mess` WHERE `time` > '".(time()-86400)."'"),0);
//Счетчик всех сообщений
$message_all = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_mess`"),0);
echo '<div class="maintext">';
echo '<img src="../template/icon/search.png"/> <a href="search.php">'.Lang::get('Поиск темы').'</a><hr/>';
echo '<img src="../template/icon/dir.png"/> <a href="forum_files.php">'.Lang::get('Файлы форума').'</a> <span class="maintime"><strong>'.$count_files.'</strong></span><hr/>';
echo '<img src="icon/icon_them/them.png"/> <a href="new.themes.php">'.Lang::get('Новые публикации').'</a><span class="maintime"><strong>'.$count_them.'</strong></span><hr/>';
echo '<img src="icon/icon_them/them.png"/> <a href="new.posts.php">'.Lang::get('Новые сообщения в темах').'</a><span class="maintime"><strong>'.$message_all.' / <font color="red">+ '.$my_message1.'</font>'.'</strong></span>';
if(isset($user_id))
{
echo '<hr/>';
echo '<img src="../template/icon/statistics.png"/> <a href="stat.php">'.Lang::get('Моя статистика').'</a><span class="maintime"><strong>'.$my_them .'/'. $my_message.'</strong></span>';
}
echo '</div>';
if($forum == null){
echo '<div class="posts"> <img class="img_s" src="/template/icon/empty.png"> <strong>'.Lang::get('Нет категорий').'</strong></div>';
}
else
{
do
{
$them_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_razd` WHERE `id_cat` = '$forum[id]'"),0);
echo '<div class="maintitle">';
echo '<img src="/forum/icon/icon_cat/'.$forum['icon'].'"/> <a href="razd.php?id='.$forum['id'].'">'.$forum['name'].'</a>
<div class="mainforum">'.Lang::get('Разделов:').$them_count.'</div></div>';
if($forum['message']){
echo '<div class="maintext">'.$forum['message'].'</div>';
}
}
while($forum = mysql_fetch_array($forums));
echo '<div class="pages">';
echo $newlist->pagination();
echo '</div>';
}
if($user4['team'] == 6){
echo '<div class="maintitle mainrazd">'.Lang::get('Навигация').'</div>';
echo '<div class="maintext"><div class="posts"><a href="new.cat.php">'.Lang::get('Создать категорию').'</a></div></div>';
}
include_once'../template/foot.php';
?>