<?php
include 'func_user.php';
include 'core/func_next_level.php';
/* поиск пользователя в системе */
if($user['id']>0){
	/*Пули*/
	$test_puli = mysql_result(mysql_query("SELECT MAX(puli_id) FROM `puli_user` WHERE `user_id`='".$user['id']."'  AND `kol`>0"),0);
	if($test_puli[0]<1){
	$my_puli = '<img src="img/puli/1.png"> 0';
	}else{
	$puli = mysql_fetch_assoc(mysql_query("SELECT * FROM `puli_user` WHERE `puli_id`='".$test_puli[0]."' AND `user_id`='".$user['id']."'"));
	$my_puli = '<img src="img/puli/'.$test_puli[0].'.png"> '.$puli['kol'];
	}
$pred_level = mysql_fetch_assoc(mysql_query("SELECT `oput` FROM `level` WHERE `id`='".$user['level']."'"));
##echo $pred_level['oput'].'|||';
$minus_pred = $user['oput'] - $pred_level['oput'];
$sukpzdc = $row_level['oput']-$pred_level['oput'];
$oput_proc = round($minus_pred /$sukpzdc*100,2);
echo '<div class="text"><img src="img/money/money.png" alt=""> '.$user['money'].'|
<img src="img/money/rubin.png" alt=""> '.$user['rubin'].'|<img src="img/stat/oput.png"> ур. '.$user['level'].' ('.$oput_proc.' %)|'.$my_puli.'<br></div>';
if($_SERVER['PHP_SELF']!='/index.php'){

echo '<div class="panel">

<a href="./index.php">Меню</a>|<a href="./my.php">Персонаж</a>|<a href="./inventory.php">Инвентарь</a>|<a href="./pets.php?my">Питомец</a>|<a href="lab.php?my">Лаборатории</a>
</div>';

}
}else{
if($_SERVER['PHP_SELF']!='/index.php'){
echo '<div class="text"><a href="./index.php">На главную</a><br></div>';
}
}

echo '<div class="foot">Время: '.date("H:i:s",time()).'<br>

&copy; HAKER(Luxor)</div>';
echo '</body></htm>';


?>