Файл: weed/inc/game.php
Строк: 542
<?
/*
Автор скрипта: Simptom
Сайт поддержки: http://s-klub.ru
Запрещено распространять скрипт в любом виде и под любым предлогом!
*/
if (isset($_GET['new_sad_ok']))
{
if ($user['weed_money']>=300)
{
mysql_query("UPDATE `user` SET `weed_money` = `weed_money`- '300' WHERE `id` = $user[id] LIMIT 1");
mysql_query("INSERT INTO `weed_sad` (`id_user`) VALUES ('".$user['id']."')");
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='msg'><center>";
echo '<img src="img/ok.png">';
echo "</center></td>";
echo "<td class='msg'><center>";
echo "Вы успешно расширили место для плантации!";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}else{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo "<img src='img/err.png'>";
echo "</center></td>";
echo "<td class='err'><center>";
echo "У вас недостаточно монет!";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
}
if (isset($_GET['new_sad']))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='panel'><center>";
echo "<img src='img/err.png'>";
echo "</center></td>";
echo "<td class='panel'><center>";
echo "Стоимость расширения = 300 монет!";
echo "</center></td>";
echo "</tr></table>";
if ($user['weed_money']>=300)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='panel'><center>";
echo "<a href='game.php?new_sad_ok'><b>Купить</b></a>";
echo "</center></td>";
echo "</tr></table>";
}
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>Назад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ((isset($_GET['id'])) && (isset($_GET['act'])) && ($_GET['act']=='posadit'))
{
$it=intval($_GET['id']);
$post=mysql_fetch_array(mysql_query("SELECT * FROM `weed_sad` WHERE `id` = '$it'"));
if (($post==0) || (!$post))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ошибка!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($post['id_user']!=$user['id'])
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>У вас нет семян!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($user['weed_semena']==0)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>У вас нет семян!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($post['status']!=0)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>На этой плантации уже ростут семена!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
mysql_query("UPDATE `user` SET `weed_semena`=`weed_semena`-'1' WHERE `id`='".$user['id']."'");
mysql_query("UPDATE `weed_sad` SET `status` = '1' WHERE `id` = '$post[id]' LIMIT 1");
mysql_query("UPDATE `weed_sad` SET `time` = '".time()."' WHERE `id` = '$post[id]' LIMIT 1");
$watter_time=time()+3200;
$anti_time=time()+2200;
$ydobr_time=time()+4200;
mysql_query("UPDATE `weed_sad` SET `watter_time` = '".$watter_time."' WHERE `id` = '$post[id]' LIMIT 1");
mysql_query("UPDATE `weed_sad` SET `anti_time` = '".$anti_time."' WHERE `id` = '$post[id]' LIMIT 1");
mysql_query("UPDATE `weed_sad` SET `ydobr_time` = '".$ydobr_time."' WHERE `id` = '$post[id]' LIMIT 1");
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='msg'><center>";
echo '<img src="img/ok.png">';
echo "</center></td>";
echo "<td class='msg'><center>";
echo "<b>Семена успешно посажены!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ((isset($_GET['id'])) && (isset($_GET['act'])) && ($_GET['act']=='anti'))
{
$it=intval($_GET['id']);
$post=mysql_fetch_array(mysql_query("SELECT * FROM `weed_sad` WHERE `id` = '$it' AND `id_user` = '$user[id]'"));
if (($post==0) || (!$post))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ошибка!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($post['anti_time']>time())
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
$ydobr=$post['anti_time']-time();
echo "<b>До обработки осталось: ".ost($ydobr)."!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($user['weed_money']<=149)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Стоимость обработки - 150 монет!<br />";
echo "У вас всего ".$user['weed_money']." монет!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
$anti_time=time()+2200;
mysql_query("UPDATE `weed_sad` SET `anti_time`='".$anti_time."' WHERE `id` = '$post[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `weed_money`=`weed_money`-'150' WHERE `id`='".$user['id']."'");
mysql_query("UPDATE `weed_sad` SET `anti`=`anti`+'1' WHERE `id` = '$post[id]' LIMIT 1");
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='msg'><center>";
echo '<img src="img/ok.png">';
echo "</center></td>";
echo "<td class='msg'><center>";
echo "<b>Обработка растения против паразитов прошла успешно!<br />";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ((isset($_GET['id'])) && (isset($_GET['act'])) && ($_GET['act']=='watter'))
{
$it=intval($_GET['id']);
$post=mysql_fetch_array(mysql_query("SELECT * FROM `weed_sad` WHERE `id` = '$it' AND `id_user` = '$user[id]'"));
if (($post==0) || (!$post))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ошибка!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($post['watter_time']>time())
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
$watter=$post['watter_time']-time();
echo "<b>До поливки осталось: ".ost($watter)."!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($user['weed_money']<=99)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Стоимость поливки - 100 монет!<br />";
echo "У вас всего ".$user['weed_money']." монет!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
$watter_time=time()+3200;
mysql_query("UPDATE `weed_sad` SET `watter_time`='".$watter_time."' WHERE `id` = '$post[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `weed_money`=`weed_money`-'100' WHERE `id`='".$user['id']."'");
mysql_query("UPDATE `weed_sad` SET `watter`=`watter`+'1' WHERE `id` = '$post[id]' LIMIT 1");
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='msg'><center>";
echo '<img src="img/ok.png">';
echo "</center></td>";
echo "<td class='msg'><center>";
echo "<b>Поливка растения прошла успешно!<br />";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ((isset($_GET['id'])) && (isset($_GET['act'])) && ($_GET['act']=='ydobr'))
{
$it=intval($_GET['id']);
$post=mysql_fetch_array(mysql_query("SELECT * FROM `weed_sad` WHERE `id` = '$it' AND `id_user` = '$user[id]'"));
if (($post==0) || (!$post))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ошибка!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($post['ydobr_time']>time())
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
$ydobr=$post['ydobr_time']-time();
echo "<b>До поливки осталось: ".ost($ydobr)."!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ($user['weed_money']<=199)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Стоимость удобрения - 200 монет!<br />";
echo "У вас всего ".$user['weed_money']." монет!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
$ydobr_time=time()+4200;
mysql_query("UPDATE `weed_sad` SET `ydobr_time`='".$ydobr_time."' WHERE `id` = '$post[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `weed_money`=`weed_money`-'200' WHERE `id`='".$user['id']."'");
mysql_query("UPDATE `weed_sad` SET `ydobr`=`ydobr`+'1' WHERE `id` = '$post[id]' LIMIT 1");
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='msg'><center>";
echo '<img src="img/ok.png">';
echo "</center></td>";
echo "<td class='msg'><center>";
echo "<b>Удобрение растения прошло успешно!<br />";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ((isset($_GET['id'])) && (isset($_GET['act'])) && ($_GET['act']=='info'))
{
$it=intval($_GET['id']);
$post=mysql_fetch_array(mysql_query("SELECT * FROM `weed_sad` WHERE `id` = '$it' AND `id_user` = '$user[id]'"));
if (($post==0) || (!$post))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ошибка!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
$oned3=60*60*24;
$aw3=time()-$post['time'];
$da3=floor($aw3/$oned3);
if ($da3>=16)
{
$ima3='16';
}else{
$ima3=$da3;
}
$all=$post['watter']+$post['anti']+$post['ydobr'];
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='$room'><center>";
echo "<img src='img/weed/".$ima3.".png'>";
echo "</center></td>";
echo "</tr></table>";
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='panel'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>Растёт уже: ".yzhe(time()-$post['time'])."</b><br />";
echo "</td>";
echo "</tr><tr>";
echo "<td class='panel'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>Урожай: ".$da3." шт. семян и ".$all." гр. листьев.</b><br />";
echo "</td>";
echo "</tr><tr>";
echo "<td class='panel'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>Полито: ".$post['watter']." раз(а).</b><br />";
echo "</td>";
echo "</tr><tr>";
echo "<td class='panel'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>Обработано: ".$post['anti']." раз(а).</b><br />";
echo "</td>";
echo "</tr><tr>";
echo "<td class='panel'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>Удобрено: ".$post['ydobr']." раз(а).</b><br />";
echo "</td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
if ((isset($_GET['id'])) && (isset($_GET['act'])) && ($_GET['act']=='sobrat'))
{
$it=intval($_GET['id']);
$post=mysql_fetch_array(mysql_query("SELECT * FROM `weed_sad` WHERE `id` = '$it' AND `id_user` = '$user[id]'"));
if (($post==0) || (!$post))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ошибка!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
$oned2=60*60*24;
$aw2=time()-$post['time'];
$da2=floor($aw2/$oned2);
$all2=$post['watter']+$post['anti']+$post['ydobr'];
if ($da2==0)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'><center>";
echo '<img src="img/err.png">';
echo "</center></td>";
echo "<td class='err'><center>";
echo "<b>Ваше растение еще слишком маленькое!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
mysql_query("UPDATE `user` SET `weed_semena`=`weed_semena`+'".$da2."' WHERE `id`='".$user['id']."'");
mysql_query("UPDATE `user` SET `weed_reyt`=`weed_reyt`+'1' WHERE `id`='".$user['id']."'");
mysql_query("UPDATE `user` SET `weed_list`=`weed_list`+'".$all2."' WHERE `id`='".$user['id']."'");
mysql_query("DELETE FROM `weed_sad` WHERE `id` = '$post[id]' AND `id_user` = '$user[id]' LIMIT 1");
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='msg'><center>";
echo '<img src="img/ok.png">';
echo "</center></td>";
echo "<td class='msg'><center>";
echo "<b>Урожай успешно собран!</b>";
echo "</center></td>";
echo "</tr></table>";
echo "<a href='game.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>В сад</b><br />";
echo "</td>";
echo "</tr></table></a>";
echo "<a href='index.php'><table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='navigator'>";
echo "<img src='img/weed.png' width='18' height='18'> ";
echo "<b>На главную</b><br />";
echo "</td>";
echo "</tr></table></a>";
include_once '../sys/inc/tfoot.php';
exit;
}
?>