<?php
define('_CONSTANT_', 1);
require_once '../../core/start.php';
checkAuth();
head('Кладбище', 'Кладбище');
if (isset($_GET['restoreHealth']))
{
if ($user['money'] < 100)
{
errorNoExit('Недостаточно золота');
}
else if ($user['health'] == $user['max_health'])
{
errorNoExit('У вас полное здоровье');
}
else
{
DB::$dbs->query("UPDATE " . USERS . " SET `health` = ?, `money` = ? WHERE `id` = ?", [$user['max_health'], ($user['money'] - 100), $user['id']]);
success('Здоровье восстановлено', '/', 'На главную');
}
}
?>
<div style="text-align: center;"><img src="/img/rip.png"></div>
<div class="content">
Твой персонаж пал в бою!<br/>
<a href="<?=HOME?>/modules/fight/rip.php?restoreHealth" class="link-touch">Восстановить здоровье за <?=moneyIcon()?>100</a>
</div>
<?php
require_once '../../core/foot.php';