File size: 1.05Kb
<?php
require '../sys/dbconnect.php';
include_once '../sys/head.php';
$cat_q=mysql_query("SELECT * FROM `forum_cat`");
echo '<div class="cat"><b>Категории форума:</b></div>';
while($cat=mysql_fetch_array($cat_q))
{
$num_pod=mysql_num_rows(mysql_query("SELECT * FROM `forum_podcat` WHERE `refid`=$cat[id]"));
echo'<div class="main"><a href="cat.php?id='.num($cat['id']).'">'.output($cat['name']).'</a> ['.$num_pod.']</div>';
}
if($user['status']==admin)
{
echo'<img src="/img/2.png"><a href="/forum/admin/">Управление форумом</a><br/>';
}
echo'<div class="cat"><b>Активность на форуме:</b></div>
<div class="login">Форумов: '.mysql_num_rows(mysql_query("SELECT * FROM `forum_cat`")).'<br/>
Категорий: '.mysql_num_rows(mysql_query("SELECT * FROM `forum_podcat`")).'<br/>
Тем: '.mysql_num_rows(mysql_query("SELECT * FROM `forum_tem`")).'<br/>
Сообщений: '.mysql_num_rows(mysql_query("SELECT * FROM `forum_post`")).'</div>';
include_once '../sys/foot.php';
?>