Файл: public_html/element_forum_topic2.php
Строк: 31
<?php
require_once './element_options/element_options.php';
if (!$user) { header('Location: /'); exit; }
        $title = 'Форум';
    if (readcache('element_user_mesto'.$user['lost_id']) != $title) writecache('element_user_mesto'.$user['lost_id'], $title);
    if (!$id) {
        $title = 'Топик не существует';
        $error1 = 'Выбранный Вами топик не существует, или был удален';
        require_once 'element_error_page.php';
        exit;
    }
    
    $topic = mysql_fetch_array(mysql_query("SELECT * FROM `element_forum_topic_2` WHERE `lost_id` = '$id' LIMIT 1"));
    if (!$topic) {
        $title = 'Топик не существует';
        $error1 = 'Выбранный Вами топик не существует, или был удален';
        require_once 'element_error_page.php';
        exit;
    }
    
    $subforum = mysql_fetch_array(mysql_query("SELECT * FROM `element_forum_list_2` WHERE `lost_id` = '$topic[lost_subforum]' LIMIT 1"));
    
    $moderation = explode(" ", $subforum['lost_moderation']);     // Список модераторов
    $my_moder = (in_array($user['lost_id'], $moderation)) ? true : false;
    
    
    // Если раздел городской, подключаем городской, иначе общий
    if ($subforum['lost_town'] > 0) {
        require_once './element_forum/element_topic_town.php';
    } else {
        require_once './element_forum/element_topic_other.php';
    }
    require_once './element_include/element_foot_user_true.php';
?>