<?php
$__yt_template_key = 'kongtiao';
$__yt_required_level = 1;
$__yt_site_id = 'EC20260610FB84D33E';
$__yt_allowed_domains = array (
  0 => '127.0.0.1',
);

if (!defined('ROOT_PATH')) {
    return false;
}

if (!class_exists('\Core\Lib\License')) {
    require_once ROOT_PATH . 'core/lib/license.php';
}
if (!class_exists('\Core\Lib\TemplateLoader')) {
    require_once ROOT_PATH . 'core/lib/template_loader.php';
}

$__yt_guard_license = new \Core\Lib\License();
$__yt_guard_loader = new \Core\Lib\TemplateLoader($__yt_guard_license);
$__yt_guard_status = $__yt_guard_license->getStatus();
$__yt_guard_site_id = trim((string) ($__yt_guard_status['site_id'] ?? ''));
$__yt_guard_level = intval($__yt_guard_status['level'] ?? 1);
$__yt_guard_domain = trim((string) ($_SERVER['HTTP_HOST'] ?? ''));

if ($__yt_site_id !== '' && $__yt_guard_site_id !== $__yt_site_id) {
    return false;
}
if ($__yt_guard_level < $__yt_required_level) {
    return false;
}
if (!empty($__yt_allowed_domains) && $__yt_guard_domain !== '' && !in_array($__yt_guard_domain, $__yt_allowed_domains, true)) {
    return false;
}
if (!$__yt_guard_loader->validateInstalledTemplate($__yt_template_key)) {
    return false;
}

return true;