Файл: 4mast/profmas.ru/downloads/index.php
Строк: 34
<?php
require_once('../includes/Headers.php');
require_once('../includes/PDO_func.php');
H ('Загруз-центр', 'Загруз-центр');
echo ' <a href="/downloads/search.php" class="block"><img src="/images/downloads/fsearch.png" alt=""/> Поиск скриптов</a></div>
<a href="/downloads/new_files.php" class="block"><img src="/images/downloads/folder_new.png" alt=""/> Новые скрипты</a></div> ';
echo '<div class="menu2">Список разделов</div>';
$query = DB :: $dbs -> query ("SELECT * FROM `down_kats` ORDER BY `id`");
while ($kats = $query -> fetch ()) {
$c_f = DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `down_files` WHERE (`id_kats`='" . $kats['id'] . "') AND (`dop`='da')");
$n_f = DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `down_files` WHERE (`id_kats`='" . $kats['id'] . "') AND (`dop`='da') AND (`time`>'" . (time () - 86400) . "')");
echo '<a href="/downloads/kats' . $kats['id'] . '" class="block"><img src="/images/p2.png" alt=""/> ' . $kats['name'] . ' (' . $c_f . ($n_f != 0 ? '/<b style="color:red;">+' . $n_f . '</b>' : '') . ')</div></a>';
}
echo '<div class="error">Всего файлов: ' . DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `down_files` WHERE (`dop`='da')") . ', Категорий: ' . DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `down_kats`") . ' , Подкатегорий: ' . DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `down_pods`") . '</div>';
require_once('../includes/Footers.php');
?>