Размер файла: 3.27Kb
<?
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Форум
=============================================
Official website: http://shcms.ru
=============================================
Данный код защищен авторскими правами
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
$shcmsengine['title'] = 'Форум';
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);
echo '<div class="maintext">';
echo '<img src="../template/icon/search.png"/> <a href="search.php">Поиск темы</a><hr/>';
echo '<img src="../template/icon/dir.png"/> <a href="forum_files.php">Файлы форума</a> <span class="maintime"><strong>'.$count_files.'</strong></span><hr/>';
echo '<img src="icon/icon_them/them.png"/> <a href="new.themes.php">Новые публикации</a><span class="maintime"><strong>'.$count_them.'</strong></span>';
if(isset($user_id))
{
echo '<hr/>';
echo '<img src="../template/icon/statistics.png"/> <a href="stat.php">Моя статистика </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>Нет категорий</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">Разделов: '.$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">Навигация</div>';
echo '<div class="maintext"><div class="posts"><a href="new.cat.php">Создать категорию</a></div></div>';
}
include_once'../template/foot.php';
?>