Файл: test.masteram.us/games/fermer/dog.php
Строк: 62
<?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']='Покупка собаки!';
include_once '../../sys/inc/thead.php';
title();
err();
$cena=10000;
include 'inc/str.php';
if(isset($_GET['add_dog']) && $user['fermer_money']>=$cena){
$t=$time+60*60*24*30;
mysql_query("UPDATE `user` SET `fermer_oput` = `fermer_oput`+ '1000' WHERE `id` = $user[id] LIMIT 1");
mysql_query("UPDATE `user` SET `fermer_money` = `fermer_money` - '".$cena."' 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 "<div class='gmenu'>n";
echo "» Покупка собаки обойдется вам в ".$cena."$!!!<br />n";
echo "» Собака живет 30 дней!!!n";
echo "</div>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'>Моя ферма</a><br/>";
echo "« <a href='index.php'>Назад</a><br/>";
echo "</div>";
include_once '../../sys/inc/tfoot.php';
?>