Файл: zfarm.mobi/inc/user/uf.php
Строк: 44
<?
$title='Грядки игрока';
include_once '../system/config.php';
if(isset($_GET['uf']) && ($_GET['uf'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".($_GET['uf'])."' LIMIT 1"),0)!=0){
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uf'])."'"));
$au=$ank;
echo "<div class='title'><a href='/user/$ank[id]'>$au[nick]</a> / Грядки</h2></div>";
echo '<div class="content"><div class="div">';
if($ank['id']==$ku['id'])header("Location:/garden");
$q=mysql_query("SELECT * FROM `kolhoz_ground` WHERE `id_user` = '$ank[id]'");
echo "<ul>";
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 "<li><img width='48' height='48' style='border-radius: 5px' src='/img/".(!isset($plant)?"dirt_new.jpg":"plants/$plant[img].png")."' alt='o' class='portrait'>";
echo "<div>";
echo "".(!isset($plant)?"<span class='n'>Земля, готовая к посеву</span>":"<span class='n'>".hsc($plant['name'])."</span>".($post['time']>$time?"<span class='small minor'> (Урожай через <span> ".time_left($post['time']-$time)."</span>)</span>":null)."")."";
echo "</div>";
echo "<div style='clear:both'></div></li>";
}
echo "</ul>";
echo "</div>";
include_once '../system/foot.php';
}
?>