Файл: waphero.ru/forum/post/topic/topic_verh.php
Строк: 7
<?
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_assoc(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` = '1' WHERE `id` = '$topic[id]' LIMIT 1");
$_SESSION['message'] = "Топик Прикреплен!";
exit();
?>