<?php
/**********************************
* @year: 2015 *
* @author: Klubv *
* @icq: 611940693 *
* @link: http://klubv.ru *
**********************************/
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 * FROM `".prefix."users` order by `id` desc;");
while ($r=mysql_fetch_array($q))
{
$n=mysql_num_rows(mysql_query("SELECT `cfrom` FROM `".prefix."users` WHERE `who`='$r[id]';"));
if ($n>0)
$arr[$r[login]]=$n;
}
{
$ot=mysql_num_rows(mysql_query("SELECT `cto` FROM `".prefix."users` WHERE `who`='$r[id]';"));
if ($ot>0)
$arr2[$r[login]]=$ot;
}
arsort($arr);
arsort($arr2);
print '<b>Рейтинг банкиров</b><br/>---<br/>Логин [Откл/Клик]:<br/>---<br/>';
$start=mysql_escape_string($_GET[start]);
if (empty($start))
$start=1;
foreach($arr as $key=>$value)
foreach($arr2 as $key=>$value2)
{
$i++;
if ($i>=$start and $i<=($start+15))
print "$i) $key [$value/$value] <br />";
}
print "---<br />
Участников: $i
<br />";
$start=$start+15;
if ($i>15)
print "<a href='clik_rat.php?start=$start'>далее ....</a>";
include "header/end.inc.php";
?>