<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }


$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,07");
if (dbrows($result) != 0) {
		echo "<table width='150' cellpadding='0' cellspacing='0' style='padding-right:2px'>";
	while($data = dbarray($result)) {
		$itemsubject = trimlink($data['download_title'], 20);
		echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?d_id=".$data['download_id']."' title='".$data['download_title']."' class='forumas'>$itemsubject</a></td>\n
		<td align='right'>".$data['download_count']."</td>\n</tr>\n";
	}
	echo "</table>";
} else {
	echo "<center>".$locale['004']."</center>\n";
}

?>