case \'cat\':
$cat = mysql_fetch_assoc(mysql_query(\"SELECT `name` FROM `forum_cats` WHERE `id` = \'$id\'\"
);
if ($cat[\'name\']) {
tp(\'<a href=\"?\">\'.$lang[\'forum\'].\'</a>» \'.$cat[\'name\']);
echo \'<div class=\"body\">\';
$subcats_r = mysql_query(\"SELECT `id`, `name` FROM `forum_subcats` WHERE `id_cat` = \'$id\' ORDER BY `order`, `name`\"
;
if (mysql_num_rows($subcats_r)) {
while ($subcat = mysql_fetch_assoc($subcats_r)) {
$f_topics = mysql_result(mysql_query(\"SELECT COUNT(`id`) FROM `forum_topics` WHERE `id_subcat` = \'$subcat[id]\'\"
, 0);
$f_msg = mysql_result(mysql_query(\"SELECT COUNT(`id`) FROM `forum_msg` WHERE `id_subcat` = \'$subcat[id]\'\"
, 0);
echo \'<a href=\"index.php?act=subcat&id=\'.$subcat[\'id\'].\'\">\'.$subcat[\'name\'].\'</a> (\'.$f_topics.\'/\'.$f_msg.\')<br />\';
}
} else {
echo $lang[\'no_subcategories_yet\'];
}
echo \'<br /><a href=\"?\">\'.$lang[\'forum\'].\'</a>» \'.$cat[\'name\'].\'</div>\';
} else {
redirect(\'?\');
}
break;
Добавлено 23.09.13 в 16:30:28:
простите забыл