<?
require_once '../core/system.php';
echo only_reg();
$header = 'Слитки';
require_once '../core/head.php';
switch($act) {
case 'ok':
if($user[gold] < 1000){
header('Location: ?');
$_SESSION['err'] = 'Нужно больше золота!';
exit();
}else{
mysql_query("UPDATE `user` SET `gold` = '".($user['gold']-1000)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `sila` = '".($user['sila']+200)."', `max_health` = '".($user['max_health']+200)."', `lovk` = '".($user['lovk']+200)."', `zashit` = '".($user['zashit']+200)."', `max_mana` = '".($user['max_mana']+200)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `podarok` = '1' WHERE `id` = '$user[id]' LIMIT 1");
header('Location: ?');
$_SESSION['message'] = 'Благословение успешно куплено!';
exit();
}
break;
default;
echo "<div class='player center'>";
echo "</div>";
echo "<div class='dot-line'></div>";
echo "<div class='player center blue'>";
echo "Слитки можно потратить в Магазине";
echo "</div>";
echo "<div class='mini-line'></div>";

echo "<div class='block_zero'><span class='yellow'>​Слиток Обсидиан​</span>​​ <br/><span class='medium'> Количество: </span><div style='clear:both;'></div><center><span class='end'><span class='label'><img src='/images/icon/res/2.png'> Обсидиан, $user[ambrozia] шт</span></span></a> </div><div class='dot-line'></div></center>";
echo "<div class='block_zero'><span class='yellow'>Слиток Алмаз</span>​​ <br/><span class='medium'> Количество: </span><div style='clear:both;'></div><center><span class='end'><span class='label'><img src='/images/icon/res/3.png'> Алмаз, $user[rabina] шт.</span></span></a> </div><div class='dot-line'></div></center>";
echo "<div class='block_zero'><span class='yellow'>Слиток Графит​</span>​​ <br/><span class='medium'> Количество: </span><div style='clear:both;'></div><center><span class='end'><span class='label'><img src='/images/icon/res/4.png'> Графит, $user[mata] шт.</span></span></a> </div><div class='dot-line'></div></center>";
echo "<div class='block_zero'><span class='yellow'>​Слиток Оникс​</span>​​ <br/><span class='medium'> Количество: </span><div style='clear:both;'></div><center><span class='end'><span class='label'><img src='/images/icon/res/5.png'> Оникс, $user[air] шт.</span></span></a> </div></center>";
echo "<div class='mini-line'></div>";
echo "<ul class='hint'><li>Слитки можно добыть в пещере</li></ul></center><div class='mini-line'></div><div class='menuList'><li><a href='/shop'><img src='/images/icon/arrow.png'>Перейти в Магазин</a></li></div>";
echo "</div>";
}
require_once '../core/foot.php';
?>