<?PHP
if (!defined('beerman')) { exit(); }
$i = NULL;
$sql = mysql_query("SELECT `user_id` FROM `b_ref_box` ORDER BY `id` desc LIMIT 1") or die(mysql_error());
while($row = mysql_fetch_assoc($sql)) {
$sql_u = mysql_query("SELECT * FROM `b_users` WHERE `id`='".$row["user_id"]."'") or die(mysql_error());
$row_u = mysql_fetch_assoc($sql_u);
echo '<span class="top-bl-s">'.$row_u["username"].'</span>
<div id="contextblock" class="contextlink2">
<a href="/users-'.$row["user_id"].'-wall.html" class="rekl_a" title="Стать рефералом">';
echo '<center><img style="border: solid 1px #ddd;padding:1px;" src="/avp/'.$row_u["avatar"].'" border="0" width="90" height="90" alt="avatar" /></center></a>
<br />
<center><font color=red>Авто-рефбэк всем '.$row_u["new_rb"].'%</font></center>';
echo '</a></div>
<span class="bottom-bl-s1"><a href="/ref-box.html">Попасть сюда за 2.00 руб.</a></span>';
$i++;
}