echo '<table class="abonatigore" width="100%">
<tr>
<td align="center">Класиране</td>
</tr>
</table>
<table id="myTable" align="center">
<thead>
<tr>
<th align="center" width="155px">Име:</th>
<th align="center" width="100px">Прогнози:</th>
<th align="center" width="100px"><font color="#00FF00">Печеливши:</font></th>
<th align="center" width="100px"><font color="#FF0000">Изгубени:</font></th>
<th align="center" width="100px"><font color="#FFFC17">Чакащи:</font></th>
<th align="center" width="100px">Баланс:</th>
<th align="center" width="90px" colspan="2">Успеваемост:</th>
</tr></thead>';
$getuser = mysql_query("SELECT * from users order by id asc");
while ($user = mysql_fetch_array($getuser))
{
$broi = mysql_result(mysql_query("SELECT COUNT(*) FROM tipinfo WHERE napisal = '".$user['username']."'"),0);
$broipecheli = mysql_result(mysql_query("SELECT COUNT(*) FROM tipinfo WHERE napisal = '".$user['username']."' && status ='Печели'"),0);
$broigubi = mysql_result(mysql_query("SELECT COUNT(*) FROM tipinfo WHERE napisal = '".$user['username']."' && status ='Губи'"),0);
$waitbets = mysql_result(mysql_query("SELECT COUNT(*) FROM tipinfo WHERE napisal = '".$user['username']."' && status ='Чакащ'"),0);
$procentusp = @round(($broipecheli/$broi)*100,1);
$result = mysql_query("SELECT sum(zalog) as sum FROM tipinfo where napisal='".$user['username']."'")
echo '<tr>
<td align="center" width="155px"><a class="lside" href="Members.php?user='.$user['username'].'">'.$user['username'].'</a></td>
<td align="center" width="100px">'.$broi.'</td>
<td align="center" width="100px"><font color="#aeff00">'.$broipecheli.'</font></td>
<td align="center" width="100px"><font color="#FF0000">'.$broigubi.'</font></td>
<td align="center" width="100px"><font color="#FFFC17">'.$waitbets.'</font></td>
<td align="center" width="100px">Сума в лева</td>
<td align="center" width="90px"><span style="color: #'.$color.';">'.$procentusp.' </span></td><td>%</td>
</tr>';
// links to a page to view the user's profile.
// in the above code, we display the user's information.
}