<!-- Dev By CMSNT.CO | FB.COM/CMSNT.CO | ZALO.ME/0947838128 | MMO Solution -->
<?php
define("IN_SITE", true);


require_once(__DIR__.'/libs/db.php');
require_once(__DIR__.'/config.php');
require_once(__DIR__.'/libs/lang.php');
require_once(__DIR__.'/libs/helper.php');
require_once(__DIR__.'/libs/database/users.php');
$CMSNT = new DB();
 

if (!function_exists('verify_license_integrity_a91fef')) {
    http_response_code(500);
    exit('License integrity handler missing. Access denied.');
}


$module = !empty($_GET['module']) ? check_path($_GET['module']) : 'client';
$home   = $module == 'client' ? $CMSNT->site('home_page') : 'home';
$action = !empty($_GET['action']) ? check_path($_GET['action']) : $home;

if($module == 'client'){
    if ($CMSNT->site('status') != 1 && isSecureCookie('admin_login') != true) {
        require_once(__DIR__.'/resources/views/common/maintenance.php');
        exit();
    }
}

if($module == 'admin'){
    require_once __DIR__.'/models/is_admin.php';
}

if($action == 'footer' || $action == 'header' || $action == 'sidebar' || $action == 'nav'){
    require_once(__DIR__.'/resources/views/common/404.php');
    exit();
}
$path = "resources/views/$module/$action.php";
if (file_exists($path)) {
    require_once(__DIR__.'/'.$path);
    exit();
} else {
    require_once(__DIR__.'/resources/views/common/404.php');
    exit();
}
?>
