<?php
echo "<div class='center player'>Вы действительно хотите удалить этот топик?</div>";
echo "<div class='mini-line'></div>";
echo "<div class='player menuList'>";
echo "<li><a href='/delete_topic?id=$topic[id]&confirm=1'><img src='/images/icon/ok.png'>Да</a></li>";
echo "<li><a href='/topic?id=$topic[id]'><img src='/images/icon/error.png'>Нет</a></li>";
echo "</div>";
echo "<hr />";
if ($user['clan_prava'] >= '3' || $user['prava'] >= '4'){
if(isset($_GET['confirm'])) {
mysql_query("DELETE FROM `forum_comm` WHERE `id_topic` = '$topic[id]'");
mysql_query("DELETE FROM `forum_topic` WHERE `id` = '$topic[id]' LIMIT 1");
header("Location: /forum?id=$topic_razdel[id]");
$_SESSION['message'] = 'Топик удален!';
exit();
}
}else{
header("Location: /topic?id=$topic[id]");
$_SESSION['err'] = 'Недостаточно прав для удаления топика';
exit();
}
include 'topic_index.php';
?>