<?php
include 'system/bd.php';
include 'system/cook.php';
include ("system/gzip.php");
if(isset($_SESSION['auth']) && $_SESSION['auth']==1){
include 'system/head.php';
include 'system/head1.php';
switch($_GET[go]){
default:
echo' <div class="empty_block item_center bottom">Вы мертвы</div>
<div class="block_zero center"><center><img class="img_dead" src="/img/dead.png"></div>';

echo' <div class="item_center bottom" style="padding-bottom: 3px;">

ты сражался храбро,
но враг оказался сильнее!
</div>';

if($user[hp] < 0){
mysql_query("UPDATE `user` SET `hp`='0'
 WHERE `id` = '$user[id]'");}







echo" 
<div class='block_link'><a href='dead.php?go=hp'> <img src='./img/images/arrow.png'> Воскреснуть</a></div>
<div class='line'></div>";
break;
////////////

case 'hp':

mysql_query("UPDATE `user` SET `hp` = '$user[hpfull]',`mp` = '$user[mpfull]',`gold`='$user[gold]'-'0' WHERE `id` = '$user[id]'");
header ("Location: dead.php?go=rest ");exit;
break;


case 'rest':
echo"
<div class='empty_block item_center'>  Здоровье и энергия восстановлены, заходите ещё</div>";
echo" <div class='block_link'> <a href='dead.php?\'> <img src='./img/images/arrow.png'> Продолжить</a></div> ";
break;

}


}else{
header ("Location: index.php"); exit;
}
include './system/foot.php';
?>
