<?php
$req_down = mysql_query("SELECT * FROM `down_files` WHERE `refid` = '0' AND `type` = 1 ORDER BY `name` ASC");
if(mysql_num_rows($req_down) > 0) {
echo '<div class="phdr"><b>Загрузки</b></div>';
while ($res_down = mysql_fetch_assoc($req_down)) {
echo '<div class="menu"><a href="download/index.php?id=' . $res_down['id'] . '">' . functions::checkout($res_down['rus_name']) . '</a> (' . $res_down['total'] . ')</div>';
}
}
?>
Вывод на главную для тройки
<?php
$req_down = mysql_query("SELECT * FROM `down_files` WHERE `refid` = '0' AND `type` = 1 ORDER BY `name` ASC");
if(mysql_num_rows($req_down) > 0) {
echo '<div class="phdr"><b>Загрузки</b></div>';
while ($res_down = mysql_fetch_assoc($req_down)) {
echo '<div class="menu"><a href="download/index.php?id=' . $res_down['id'] . '">' . checkout($res_down['rus_name']) . '</a> (' . $res_down['total'] . ')</div>';
}
}
?>