Файл: stat/ref_rat.php
Строк: 43
<?php
$_CONF['title']='Рейтинг по рефералам';
include "../header/config.inc.php";
include "../header/function.inc.php";
include "../header/header.inc.php";
include "../header/connect.inc.php";
include "../header/click-club.class.php";
include "../header/hellfish.inc.php";
$q=mysql_query("SELECT `login` FROM `".prefix."users` order by `id` desc;");
while ($r=mysql_fetch_array($q))
{
$n=mysql_num_rows(mysql_query("SELECT `login` FROM `".prefix."users` WHERE `pid`='$r[login]';"));
if ($n>0)
$arr[$r[login]]=$n;
}
arsort($arr);
@mysql_query("update `".prefix."users` set `mesto`='В рейтинге рефералов', `online`='".time()."' where `id` = '".$_USER['id']."';");
print '<div class="downsw"><b>Рейтинг по рефералам</b>:</div>';
$start=mysql_escape_string($_GET[start]);
if (empty($start))
$start=1;
foreach($arr as $key=>$value)
{
$i++;
if ($i>=$start and $i<=($start+15))
print "<div class='menuindexom'>$i) <a href='/system/info.php?user=$key'><b>$key</b></a> [$value]</div>" ;
}
echo '<div class="menuindexom"><b>';
print "Участников: $i";
echo '</b></div>';
$start=$start+15;
if ($i>15)
echo'<div class="menuindexom"><a href="'.$_zapros.'start='.$start.'">Дaлee »</a></div>';
include "../header/end.inc.php";
?>