Просмотр файла sdark.mobi/forum/post/topic/topic_no_verh.php

Размер файла: 630B
<?
require_once '../../../core/system.php';
echo only_reg();
echo moder();
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_topic` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
$topic = mysql_fetch_array(mysql_query("SELECT * FROM `forum_topic` WHERE `id`  = '".intval($_GET['id'])."'"));
}else{
$_SESSION['err'] = "Топик не найден";
header('Location: /forum/');
exit();
}
header("Location: /forum/post/topic/$topic[id]/");
mysql_query("UPDATE `forum_topic` SET `verh` = '0' WHERE `id` = '$topic[id]' LIMIT 1");
$_SESSION['message'] = "Топик Откреплен";
exit();
?>