Вход Регистрация
Файл: monst/core/pag/quest.php
Строк: 108
<?
upd_loc
('read quests');

include 
$HOME '/core/content/part.php';

$part $PART[$user['part']];

if ( isset(
$_GET['col'])) {
    
$_users -> update(
        [
            
'id' => $user['id']
        ],

        [
            
'$set' => [
                
'theme_color' => $_GET['col']
            ]
        ]
    );


}

?>

<div class='op_top_im'>
    <img src='/core/i/part/<?=$user['part']?>.jpg?0' alt='' class='title_img' style='box-sha2dow: 0 0 10px #000;'/><br/>

</div>


    <div style='position: relative; top: -100px; color: <?=$part['color']?>; height: 0;'>
        <span style='background: #000; color: #999; f2ont-size: 11px;'>Глава <?=$user['part']?></span><br/>
        <span style='background: #000; color: #999;font-size: 20px;'><?=$part['name']?></span><br/>
    </div>

<br/>
    <div style='text-align: center;'>
    <?=$part['about']?>
</div>


<?

if ( isset($index[1]) AND $index[1] == 'end' ) {
    
$quest_id = (int)$index[2];

    if ( 
$quest_id ) {
        if ( !isset(
$quest[$quest_id]) ) {
            
g('/quest');
        }

        if ( 
$quest[$quest_id]['count'] >= $quest[$quest_id]['need'] AND !$quest[$quest_id]['end'] ) {
            
$gold $quest[$quest_id]['gold'];
            
$exp $quest[$quest_id]['exp'];

            if ( 
$user['vip_time'] > time() ) {
                
$gold $gold 2;
            }

            
$quest[$quest_id]['end'] = 1;
            
$quest_db[$quest_id]['end'] = 1;

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

                [
                    
'$set' => [
                        
'quest' => $quest_db,
                        
'gold' => $user['gold'] + $gold,
                        
'exp' => $user['exp'] + $exp,
                    ]
                ]
            );

            
?>
            <div class='ok_box'>
                <?=$lang['quest.php']['end_text']?><br/>
                <img src='<?=$gold_icon?>' alt='' width='20'/><span style='color: <?=$gold_color?>;'><?=num($gold)?></span>
                <img src='<?=$exp_icon?>' alt='' width='20'/><span style='color: <?=$exp_color?>;'><?=num($exp)?></span><br/>
            </div>
            <?


        
}
    }
}

?>
<br/>
<div style='background: #111; padding: 20px;  color: #999;text-align: center; fo2nt-size: 15px;'>
    <?=$lang['daily.php']['part_quest']?> | <a href='/daily'><?=$lang['daily.php']['daily']?></a><br/>

</div>
<br/>
<?



$all_quest 
count($quest);
$ended 0;
foreach ( 
$quest as $quest_id => $quest_dat ) {
    if ( 
$quest_dat['end'] ) {
        
$ended++;
    }
}

$progress floor($ended $all_quest 100);
$progress_color '#fff';
?>
    <br/>
    <div style='text-align: center;'>
        <span style='color: <?=$progress_color?>; font-size: 15px;'><?=$progress?>%</span>

        <div style='width: 200px; height: 10px; background: #222; margin: auto;'>
            <div style='width: <?=$progress?>%; height: 10px; background: <?=$progress_color?>;'>
            </div>
        </div>
    </div>
    <br/>
<?



foreach ( $quest as $quest_id => $quest_dat ) {
    
?>
    <div class='quest_box'>
        <?
        
if ( $quest_dat['count'] >= $quest_dat['need'] AND !$quest_dat['end'] ) {
            
?>
            <img src='/core/i/other/ok.png?1' alt='' width='30'/>
            <?
        
} elseif ( $quest_dat['end'] ) {
            
?>
            <img src='/core/i/other/ok_gray.png' alt='' width='30'/>
            <?
        
} else {
            
?>
            <span style='font-size: 30px; color: <?=$user['theme_color']?>; font-weight: bold;'>?</span>
            <?
        
}
        
?>

<!--        <img src='--><?//=$quest_dat['icon']?><!--' alt='' width='40' style='float: right; --><?// if ( $quest_dat['end'] ) print '-webkit-filter: grayscale(100%); filter: grayscale(100%); opacity: 0.5;'; ?><!--'/>-->

        <span style='font-2size: 15px; <? if ( $quest_dat['end'] ) print 'color: #555'; else print 'color: #999'?>'>
            <?=$quest_dat['name']?>

            <?
            
if ( $quest_dat['type'] == 'buy_gold' ) {
                
?>
                <br/>
                <span style='color: #777; font-size: 11px;'><?=$lang['quest.php']['dont_needed']?></span>
                <?
            
}
            
?>
        </span><br/>

        <?
        
if ( $quest_dat['end'] ) {
            
?>

            <span style='color: <?=$progress_color?>; color: #333   ;'>
                <?=$lang['quest.php']['complete']?>
            </span><br/>
            <?
        
} else {
            if ( 
$quest_dat['count'] >= $quest_dat['need'] ) {

                if ( 
$quest_dat['count'] >= $quest_dat['need'] ) {
                    
?>
                    <span style='color: yellowgreen;'>
                    <?=$lang['quest.php']['progress']?><?=$quest_dat['count']?>/<?=$quest_dat['need']?><br/>
                    </span>
                    <?
                
} else {
                    
?>

                    <?=$lang['quest.php']['progress']?><?=$quest_dat['count']?>/<?=$quest_dat['need']?><br/>
                    <?
                
}
                
?>


                <div style='text-align: center;'>
                    <a href='/quest/end/<?=$quest_id?>'>
                        <img src='<?=$gold_icon?>' alt='' width='70'/>
                    </a>

                </div>

                <?
            
} else {
                
?>
                <span class='theme_color'>
                <?=$lang['quest.php']['progress']?><?=$quest_dat['count']?>/<?=$quest_dat['need']?><br/>

                </span>
                <?
            
}
        }
        
?>
    </div>

    <?
}
Онлайн: 3
Реклама