Файл: news/out.php
Строк: 36
<?
include_once('../apahe/ini.php');
$urlup='/news/index';
$news = mysql_fetch_assoc(mysql_query("SELECT * FROM `news` WHERE `id` = '".int($_GET['id'])."'"));
$inc['title'] = 'Скрываем новость';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
if (!$news){
header ('location: /news/index.dll');
exit;
}
$news_out = mysql_result(mysql_query("SELECT COUNT(*) FROM `news-o` WHERE `id-apache` = '".int($apache['id'])."' ORDER BY `id-news` = '".int($news['id'])."'"), 0);
if($news_out==0){
mysql_query("INSERT INTO `news-o` SET `id-apache` = '".int($apache['id'])."', `id-news` = '".int($news['id'])."', `date` = '".time()."'");
header('Location: /index.dll');
}else{
header('Location: /index.dll');
}
include_once('../apahe/bottom.php');
?>