<?
/** 
 * @Project GoldMU.Net
 * @copyright 03/03/2022
 * @Email: goldmu.net@gmail.com
 * @Zalo: 0923 117 898
 */
 
	if (!defined('GoldWebMU')) die("Ban khong co quyen truy cap he thong");
if ($Use_Event != 1) {
	echo "<center>Chức năng không có hoặc không được sử dụng</center>";
}
else {
include('config/config_event.php');

if ( !isset($_SESSION['mu_username']) ) {
	echo "<div align=center><font color=red><b>Hãy Login trước khi thực hiện chức năng này</b></font></div>";
//	include('modules/home.php');
} elseif (isset($_SESSION['mu_nvchon'])) {	
	if(isset($_GET['act'])) $act = $_GET['act'];
    else $act = null;
	switch ($act)
	{
		case 'event_week': 
			if ($event_week == 1) { include('modules/event/event_week.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'event_month': 
			if ($event_month == 1) { include('modules/event/event_month.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
            
        case 'event_bongda': 
			if ($event_bongda_on == 1) { include('modules/event/event_bongda.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'event_epitem': 
			if ($event_epitem_on == 1) { include('modules/event/event_epitem.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event1': 
			if ($event1_on == 1) { include('modules/event/event1.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'santa_ticket': 
			if ($event_santa_ticket == 1) { include('modules/event/santa_ticket.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_toprs': 
			if ($event_toprs_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_toprs2': 
			if ($event_toprs2_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_toprs3': 
			if ($event_toprs3_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_topdanhvong': 
			if ($event_topdanhvong_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_toppoint': 
			if ($event_toppoint_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_topcard': 
			if ($event_topcard_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_topcard2': 
			if ($event_topcard2_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_topcard3': 
			if ($event_topcard2_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
		case 'event_topcard4': 
			if ($event_topcard3_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
			
		case 'event_tongtop': 
			if ($event_tongtop_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;

		case 'event_topmaster2point': 
			if ($event_topmaster2point_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
			
		case 'event_topvongquay': 
			if ($event_topvongquay_on == 1) { include('modules/event/eventtop_intime.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
			
        case 'giftcode_rs': 
			include('config/config_giftcode_rs.php');
            if ($giftcode_rs_use != 'none') { include('modules/event/giftcode_rs.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_week': 
			include('config/config_giftcode_week.php');
            if ($giftcode_week_use != 'none') { include('modules/event/giftcode_week.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_month': 
			include('config/config_giftcode_month.php');
            if ($giftcode_month_use != 'none') { include('modules/event/giftcode_month.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_tanthu': 
			include('config/config_giftcode_tanthu.php');
            if ($giftcode_tanthu_use == 1) { include('modules/event/giftcode_tanthu.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
			
        case 'giftcode_napthedau': 
			include('config/config_giftcode_napthedau.php');
            if ($giftcode_napthedau_use == 1) { include('modules/event/giftcode_napthedau.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
			
        case 'giftcode_card50': 
			include('config/config_giftcode_card50.php');
            if ($giftcode_card50_use != 'none') { include('modules/event/giftcode_card50.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_card100': 
			include('config/config_giftcode_card100.php');
            if ($giftcode_card100_use != 'none') { include('modules/event/giftcode_card100.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_card200': 
			include('config/config_giftcode_card200.php');
            if ($giftcode_card200_use != 'none') { include('modules/event/giftcode_card200.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_card300': 
			include('config/config_giftcode_card300.php');
            if ($giftcode_card300_use != 'none') { include('modules/event/giftcode_card300.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_card500': 
			include('config/config_giftcode_card500.php');
            if ($giftcode_card500_use != 'none') { include('modules/event/giftcode_card500.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;

        case 'giftcode_change': 
			include('config/config_giftcode_rs.php');
            include('config/config_giftcode_week.php');
            include('config/config_giftcode_month.php');
            include('config/config_giftcode_tanthu.php');
			include('config/config_giftcode_napthedau.php');
			include('config/config_giftcode_card50.php');
			include('config/config_giftcode_card100.php');
			include('config/config_giftcode_card200.php');
			include('config/config_giftcode_card300.php');
			include('config/config_giftcode_card500.php');
			include('config/config_giftcode_allinone.php');
            if ($giftcode_allinone_use != 'none' || $giftcode_rs_use != 'none' || $giftcode_week_use != 'none' || $giftcode_month_use != 'none' || $giftcode_tanthu_use == 1 || $giftcode_napthedau_use == 1 || $giftcode_card50_use != 'none' || $giftcode_card100_use != 'none' || $giftcode_card200_use != 'none' || $giftcode_card300_use != 'none' || $giftcode_card500_use != 'none') { include('modules/event/giftcode_change.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
        case 'giftcode_history': 
			include('config/config_giftcode_rs.php');
            include('config/config_giftcode_week.php');
            include('config/config_giftcode_month.php');
            include('config/config_giftcode_tanthu.php');
			include('config/config_giftcode_napthedau.php');
			include('config/config_giftcode_card50.php');
			include('config/config_giftcode_card100.php');
			include('config/config_giftcode_card200.php');
			include('config/config_giftcode_card300.php');
			include('config/config_giftcode_card500.php');
			include('config/config_giftcode_allinone.php');
            if ($giftcode_allinone_use != 'none' || $giftcode_rs_use != 'none' || $giftcode_week_use != 'none' || $giftcode_month_use != 'none' || $giftcode_tanthu_use == 1 || $giftcode_napthedau_use == 1 || $giftcode_card50_use != 'none' || $giftcode_card100_use != 'none' || $giftcode_card200_use != 'none' || $giftcode_card300_use != 'none' || $giftcode_card500_use != 'none') { include('modules/event/giftcode_history.php'); }
			else { echo "<center>Event chưa bật</center>"; }
			break;
            
        case 'award':
            include('modules/event/award.php');
        break;
        
        case 'sharefb':
        	include('config/config_sharefb.php');
            if ($event_sharefb_on == 1) { include('modules/event/sharefb.php'); }
            else { echo "<center>Event chưa bật</center>"; }
        break;
		
        case 'event_tichluythe': 
            if ($event_tichluythe_on == 1) { include('modules/event/event_tichluythe.php'); }
			else { echo "<center>Event chưa bật</center>"; }
		break;
		
        case 'event_thangcap': 
            if ($event_thangcap_on == 1) { include('modules/event/event_thangcap.php'); }
			else { echo "<center>Event chưa bật</center>"; }
		break;
        
        default:
            $page_template = 'templates/home.aspx';
	}
}else $page_template = 'templates/chonnv.aspx';
}
?>