Файл: CMS/comm/comm.php
Строк: 75
<?php
define('CMS',TRUE);
require('cfg.php');
$community = get_vars('community');
if (!$community || !is_array($community)) {
$community = array();
$rows = $db->select("SELECT ?_comm_comm.*, ?_comm_category.*
FROM ?_comm_comm LEFT JOIN ?_comm_category
ON ?_comm_comm.`comm_cats_id` = ?_comm_category.`cats_id`
ORDER BY `comm_id` ASC;");
if (!empty($rows)) {
foreach($rows as $row) {
if (empty($row['comm_url'])) continue;
$community[$row['comm_url']] = $row;
}
set_vars('community', $community);
}
}
//print_r($community);
$soo = !empty($_GET['soo']) ? check($_GET['soo']) : '';
if (empty($soo)) {
$inSes->addMessage('Ошибка! Сообщество не найдено или ссылка неверна!');
redirect($config['site_url'] . '/comm/' . gen_uri('index', '', RND));
}
if (!array_key_exists($soo,$community)) {
$inSes->addMessage('Ошибка! Сообщество не найдено или ссылка неверна!');
redirect($config['site_url'] . '/comm/' . gen_uri('index', '', RND));
}
switch($mod):
case 'add_screen':
include('comm_add_screen.php');
break;
case 'add_file':
include('comm_add_file.php');
break;
case 'add_forum':
include('comm_add_forum.php');
break;
case 'add_obmen':
include('comm_add_obmen.php');
break;
case 'admins':
include('comm_admins.php');
break;
case 'edit':
include('comm_edit.php');
break;
case 'enter': case 'exit':
include('comm_enter.php');
break;
case 'rules':
include('comm_comm_rules.php');
break;
case 'chat': case 'chat_edit': case 'chat_reply': case 'chat_quote':
include('comm_chat.php');
break;
case 'files':
include('comm_files.php');
break;
case 'file':
include('comm_file.php');
break;
case 'read':
include('comm_file_read.php');
break;
case 'forum':
include('comm_forum.php');
break;
case 'topic':
include('comm_topic.php');
break;
case 'add_themes':
include('comm_add_themes.php');
break;
case 'add_posts':
include('comm_add_posts.php');
break;
case 'edit_posts':
include('comm_edit_posts.php');
break;
case 'edit_topic':
include('comm_edit_topic.php');
break;
case 'edittopic':
include('comm_edittopic.php');
break;
case 'del_topic':
include('comm_del_topic.php');
break;
case 'new_themes': case 'new_posts':
include('comm_new_forum.php');
break;
case 'quote':
include('comm_quote.php');
break;
case 'reply':
include('comm_reply.php');
break;
case 'search':
include('comm_forum_search.php');
break;
case 'top':
include('comm_new_forum.php');
break;
case 'smiles': case 'tags':
include('comm_smiles.php');
break;
case 'rss':
include('comm_forum_rss.php');
break;
case 'print':
include('comm_forum_print.php');
break;
case 'invite':
include('comm_invite.php');
break;
case 'new_users':
include('comm_new_users.php');
break;
case 'users':
include('comm_users.php');
break;
default: case 'index':
include('comm_comm.php');
break;
endswitch;
show_footer();
?>