Файл: vitaliy_nosov/public_html/game/pets/pets.php
Строк: 21
<?php
require_once ('../../config/func.php');
$title = 'Мой питомец';
require_once ('../../config/header.php');
auth();
$pets = mysql_query("SELECT * FROM `pets_user` WHERE `user`='".$user['id']."'");
if(mysql_num_rows($pets) == '0'){
header('Location: /pets');
$_SESSION['notif'] = 'Питомцев у Вас нет';
}else{
$mypets = mysql_fetch_assoc(mysql_query("SELECT * FROM `pets_user` WHERE `user` = '".$user['id']."'"));
?>
<div class="block center"><img src="/style/pets/<?=$mypets['img'];?>.png" width="100"></div>
<div class="block"><b><a href="/pets/name/"><img src="/style/pit.png"> <?=$mypets['name'];?></b></a></br><img src="/style/sila.png"> Сила: <?=$mypets['sila'];?></br>
<img src="/style/zahita.png"> Защита: <?=$mypets['def'];?></br>
<img src="/style/health.png"> Здоровье: <?=$mypets['hp'];?>/<?=$mypets['max_hp'];?></div>
<div class="list">
<li><a href="/pets/train/"> <img src="/style/home.png"> Тренировать</a></li>
</div>
<?
}
require_once ('../../config/footer.php');
?>