<?
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();

$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `kaktuz` WHERE `rost` > '0'"),0);
$k_page=k_page($k_post,10);
$page=page($k_page);
$start=10*$page-10;

echo "<table class='post'>\n";
if ($k_post==0)
{
echo "   <tr>\n";
echo "  <td class='p_t'>\n";
echo "Нет результатов\n";
echo "  </td>\n";
echo "   </tr>\n";
}

$q=mysql_query("SELECT `id_u` FROM `kaktuz` WHERE `rost` > '0' ORDER BY `rost` DESC LIMIT $start,10");
while ($ank = mysql_fetch_assoc($q))
{
$ank=get_user($ank['id_u']);
echo "   <tr>\n";

echo "  <td class='icon14'>\n";
echo "".status($ank['id'])."";
echo "  </td>\n";



$arr=mysql_fetch_array(mysql_query("SELECT * FROM `kaktuz` WHERE `id_u`='$ank[id]'"));
echo "  <td class='p_t'>\n";
echo "<a href='kaktuz.php?id=".$arr['id_u']."'>$ank[nick]</a>\n";
echo "".medal($ank['id'])." ".online($ank['id'])." ";
echo "  </td>\n";
echo "   </tr>\n";
echo "   <tr>\n";
if ($set['set_show_icon'])echo "  <td class='p_m' colspan='2'>\n"; else echo "  <td class='p_m'>\n";

echo "Авторитет: $arr[rost]<br />\n";
echo "Стоимость : ".intval($arr['rost']*5)." балла";
echo "  </td>\n";
echo "   </tr>\n";
}
echo "</table>\n";

if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class='aut'><a href='index.php'>Назад</a></div>";
include_once '../../sys/inc/tfoot.php';
?>