<?
    if(strlen($_SESSION['acc_phone']) <= 0) {
?>
<div class="primary-block">
    <div class="main-content">
        <h1 class="title-content">Cập nhập Thông tin tài khoản</h1>
        <div class="form-1">
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Tài khoản</span></div>
                <div class="form-1-col-2"><span class="tag tag-orange"><? echo isset($_SESSION['mu_username']) ? $_SESSION['mu_username'] : 'demo'; ?></span></div>
                <div class="form-1-col-3">&nbsp;</div>
            </div>
            <div class="out-top-20">
                <div class='error out-bottom-10'>Thông tin tài khoản chưa đầy đủ. Vui lòng cập nhật thêm.</div>
                <a href="#acc_manager&act=changesdt_info" rel="ajax" class="btn btn-block btn-green btn-lg" >Cập nhật thêm</a>
            </div>
        </div>
    </div>
</div>
<?
    }
?>

<div class="primary-block out-top-20">
    <ul class="menu-main-tabs">
		<li class="main-tab active"><a href="javascript:;">Thông Báo Quan Trọng</a></li>
		<? if(isset($Use_TimeEvent) && $Use_TimeEvent == 1) { ?>
        <li class="main-tab"><a href="javascript:;">Giờ sự Kiện Game</a></li>
		<? } ?>
    </ul>
    <div class="in-20" >
        <ul class="content-main-tabs">
            <li class="content-m-tab active">
                <?
                    // KM Card
                    include('config/config_napthe.php');
					$time_now = time();
						if(isset($kmbegin) && isset($kmend) && strtotime($kmbegin) <= $time_now && (strtotime($kmend) + 24*60*60 - 1) >= $time_now && $khuyenmai_phantram > 0) {
							$kmbegin_date = date('d/m', strtotime($kmbegin));
							$kmend_date = date('d/m', strtotime($kmend));
							echo "<center>Hiện đang <span class='tag tag-orange'>Khuyến mại nạp thẻ</span> : <span class='tag tag-red'>$khuyenmai_phantram%</span> từ 0h $kmbegin_date - 24h $kmend_date.</center><br /><br />";
						}
                    // KM Card End
                    
                    
                    $config_notice = file_get_contents('config/config_notice.txt');
                    $config_notice = htmlspecialchars_decode(urldecode($config_notice));
                    echo "<div class='info_noimg'>". $config_notice ."</div>";
                ?>
            </li>
            <li class="content-m-tab">
                <script>
                $(document).ready(function() {
                    $('[data-countdown]').each(function() {
                        var $this = $(this), finalDate = $(this).data('countdown');
                        $this.countdown(finalDate, function(event) {
                            $this.html(event.strftime('%H:%M:%S'));
                        });
                    });
                });
                </script>
                
                <div class="form-1">
                    <?
                        foreach($eventgame_show_arr as $eventgame_k => $eventgame_v) { 
                            foreach($eventgame_v as $eventgame_k2 => $eventgame_v2) { 
                    ?>
                    <div class="form-1-row">
                        <div class="form-1-col-1_event"><span><? echo $eventgame_v2['name']; ?></span></div>
                        <div class="form-1-col-2_event"><span class="tag tag-orange"><? echo $eventgame_v2['server']; ?></span></div>
                        <div class="form-1-col-3_event"><span class="tag tag-green"><? echo $eventgame_v2['timer_show']; ?></span> <span data-countdown="<? echo $eventgame_v2['timer']; ?>">&nbsp;</span></div>
                    </div>
                    <? } } ?>
                </div>
                
                <div class="form-1">
                    <center>
                        <strong>Kundun</strong><br />
                        Cập nhập <? echo date('H:i', $data_arr['kudnun']['timecheck']); ?> (5 phút cập nhập 1 lần)
                    </center>
                    <?
                        if(is_array($data_arr['kudnun']['data'])) {
                            foreach($data_arr['kudnun']['data'] as $kundun_k => $kundun_v) { 
                                if($kundun_v['stat'] == 1) {
                                    $kundun_stat = "Đang có";
                                } else {
                                    $kundun_stat = $kundun_v['next'];
                                }
                    ?>
                    <div class="form-1-row">
                        <div class="form-1-col-1_event"><span><? echo $kundun_v['server']; ?></span></div>
                        <div class="form-1-col-2_event"><span class="tag tag-orange"><? echo $kundun_stat; ?></span></div>
                        <? if($kundun_v['stat'] == 0) { ?> 
                        <div class="form-1-col-3_event"><span class="tag tag-red" data-countdown="<? echo $kundun_v['date_next']; ?>" >&nbsp;</span></div>
                        <? } ?>
                    </div>
                    <? } } ?>
                </div>
            </li>
        </ul>
    </div>
</div>

            <div class="primary-block out-top-20">
                <div class="home-slide">
                    <div id="slider_container" style="position:relative;margin:0px;height:auto;left:0px;top:0px;">
                    <div style="left:0px;top:0px;height:auto;overflow:hidden;">
                        <? include('forum_news/getdata.php'); ?>
                    </div>
                    </div>
                </div>
            </div>

<!--div class="primary-block out-top-20">
    <div class="main-content">
        <h1 class="title-content">Thông tin tài khoản</h1>
        <div class="form-1">
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Tài khoản</span></div>
                <div class="form-1-col-2"><span class="tag tag-orange"><? echo isset($_SESSION['mu_username']) ? $_SESSION['mu_username'] : 'demo'; ?></span></div>
                <div class="form-1-col-3">&nbsp;</div>
            </div>
            <?
                if(strlen($_SESSION['acc_phone']) > 0) {
            ?>
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Mật khẩu Game</span></div>
                <div class="form-1-col-2">******</div>
                <div class="form-1-col-3"><a href="#acc_manager&act=changepass1_info" rel="ajax" class="btn btn-green btn-icon-setup">Chỉnh sửa</a></div>
            </div>
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Mật khẩu Web</span></div>
                <div class="form-1-col-2">******</div>
                <div class="form-1-col-3"><a href="#acc_manager&act=changepass2_info" rel="ajax" class="btn btn-green btn-icon-setup">Chỉnh sửa</a></div>
            </div>
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Số điện thoại</span></div>
                <div class="form-1-col-2">*******<? echo isset($_SESSION['acc_phone']) ? $_SESSION['acc_phone'] : 'demo'; ?></div>
                <div class="form-1-col-3"><a href="#acc_manager&act=changesdt_sms" rel="ajax" class="btn btn-green btn-icon-setup">Chỉnh sửa</a></div>
            </div>
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Câu hỏi bí mật</span></div>
                <div class="form-1-col-2">&nbsp;</div>
                <div class="form-1-col-3"><a href="#acc_manager&act=changequest" rel="ajax" class="btn btn-green btn-icon-setup">Chỉnh sửa</a></div>
            </div>
            <div class="form-1-row">
                <div class="form-1-col-1"><span>Câu trả lời bí mật</span></div>
                <div class="form-1-col-2">&nbsp;</div>
                <div class="form-1-col-3"><a href="#acc_manager&act=changeans" rel="ajax" class="btn btn-green btn-icon-setup">Chỉnh sửa</a></div>
            </div>

            <?
                }
            ?>
            
            
            
        </div>
        
        
    </div>
</div--!>
<?if(isset($Use_Tintuc) && $Use_Tintuc == 1){?>
	<div class="primary-block out-top-20">
		<div class="main-content">
			
			<?php include_once('modules/ajax_news.php'); ?>		
		</div>
	</div>
	<? } if(isset($Use_Tintuc4r) && $Use_Tintuc4r == 1){ ?>
	<div class="primary-block out-top-20">
		<div class="main-content">
				<? include_once('forum_news/getdata.php'); ?>
		</div>
	</div>
	<? } ?>