<? include('header.php'); ?>


								<div class="content_top_center">
									<div class="content_top_left">
										<div class="content_top_right">
			
			<table class="contentpaneopen"><tr><td class="contentheading" width="100%">Ваши рефералы</td></tr></table>
			
		<table class="contentpaneopen"><tr><td width="70%" align="left" valign="top" colspan="2"><span class="small"></td></tr>
			<tr>
				<td valign="top" colspan="2" class="createdate"></td>
			</tr>
</table>

		              </div>
									</div>
								</div>
<script language="JavaScript">
<!--
function winop(t,w,h)
{
h=h+8;
w=w+8;
windop = window.open(t,"mywin","height="+h+",width="+w+",left=180,top=220, resizable=yes,locationbar=no,menubar=no,scrollbars=yes,status=yes,toolbar=no");
}
-->
</script>
<a href="javascript:winop('reflink.php',600,200);">Ccылка / Баннер для привлечения рефералов</a><br><br>


<div id="tables">
<table align="center" width="40%" cellspacing="0" cellpadding="0">
<tr>
<th class="top"><b>Имя реферала</b></th>
<th class="top"><b>Кол. визитов</th></tr>
<?
require('config.php');
$lole=$_COOKIE["usNick"];

$tabla = mysql_query("SELECT * FROM tb_users where referer='$lole' ORDER BY id ASC"); // selecciono todos los registros de la tabla usuarios, ordenado por nombre
mysql_close($con);
while ($row = mysql_fetch_array($tabla)) { // comienza un bucle que leera todos los registros y ejecutara las ordenes que siguen




echo "<tr><td align='center'>";

echo $row["username"];

echo "</td><td align='center'>";

echo $row["visits"];

echo "</td></tr>";

}

echo "</table>";

?>

</div>




		<!--footer starts here-->
<? include('footer.php'); ?>
