Размер файла: 2.18Kb
<?
/*
=============================================
Движок: 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);
$new_themes = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_them` WHERE `time` > '".(time()-86400)."'"),0);
$new_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_mess` WHERE `time` > '".(time()-86400)."'"),0);
echo '<div class="posts"><img src="../template/icon/search.png"/> <a href="search.php">Поиск темы</a></div>';
echo '<div class="posts"><img src="icon/icon_them/them.png"/> <a href="new.themes.php">Новые темы ('.$new_themes.')</a></div>';
if($forum == null){
echo '<div class="posts">Нет категорий</div>';
}
else
{
do
{
echo '<div class="maintitle">';
echo '<img src="/forum/icon/icon_cat/'.$forum['icon'].'"/> <a href="razd.php?id='.$forum['id'].'">'.$forum['name'].'</a></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($users_nav['team'] == 6){
echo '<div class="user_foot">Навигация</div>';
echo '<div class="posts"><a href="new.cat.php">Создать категорию</a></div>';
}
include_once'../template/foot.php';
?>