Файл: profiwm.pp.ua/loads/index.php
Строк: 23
<?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 . 'WAP-скрипты' . $div_end . $div_menu . '
<img src="../ico/up.gif" alt=""/> <b>WAP-скрипты</b>
' . $block . '
<a href="search.php?">Поиск</a><br/>
<a href="pop.php?">Популярные</a> |
<a href="new.php?">Новые</a>
' . $div_end;
$look = mysql_result(mysql_query("SELECT COUNT(id) FROM `loads_r`"), 0);
$n = new navigator($look, 25, '?');
$view = mysql_query("SELECT `loads_r`.*,
(SELECT COUNT(id) FROM `loads_f` WHERE `loads_r`.`id` = `loads_f`.`cat`) AS c,
(SELECT COUNT(id) FROM `loads_f` WHERE `loads_r`.`id` = `loads_f`.`cat`
AND `loads_f`.`time` > '" . (time() - 86400) . "') AS a FROM `loads_r` 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 '<img src="../ico/dir.gif" alt=""/> <a href="r-'.$a['id'].'">' . $a['name'] . '</a> (' . $a['c'] . ') ' . $new_file . $div_end;
}
echo $n->navi();
} else {
echo 'Разделы не созданы!<br/>';
}
include '../system/foot.php';
?>