<?php
require_once ('system/func.php');
auth(); // Закроем от гостей
if(isset($_GET['koldun']) && isset($_GET['url'])){
if($user['gold'] < 200){
$_SESSION['msg'] = 'Не хватает '.ico('icons','gold.png').' '.(200-$user['gold']).' золота';
header("Location: ".$_GET['url']);
exit();
}else{
mysql_query("update `users` set `energy` = '".$user['max_energy']."', `health` = '".num($user['max_health']*1)."', `gold` = '".($user['gold']-200)."' where (`id` = '".$myID."')");
$_SESSION['msg'] = 'Жизнь и энергия восстановлены';
header("Location: ".$_GET['url']);
exit();
}
}

require_once ('system/footer.php');
?>