Файл: imstat.ru/rating.php
Строк: 24
<?php
define('NTOP', 1);
$title = 'Рейтинг юзеров';
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
require_once ('str/head.php');
$all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."users` WHERE `out` > '0' AND `in` > '0'"));
echo '<div class="topik">Переходы ['.$all.'] | <a href="/kredrat.php">Кредиты</a> | <a href="/users.php">Все</a></div>';
if($all != 0){
$total=intval(($all-1)/$page_top)+1;
$page=abs(intval($_GET['page']));
if(empty($page) OR $page < 0){
$page = 1;
}
if($page > $total){
$page = $total;
}
$past=intval($all/$page_top);
$start=$page*$page_top-$page_top;
$top = mysql_query("SELECT * FROM `".$prefix."users` WHERE `in` > '0' AND `out` > '0' ORDER BY `out` DESC LIMIT ".$start.",".$page_top."");
while($row = mysql_fetch_array($top)){
$start++;
echo '<div class="topni">'.$start.'. <a href="/str/info.php?id='.$row['id'].'">'.$row['login'].'</a> ['.$row['out'].'/'.$row['in'].']</div>';
}
navigation($all,$page_top,$page,'rating.php?',$total);
}
else
{
echo '<div class="stat">Юзеров нет</div>';
}
require_once ('str/foot.php');
?>