<? if (isset($_SESSION[mu_nvchon])) { ?>
<div class="primary-block">
    <div class="main-content">
        <h1 class="title-content">Nhận Giải Thưởng Event</h1>
    </div>
</div>

<div class="primary-block out-top-20">
    <div class="in-20">
<? 
    if(isset($error_module)) echo "<center><font color='red'><strong>$error_module</strong></font></center>";
?>


<center><b><font size=3>Item đạt giải thưởng</font></b></center>


        <ul class="box-award">
            <?
                if(count($listitem_arr) > 0) {
                foreach($listitem_arr as $item) {

            ?>

            <li class="award-item <? if($item['status'] == 0) echo 'award-received'  ?>" id="li_award_<? echo $item['award_id']; ?>">
                <div class="award-info">
                    <div class="info-line">
                        <div class="info-head">
                            <div class="image-head"><img src="items/<? echo $item['item_image']; ?>.gif" /></div>
                            <div class="info-text">
                                <p class="name-item">Giải: <span><? echo $item['award_info']; ?></span></p>
                                <span class="soluong">Số lượng: <span><? echo $item['item_slg']; ?></span></span>
                            </div>
                        </div>
                        <div class="line"></div>
                        <? echo $item['item_info']; ?>
                    </div>
                    <div class="award-button">
                        <? if($item['status'] == 0) { ?>
                            <span id="award_receive_<? echo $item['award_id']; ?>">
                                <button class="btn btn-green award_receive" type="button" <? if($accept == 0) echo "disabled='disabled'"; ?> award_id="<? echo $item['award_id']; ?>"> <? if($accept == 0) echo "Chưa thoát Game"; else echo "Nhận Item"; ?></button>
                                <span id="loading_<? echo $item['award_id']; ?>"></span>
                                <span id="err_<? echo $item['award_id']; ?>"  style="color:#FF0000"></span>
                            </span>
                        <? } else { ?>
                            <span class="received">Đã nhận lúc<br /><? echo $item['receive_time']; ?></span>
                        <? } ?>
                    </div>
                    <div class="award-image" style="background-image: url(items/<? echo $item['item_image']; ?>.gif)"></div>
                </div>
            </li>

            <? } } else echo "<center><font color='red'><strong>Không có Item đạt giải Event</strong></font></center>"; ?>
        </ul>
    </div>
</div>
<? } else include('templates/char_manager.aspx'); ?>