Файл: vxas.ru/blacklist_add.php
Строк: 57
<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.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';
only_reg();
if (!isset($_GET['id'])){header("Location: index.php?1".SID);exit;}
$ank['id']=intval($_GET['id']);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '".mysql_real_escape_string($ank[id])."' LIMIT 1"),0)==0){header("Location: index.php?".SID);exit;}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `blacklist` WHERE (`user` = '".mysql_real_escape_string($user[id])."' AND `lol` = '".mysql_real_escape_string($ank[id])."') OR (`user` = '".mysql_real_escape_string($ank[id])."' AND `lol` = '".mysql_real_escape_string($user[id])."') LIMIT 1"),0)==1){header("Location: index.php?".SID);exit;}
if ($ank['id']==$user['id']){header("Location: index.php?".SID);exit;}
mysql_query("INSERT INTO `blacklist` (`user`, `lol`, `time`) values('".mysql_real_escape_string($user[id])."', '".mysql_real_escape_string($ank[id])."', '".mysql_real_escape_string($time)."')");
header("Location: blacklist.php?add".SID);
exit;
?>