07-31-2013, 11:28 PM
I have removed the Today Clicks table from the block and adjusted the size of the rows data.
<?
$sql = $db->Query("SELECT a.uid, SUM(a.total_clicks) AS total, b.login FROM user_clicks a LEFT JOIN users b ON b.id = a.uid GROUP BY a.uid ORDER BY total DESC LIMIT 10");
if($db->GetNumRows($sql) >= 10){
?>
<div class="home_top">
<table class="table" style="table-layout:5;60;10">
<thead>
<tr><td colspan="3">Top 10 Members</td></tr>
</thead>
<tbody>
<tr><td><center>Rank</center></td><td><center>Member</center></td><td><center>Clicks</center></td></tr>
<?
$j = 0;
foreach($db->FetchArrayAll($sql) as $top){
$j++;
echo '<tr><td><center>'.$j.'</center></td><td style="overflow:hidden;"><center>'.$top['login'].'</center></td><td><center>'.$top['total'].'</center></td></tr>';
}
?>
</tbody>
</table>
</div>
<?}?>
<?
$sql = $db->Query("SELECT a.uid, SUM(a.total_clicks) AS total, b.login FROM user_clicks a LEFT JOIN users b ON b.id = a.uid GROUP BY a.uid ORDER BY total DESC LIMIT 10");
if($db->GetNumRows($sql) >= 10){
?>
<div class="home_top">
<table class="table" style="table-layout:5;60;10">
<thead>
<tr><td colspan="3">Top 10 Members</td></tr>
</thead>
<tbody>
<tr><td><center>Rank</center></td><td><center>Member</center></td><td><center>Clicks</center></td></tr>
<?
$j = 0;
foreach($db->FetchArrayAll($sql) as $top){
$j++;
echo '<tr><td><center>'.$j.'</center></td><td style="overflow:hidden;"><center>'.$top['login'].'</center></td><td><center>'.$top['total'].'</center></td></tr>';
}
?>
</tbody>
</table>
</div>
<?}?>