<?
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';

only_reg();
include_once '../sys/inc/thead.php';
title();
err();
echo "<div class='menu_razd'>";
echo "<center><img src='/style/gorod/life.gif'> Самые здоровые!</center>";
echo "</div>\n";
include_once '../top/lifebest.php';
echo "<div class='menu_razd'>";
echo "<center><img src='/style/gorod/life.gif'> Топ самых здоровых!</center>";
echo "</div>\n";
echo "<table class='post'>\n";
$k_gorod_life = mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `gorod_life` > '0'"));
$k_page = k_page($k_gorod_life,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if ($k_gorod_life=='0')
{

echo 'Нет результатов';

}

$q_gorod_life = mysql_query("SELECT * FROM `user` WHERE `gorod_life` > '0' ORDER BY `gorod_life` DESC LIMIT $start, $set[p_str]");

while ($gorod_life = mysql_fetch_array($q_gorod_life))
{
echo '<tr><td class="icon14">';
avatar3($gorod_life['id']);
echo '</td><td class="anput">';

echo "".online($gorod_life['id'])." \n";
echo "<a href='/info.php?id=$gorod_life[id]'><span style=\"color:$gorod_life[ncolor]\">$gorod_life[nick]</span></a><br />\n";
echo "<img src='/style/gorod/life.gif'>\n";
echo 'Здоровье: <font color="red">'.$gorod_life['gorod_life'].'</font> %<br />';
echo "</div>"; 
echo '</td></tr>';

}
echo "</table>"; 
echo' <img src="/style/back.gif" alt="" class="icon"/> <a href="/top/">Топы</a><br/>';

if ($k_page>1)str("life.php?",$k_page,$page);

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