Файл: soo/forum/index.php
Строк: 46
<?
require'../../config.php';
$align='left';
$title='Форум';
aut();
head();
$soo=trim($_GET['soo']);
$comm = mysql_fetch_array(mysql_query('SELECT * FROM `community_comm` WHERE `id` = '.$soo.' LIMIT 1'));
$admin = mysql_fetch_array(mysql_query("SELECT * FROM `community_user_incomm` WHERE `cid` = '$soo' AND `uid` = '".$user['id']."'"));
if(!isset($user)){
echo '<div class="err">Гостям вход запрещён.</div>';
}else if($soo==0 || $soo<0){
echo '<div class="err">Иди нахуй! Хакер недоношеный!</div>';
}else if($soo!=$comm['id']){
echo '<div class="err">Сообщество не найдено.</div>';
}else if(mysql_result(mysql_query("SELECT COUNT(*) FROM `comm_ban` WHERE `id_user` = '$user[id]' AND `id_comm` = '$soo' AND `time` > '$time'"), 0)!=0){
header('Location: ban.php?id='.$soo);
}else{
$fid = check(intval($_GET['fid']));
$page = check(intval($_GET['page']));
who_add($fid,$mod);
echo '<a name="up"></a>';
//$rid = check(intval($_GET['rid']));
//$tid = check(intval($_GET['tid']));
//$mid = check(intval($_GET['mid']));
$uchas = mysql_result(mysql_query("SELECT COUNT(uid) FROM `community_user_incomm` where `uid` = '$user[id]' AND `activate` = 1 AND `cid` = '$soo'"),0);
if($comm['status']==2 or $comm['status']==1 && $uchas){
switch ($mod)
{
default :
require_once'inc/index.php';
break;
case 'razdel':
require_once'inc/razdel.php';
break;
case 'temes':
require_once'inc/temes.php';// Вывод тем
break;
case 'addtem':
require_once'inc/addtem.php';//Создаем тему
break;
case 'tema':
require_once'inc/tema.php';//Тема
break;
case 'addpost':
require_once'inc/addpost.php';//Пишем сообщение
break;
case 'read':
require_once'inc/read.php';
break;
case 'editp':
require_once'inc/editp.php';
break;
case 'cit':
require_once'inc/cit.php';
break;
case 'files':
require_once'inc/files.php';
break;
case 'down':
require_once'inc/down.php';
break;
case 'bookmarks':
require_once'inc/bookmarks.php';
break;
}
}
//if ($mod!='tema')echo '<br /><dl><dt></dt></dl>';
echo '<a href="/forum/nastroiki?">Настройки</a> | <a href="/soo/soo.php?act=rules&soo='.$soo.'">Правила</a> | <a href="/forum/bbcode?soo='.$soo.'">BBcode</a> | <a href="'.H.'smiles/?soo='.$soo.'">Смайлы</a> | <a href="search?soo='.$soo.'">Поиск</a>';
//if ($mod=='tema')echo ' | <a href="who/tema/'.$id.'"">Кто тут?</a>';
echo '<br /><dl><dt></dt></dl>';
}
foot();
?>