Code: 
<?
/*BEGIN_INFO
Use this module to Create an page whit the top sites for each category<br />.
By Stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
   exit;
    $saida.='<table width="100%" border="0"><tr><td>The List of best sites by category<br />
                        Listed in order Descendent by number of titles for each category.</td></tr>';
    foreach($core->allowed_types as $ty) {
    $saida .= '<tr  class="row2">
    <td><font size="4">Category <span class="'.strtolower($ty).'">'.ucfirst($ty).'</span></font></td>
    </tr><tr><td><b>SITE NAME</b></td><td><b>NUMBER OF TITLES</b></td></tr>';
    $dbc = mysql_query("SELECT sid, COUNT(id) AS number FROM wcddl_downloads WHERE TYPE = '".$ty."' GROUP BY sid ORDER BY number DESC LIMIT 3");
        while($got = mysql_fetch_assoc($dbc)){
            $site = mysql_query("SELECT id,name,url from wcddl_sites WHERE id = '".mysql_real_escape_string($got['sid'])."'");
            $site = mysql_fetch_assoc($site);
            $row = array_merge($site,$got);
        $saida .= '<tr class="row2"><td><font size="2" color="red"><a href="http://'.$row['url'].'" target="_blank">'.$row['name'].'</font></td><td>'.$row['number'].'</td></tr>';
    }
}
$saida .= '</table><br>';

$core->setTemplateVar("downloadsbysite",$saida);
?>
Code: 
<?=$core->templateVar("downloadsbysite")?>
jomasaco Reviewed by jomasaco on . [WCDDL] Top Sites by Category http://www.besthostingforums.com/images/cdn/besthostingforums.com/2010/01/11tq44o-1.png <? /*BEGIN_INFO Use this module to Create an page whit the top sites for each category<br />. By Stugas-ddl.org END_INFO*/ if(!defined("WCDDL_GUTS")) exit; $saida.='<table width="100%" border="0"><tr><td>The List of best sites by category<br /> Rating: 5