Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: v7 Top 5 Uploaders

Parašė iGolf· 2011 Vas. 16 15:02:31
#2


openside("TOP-5 Uploaderiai");
 
 
 
$result = dbquery("SELECT d.download_user, u.user_id, u.user_name FROM ".$db_prefix."downloads d
 
LEFT JOIN ".DB_USERS." u ON d.download_user=u.user_id
 
GROUP BY download_user ORDER BY COUNT(d.download_id) DESC LIMIT 5");
 
    if (dbrows($result) != 0) {
 
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='tbl' border='0'>\n";
 
       while($data = dbarray($result)) {
 
   $num = dbcount("(download_user)", $db_prefix."downloads", "download_user='".$data['download_user']."' LIMIT 5");
 
   echo "<tr><td class='small' align='left'><img src='".THEME."images/bullet.gif' alt='image' /><span>&nbsp;</span><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."'>".$data['user_name']."</a></td>
 
   <td class='small' align='right'>".$num." failø</td></tr>\n";
 
       }
 
   echo "</table>\n";
 
    } else { echo "<center>N&#235;ra</center>\n"; }
 
closeside()