<?
require_once '../core/system.php';
echo only_reg();
require_once H.'core/head.php';
switch($act) {
case 'energy':
if($user[gold] < 10){
header('Location: ?');
$_SESSION['err'] = 'Нужно больше фикс!';
exit();
}else{
mysql_query("UPDATE `user` SET `gold` = '".($user['gold']-10)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `mana` = '".($user['max_mana'])."' WHERE `id` = '$user[id]' LIMIT 1");
header('Location: ?');
$_SESSION['message'] = 'Энергия успешно пополнена!';
exit();
}
break;
default;
echo '<div class="new-link-tree" style="vertical-align:middle;"><div class="new-link-tree-step1"><a href="/" class="new-tree-link"><span class="link-span">Главная</span></a></div><div class="new-link-tree-step2"><a href="/korupciya.php" class="new-tree-link"><span class="link-span">Коррупция</span></a></div></div>';
echo "<div class='mini-line'></div>";
echo '<div class="block10t"><div class="panelInfo"><div class="panelInfoHeader">Выпить Энергетика</div><div class="panelInfoContent"><div class="panelInfoLeftCornerGlass"><div class="panelInfoRightCornerGlass"><div class="center"><div class="block10"><span style="color:#cc9933;"> Восполняет 100% энергии </span><div class="block4"><img src="/style/theme/images/1.gif" width="40" height="40" alt="."/></div>Цена: <img src="/images/icon/gold.png" width="16" height="16" alt="."/><span>10</span></div><form name="userGoldShopForm" method="post" action="?act=energy"><div class="block4"><input type="submit" value="Купить" class="button_xl"></div></form></div></div></div></div></div></div>';

}

switch($act) {
case 'health':
if($user[gold] < 10){
header('Location: ?');
$_SESSION['err'] = 'Нужно больше фикс!';
exit();
}else{
mysql_query("UPDATE `user` SET `gold` = '".($user['gold']-10)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `health` = '".($user['max_health'])."' WHERE `id` = '$user[id]' LIMIT 1");
header('Location: ?');
$_SESSION['message'] = 'Здоровье успешно пополнено!';
exit();
}
break;
default;
echo '<div class="block10t"><div class="panelInfo"><div class="panelInfoHeader">Захавать колёса</div><div class="panelInfoContent"><div class="panelInfoLeftCornerGlass"><div class="panelInfoRightCornerGlass"><div class="center"><div class="block10"><span style="color:#cc9933;"> Восполняет 100% здоровья </span><div class="block4"><img src="/style/theme/images/3.gif" width="40" height="40" alt="."/></div> Цена: <img src="/images/icon/gold.png" width="16" height="16" alt="."/><span>10</span></div><form name="userGoldShopForm" method="post" action="?act=health"><div class="block4"><input type="submit" value="Купить" class="button_xl"></div></form></div></div></div></div></div></div>';
}
require_once H.'core/foot.php';
?>