<?php
				echo "
				<script language='JavaScript'>
				var elem = document.getElementById('se-pre-con');
				elem.parentNode.removeChild(elem);
				</script>
				";
if(!defined('GAME') || !isset($_GET['referals']))
{
	die();
}

?>
<style> .row { cursor:pointer; } </style>
<script type="text/javascript">
function show(ele) {
	      var srcElement = document.getElementById(ele);
	      if(srcElement != null) {
	          if(srcElement.style.display == "block") {
	            srcElement.style.display= 'none';
	          }
	          else {
	            srcElement.style.display='block';
	          }
	      }
	  }
</script>
<style type="text/css">
	  .bordered, .bordered tr, .bordered tr td { font-family: Times New Roman; font-size: 14px;
	          border: 1px solid black; border-collapse: collapse; text-align: center; vertical-align: top; }
	  .bordered { border: 3px solid black; border-collapse: collapse;}
	  .bordered .al { text-align: left; }
	  .bordered .vam { vertical-align: middle; }
	  .bordered .ac { text-align: center; }
	  .bordered .b { font-weight: bold; }
	  .bordered .p { padding: 0px 5px 0px 5px; }
	  .bordered .btop { border-top: 3px solid black; border-collapse: collapse;}
	  .bordered .bright { border-right: 3px solid black; border-collapse: collapse;}
	  .bordered .bleft { border-left: 3px solid black; border-collapse: collapse;}
	  .bordered .bbottom { border-bottom: 3px solid black; border-collapse: collapse;}
	  .bordered .light { background: #F4E7CC;}

	  .font16, .font16 tr, .font16 tr td { font-family: Times New Roman; font-size: 16px;}
</style>

<div id="hint4" class="ahint"></div>

<table cellspacing="0" cellpadding="2" style="width: 100%; margin-top: 10px; margin-bottom: 10px;">
	<tr>
		<td style="width: 70%; vertical-align: top; text-align: center;">
			<h4 style="font-family: Times New Roman; font-size: 18px">����������� �������</h4>
		</td>
		<td style="width: 27%; vertical-align: top; text-align: right; padding-right: 20px;">
			<input type="button" class="btn" value="��������"  onclick='location="/main.php?referals"'>
			<input type="button" class="btn" value="���������" onclick="location.href='/main.php'">
		</td>
	</tr>
</table>

<p style="margin: 5px 20px 5px 20px; padding: 0px;">� ������� ����������� ������� �� ������ ��������� � ���� ����� ������ ��������� ������ ����, � �������� �� ��� �������.</p>
<p style="margin: 5px 20px 5px 20px; padding: 0px;">
	<b>��� ������ ���������� ������� ��� ����� ��������� �� ������ ��������:</b><br>
	- <b>10% ���</b> �� ����� ���������� �������� ;<br>
</p>
<p style="margin: 5px 20px 5px 20px; padding: 0px;">���� ������ �� ����������� ��� ����� �������: <b style="color: red">https://new-combats.com/r<?=$u->info['id']?></b></p>
<?
$rtg = mysql_fetch_array(mysql_query('SELECT * FROM `ref_mult` WHERE `uid1` = "'.$u->info['id'].'" LIMIT 1'));
if(isset($rtg['id'])) {
	echo '<p style="margin: 5px 20px 5px 20px; padding: 0px;">������� � ������������ IP (��������� ������ ������ �� ����� ��������): <b style="color: red">'.$u->microLogin($rtg['uid2'],1).'</b><br>'.
		 '<small>(������� �� ������� �������� � ������ IP ������ ������!)</small></p>';
}
?>
<center>
	<b>�� ������� ������������ � ���� ��������,�� ������ ��������:</b>
</center>

<table cellspacing="0" cellpadding="2" style="width: 620px; margin: 7px auto 15px;" class="bordered ac font16 b">
	<tr class="bbottom">
		<td style="width: 16%;" class="bright">
			<b>�������</b>
		</td>
		<td style="width: 28%;">
			<b>������� �� ��������</b>
		</td>
	</tr>
    <tr><td class="bright">8</td><td>0 ��</td>
    <tr><td class="bright">9</td><td><font color=green>30 ���</font></td>
    <tr><td class="bright">10</td><td><font color=green>75 ���</font></td>
    <tr><td class="bright">11</td><td><font color=green>150 ���</font></td>
</table>

<p style="margin: 5px 20px 15px 20px; padding: 0px;">
	��������� �������� �� ����� ������ �������� � ������ ����. ��������� ��������� ����������� ������ � ���� �� ������ �� ����������� ������ ���� �� �����-���� ��� �����. ����������� ������� ������������� ������ ��� ����������� ����� �������.<br>
	��������! ��������� ������� � ��������������� ��������� � ���� �������, � ����� ��������� "�����������" ��������. ����� �������� � ����� ������ �������� ��������� � ��� ������� ��������� ����������, � ��� ������� ����� �������� ��������� �� ��������� ������ ����������� �������.<br>
	����������� ����� ������� ����������� ������ ������ ����, � ��� ����� ���������� � ������.
</p>
<?
$x1 = 0;
$x2 = 0;
$x3 = 0;
$xh1 = '';
$xh2 = '';
$xh3 = '';

$sp = mysql_query('SELECT `id`,`login`,`level`,`align`,`clan`,`online` FROM `users` WHERE `host_reg` = "'.$u->info['id'].'" AND `banned` = 0 ORDER BY `timereg` DESC');
while( $pl = mysql_fetch_array($sp) ) {
	$x1++;
	$clr = 'grey';
	if( $pl['online'] > time() - 240 ) {
		$clr = 'green';
	}
	$xh1 .= '<tr><td align="center"><font color="'.$clr.'">'.$u->microLogin($pl,2).'</font></td></tr>';
	$sp2 = mysql_query('SELECT `id`,`login`,`level`,`align`,`clan`,`online` FROM `users` WHERE `host_reg` = "'.$pl['id'].'" AND `banned` = 0 ORDER BY `timereg` DESC');
	while( $pl2 = mysql_fetch_array($sp2) ) {
		$x2++;
		$clr = 'grey';
		if( $pl2['online'] > time() - 240 ) {
			$clr = 'green';
		}
		$xh2 .= '<tr><td align="center"><font color="'.$clr.'">'.$u->microLogin($pl2,2).'</font></td></tr>';
		$sp3 = mysql_query('SELECT `id`,`login`,`level`,`align`,`clan`,`online` FROM `users` WHERE `host_reg` = "'.$pl2['id'].'" AND `banned` = 0 ORDER BY `timereg` DESC');
		while( $pl3 = mysql_fetch_array($sp3) ) {
			$x3++;
			$clr = 'grey';
			if( $pl3['online'] > time() - 240 ) {
				$clr = 'green';
			}
			$xh3 .= '<tr><td align="center"><font color="'.$clr.'">'.$u->microLogin($pl3,2).'</font></td></tr>';
		}
	}
}

if( $xh1 == '' ) {
	$xh1 = '<tr><td align="center"><font color="grey">� ��� ��� ���������</font></td></tr>';
}
?>
<div align="center"><p style="margin: 5px 20px 15px 20px; padding: 0px;"><b>���� �������� (<?=$x1?>)</b></p></div>
<table align="center" cellpadding="2" cellspacing="0" class="bordered ac font16 b" style="width: 620px; margin: 7px auto 15px;">
  <?=$xh1?>
</table>