File size: 1.09Kb
<?
define('PROTECTOR', 1);
$headmod = 'istok';//фикс. места
$textl='Больница';
@include('files/db.php');
@include('files/auth.php');
@include('files/func.php');
going();
ryd();
place_okr();
place_tower();
@include('files/core.php');
@include('files/head.php');
@include('files/zag.php');
$rand=rand(1000,9999);
if($udata[lvl]>5){
echo'В больницу могут приходить только новички!';
@include('files/down.php');
exit;
}
if($udata[hp]>=$udata[hpall]){
echo'Вы здоровы!';
@include('files/down.php');
exit;
}
if(empty($_SESSION[regen])){
$_SESSION[regen]=5;
echo"<a href=\"istok.php?log=$log&pas=$pas&r=$rand\">Лечиться</a> (+5 жизни)";
}else{
$udata[hp]=$udata[hp]+$_SESSION[regen];
if($udata[hp]>$udata[hpall]){$udata[hp]=$udata[hpall];}
mysql_query("UPDATE users SET hp = '$udata[hp]' WHERE usr = '$log'");
$_SESSION[regen]++;
echo"<a href=\"istok.php?log=$log&pas=$pas&r=$rand\">Лечиться</a> (+$_SESSION[regen] жизни)";
}
////////////////////////
@include('files/down.php');
?>