View file admin/index.php

File size: 825B
<? $dir=''; include("../head.php");if(!isset($_SESSION['user_id']) or @$me['admin']!=2)exit("Нету доступа");

$forum_q=mysql_query("SELECT * FROM `sh_cat`");

echo "<div class='menu'>
<b>Управление форумом</b><br/>";
while($forum=mysql_fetch_array($forum_q))
{$num_pod=mysql_num_rows(mysql_query("SELECT * FROM `sh_podcat` WHERE `refid`=$forum[id]")); 
echo "<a href='cat.php?id=$forum[id]'>$forum[name]</a> [$num_pod/$forum[tem]/$forum[post]] 
<a href='cat.php?edit=$forum[id]'>[ред]</a> | <a href='cat.php?del=$forum[id]'>[уд]</a><br/>";}

echo "<b><a href='cat.php?new=1'>Создать категорию</a></b></div>";

echo "<div class='menu'>
<a href='new.php'>Новости</a><br/>
<a href='user.php'>Пользователи</a></div>";

include("../foot.php");?>