<?php
if($ku['action_time']>$time)$skidka = 1;
if(isset($_GET['shop']) && $_GET['shop']==NULL)
{
require_header ('Магазин');
echo "<div class='content'>";

echo '<div>
<ul class="block">
<li><img width="16" height="16" src="images/icons/hydropinics.png" alt=""> <a class="epic" href="/shop-hydropinics">Гидропоника</a></li>
<li><img width="16" height="16" src="images/icons/scarecrow.png" alt=""> <a class="epic" href="/shop-scarecrow">Пугало</a></li>
<li><img width="16" height="16" src="images/icons/dog.png" alt=""> <a class="epic" href="/shop-dog">Собака</a></li>
<li class="pt"><img width="16" height="16" src="images/icons/flowerbed.png" alt=""> <a class="epic" href="/shop-flowerbed">Клумба</a></li>
<li><img width="16" height="16" src="images/icons/dig.png" alt=""> <a class="epic" href="/shop-cultivator">Культиватор</a></li>
<li><img width="16" height="16" src="images/icons/seat.png" alt=""> <a class="epic" href="/shop-seeder">Сеялка</a></li>
<li><img width="16" height="16" src="images/icons/harvest.png" alt=""> <a class="epic" href="/shop-harvester">Комбайн</a></li>
<li><img width="16" height="16" src="images/icons/water.png" alt=""> <a class="epic" href="/shop-irregate">Ороситель</a></li>
<li><img width="16" height="16" src="images/icons/soil.png" alt=""> <a class="epic" href="/shop-soiler">Удобритель</a></li>
<li class="pt"><img width="16" height="16" src="images/icons/harvest.png" alt=""> <a class="epic" href="/shop-conveyor">Конвейер</a></li>
<li><img width="16" height="16" src="images/icons/plate.png" alt=""> <a class="epic" href="/shop-fooder">Кормушка</a></li>';

/////////echo '<li class="pt"><li><img width="16" height="16" src="images/icons/riboulovitel.png" alt=""> <a class="epic" href="/shop-catchfish">Рыбоуловитель</a></li>
/////<li><img width="16" height="16" src="images/icons/prudfilter.png" alt=""> <a class="epic" href="/shop-sponder">Пруд фильтр</a></li>';

if($ku['level']>=45){echo '<li class="pt"><li><img width="16" height="16" src="images/icons/truck_empty.png" alt=""> <a class="epic" href="/shop-avtoconveyor">Автоконвейер</a></li>
<li><img width="16" height="16" src="images/icons/autosoil.png" alt=""> <a class="epic" href="/shop-avtofooder">Авто-удобритель</a></li>';}

if($ku['level']>=20){echo'<li class="pt"><li><img width="16" height="16" src="images/icons/dig2.png" alt=""> <a class="epic" href="/shop-cultivator2">Пылесос</a></li>
<li><img width="16" height="16" src="images/icons/seeder2.png" alt=""> <a class="epic" href="/shop-seeder2">Поставилка</a></li>
<li><img width="16" height="16" src="images/icons/har2.png" alt=""> <a class="epic" href="/shop-harvester2">Комбайн Дон</a></li>
';}

if($ku['level']>=40){echo '<li class="pt"><li><img width="16" height="16" src="images/icons/avtofooder.png" alt=""> <a class="epic" href="/shop-fishfooder">Автокормушка</a></li>
<li><img width="16" height="16" src="images/icons/avtokonveer.png" alt=""> <a class="epic" href="/shop-autocrane">Автопогрузчик</a></li>
<li><img width="16" height="16" src="images/fish/ss-hrvst.png" alt=""> <a class="epic" href="/shop-incubator">Инкубатор</a></li>';}

?>
</ul>
<h2>Садовники</h2>
<ul class="block">
<li><img width="16" height="16" alt="*" src="/images/
icons/gardener1.png"> <a class="epic" href="/shop-
gardener/id-1">Молчан</a></li>
<li><img width="16" height="16" alt="*" src="/images/
icons/gardener2.png"> <a class="epic" href="/shop-
gardener/id-2">Казимир</a></li>
<li><img width="16" height="16" alt="*" src="/images/
icons/gardener3.png"> <a class="epic" href="/shop-
gardener/id-3">Ярило</a></li>
</ul>
<?
echo'
<h2>Работники</h2>
<ul class="block">

<li><img width="16" height="16" alt="*" src="/images/
icons/cook.png"> '.($ku['level']>=20?'<a class="epic" href="/shop-
worker/id-1">Дарья</a>':'Дарья').'</li>
<li><img width="16" height="16" alt="*" src="/images/
icons/fisherman.png"> '.($ku['level']>=40?'<a class="epic" href="/shop-
worker/id-2">Трофим</a>':'Трофим').'</li>
<li><img width="16" height="16" alt="*" src="/images/
icons/changer.png"> <a class="epic" href="/shop-
worker/id-3">Семён</a></li>

</ul>
';
?>
<h2>Вертолёты</h2>
<ul class="block">
<li><img width="16" height="16" alt="*" src="images/icons/heli1n.png"> <a class="epic" href="shop-helicopter/1">Шмель</a></li>
<li><img width="16" height="16" alt="*" src="images/icons/heli2n.png"> <a class="epic" href="shop-helicopter/2">Ястреб</a></li>
<li><img width="16" height="16" alt="*" src="images/icons/heli3n.png"> <a class="epic" href="shop-helicopter/3">Дракон</a></li>
<li><img width="16" height="16" alt="*" src="images/icons/heli4n.png"> <a class="epic" href="shop-helicopter/4">Гром</a></li>
</ul>
<h2>Разное</h2>
<ul class="block">
<li><img width="16" height="16" src="/images/icon/4.png" alt="*"> <a href="icon">Иконки</a></li>
<?
/*<li><img width="16" height="16" src="images/icons/seat.png" alt="*"> <a href="?help=plants">Семена</a></li>
<li><img width="16" height="16" src="images/icons/soil.png" alt="*"> <a href="?help=soils">Удобрения</
a></li>
<li><img width="16" height="16" src="images/icons/animal.png" alt="*"> <a href="?help=animals">Животные</a></li>

<li><img width="16" height="16" src="/images/icons/
addition.png" alt="*"> <a href="shop/
additions">Кулинария</a></li>
*/
?>
</ul>
</div>
<?
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='hydropinics')
{
include_once 'inc/hydropinics.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='scarecrow')
{
include_once 'inc/scarecrow.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='dog')
{
include_once 'inc/dog.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='iconka')
{
include_once 'inc/iconka.php';
include_once 'inc/foot.php';
}
//САДОВНИКИ///////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='gardener')
{
if(!isset($_GET['sell'])){
include_once 'inc/gardener.php';
include_once 'inc/foot.php';}
else{
$sell=intval($_GET['sell']);
$tim=intval($_GET['tim']);
if($sell==1 AND $tim==1){$cena=3;$vrem=3600*3;}
if($sell==1 AND $tim==2){$cena=5;$vrem=3600*6;}
if($sell==1 AND $tim==3){$cena=7;$vrem=3600*12;}
if($sell==1 AND $tim==4){$cena=10;$vrem=3600*24;}
if($sell==1 AND $tim==5){$cena=17;$vrem=3600*24*2;}
if($sell==1 AND $tim==6){$cena=22;$vrem=3600*24*3;}

if($sell==2 AND $tim==1){$cena=7;$vrem=3600*3;}
if($sell==2 AND $tim==2){$cena=11;$vrem=3600*6;}
if($sell==2 AND $tim==3){$cena=15;$vrem=3600*12;}
if($sell==2 AND $tim==4){$cena=19;$vrem=3600*24;}
if($sell==2 AND $tim==5){$cena=32;$vrem=3600*24*2;}
if($sell==2 AND $tim==6){$cena=41;$vrem=3600*24*3;}

if($sell==3 AND $tim==1){$cena=36;$vrem=3600*3;}
if($sell==3 AND $tim==2){$cena=54;$vrem=3600*6;}
if($sell==3 AND $tim==3){$cena=70;$vrem=3600*12;}
if($sell==3 AND $tim==4){$cena=96;$vrem=3600*24;}
if($sell==3 AND $tim==5){$cena=148;$vrem=3600*24*2;}
if($sell==3 AND $tim==6){$cena=196;$vrem=3600*24*3;}

if(isset($_GET['guardok']))
{
if($ku['cultivator']<=0 OR $ku['seeder']<=0 OR $ku['harvester']<=0 OR $ku['irregate']<=0 OR $ku['soiler']<=0){
echo "<div class='event'><h1>Магазин</h1></div><div class='content'>";
echo'Садовников можно покупать только тогда, когда куплена техника для грядок.<br/><div class="pt">
<img width="16" height="16" src="images/icons/cart.png" alt="*"><a href="/shop">В магазин</a>';
include_once 'inc/foot.php';
exit;
}
if($ku['garden_time']+$vrem>$time+86400*3){
echo "<div class='event'><h1>Магазин</h1></div><div class='content'>";
echo'Садовника можно нанять максимум на 3 суток.<br/><div class="pt">
<img width="16" height="16" src="images/icons/cart.png" alt="*"><a href="/shop">В магазин</a>';
include_once 'inc/foot.php';
exit;
}
if(!empty($conf['garden'])){
echo "<div class='event'><h1>Магазин</h1></div><div class='content'>";
echo'Сначала активируйте уволенного садовника.<br/><div class="pt">
<img width="16" height="16" src="images/icons/cart.png" alt="*"><a href="/shop">В магазин</a>';
include_once 'inc/foot.php';
exit;
}
if($ku['rubies']>=$cena)
{
if($ku['gardener']==$sell)$time=$ku['garden_time'];
$hours = floor($vrem/3600);
mysql_query("UPDATE `kolhoz_setting` SET `garden_dost_count` = '".($conf['garden_dost_count']+$hours)."' WHERE `id_user` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `gardener` = '$sell',`rubies` = '".($ku['rubies']-$cena)."',`garden_time`='$time'+'$vrem' WHERE `id` = '$ku[id]'");
$_SESSION['msg']='Садовник успешно куплен';
}
else
{
$rm=$cena-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-gardener/id-$sell");
}else{
echo podtv("?shop=gardener&sell=$sell&tim=$tim&guardok","/shop-gardener/id-$sell");
include_once 'inc/foot.php';
exit;
}
}
}
/////////Работники///////////////////////////////////////////////////////////////////

elseif(isset($_GET['shop']) && $_GET['shop']=='worker')
{
if(!isset($_GET['sell'])){
include_once 'inc/worker.php';
include_once 'inc/foot.php';}
else{
$sell=intval($_GET['sell']);

if($sell==1){$tables='darja_time';$tables2='darja_leave';}
if($sell==2){$tables='trofim_time';$tables2='trofim_leave';}
if($sell==3){$tables='semen_time';$tables2='semen_leave';}
$tim=intval($_GET['tim']);
if($sell==1 AND $tim==1){$cena=14;$vrem=3600*3;}
if($sell==1 AND $tim==2){$cena=26;$vrem=3600*6;}
if($sell==1 AND $tim==3){$cena=50;$vrem=3600*12;}
if($sell==1 AND $tim==4){$cena=76;$vrem=3600*24;}
if($sell==1 AND $tim==5){$cena=128;$vrem=3600*24*2;}
if($sell==1 AND $tim==6){$cena=166;$vrem=3600*24*3;}

if($sell==2 AND $tim==1){$cena=26;$vrem=3600*3;}
if($sell==2 AND $tim==2){$cena=44;$vrem=3600*6;}
if($sell==2 AND $tim==3){$cena=60;$vrem=3600*12;}
if($sell==2 AND $tim==4){$cena=76;$vrem=3600*24;}
if($sell==2 AND $tim==5){$cena=128;$vrem=3600*24*2;}
if($sell==2 AND $tim==6){$cena=166;$vrem=3600*24*3;}

if($sell==3 AND $tim==1){$cena=3;$vrem=3600*3;}
if($sell==3 AND $tim==2){$cena=5;$vrem=3600*6;}
if($sell==3 AND $tim==3){$cena=7;$vrem=3600*12;}
if($sell==3 AND $tim==4){$cena=10;$vrem=3600*24;}
if($sell==3 AND $tim==5){$cena=15;$vrem=3600*24*2;}
if($sell==3 AND $tim==6){$cena=20;$vrem=3600*24*3;}

if(isset($_GET['guardok']))
{
if($ku['keytime']<$time AND $sell==1){
echo "<div class='event'><h1>Магазин</h1></div><div class='content'>";
echo'Работника можно купить только когда активен погреб.<br/><div class="pt">
<img width="16" height="16" src="images/icons/cart.png" alt="*"><a href="/shop">В магазин</a>';
include_once 'inc/foot.php';
exit;
}
if($ku[''.$tables.'']+$vrem>$time+86400*5){
echo "<div class='event'><h1>Магазин</h1></div><div class='content'>";
echo'Работников можно покупать максимум на 5 дней.<br/><div class="pt">
<img width="16" height="16" src="images/icons/cart.png" alt="*"><a href="/shop">В магазин</a>';
include_once 'inc/foot.php';
exit;
}
if(!empty($ku[''.$tables2.''])){
echo "<div class='event'><h1>Магазин</h1></div><div class='content'>";
echo'Сначала активируйте уволенного работника.<br/><div class="pt">
<img width="16" height="16" src="images/icons/cart.png" alt="*"><a href="/shop">В магазин</a>';
include_once 'inc/foot.php';
exit;
}
if($ku['rubies']>=$cena)
{
if($ku[$tables]>$time)$time = $ku[$tables];
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-$cena)."',`$tables`='$time'+'$vrem' WHERE `id` = '$ku[id]'");
$_SESSION['msg']='Работник успешно куплен';
}
else
{
$rm=$cena-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-worker/id-$sell");
}else{
echo podtv("/shop-worker/sell-$sell/tim-$tim/guardok","/shop-worker/id-$sell");
include_once 'inc/foot.php';
exit;}
/////////////////////////////////Конец///////////////////////////////////////////////
}
}
//////////////////////////////////Клумба///////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='flowerbed')
{
$lr=rl($ku['flowerbed']);
$lrl=$ku['flowerbed']+1;
$lkn=$ku['flowerbed'];
if($ku['flowerbed']==0)$lr=100;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `flowerbed` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-flowerbed");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['flowerbed']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Клумба</span>".($ku['flowerbed']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-flowerbed'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-flowerbed'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/flowerbed.php';
include_once 'inc/foot.php';
}
//////////////////////////////////////////Культиватор///////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='cultivator')
{
$lr=rl($ku['cultivator']);
$lrl=$ku['cultivator']+1;
$lkn=$ku['cultivator'];
if($ku['cultivator']==0)$lr=50;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `cultivator` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-cultivator");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['cultivator']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Культиватор</span>".($ku['cultivator']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-cultivator'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-cultivator'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/cultivators.php';
include_once 'inc/foot.php';
}
/////////////////////////////////////Сеялка//////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='seeder')
{
$lr=rl($ku['seeder']);
$lrl=$ku['seeder']+1;
$lkn=$ku['seeder'];
if($ku['seeder']==0)$lr=100;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `seeder` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-seeder");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['seeder']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Сеялка</span>".($ku['seeder']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-seeder'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-seeder'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/seeder.php';
include_once 'inc/foot.php';
}
//////////////////////////////////Комбаин////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='harvester')
{
$lr=rl($ku['harvester']);
$lrl=$ku['harvester']+1;
$lkn=$ku['harvester'];
if($ku['harvester']==0)$lr=100;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `harvester` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-harvester");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['harvester']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Комбайн</span>".($ku['harvester']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-harvester'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-harvester'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/harvester.php';
include_once 'inc/foot.php';
}
/////////////////////////////////////////////////Рыбоуловитель///////////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='catchfish')
{
$lr=rl($ku['catchfish']);
$lrl=$ku['catchfish']+1;
$lkn=$ku['catchfish'];
if($ku['catchfish']==0)$lr=100;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `catchfish` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-catchfish");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['harvester']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Рыбоуловитель</span>".($ku['catchfish']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-catchfish'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-catchfish'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/catchfisher.php';
include_once 'inc/foot.php';
}
/////////////////////////////////////////////////Пруд Фильтр///////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='sponder')
{
$lr=rl($ku['sponder']);
$lrl=$ku['sponder']+1;
$lkn=$ku['sponder'];
if($ku['sponder']==0)$lr=50;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `sponder` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-sponder");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['cultivator']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Пруд фильтр</span>".($ku['cultivator']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-sponder'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-sponder'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/sponders.php';
include_once 'inc/foot.php';
}
///////////////////////////////////Ороситель/////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='irregate')
{
$lr=rl($ku['irregate']);
$lrl=$ku['irregate']+1;
if($ku['irregate']==0)$lr=50;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
$lkn=$ku['irregate'];
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `irregate` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-irregate");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['irregate']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Ороситель</span>".($ku['irregate']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-irregate'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-irregate'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/irregate.php';
include_once 'inc/foot.php';
}
///////////////////////////////////////Удобритель////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='soiler')
{
$lr=rl($ku['soiler']);
$lrl=$ku['soiler']+1;
$lkn=$ku['soiler'];
if($ku['soiler']==0)$lr=50;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `soiler` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-soiler");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['soiler']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Удобритель</span>".($ku['soiler']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-soiler'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-soiler'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/soiler.php';
include_once 'inc/foot.php';
}
////////////////////////////////////////Конвеер///////////////////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='conveyor')
{
$lr=rl($ku['conveyor']);
$lrl=$ku['conveyor']+1;
$lkn=$ku['conveyor'];
if($ku['conveyor']==0)$lr=100;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `conveyor` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-conveyor");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['conveyor']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Конвеер</span>".($ku['conveyor']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-conveyor'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-conveyor'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/conveyor.php';
include_once 'inc/foot.php';
}
//////////////////////////////////////Кормушка//////////////////////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='fooder')
{
$lr=rl($ku['fooder']);
$lrl=$ku['fooder']+1;
$lkn=$ku['fooder'];
if($ku['fooder']==0)$lr=100;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `fooder` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-fooder");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['fooder']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Кормушка</span>".($ku['fooder']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-fooder'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-fooder'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/fooder.php';
include_once 'inc/foot.php';
}
///////////////////////////ТЕХНИКА ДЛЯ САДА///////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='avtoconveyor')
{
$lr=rl3($ku['avtoconveyor']);
$lrl=$ku['avtoconveyor']+1;
$lkn=$ku['avtoconveyor'];
if($ku['avtoconveyor']==0)$lr=300;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `avtoconveyor` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-avtoconveyor");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['avtoconveyor']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Автоконвеер</span>".($ku['avtoconveyor']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-avtoconveyor'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-avtoconveyor'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/avtoconveyor.php';
include_once 'inc/foot.php';
}
/////////////////////////////////////////////////Автокормушка////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='avtofooder')
{
$lr=rl3($ku['avtofooder']);
$lrl=$ku['avtofooder']+1;
$lkn=$ku['avtofooder'];
if($ku['avtofooder']==0)$lr=300;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `avtofooder` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-avtofooder");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['avtofooder']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Авто-удобритель</span>".($ku['avtofooder']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-avtofooder'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-avtofooder'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/avtofooder.php';
include_once 'inc/foot.php';
}

///////////////////////////////////Пылесос///////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='cultivator2')
{
$lr=rl2($ku['cultivator2']);
$lrl=$ku['cultivator2']+1;
$lkn=$ku['cultivator2'];
if($ku
['cultivator2']==0)$lr=150;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `cultivator2` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-cultivator2");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['cultivator2']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Пылесоса</span>".($ku['cultivator']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-cultivator2'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-cultivator2'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/sellar/cultivators2.php';
include_once 'inc/foot.php';
}
////////////////////////////////////////////////Поставилка////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='seeder2')
{
$lr=rl3($ku['seeder2']);
$lrl=$ku['seeder2']+1;
$lkn=$ku['seeder2'];
if($ku['seeder2']==0)$lr=200;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `seeder2` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-seeder2");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['seeder2']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Ставилка</span>".($ku['seeder2']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-seeder2'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-seeder2'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/sellar/seeder2.php';
include_once 'inc/foot.php';
}
////////////////////////////////////////////////////Комбайн Дон////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='harvester2')
{
$lr=rl3($ku['harvester2']);
$lrl=$ku['harvester2']+1;
$lkn=$ku['harvester2'];
if($ku['harvester2']==0)$lr=200;
if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `harvester2` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-harvester2");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['harvester2']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Комбайн (Дон)</span>".($ku['harvester2']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-harvester2'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-harvester2'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/sellar/harvester2.php';
include_once 'inc/foot.php';
}
/////////////////////////////////////////////ТЕХНИКА ДЛЯ ПРУДОВ///////////////////////////////////////
///////////////////////////////////////////////Автокормушка///////////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='fishfooder')
{
$lr=500;
if($ku['fishfooder']==12)$lr=1000;
else if($ku['fishfooder']>12)$lr=2000;
$lrl=$ku['fishfooder']+1;
$lkn=$ku['fishfooder'];

if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `fishfooder` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-fishfooder");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['fishfooder']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Автокормушки</span>".($ku['fishfooder']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-fishfooder'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-fishfooder'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/mypool/fishfooder.php';
include_once 'inc/foot.php';
}
//////////////////////////////////////////////////////Автопогрузчик////////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='autocrane')
{
$lr=500;
if($ku['autocrane']==12)$lr=1000;
else if($ku['autocrane']>12)$lr=2000;
$lrl=$ku['autocrane']+1;
$lkn=$ku['autocrane'];

if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `autocrane` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-autocrane");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['autocrane']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Автопогрузчика</span>".($ku['autocrane']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-autocrane'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-autocrane'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/mypool/autocrane.php';
include_once 'inc/foot.php';
}
////////////////////////////////////////////////////////Инкубатаор///////////////////////////////////////////////////////
elseif(isset($_GET['shop']) && $_GET['shop']=='incubator')
{
$lr=500;
if($ku['incubator']==12)$lr=1000;
else if($ku['incubator']>12)$lr=2000;
$lrl=$ku['incubator']+1;
$lkn=$ku['incubator'];

if(isset($skidka) AND $skidka==1)$lr=round($lr/2);
if(isset($_GET['level']) && $lkn<20)
{
if(isset($_GET['ok']))
{
if($ku['rubies']>=$lr)
{
mysql_query("UPDATE `kolhoz_user` SET `incubator` = '$lrl',`rubies` = '".($ku['rubies']-$lr)."' WHERE `id` = '$ku[id]'");
}
else
{
$rm=$lr-$ku['rubies'];
$_SESSION['no_rubies']=$rm;
}
header("Location:/shop-incubator");
}
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><ul class='block'><li><span>".($ku['fishfooder']==0?"Покупка":"Прокачка")."</span>: <span><span class='epic'>Инкубатора</span>".($ku['incubator']>0?", повышение уровня до $lrl":null)."</span><br/><span>цена</span>: <span><img width='16' height='16' src='images/icons/ruby.png' alt='*'> <span class='title'>$lr</span></span></li><li class='pt'><img alt='*' width='16' height='16' src='images/icons/tick.png'> <a href='/level/ok/shop-incubator'><span>Да, подтверждаю</span></a></li><li><img alt='*' width='16' height='16' src='images/icons/cross.png'> <a href='/shop-incubator'><span>Нет, отказываюсь</span></a></li></ul>";
}
else include_once 'inc/mypool/incubator.php';
include_once 'inc/foot.php';
}

//////////////////////////////////////////////////////////КОНЕЦ///////////////////////////////////////////////////////////////////

elseif(isset($_GET['shop']) && $_GET['shop']=='helicopter' && isset($_GET['1']))
{
include_once 'inc/vert1.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='helicopter' && isset($_GET['2']))
{
include_once 'inc/vert2.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='helicopter' && isset($_GET['3']))
{
include_once 'inc/vert3.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='helicopter' && isset($_GET['4']))
{
include_once 'inc/vert4.php';
include_once 'inc/foot.php';
}
elseif(isset($_GET['shop']) && $_GET['shop']=='helicopter' && isset($_GET['5']))
{
include_once 'inc/vert5.php';
include_once 'inc/foot.php';
}
?>