<?
include '../config.php';
include '../func.php';
head();
ban();
/////////////////////////////
$razdel = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_razdel` WHERE `id` = '".num($_GET['razdel'])."'"));
$podforum = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_podrazdel` WHERE `id` = '".num($_GET['pod_forum'])."'"));
$theme = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_themes` WHERE `id` = '".num($_GET['theme'])."'"));
$post = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_msg` WHERE `id` = '".num($_GET['post'])."'"));

echo head . 'Чтение поста' . div . katalog;

if (empty($theme['id'])) {
    echo 'Тема не найдена';
    echo div;
    navig();
    foot();
    exit();
}

if (empty($post['id'])) {
    echo 'Пост не найден';
    echo div;
    navig();
    foot();
    exit();
}

echo smile(adminbb(parsebb(nl2br($post['msg']))));

echo '<br/ ><a href="theme.php?razdel='.$razdel['id'].'&pod_forum='.$podforum['id'].'&theme='.$themes['id'].'"><b>Вернуться в тему</b></a><br/ >';
echo div;
navig();
foot();


