Файл: ferma/inc/upf.php
Строк: 33
<?
if(isset($_GET['del']) && $ku['status']==3)mysql_query("DELETE FROM `kolhoz_petground` WHERE `id` = '".intval($_GET['del'])."'");
echo "<div class='event'><g1><b><a href='?user=$ank[id]' style='color:#FFEDA2'>$au[nick]</a> /Сад</b></g1></div>";
echo '<div class="content"><div class="block">';
if($ank['scarecrow_time']>$time)echo "<li><img width='16' height='16' src='i/dot.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['id']==$ku['id'])header("Location:?farm");
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='".($post['id_pet']==0?"i/dirt_new.jpg":"i/pets/$pet[id].png")."' alt='o' class='portrait'>";
echo "<div>";
echo "<span class='title'>".($post['id_pet']==0?"Пустой загон":"".hsc($pet['name'])."")."</span>";
if($post['time']>$time)echo "<span class='small minor'>(Кормление церез ".time_left($post['time']-$time).")</span>";
if($ku['status']==3)echo " <a class='small minor' href='?upf=$ank[id]&del=$post[id]'>[удалить]</a>";
echo "</div>";
echo "<div style='clear:both'></div></li>";
}
echo "</ul>";
echo "</div>";
include_once 'inc/foot.php';
?>