Файл: zfarm.mobi/inc/user/upf.php
Строк: 67
<?
$title='Загоны игрока';
include_once '../system/config.php';
if(isset($_GET['upf']) && ($_GET['upf'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".($_GET['upf'])."' LIMIT 1"),0)!=0){
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['upf'])."'"));
$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['scarecrow_time']>$time)echo "<li><img src='/img/icons/scarecrow.png' alt='o'> <a class='epic' href='/shop/scarecrow'>Пугало</a><span class='minor'> на <span>".time_left($ank['scarecrow_time']-$time)."</span></span></li>";
if($ank['time_shmel']>$time)echo "<li><img alt='o' src='/img/icons/heli1n.png'> <a class='epic' href='/shop=helicopter/1'>Шмель</a><span class='minor'> на <span>".time_left($ank['time_shmel']-$time)."</span></span></li>";
if($ank['time_yastreb']>$time)echo "<li><img alt='o' src='/img/icons/heli2n.png'> <a class='epic' href='/shop/helicopter/2'>Ястреб</a><span class='minor'> на <span>".time_left($ank['time_yastreb']-$time)."</span></span></li>";
if($ank['time_drakon']>$time)echo "<li><img alt='o' src='/img/icons/heli3n.png'> <a class='epic' href='/shop/helicopter/3'>Дракон</a><span class='minor'> на <span>".time_left($ank['time_drakon']-$time)."</span></span></li>";
if($ank['id']==$ku['id'])header("Location:?myfarm");
echo "<ul>";
$q=mysql_query("SELECT * FROM `kolhoz_petground` WHERE `id_user` = '$ank[id]'");
while($post=mysql_fetch_array($q))
{
$pet=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_pet` WHERE `id` = '$post[id_pet]'"));
echo "<li><img width='48' height='48' src='/img/".($post['id_pet']==0?"dirt_new.jpg":"pets/$pet[img].png")."' alt='o' class='portrait'>";
echo "<div>";
echo "<span class='n'>".($post['id_pet']==0?"Пустой загон":"".hsc($pet['name'])."")."</span>";
if($post['time']>$time)echo "<span class='small minor'>(Кормление церез ".time_left($post['time']-$time).")</span>";
echo "</div>";
echo "<div style='clear:both'></div></li>";
}
echo "</ul>";
echo "</div>";
include_once '../system/foot.php';
}
?>