<?
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();
$set['title']='Рейтинг По переходам';
include_once '../sys/inc/thead.php';
title();
err();
aut();

$k_iq = mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `perehodu` > '0'"));
$k_page = k_page($k_iq,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if ($k_iq=='0')
{

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

}

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

while ($iq = mysql_fetch_array($q_iq))
{
if($num==1){ 
echo "<div class='str'>"; 
$num=0;
}else{ 
echo "<div class='news'>"; 
$num=1;}
echo "".online($iq['id'])." \n";
echo "<a href='/info.php?id=$iq[id]'>$iq[nick]</a><br />\n";

echo '<img src="/img/sled.gif"> Переходов:'.$iq['perehodu'].'<br />';
echo "</div>"; 


}



if ($k_page>1)str("perehodu.php?",$k_page,$page);
echo '<hr>';
echo '<img src="/img/topka.gif"><a href="/top/">В Топ</a>';

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