<?php
$cat = '2';   //Kategoriya id`si

$cat_inf = mysql_query("SELECT * FROM `downpath` WHERE `id` = '" . $cat . "' LIMIT 1"); 
if(mysql_num_rows($cat_inf)){ 
$cat_inf = mysql_fetch_assoc($cat_inf); 
}else{
$cat_inf = array('way' => ''); 
}
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%'"), 0);

if ($total) {$zap = mysql_query("SELECT * FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%' ORDER BY `time` DESC LIMIT 10");
while ($ok = mysql_fetch_array($zap)) { 


    $imya = explode('||||', $ok['name']);
echo '<div class="menu"><img style="width: 48px; height: 48px; float: left;" src="/download/files/'.$ok['way'].'.GIF"/>';
echo '<div style="min-height: 52px; margin-left:54px;"><a href="/download/files/'.$ok['way'].'">' . str_replace('_', ' ', $imya[0]) . '</a><div style="margin: 1px;"></div>Hajmi:<span class="gray">  ['.size_convert($ok['size']).']</span></br>Yuklab olindi: <span class="gray">'.$ok['count'].'</span></div></div>';
}
}
?>
