Файл: forum/index.php
Строк: 24
<?
include_once '../core/system.php';
echo only_reg();
echo ban();
$header = 'Форум';
include_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_razdel`"),0);
$q = mysql_query("SELECT * FROM `forum_razdel` ORDER BY `id` ASC");
if($k_post == 0)echo "<div class='player grey'>Разделов нет!</div><div class='mini-line'></div>";
echo "<div class='player menuList'>";
while($post = mysql_fetch_assoc($q)) {
$num = mysql_result(mysql_query("SELECT count(id) FROM forum_topic where id_razdel='$post[id]'", $db), 0);
echo "<li><a href='/forum/post/$post[id]/'><img src='/images/icon/section.png'>$post[name] (".$num.")</a></li>";
echo "<div class='dot-line'></div>";
}
echo "</div>";
if($user[prava] >= 5){
echo "<div class='player menuList'>";
echo "<li><a href='new_razdel.php'><img src='/images/icon/arrow.png'>Создать раздел</a></li>";
echo "</div>";
}
include_once '../core/foot.php';
?>