Файл: mydcms.tk/downloads/index.php
Строк: 19
<?php
require '../system/sid.php';
require '../system/config.php';
if (!empty($_SESSION['us']))
{
include '../system/user.php';
whorm(0, 'fo');
}
include '../system/head.php';
include '../system/navigator.php';
echo $div_title . 'Все для мастера' . $div_end;
$look = mysql_result(mysql_query("SELECT COUNT(id) FROM `fo_cat`"), 0);
$n = new navigator($look, 25, '?');
$view = mysql_query("SELECT `fo_cat`.*,
(SELECT COUNT(id) FROM `fo_files` WHERE `fo_cat`.`id` = `fo_files`.`rid` AND `moder` = '0') AS c,
(SELECT COUNT(id) FROM `fo_files` WHERE `fo_cat`.`id` = `fo_files`.`rid`
AND `fo_files`.`time` > '" . (time() - 86400) . "' AND `moder` = '0') AS a FROM `fo_cat` ORDER BY `id` ASC {$n->limit}");
if ($look != FALSE) {
$i = 0;
while($a = mysql_fetch_assoc($view)) {
$new_file = (!empty($a['a'])) ? '<span style="color: #FF0000;">+' . $a['a'] . '</span>' : '';
echo ($i ++ % 2) ? $div_tworazdel : $div_razdel;
echo '<div class="menu"><a class="ssyl2" href="view.php?r='.$a['id'].'"> <img src="../ico/dir.gif" alt=""/> ' . $a['title'] . ' (' . $a['c'] . ') ' . $new_file . '</a></div>';
}
echo $n->navi();
} else {
echo 'Разделы не созданы!<br/>';
}
include '../system/foot.php';
?>