<?php
require '../core/system.php';
if (check(isset($_GET['page']))) {
$page = intval($_GET['page']);
}
if (isset($_GET['id'])) {
$msg = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_comm` WHERE `id` = '".intval($_GET['id'])."'"));
$topic_msg = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_topic` WHERE `id` = '".intval($msg['id_topic'])."'"));
$razdel_msg = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_razdel` WHERE `id` = '".intval($topic_msg['id_razdel'])."'"));
$parent_razdel_msg = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_razdel` WHERE `id` = '".intval($razdel_msg['attached_to'])."' AND `main_forum` = '1'"));
if ($razdel_msg['clan_forum'] == '1' || $parent_razdel_msg['clan_forum'] == '1') {
include 'include_clan_forum_topic_message_delete.php';
}elseif ($razdel_msg['clan_forum'] == '0' || $parent_razdel_msg['clan_forum'] == '0') {
include 'include_forum_topic_message_delete.php';
}else{
header("Location: /");
}
}
?>