<?php 
include("header.php");

require_once("config.php");

echo "<div class='hl'>Top Downloads</div>";


$sql = mysql_query("SELECT * FROM fisiere WHERE download ORDER BY download desc LIMIT 20"); 
while($row = mysql_fetch_array($sql))
{ 
    // Build your formatted results here.
 $file = $row['file'];
$user = $row['user'];
$filename = $row['file'];
$desc = $row['description'];
$size = $row['size'];
$id = $row['id'];
$ftype = $row['ftype'];
$from = $from+1;
$dload = $row['download'];

echo "$from. <a href=\"file.php?mode=xhtml&id=".$id."\"> $filename</a>(<b>$dload</b>)<br/>";

} 


include("flooter.php");

?>
