<?
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&amp;pas=$pas&amp;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');
?>
