<?php
include 'system/common.php';
include 'system/functions.php';
include 'system/user.php';
if (!isset ($user)) {header('location: /');exit;}
$pet_id= _string(_num($_GET['pet_id']));
if(!$pet_id){header('location: /petshop/');exit;}
$pet = mysql_query('SELECT * FROM `pet_u` WHERE `id` = "'.$pet_id.'"');
$pet = mysql_fetch_array($pet);
if(!$pet){header('location: /petshop/');exit;}
$us = mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pet['user_id'].'"');
$us = mysql_fetch_array($us);
if($pet['user_id']==$user['id']){header('location: /petshop/'.$pet['pet_id'].'');exit;}
$title = 'Питомец игрока '.$us['login'].'';

include './system/h.php';  
?>
<div class='list'>Питомец игрока <?=$us['login'];?></div>
<div class='center'><div class='content'><img src='/images/pet/<?=$pet['screen'];?>' alt=''/><br/></div></div>
<div class='content'>
<img src='/images/icon/str.png' alt='*'/> Сила: <?=$pet['str'];?><br/>

<img src='/images/icon/vit.png' alt='*'/> Жизнь: <?=$pet['vit'];?><br/>

<img src='/images/icon/agi.png' alt='*'/> Удача: <?=$pet['agi'];?><br/>

<img src='/images/icon/def.png' alt='*'/> Защита: <?=$pet['def'];?><br/>

<img src='/images/icon/mana.png' alt='*'/> Мана: <?=$pet['mana'];?><br/>
</div><div class='line'></div>
<div class='list'><a href='/petshop/'><img src='/images/pet/icon.gif' alt=''/> Магазин питомцев</a></div>
<div class="list"><a href="/user/<?=$pet['user_id'];?>/"><img src="/images/icon/arrow.png"> В профиль</a></div>
<? 
include './system/f.php';

?>