Вот сам код (+/-)
<?
include_once $SERVER['DOCUMENT_ROOT'].'download/functions.php';
echo '<div class="phdr">музыкальный новинки</div>';
$cat = intval($_GET['cat']);
$cat = 1;
$cat_inf = mysql_query("SELECT * FROM `downpath`
WHERE `id` = '1' LIMIT 1");
if(mysql_num_rows($cat_inf)){
$cat_inf = mysql_fetch_assoc($cat_inf);
}else{
$cat_inf = array('way' => '');
}
$totalfile = mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%'"), 0);
if($totalfile > 10000){ $totalfile = 10000; }
$zap = mysql_query("SELECT * FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%' ORDER BY `time` DESC LIMIT " . $start . "," . 10);
while ($ok = mysql_fetch_array($zap)) {
echo ($i % 2) ? '<div class="menu">' : '<div class="menu">';
++$i;
$ok['name'] = str_replace('||||','',$ok['name']);
$new = mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `time` > '" . (time() - 86400) . "' AND `id` = '" . $ok['id'] . "'"), 0);
echo "<img src='/download/img/mp33.png' width='16' alt='*' /> <a href='/download/loadfile.php?down=".$ok['way']."'>".$ok['name']."</a>";
if($new > 0){
echo '<span class="red"> (New!)</span>';
}else{
echo ' ('.size_convert($ok['size']).')';
echo '';
}
echo '</div>';
}
if ($totalfile > $kmess){
echo '<div class="menu">' . functions::display_pagination('index.php?act=new&cat='.$cat.'&', $start, $totalfile, $kmess) . '';
echo '</div>';}
?>