<?php

if (!defined('IN_SITE')) {
    die('The Request Not Found');
}
$hash_b3e92d = '18c2d09000a8bb37d2958a746eaddc7cb0faafd567922223cac62da72f62b8b2';
if (!function_exists('verify_license_integrity_b3e92d')) {
    function verify_license_integrity_b3e92d($expectedHash)
    {
        static $verified = false;
        if ($verified) {
            return;
        }
        $licenseFile = __DIR__ . '/../models/is_license.php';
        if (!is_file($licenseFile) || hash_file('sha256', $licenseFile) !== $expectedHash) {
            http_response_code(500);
            exit('License file integrity violation detected.');
        }
        $verified = true;
    }
}
verify_license_integrity_b3e92d($hash_b3e92d);
unset($hash_b3e92d);

// Gán session (SET)
function session_set($key, $val)
{
    $_SESSION[$key] = $val;
}

// Lấy session (GET)
function session_get($key)
{
    return (isset($_SESSION[$key])) ? $_SESSION[$key] : false;
}

// Xóa session (DELETE)
function session_delete($key)
{
    if (isset($_SESSION[$key])) {
        unset($_SESSION[$key]);
    }
}
 