Вход Регистрация
Файл: news/hide.php
Строк: 43
<?
include_once '../sys/inc/start.php';
include_once 
'../sys/inc/compress.php';
include_once 
'../sys/inc/db_connect.php';
include_once 
'../sys/inc/ipua.php';
include_once 
'../sys/inc/fnc.php';
include_once 
'../sys/inc/user.php';
include_once 
'../sys/inc/thead.php';
title();
only_reg();

if (!isset(
$_GET['id']) && !is_numeric($_GET['id'])){header("Location: /index.php?".SID);exit;}
if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `id` = '".intval($_GET['id'])."' LIMIT 1",$db), 0)==0){header("Location: /index.php?".SID);exit;}
if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `news_hide` WHERE `nid` = '".intval($_GET['id'])."' AND `uid` = '$user[id]' LIMIT 1",$db), 0)){header("Location: /index.php?".SID);exit;}

mysql_query("INSERT INTO `news_hide` (`nid`,`uid`) VALUES ('".intval($_GET['id'])."','$user[id]')");
header("Location: /index.php?".SID);exit;
?>
Онлайн: 2
Реклама