<?
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';
include_once '../sys/inc/thead.php';
title();
echo "<div class='rekl'>";
echo "<center><img src='/style/ment.png' alt='' class='icon'/> <b>Администрация Xhata.SU</b></center>";
echo "</div>\n";
echo "<div class='menu_razd'>";
echo "<font color='red'>Все вопросы по сайту можете задать любому из нижеперечисленных представителей администрации</font>\n";
echo "</div>\n";
$k_post=mysql_result(mysql_query("SELECT COUNT(`user`.`id`) FROM `user` LEFT JOIN `user_group` ON `user`.`group_access` = `user_group`.`id` WHERE `user_group`.`level` != 0 AND `user_group`.`level` IS NOT NULL"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
echo "<table class='post'>\n";
if ($k_post==0)
{
echo "Нет результатов\n";
}
$q=mysql_query("SELECT `user`.`id` FROM `user` LEFT JOIN `user_group` ON `user`.`group_access` = `user_group`.`id` WHERE `user_group`.`level` != 0 AND `user_group`.`level` IS NOT NULL ORDER BY `user_group`.`level` DESC LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_assoc($q))
{
$ank=get_user($ank['id']);
echo "   <tr>\n";
if($num==1){
echo "  <td class='linechat'>\n";
$num=0;
}else{
echo "  <td class='linechat'>\n";
$num=1;}
if (user_access('adm_log_read') && $ank['level']!=0 && ($ank['id']==$user['id'] || $ank['level']<$user['level']))
echo "".online($ank['id'])." <a href='/info.php?id=$ank[id]'><span style=\"color:$ank[ncolor]\">$ank[nick]</span></a>\n";
else
echo "".online($ank['id'])." <a href='/info.php?id=$ank[id]'><span style=\"color:$ank[ncolor]\">$ank[nick]</span></a>\n";


if($ank['rating']>=0 && $ank['rating']<=9)echo " ";
if($ank['rating']>=15 && $ank['rating']<=30)echo " <img src='/rating/05.gif'></img> "; 
if($ank['rating']>=31 && $ank['rating']<=65)echo " <img src='/rating/medal_bronze.gif'></img> ";
if($ank['rating']>=66 && $ank['rating']<=90)echo " <img src='/rating/medal_silver.gif'></img> ";
if($ank['rating']>=91 && $ank['rating']<=130)echo " <img src='/rating/medal_gold.gif'></img> ";
if($ank['rating']>=131 && $ank['rating']<=180)echo " <img src='/rating/medal_bronze.gif'></img> ";
if($ank['rating']>=131 && $ank['rating']<=180)echo " <img src='/rating/medal_silver.gif'></img> ";
if($ank['rating']>=181 && $ank['rating']<=250)echo " <img src='/rating/medal_bronze.gif'></img> ";
if($ank['rating']>=181 && $ank['rating']<=250)echo " <img src='/rating/medal_silver.gif'></img> ";
if($ank['rating']>=181 && $ank['rating']<=250)echo " <img src='/rating/medal_gold.gif'></img> ";
if($ank['rating']>=251 && $ank['rating']<=2500)echo " <img src='/rating/konkurs.png'></img> ";
if ($ank['ank_city']!=NULL)echo "/ $ank[ank_city] \n";
if ($ank['stran']==0)echo "\n";
if ($ank['stran']==1)echo "<img src='/style/strana/ru.png'> /\n";
if ($ank['stran']==2)echo "<img src='/style/strana/ua.png'> /\n";
if ($ank['stran']==3)echo "<img src='/style/strana/by.png'> /\n";
if ($ank['stran']==4)echo "<img src='/style/strana/az.png'> /\n";
if ($ank['stran']==5)echo "<img src='/style/strana/kz.png'> /\n";
if ($ank['stran']==6)echo "<img src='/style/strana/uz.png'> /\n";
if ($ank['stran']==7)echo "<img src='/style/strana/england.png'> /\n";
if ($ank['stran']==8)echo "<img src='/style/strana/de.png'> /\n";
if (isset($user) && $user['id']==$ank['id'])
{
echo " (Это Вы)<br/>\n";
}
if (isset($user) && $user['id']!=$ank['id'])echo " <a href='/mail.php?id=$ank[id]'><img src='/img/mail.gif' alt='' /></a><br/>\n";

echo "<font color='red'>$ank[group_name]</font><br/>\n";
$adm_log_c_all=mysql_result(mysql_query("SELECT COUNT(*) FROM `admin_log` WHERE `id_user` = '$ank[id]'"), 0);
$mes=mktime(0, 0, 0, date('m')-1); // время месяц назад
$adm_log_c_mes=mysql_result(mysql_query("SELECT COUNT(*) FROM `admin_log` WHERE `id_user` = '$ank[id]' AND `time` > '$mes'"), 0);
if ($ank['show_secret']==0)
{
echo "<font color='#afb0a3'>Посл. посещение: ".vremja($ank['date_last'])."</font><br />\n";
}
if ($ank['show_secret']==1)
{
echo "<font color='#afb0a3'>Посл. посещение: <b>Режим невидимка</b></font><br />\n";
}

if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
{
echo "<a href='/adm_panel/user.php?id=$ank[id]'>Редактировать профиль</a><br />\n";
}

}
echo "</table>\n";
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц


include_once '../sys/inc/tfoot.php';
?>