<?
if(isset($_GET['gos']))
{
if(isset($mc))
{
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$gos[id_plant]' AND (`level` = '$ku[level]' OR `level` < '$ku[level]')"),0)!=0)
mysql_querll("UPDATE `kolhoz_user` SET `last_plant` = '$gos[id_plant]' WHERE `id` = '$ku[id]'");
header("Location:?myfarm");
exit;
}
else err_game("Для начала вступите в колхоз.");
}

include_once 'inc/change_plant.php';
include_once 'inc/change_soil.php';
include_once 'inc/cultivator_all.php';
include_once 'inc/cultivator.php';
include_once 'inc/harvest_all.php';
include_once 'inc/harvest.php';
include_once 'inc/seat_all.php';
include_once 'inc/soil_all.php';
include_once 'inc/soil.php';
include_once 'inc/water_all.php';
include_once 'inc/water.php';
include_once 'inc/clean_grounds.php';
include_once 'inc/new_ground.php';
include_once 'inc/seat.php';

if(isset($_SESSION['cp'])){echo "<div class='feedback'><ul class='feedbackPanel'><li class='feedbackPanelINFO'><span class='feedbackPanelINFO'>Бесплатная очистка грядок будет доступна через ".time_left($ku['time_cp']-$time)."</span></li></ul></div>";unset($_SESSION['cp']);}

echo "<div class='event'><h1>Грядки</h1></div>";
echo "<div class='content'>";
echo "<div class='block'>";

//свернуть грядки
if(isset($_GET['myfarm']) && $_GET['myfarm']=='sv'){
mysql_querll("UPDATE `kolhoz_user` SET `sv` = '1' WHERE `id` = '$ku[id]'");
header("Location:?myfarm");}
if(isset($_GET['myfarm']) && $_GET['myfarm']=='rv'){
mysql_querll("UPDATE `kolhoz_user` SET `sv` = '0' WHERE `id` = '$ku[id]'");
header("Location:?myfarm");}

//Компактный вид
if(isset($_GET['vidok'])){
mysql_query("UPDATE `kolhoz_user` SET `vidok` = '".($ku['vidok']==1?"0":"1")."' WHERE `id` = '$ku[id]'");
header("Location:?myfarm");}

echo "<div class='block'>".($ku['vidok']==0?"<a href='?myfarm&vidok'>Компактный вид <img width='16' height='16' src='img/icons/right.png' alt='o'></a>":"<a href='?myfarm&vidok'><img width='16' height='16' src='img/icons/left.png' alt='o'>")."</a> ";
if($ku['vidok']==1){
echo "<a href='?myfarm&reflesh=".rand(99999,99999999)."'><img width='16' height='16' src='img/icons/obmen.png' alt='o'></a> ";
if($ku['hydropinics_time']>$time)echo "<a class='epic' href='?shop=hydropinics'><img width='16' height='16' src='img/icons/hydropinics.png' alt='o'></a> ";
if($ku['vetriak_time']>$time)echo "<a class='epic' href='?shop=vetriak'><img width='16' height='16' src='img/vetriak.png' alt='o'></a> ";
if($ku['scarecrow_time']>$time)echo "<a class='epic' href='?shop=scarecrow'><img width='16' height='16' src='img/icons/scarecrow.png' alt='o'></a> ";
if($ku['time_shmel']>$time)echo "<a class='epic' href='?shop=helicopter&1'><img width='16' height='16' alt='o' src='img/icons/heli1n.png'></a> ";
if($ku['time_yastreb']>$time)echo "<a class='epic' href='?shop=helicopter&2'><img width='16' height='16' alt='o' src='img/icons/heli2n.png'></a> ";
if($ku['time_drakon']>$time)echo "<a class='epic' href='?shop=helicopter&3'><img width='16' height='16' alt='o' src='img/icons/heli3n.png'></a> ";
if($ku['garden_time']>$time)echo "<a class='epic' href='?shop=gardener&id=".$ku['gardener']."'><img width='16' height='16' alt='' src='img/icons/gardener".$ku['gardener'].".png'></a> ";
}
echo "</div>";
if($ku['vidok']==0){
echo "<a href='?myfarm&reflesh=".rand(99999,99999999)."'><div class='block'><img width='16' height='16' src='img/icons/obmen.png' alt='o'> Обновить</a></div>";
if($ku['garden_time']>$time)echo "<a class='epic' href='?shop=gardener&id=".$ku['gardener']."'><div class='block'><img width='16' height='16' alt='' src='img/icons/gardener".$ku['gardener'].".png'> Садовник ".$name."</a><span class='minor'> <span>".time_left($ku['garden_time']-$time)."</span></span></div>";
if($ku['hydropinics_time']>$time)echo "<a class='epic' href='?shop=hydropinics'><div class='block'><img width='16' height='16' src='img/icons/hydropinics.png' alt='o'> Гидропоника</a> <span class='minor'> <b>$ku[hydropinics_type]%</b> <span>".time_left($ku['hydropinics_time']-$time)."</span></span></div>";
if($ku['scarecrow_time']>$time)echo "<a class='epic' href='?shop=scarecrow'><div class='block'><img width='16' height='16' src='img/icons/scarecrow.png' alt='o'> Пугало</a><span class='minor'> <span>".time_left($ku['scarecrow_time']-$time)."</span></span></div>";
if($ku['vetriak_time']>$time)echo "<a class='epic' href='?shop=vetriak'><div class='block'><img width='16' height='16' src='img/vetriak.png' alt='o'> Ветряк</a><span class='minor'> <span>".time_left($ku['vetriak_time']-$time)."</span></span></div>";
if($ku['time_shmel']>$time)echo "<a class='epic' href='?shop=helicopter&1'><div class='block'><img width='16' height='16' src='img/icons/heli1n.png' alt='o'> Шмель</a> <span class='minor'> <span>".time_left($ku['time_shmel']-$time)."</span></span></div>";
if($ku['time_yastreb']>$time)echo "<a class='epic' href='?shop=helicopter&2'><div class='block'><img width='16' height='16' src='img/icons/heli2n.png' alt='o'> Ястреб</a><span class='minor'> <span>".time_left($ku['time_yastreb']-$time)."</span></span></div>";
if($ku['time_drakon']>$time)echo "<a class='epic' href='?shop=helicopter&3'><div class='block'><img width='16' height='16' src='img/icons/heli3n.png' alt='o'> Дракон</a><span class='minor'> <span>".time_left($ku['time_drakon']-$time)."</span></span></div>";
}

//Массовые действия
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND (`time` < '$time' OR `time` = '$time') AND `id_plant` != '0'"),0)!=0 && $ku['harvester']>0)echo "<a href='?myfarm&harvest_all'><div class='block'><img width='16' height='16' src='img/icons/harvest.png' alt='o'> Собрать все</a></div>";
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND `soil` = '0' AND (`time_soil` = '$time' OR `time_soil` < '$time') AND `id_plant` != '0' AND `time` > '$time'"),0)!=0 && $ku['soiler']>0)echo "<a href='?myfarm&soil_all'><div class='block'><img width='16' height='16' src='img/icons/soil.png' alt='o'> Удобрить все</a></div>";
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND `id_plant` != '0' AND (`time_water` = '$time' OR `time_water` < '$time') AND `time` > '$time' AND (`soil` = '0' AND `time_soil` > '$time' OR `soil` = '1')"),0)!=0 && $ku['irregate']>0)echo "<a href='?myfarm&water_all'><div class='block'><img width='16' height='16' src='img/icons/water.png' alt='o'> Полить все</a></div>";
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND `id_plant` = '0' AND `cultivator` = '1'"),0)!=0 && $ku['seeder']>0)echo "<a href='?myfarm&seat_all'><div class='block'><img width='16' height='16' src='img/icons/seat.png' alt='o'> Засадить все</a></div>";
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND `id_plant` = '0' AND (`time` = '$time' OR `time` < '$time') AND `cultivator` = '0'"),0)!=0 && $ku['cultivator']>0)echo "<a href='?myfarm&cultivator_all'><div class='block'><img width='16' height='16' src='img/icons/dig.png' alt='o'> Вскопать все</a></div>";

//Кнопки СВЕРНУТЬ и РАЗВЕРНУТЬ
echo "<div class='block'>".($ku['sv']==0?"<img width='16' height='16' src='img/icons/up.png' alt='o'> <a href='?myfarm=sv'><font color='violet'>Свернуть</font></a>":"<img width='16' height='16' src='img/icons/down.png' alt='o'> <a href='?myfarm=rv'><font color='violet'>Развернуть</font>")."</a></div>";
if($ku['sv']==1){$q=mysql_query("SELECT * FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' LIMIT 1");
}else{$q=mysql_query("SELECT * FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]'");}















while($post=mysql_fetch_array($q))
{
if($post['id_plant']!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$post[id_plant]'"),0)!=0)$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$post[id_plant]'"));

echo "<div class='block'><img width='48' height='48' src='".(!isset($plant)?"".($post['cultivator']==1?"img/dirt_new.jpg":"img/dirt2_new.jpg")."":"img/plants/$plant[id].png")."' alt='o' class='portrait'>";
echo "".(!isset($plant)?"<span class='title'>".($post['cultivator']==1?"Вскопанная земля<br/>":"Не вскопанная земля<br/>")."</span>":"<span  class='title'>".hsc($plant['name'])."</span> (".$plant['count']." шт)".($post['time']>$time?"<br/><span class='small minor'>(До сбора: ".time_left($post['time']-$time).")</span>":null)."")."";
if(isset($plant))
{
if($post['time']<=$time)
{
echo " <span class='small minor'>(<font color='orange'>Созрело</font>)</span><br/><img width='16' height='16' src='img/icons/harvest.png' alt='o'> <a href='?myfarm&harvest=$post[id]'>Собрать урожай</a>";
}
else
{
if($ku['last_soil']!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"),0)!=0)$ls=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"));
echo "<div class='small minor'>".($post['time_soil']<=$time && $post['soil']==0 && $post['time']>$time?"<img width='16' height='16' src='img/icons/soil.png' alt='o'> ".(isset($ls)?"<a href='?myfarm&soil=$post[id]&select=$ls[id]'>Применить
<span>".hsc($ls['name'])."</span></a>, <a href='?myfarm&soil=$post[id]'><span>выбрать
удобрение</span></a>":"<a href='?myfarm&soil=$post[id]'>Удобрить</a>")."":"".($post['soil']==0 && $post['time']>$time?"<br/>(До удобрения: ".time_left($post['time_soil']-$time).")":null)."")."</div>";
echo "<div class='small minor'>".($post['time_water']>$time && $post['time']>$time?"(До полива: ".time_left($post['time_water']-$time).")":"".($post['time']>$time?"".($post['soil']==0 && $post['time_soil']>$time || $post['soil']==1?"<img alt='' width='16' height='16' src='img/icons/water.png'> <a href='?myfarm&water=$post[id]'>Полить грядку</a>":null)."":null)."")."</div>";
}
}
else
{
echo "<span>";
if($ku['last_plant']!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"),0)!=0)$lp=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"));
echo "".($post['cultivator']==1?"<img width='16' height='16' src='img/icons/seat.png' alt='o'> ".(isset($lp)?"<a href='?myfarm&seat=$post[id]&select=$lp[id]'>Посадить <span><b>".hsc($lp['name'])."</b></span></a>, <a href='?myfarm&seat=$post[id]'><span>Сменить растение</span></a>":"<a href='?myfarm&seat=$post[id]'>Посадить</a><div style='clear:both'></div>")."":"<img width='16' height='16' src='img/icons/dig.png' alt='o'> <a href='?myfarm&cultivator=$post[id]'><span style='title'>Вскопать грядку</span></a><br/><br/>")."";
echo "</span>";
}
if(isset($plant))unset($plant);
echo "<div style='clear:both'></div></div>";

}
//echo "<div style='clear:both'></div></div>";
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]'"),0)<200)echo "<div class='block'><img width='48' height='48' src='img/dirt_new.jpg' alt='o' class='portrait'><span class='title'>Купить новую землю</span><br/><img width='16' height='16' src='img/icons/cart.png' alt='o'> <a href='?myfarm&new_ground'>Купить</a> за <span class='title'><img width='16' height='16' src='img/icons/ruby.png' alt='o'><span>".cpg(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]'"),0))."</span></span>";
if($ku['last_plant']!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"),0)!=0)$lp=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"));
if($ku['last_soil']!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"),0)!=0)$ls=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"));
echo "<div style='clear:both'></div></div><div class='xr'></div>";
echo "<a href='?myfarm&change_plant'><div class='block'><img width='16' height='16' src='img/icons/seat.png' alt='o'> Сменить растение</a>: <b><span>".(isset($lp)?"".hsc($lp['name'])."":"-")."</span></b></div>";
echo "<a href='?myfarm&change_soil'><div class='block'><img width='16' height='16' src='img/icons/soil.png' alt='o'> Сменить удобрение</a>: <b><span>".(isset($ls)?"".hsc($ls['name'])."":"-")."</span></b></div>";
echo "".($ku['time_cp']>$time?"<div class='block'><img width='16' height='16' src='img/icons/ok_off.png' alt='o'> <font color='violet'>До бесплатной очистки</font>: <img width='14' height='14' src='img/icons/times.png' alt='o'> <b>".time_left($ku['time_cp']-$time)."</b></div><a href='?myfarm&clean_grounds'><div class='block'><img width='16' height='16' src='img/icons/ok_on.png' alt='o'> Очистить все грядки</a> (<img width='16' height='16' src='img/icons/ruby.png' alt='o'><span
class='title'>".($ku['count_cp']*10)."</span></span>)</span>":"<a href='?myfarm&clean_grounds'><div class='block'><img width='16' height='16' src='img/icons/cross.png' alt='o'> Очистить все грядки</a>")."</div>";
if(isset($mc))echo "<img width='16' height='16' src='img/icons/heli4n.png' alt='o'> <a href='?collective=$mc[id]&hangar&vzv'>Вызвать все вертолёты</a></div>";
include_once 'inc/foot.php';









/*
if($ku['vidok']==0){
echo "<a href='?myfarm&reflesh=".rand(99999,99999999)."'><div class='block'><img width='16' height='16' src='img/icons/obmen.png' alt='o'> Обновить</a></div>";
if($ku['garden_time']>$time)echo "<a class='epic' href='?shop=gardener&id=".$ku['gardener']."'><div class='block'><img width='16' height='16' alt='' src='img/icons/gardener".$ku['gardener'].".png'> Садовник ".$name."</a><span class='minor'><br/>(<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['garden_time']-$time).")</span></span></div>";
if($ku['hydropinics_time']>$time)echo "<a class='epic' href='?shop=hydropinics'><div class='block'><img width='16' height='16' src='img/icons/hydropinics.png' alt='o'> Гидропоника</a> <span class='minor'><b>$ku[hydropinics_type]%</b><br/>(<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['hydropinics_time']-$time).")</span></span></div>";
if($ku['scarecrow_time']>$time)echo "<a class='epic' href='?shop=scarecrow'><div class='block'><img width='16' height='16' src='img/icons/scarecrow.png' alt='o'> Пугало</a><span class='minor'> (<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['scarecrow_time']-$time).")</span></span></div>";
if($ku['vetriak_time']>$time)echo "<a class='epic' href='?shop=vetriak'><div class='block'><img width='16' height='16' src='img/vetriak.png' alt='o'> Ветряк</a><span class='minor'> (<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['vetriak_time']-$time).")</span></span></div>";
if($ku['time_shmel']>$time)echo "<a class='epic' href='?shop=helicopter&1'><div class='block'><img width='16' height='16' src='img/icons/heli1n.png' alt='o'> Шмель</a> <span class='minor'>(<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['time_shmel']-$time).")</span></span></div>";
if($ku['time_yastreb']>$time)echo "<a class='epic' href='?shop=helicopter&2'><div class='block'><img width='16' height='16' src='img/icons/heli2n.png' alt='o'> Ястреб</a><span class='minor'> (<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['time_yastreb']-$time).")</span></span></div>";
if($ku['time_drakon']>$time)echo "<a class='epic' href='?shop=helicopter&3'><div class='block'><img width='16' height='16' src='img/icons/heli3n.png' alt='o'> Дракон</a><span class='minor'> (<img width='14' height='14' src='img/icons/times.png' alt='o'> <span>".time_left($ku['time_drakon']-$time).")</span></span></div>";
}

*/









/*
while($post=mysql_fetch_array($q))
{
echo "<li>";
if($post['id_plant']!=0 && mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$post[id_plant]'"),0)!=0)$plant=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_plant` WHERE `id` = '$post[id_plant]'"));

echo "<li><img width='48' height='48' src='".(!isset($plant)?"".($post['cultivator']==1?"img/dirt_new.jpg":"img/dirt2_new.jpg")."":"img/plants/$plant[id].png")."' alt='o' class='portrait'>";
echo "<div>";
echo "".(!isset($plant)?"<span class='title'>".($post['cultivator']==1?"Земля, готовая к посеву":"Необработанная земля")."</span>":"<span  class='title'>".hsc($plant['name'])."</span>".($post['time']>$time?"<span class='small minor'> (Урожай через <span> ".time_left($post['time']-$time)."</span>)</span>":null)."")."";
echo "</div>";
echo "<div>";
if(isset($plant))
{
if($post['time']<=$time)
{
echo "<img width='16' height='16' src='img/icons/harvest.png' alt='o'> <a href='?myfarm&harvest=$post[id]'>Собрать урожай</a>";
}
else
{
if($ku['last_soil']!=0 && mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"),0)!=0)$ls=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"));
echo "<div class='small minor'>".($post['time_soil']<=$time && $post['soil']==0 && $post['time']>$time?"<img width='16' height='16' src='img/icons/soil.png' alt='o'> ".(isset($ls)?"<a href='?myfarm&soil=$post[id]&select=$ls[id]'>Применить
<span>".hsc($ls['name'])."</span></a>, <a href='?myfarm&soil=$post[id]'><span>выбрать
удобрение</span></a>":"<a href='?myfarm&soil=$post[id]'>Удобрить</a>")."":"".($post['soil']==0 && $post['time']>$time?"Удобрение через ".time_left($post['time_soil']-$time)."":null)."")."</div>";
echo "<div class='small minor'>".($post['time_water']>$time && $post['time']>$time?"Полив через ".time_left($post['time_water']-$time)."":"".($post['time']>$time?"".($post['soil']==0 && $post['time_soil']>$time || $post['soil']==1?"<img alt='' width='16' height='16' src='img/icons/water.png'> <a href='?myfarm&water=$post[id]'>Полить</a>":null)."":null)."")."</div>";
}
}
else
{
echo "<span>";
if($ku['last_plant']!=0 && mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"),0)!=0)$lp=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"));
echo "".($post['cultivator']==1?"<img width='16' height='16' src='img/icons/seat.png' alt='o'> ".(isset($lp)?"<a href='?myfarm&seat=$post[id]&select=$lp[id]'>Посадить <span>".hsc($lp['name'])."</span></a>, <a href='?myfarm&seat=$post[id]'><span>выбрать семена</span></a>":"<a href='?myfarm&seat=$post[id]'>Посадить</a>")."":"<img width='16' height='16' src='img/icons/dig.png' alt='o'> <a href='?myfarm&cultivator=$post[id]'><span style='title'>Вскопать</span></a>")."";
echo "</span>";
}
if(isset($plant))unset($plant);
echo "</div><div style='clear:both'></div></li>";
}
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]'"),0)<200)echo "<li><img width='48' height='48' src='img/dirt_new.jpg' alt='o' class='portrait'><div><span class='title'>Новая земля</span></div><div><img width='16' height='16' src='img/icons/cart.png' alt='o'> <a href='?myfarm&new_ground'>Купить</a> за <span class='title'><img width='16' height='16' src='img/icons/ruby.png' alt='o'><span>".cpg(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]'"),0))."</span> рубинов</span></div><div style='clear:both'></div></li>";
//echo "</ul>";
if($ku['last_plant']!=0 && mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"),0)!=0)$lp=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_plant` WHERE `id` = '$ku[last_plant]'"));
if($ku['last_soil']!=0 && mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"),0)!=0)$ls=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_soil` WHERE `id` = '$ku[last_soil]'"));
{
?>
<img width='16' height='16' src='img/icons/heli4n.png' alt='o'> <a href='?collective=<? echo $mc['id'];?>&hangar'>Вызвать вертолёт</a><br>
<?
}
echo "<ul class='ptm'><li><img width='16' height='16' src='img/icons/seat.png' alt='o'> <a href='?myfarm&change_plant'>Сменить растение</a>: <span>".(isset($lp)?"".hsc($lp['name'])."":"-")."</span></li>";
echo "<li><img width='16' height='16' src='img/icons/soil.png' alt='o'> <a href='?myfarm&change_soil'>Сменить удобрение</a>: <span>".(isset($ls)?"".hsc($ls['name'])."":"-")."</span></li>";
echo "".($ku['time_cp']>$time?"<li><img width='16' height='16' src='img/icons/cross.png' alt='o'> До бесплатной очистки: <span>".time_left($ku['time_cp']-$time)."</span></li><li><span><img width='16' height='16' src='img/icons/tick.png' alt='o'> <a href='?myfarm&clean_grounds'><span>Очистить грядки</span></a>(<span>Стоимость</span>: <span><img width='16' height='16' src='img/icons/ruby.png' alt='o'> <span
class='title'>".($ku['count_cp']*10)."</span></span>)</span></li>":"<li><img width='16' height='16' src='img/icons/cross.png' alt='o'> <a href='?myfarm&clean_grounds'>Очистить грядки</a></li>")."</ul></div>";
//echo "</div>";
*/
include_once 'inc/foot.php';
?>/spanspan.hsc($lp['name']).