   : sadovnik.php  gardener.php   in!

   index.php   
include_once 'inc/uhead.php';( 19 ) 
: 
include_once 'inc/sadovnik.php';

   shop.php   : 
<ul class="block">
<li><img width="16" height="16" src="images/icons/hydropinics.png" alt="o"> <a class="epic" href="?shop=hydropinics"></a></li>
<li><img width="16" height="16" src="images/icons/scarecrow.png" alt="o"> <a class="epic" href="?shop=scarecrow"></a></li>
<li class="pt"><img width="16" height="16" src="images/icons/flowerbed.png" alt="o"> <a class="epic" href="?shop=flowerbed"></a></li>
<h2>  </h2>
<li><img width="16" height="16" src="images/icons/dig.png" alt="o"> <a class="epic" href="?shop=cultivator"></a></li>
<li><img width="16" height="16" src="images/icons/seat.png" alt="o"> <a class="epic" href="?shop=seeder"></a></li>
<li><img width="16" height="16" src="images/icons/harvest.png" alt="o"> <a class="epic" href="?shop=harvester"></a></li>
<li><img width="16" height="16" src="images/icons/water.png" alt="o"> <a class="epic" href="?shop=irregate"></a></li>
<li><img width="16" height="16" src="images/icons/soil.png" alt="o"> <a class="epic" href="?shop=soiler"></a></li>
<h2>  </h2>
<li><img width="16" height="16" src="images/icons/autoplug.png" alt="o"> <a class="epic" href="?shop=cultivator2"></a></li>
<li><img width="16" height="16" src="images/icons/seylka.png" alt="o"> <a class="epic" href="?shop=seeder2"></a></li>
<li><img width="16" height="16" src="images/icons/konveer.png" alt="o"> <a class="epic" href="?shop=harvester2"></a></li>
<h2>  </h2>
<li><img width="16" height="16" src="images/icons/prudfilter.png" alt="o"> <a class="epic" href="?shop=sponder"> </a></li>
<li><img width="16" height="16" src="images/icons/riboulovitel.png" alt="o"> <a class="epic" href="?shop=catchfish"></a></li>
<h2>  </h2>
<li><img width="16" height="16" src="images/icons/harvest.png" alt="o"> <a class="epic" href="?shop=conveyor"></a></li>
<li><img width="16" height="16" src="images/icons/plate.png" alt="o"> <a class="epic" href="?shop=fooder"></a></li>


 : 

</ul>
<h2></h2>
<ul class="block">
<li><img width="16" height="16" alt="o" src="images/icons/gardener1.png"> <a class="epic" href="?shop=gardener&id=1"></a></li>
<li><img width="16" height="16" alt="o" src="images/icons/gardener2.png"> <a class="epic" href="?shop=gardener&id=2"></a></li>
<li><img width="16" height="16" alt="o" src="images/icons/gardener3.png"> <a class="epic" href="?shop=gardener&id=3"></a></li>
</ul>



  shop.php   : 
elseif(isset($_GET['shop']) && $_GET['shop']=='scarecrow')
{
include_once 'inc/scarecrow.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=26;$vrem=3600*3;}
if($sell==3 AND $tim==2){$cena=44;$vrem=3600*6;}
if($sell==3 AND $tim==3){$cena=60;$vrem=3600*12;}
if($sell==3 AND $tim==4){$cena=76;$vrem=3600*24;}
if($sell==3 AND $tim==5){$cena=128;$vrem=3600*24*2;}
if($sell==3 AND $tim==6){$cena=166;$vrem=3600*24*3;}

if(isset($_GET['guardok']))
{
if($ku['rubies']>=$cena)
{
if($ku['gardener']==$sell)$time=$ku['garden_time'];
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;
}
}
}





    : sql.sql 


   !  +       !
    by Rostik98ua
