File size: 1.32Kb
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Сообщества';
include_once '../sys/inc/thead.php';
title();
aut();
err();
echo '<div class="main_menu">Разделы:</div>';
/**
* Admin
*/
if($user['level'] == 10) include_once 'inc/razd_act.php';
$q = mysql_query("SELECT * FROM `community_razd` ORDER BY `sort`");
while($post = mysql_fetch_array($q)) {
echo '<div class="main_menu">';
echo '<a href="razd.php?id_razd='. $post['id'] .'">'.$post['name'] .'</a> ('. mysql_result(mysql_query("SELECT COUNT(*) FROM `community_comm` WHERE `id_razd` = '$post[id]'"),0) .')<br />'. output_text($post['opis']);
/**
* Admin
*/
if($user['level'] == 10) echo '<br />[<a href="index.php?razd=edit&id_razd='.$post['id'].'">изменить</a>] [<a href="index.php?razd=delete&id_razd='.$post['id'].'">удалить</a>]';
echo '</div>';
}
/**
* Admin
*/
if($user['level'] == 10) include_once 'inc/razd_form.php';
include_once '../sys/inc/tfoot.php';
?>