battles/magic/cure_d.php

13 lines
540 B
PHP
Raw Normal View History

2018-01-28 16:40:49 +00:00
<?
if(!isset($_SESSION['uid'])) { header('Location: ../index.php'); die(); }
if($user['battle'] > 0) {
echo "<font color=red><b>Не в бою ...</b></font>";
} elseif($user['hp'] == $user['maxhp']) {
echo "<font color=red><b>Ваше здоровье и так полное ...</b></font>";
} else {
$user['hp'] = $user['maxhp'];
mysql_query('UPDATE `users` SET `hp` = "'.$user['hp'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
echo "<font color=red><b>Вы скушали Бутербродик ...</b></font>";
$bet = 1;
}