<?php
require_once '../core/system.php';
echo only_reg();
$page = ($get_page == '0') ? '1' : $get_page;
if (isset($_GET['forum']) && is_numeric($_GET['forum'])) {
$forum = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_razdel` WHERE `id`  = '".$_GET['forum_id']."'"));
   if ($forum['main_forum'] == 1 && $forum['sub_forum'] == 0) {
        $back_url = '/forum?parent_id='.$forum['id'].'&page='.$page.''; 
    }
    elseif ($forum['main_forum'] == 0 && $forum['sub_forum'] == 1 || $forum['type'] == 'public_property')
    {
        $back_url = '/forum?id='.$forum['id'].'&page='.$page.'';
    }
    else 
    {
        $back_url = NULL;
    }
    $back_url_title = 'Назад в форум';
}
elseif (isset($_GET['chat']) && is_numeric($_GET['chat'])) {
$chat = mysql_fetch_assoc(mysql_query("SELECT * FROM `chat` WHERE `id`  = '".$_GET['chat']."'"));
    $back_url = '/chat?id='.$chat['id'].'&page='.$page.''; 
    $back_url_title = 'Назад в в чат';
}
$header = 'Администрация';
include_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `prava` = '4'"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `user` WHERE `prava` >= 4 ORDER BY `online` DESC LIMIT $start, $set[p_str]");
echo "<div class='player'>";
if($k_post == 0)echo '<span class="grey"></span>';
while($post = mysql_fetch_assoc($q)) {
if ($post['storona'] == '0') {?><img src="/images/icon/0.png" height="11" alt="a"/> <?php }
	    if ($post['storona'] == '1') {?><img src="/images/icon/1.png" height="11" alt="d"/> <?php }
echo online($post[id]);
echo ' <a href="/user/'.$post['id'].'/">'.$post['nick'].'</a> <img src="/images/icon/level.png"> '.$post['level'].'<br />';
} 
echo '</div>';
if ($k_page>1){
echo '<div class="dot-line"></div>';
str('?',$k_page,$page);
}
echo '<div class="mini-line"></div>';
echo '<div class = "player menuList">
<li><a href = "'.$back_url.'"><img src = "/images/icon/arrow.png" />'.$back_url_title.'</a></li>
</div>';
echo '</div></div>';
include_once '../core/foot.php';
?>