<?
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='center player grey'>Разделов нет</div><div class='mini-line'></div>";
echo "<div class='player menuList'>";
while($post = mysql_fetch_assoc($q)) {
if($user['level']>=0 && ($post['private_post']==1 && $user['prava'] >=4 || $post['private_post']==0))echo "<li><a href='/forum/post/$post[id]/'><img src='/images/icon/section.png'>$post[name]</a></li><div class='dot-line'></div>";
//echo "<div class='dot-line'></div>";
}
echo "</div>";
if($user[prava] >= 5){
echo "<div class='player menuList'>";
echo "<li><a href='/forum/add'><img src='/images/icon/arrow.png'>Создать Раздел</a></li>";
echo "</div>";
}
echo "</div>";
include_once '../core/foot.php';
?>