Файл: public_html/forum/pod.php
Строк: 7
<?
$view = mysql_query("SELECT * FROM `f_razdel` ORDER BY `id`");
if ($view != FALSE) {
while($q = mysql_fetch_assoc($view)) {
echo $div_title . '' . $q['name'] . '' . $div_end;
$look = mysql_query("SELECT `f_pod`.*,
(SELECT COUNT(id) FROM `f_them` WHERE `f_them`.`rid` = `f_pod`.`id`) AS c,
(SELECT COUNT(id) FROM `f_message` WHERE `f_message`.`podforum` = `f_pod`.`id`) AS m
FROM `f_pod` WHERE `f_pod`.`pid` = '$r' ORDER BY `f_pod`.`id` ASC");
$pod = mysql_query("SELECT * FROM `f_pod` WHERE `pid` = '$q[id]' ORDER BY `id` ASC");
if ($pod != FALSE) {
while($a = mysql_fetch_assoc($pod)) {
echo '<div class="menu"><a class="ssyl2" href="index.php?do=pod&p='.$a['id'].'&r='.$a['pid'].'"> '. $a['name'].'</a></div>';
}
}
else
{
echo '<div class="menu">Пусто</div>';
}
}
}
?>