Вход Регистрация
Файл: monst/core/pag/treasury.php
Строк: 32
<?
if ( $user['part'] < ) {
    
g('/main');
}

$gold 20;
if ( 
$user['part'] == $gold 50;


if ( 
$user['vip_time'] > time()) {
    
$gold $gold 2;
}
?>
<div class='op_top_im'>

    <img src='/core/i/pic/treasury.jpg' alt='' class='title_img' />
</div>
<div style='position: relative; top: -100px; color: #999; height: 0;'>
    <span style='background: #000; font-size: 20px;'><?=$lang['treasury.php']['title']?></span><br/>
<span style='background: #000; font-size: 11px;'><?=$lang['treasury.php']['title_text']?></span><br/>
</div>

<div class='padding'>
    <div style='text-align: center; color: #999; border-top: 1px solid #999;'>
        <?=$lang['treasury.php']['desc']?><br/>
    </div>
</div>

<br/>

<div style='text-align: center;'>
    <?
    
if ( isset($_GET['gold_ok']) ) {
        
?>
        <div class='ok_box'>
            <?=$lang['treasury.php']['getting']?> <img src='<?=$gold_icon?>' alt='' width='15'/><span class='gold_color'><?=$gold?></span>
        </div>
        <?
    
}

    if ( !
$user['treasury_time'] OR $user['treasury_time'] < time() ) {
        if ( isset(
$_GET['get']) ) {
            
$_users -> update(
                [
                    
'id' => $user['id']
                ],

                [
                    
'$set' => [
                        
'gold' => $user['gold'] + $gold,
                        
'treasury_time' => time() + 60 60 2
                    
]
                ]
            );

            foreach ( 
$quest as $q ) {
                if ( 
$q['type'] == 'treasury' ) {
                    
$quest_db[$q['id']]['count'] += $gold;

                    
$_users -> update(
                        [
                            
'id' => $user['id']
                        ],

                        [
                            
'$set' => [
                                
'quest' => $quest_db,
                            ]
                        ]
                    );

                }
            }


            foreach ( 
$daily as $q ) {
                if ( 
$q['type'] == 'treasury' ) {
                    
$daily_db[$q['id']]['count'] += $gold;

                    
$_users -> update(
                        [
                            
'id' => $user['id']
                        ],

                        [
                            
'$set' => [
                                
'daily' => $daily_db,
                            ]
                        ]
                    );

                }
            }

            
g('/treasury?gold_ok');
        }

        
?>

        <?=$lang['treasury.php']['full']?><br/>
        <a href='/treasury?get'><div class='bt_gray'><?=$lang['treasury.php']['get']?> <img src='<?=$gold_icon?>' alt='' width='15'/><span class='gold_color'><?=$gold?></span></div></a>
        <?
    
} else {
        
?>
        <?=$lang['treasury.php']['empty']?> <?=hm($user['treasury_time'] - time(), 0110)?><br/>
        <?
    
}
    
?>
</div>
Онлайн: 1
Реклама