<?
if($ku['podarok']<=$time)
{
if($ku['pod']==0)$rubies=0;
if($ku['pod']==1)$rubies=1000;
if($ku['pod']==2)$rubies=2000;
if($ku['pod']==3)$rubies=3000;
if($ku['pod']==4)$rubies=4000;
if($ku['pod']==5)$rubies=5000;
if($ku['pod']==6)$rubies=6000;
if($ku['pod']==7)$rubies=7000;
if($ku['pod']==8)$rubies=8000;
if($ku['pod']==9)$rubies=9000;
if($ku['pod']==10)$rubies=10000;
if($ku['pod']==11)$rubies=11000;
if($ku['pod']==12)$rubies=12000;
if($ku['pod']==13)$rubies=13000;
if($ku['pod']==14)$rubies=14000;
if($ku['pod']>=15)$rubies=15000;
$money=$ku['level']*100;
$rubies2=$rubies+1000;
echo "<div class='feedback'>Спасибо, что Вы играете в нашу игру. 
<br>Вам подарок: <img src='img/icons/money.png' /> <span class='title'>$money</span>".($ku['pod']!=0?" и 
<img src='img/icons/ruby.png' /> <span class='title'>$rubies</span>":null)."".($ku['pod']<15?"<br>
Завтра вы получите <img src='img/icons/ruby.png' /> <span class='title'>$rubies2</span>.":null)."
<br>Монеты в подарок выдаются каждый день.<br>Активирована <img width='16' height='16' src='img/icons/hydropinics.png' /> 
<span class='epic'>Гидропоника</span>  на <b>1</b> час</div>";
$ku['money']=plus_money($money);
$ku['rubies']=plus_rubies($rubies);
mysql_query("UPDATE `kolhoz_user` SET `hydropinics_time` = '".($ku['hydropinics_time']>$time?"".($ku['hydropinics_time']+3600)."":"".($time+3600)."")."', `hydropinics_type` = '".($ku['hydropinics_type']>=400 && $ku['hydropinics_time']>$time?"400":"".($ku['hydropinics_time']<=$time?"50":"".($ku['hydropinics_type']+50)."")."")."' WHERE `id` = '".$ku['id']."'");
mysql_query("UPDATE `kolhoz_user` SET `botanik` = '".($ku['botanik']+3600)."' WHERE `id` = '".$ku['id']."'");
mysql_query("UPDATE `kolhoz_user` SET `pod` = '".($ku['pod']+1)."' WHERE `id` = '".$ku['id']."'");
$timepod=$time+3600*24;
mysql_query("UPDATE `kolhoz_user` SET `podarok` = '$timepod' WHERE `id` = '".$ku['id']."'");
$timepodarok=$time+3600*48;
mysql_query("UPDATE `kolhoz_user` SET `timepodarok` = '$timepodarok' WHERE `id` = '$ku[id]'");
if($ku['timepodarok']<=$time)
{
mysql_query("UPDATE `kolhoz_user` SET `pod` = '0' WHERE `id` = '".$ku['id']."'");
}
}
?>