Файл: monst/core/pag/shop/skull.php
Строк: 51
<?
if ( !empty($_GET['get']) ) {
$get = $_GET['get'];
if ( $get != 'gold' AND $get != 'silver' AND $get != 'exp' ) {
g('/main');
}
if ( $user['skull'] < 100 ) {
g('/shop/skull?no_skull');
}
$gold = 0;
$silver = 0;
$exp = 0;
if ( $get == 'gold' ) {
$gold = 2;
}
if ( $get == 'silver' ) {
$silver = 500;
}
if ( $get == 'exp' ) {
$exp = 50;
}
$_users -> update(
[
'id' => $user['id']
],
[
'$set' => [
'gold' => $user['gold'] + $gold,
'silver' => $user['silver'] + $silver,
'exp' => $user['exp'] + $exp,
'skull' => $user['skull'] - 100
]
]
);
g('/shop/skull?change_ok');
}
if ( isset($_GET['change_ok']) ) {
?>
<div class='ok_box'>
<?=$lang['shop.php']['skull']['change_ok']?>
</div>
<?
}
if ( isset($_GET['no_skull']) ) {
?>
<div class='error_box'>
<?=$lang['shop.php']['skull']['no_skull']?>
</div>
<?
}
?>
<div class='padding'>
<?=$lang['shop.php']['skull']['desc']?><br/>
<br/>
<?=$lang['shop.php']['skull']['count']?>
<img src='/core/i/game/skull.png' alt='' width='40'/><span class='skull_color'><?=$user['skull']?></span><br/>
<br/>
<a href='/shop/skull?get=gold'><div class='bt_gray'><?=$lang['shop.php']['skull']['change']?> <img src='/core/i/game/skull.png' alt='' width='15'/><span class='skull_color'>100</span> <?=$lang['shop.php']['on']?> <img src='<?=$gold_icon?>' alt='' width='15'/><span class='gold_color'>2</span></span></div></a>
<br/>
<a href='/shop/skull?get=silver'><div class='bt_gray'><?=$lang['shop.php']['skull']['change']?> <img src='/core/i/game/skull.png' alt='' width='15'/><span class='skull_color'>100</span> <?=$lang['shop.php']['on']?> <img src='<?=$silver_icon?>' alt='' width='15'/><span class='silver_color'>500</span></span></div></a>
<br/>
<a href='/shop/skull?get=exp'><div class='bt_gray'><?=$lang['shop.php']['skull']['change']?> <img src='/core/i/game/skull.png' alt='' width='15'/><span class='skull_color'>100</span> <?=$lang['shop.php']['on']?> <img src='<?=$exp_icon?>' alt='' width='15'/><span class='exp_color'>50</span></span></div></a>
</div>
<br/>
<a href='/shop'><div class='bt_black'><?=$lang['shop.php']['back']?></div></a>