info['id'].'" AND `mail` != "No E-Mail" LIMIT 1000'));
$rfs['count'] = 0+$rfs['count'][0];
$rfs['c'] = 1;
$rfs['data'] = explode('|',$u->info['ref_data']);
if(isset($_POST['r_bank']) || isset($_POST['r_type']))
{
$bnk = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `id` = "'.mysql_real_escape_string($_POST['r_bank']).'" AND `uid` = "'.$u->info['id'].'" AND `block` = "0" LIMIT 1'));
if(!isset($bnk['id']))
{
}else{
if($_POST['r_type']==1){ $_POST['r_type'] = 1; }else{ $_POST['r_type'] = 2; }
$u->info['ref_data'] = $bnk['id'].'|'.$_POST['r_type'];
$rfs['data'] = explode('|',$u->info['ref_data']);
mysql_query('UPDATE `stats` SET `ref_data` = "'.mysql_real_escape_string($u->info['ref_data']).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
}
$rfs['see'] = '';
$sp = mysql_query('SELECT `s`.`active`,`u`.`online`,`u`.`id`,`u`.`level` FROM `users` AS `u` LEFT JOIN `stats` AS `s` ON `u`.`id` = `s`.`id` WHERE `u`.`host_reg` = "'.$u->info['id'].'" AND `u`.`mail` != "No E-Mail" ORDER BY `u`.`level` DESC LIMIT '.$rfs['count']);
while($pl = mysql_fetch_array($sp))
{
$rfs['c2'] = ' '.$rfs['c'].'. '.$u->microLogin($pl['id'],1).'';
if($pl['active']!='')
{
$rfs['c2'] = ''.$rfs['c2'].' не активирован';
}elseif($pl['level']>5)
{
$rfs['c2'] = ''.$rfs['c2'].'';
}
if($pl['online'] >time()-520) {
$rfs['c2'] .= ' ONLINE';
}
$rfs['see'] .= $rfs['c2'].'
';
$rfs['c']++;
}
if($rfs['see']=='')
{
$rfs['see'] = 'К сожалению у Вас нет рефералов';
}
?>
|
|