Файл: ref.php
Строк: 27
<?php
define('PROTECTOR', 1);
$textl='REF';
include('files/path.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
include($path.'files/core.php');
$ip=htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR']));
$_GET[nick] = addslashes("$_GET[nick]");
$_GET[nick] = htmlspecialchars($_GET[nick]);
$nick = $_GET[nick];
$req = mysql_query("SELECT * FROM `ip` WHERE `ip` = '$ip'");
$ipe = mysql_fetch_array($req);
if($ipe == 0)
{
mysql_query("INSERT INTO `ip` SET `ip` = '$ip'");
$req1 = mysql_query("SELECT * FROM `users` WHERE `usr` = '$_GET[nick]'");
$eee = mysql_fetch_array($req1);
$mmm = $eee[money]+5;
mysql_query("UPDATE users SET money='$mmm' WHERE usr = '$_GET[nick]'");
header("Location: index.php?");exit;
}
if($ipe > 0)
{
header("Location: index.php?");exit;
}
echo"<div class='menu' style='text-align:center;'><a href="start.php">Чужеземцы</a></div>";
include($path.'files/end.php');
?>