Файл: ferma/inc/no_auth.php
Строк: 48
<?
if(isset($_GET['auth']))
{
include_once 'inc/auth.php';
}
if(isset($_GET['helpreg']))
{
include_once 'inc/help.php';
}
elseif(isset($_GET['reg_new_igrok_id_kod_4793257953389434446783278']))
{
include_once 'inc/registacions.php';
}
elseif(isset($_GET['pass']))
{
include_once 'inc/pass.php';
}
elseif(isset($_GET['rules']))
{
include_once 'inc/rules.php';
}
elseif(isset($_GET['autologin']))
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `autologin` = '".hsc($_GET['autologin'])."'"),0)!=0)
{
$_SESSION['id_user']=mysql_result(mysql_query("SELECT `id` FROM `kolhoz_user` WHERE `autologin` = '".hsc($_GET['autologin'])."'"),0);
header("Location:?myfarm&autologin=".hsc($_GET['autologin']));
exit;
}
else err_game("Неверная ссылка автологина!");
}
if (isset($_SESSION['ref']))
{
mysql_query("UPDATE kolhoz_user SET rubies = rubies + '100' WHERE id = '" . $_SESSION['ref'] . "' LIMIT 1");
mysql_query("UPDATE kolhoz_user SET rating = rating + '5000' WHERE id = '" . $_SESSION['ref'] . "' LIMIT 1");
mysql_query("UPDATE kolhoz_user SET money = money + '500000' WHERE id = '" . $_SESSION['ref'] . "' LIMIT 1");
mysql_query("INSERT INTO `referals` SET `id_user` = '".$_SESSION['ref']."', `id_ref` = '".$_SESSION['id_user']."', `time` = '".time()."'");
unset($_SESSION['ref']);
}
echo "<div></div><div></div>";
echo "<div class='content'>";
echo "<div style='text-align:center;'>";
echo "<div class='headers' style='text-align:left;'><img src='http://naferme.net/i/1/logo.jpg' align=left></div>";
echo "</div>";
echo "<div class='tobe'><font size='2' >Всегда в твоëм телефоне. <img src='http://naferme.net/i/s/58.gif' ></font></div>";
echo '<div class="g1">Онлайн игра "Мечта фермера"</div>';
echo "<div class='framed'>";
echo "<font size='2.5'>";
if (isset($_SESSION['ref']))
{
$usr_ref = mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".$_SESSION['ref']."'"));
$refu = mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `rubies` = '".$_SESSION['ref']."'"));
echo "<div class='block'>";
echo 'Вы по приглашению: '.$usr_ref['nick'].'<br />';
}
include_once 'inc/auth.php';
exit;
?>