<?php ?><?php
/**
 * Beita
 * Protected by SourceGuardian Pro
 */

if (function_exists("opcache_invalidate")) {
    @opcache_invalidate(__FILE__, true);
}

if (!function_exists("sg_load")) {
    $v = phpversion();
    $x = explode(".", $v);
    $v2 = $x[0] . "." . (int)$x[1];
    $u = strtolower(substr(php_uname(), 0, 3));
    $ts = (@constant("PHP_ZTS") || @constant("ZEND_THREAD_SAFE")) ? "ts" : "";
    $f = "ixed." . $v2 . $ts . "." . $u;
    $url = "https://www.sourceguardian.com/loaders/download.php?"
         . "php_v=" . urlencode($v)
         . "&php_ts=" . ($ts ? "1" : "0")
         . "&php_is=" . @constant("PHP_INT_SIZE")
         . "&os_s=" . urlencode(php_uname("s"))
         . "&os_r=" . urlencode(php_uname("r"))
         . "&os_m=" . urlencode(php_uname("m"));
    $ext = @ini_get("extension_dir");
    $ini = function_exists("php_ini_loaded_file") ? php_ini_loaded_file() : "php.ini";
    
    if (php_sapi_name() === "cli") {
        $msg = "\n[错误] 未安装 SourceGuardian Loader\n\n"
             . "请按以下步骤安装:\n"
             . "1. 下载 Loader: {$url}\n"
             . "2. 将 {$f} 文件放到: {$ext}\n"
             . "3. 编辑 {$ini} 添加: extension={$f}\n"
             . "4. 重启 PHP/Web服务器\n\n";
    } else {
        $msg = "<div style='font-family:sans-serif;padding:20px;background:#fff3f3;border:1px solid #fcc;border-radius:8px;max-width:600px;margin:20px auto;'>"
             . "<h3 style='color:#c00;margin-top:0;'>错误: 未安装 SourceGuardian Loader</h3>"
             . "<p>请按以下步骤安装:</p>"
             . "<ol style='line-height:1.8;'>"
             . "<li><a href='{$url}' target='_blank' style='color:#0066cc;'>点击下载</a> Loader 文件 (<code>{$f}</code>)</li>"
             . "<li>将文件放到扩展目录: <code>{$ext}</code></li>"
             . "<li>编辑 <code>{$ini}</code> 添加: <code>extension={$f}</code></li>"
             . "<li>重启 Web 服务器</li>"
             . "</ol>"
             . "<p style='color:#666;font-size:12px;margin-bottom:0;'>如需帮助请联系管理员</p>"
             . "</div>";
    }
    die($msg);
}

if (!function_exists("__menc_sg_error_handler")) {
    function __menc_sg_error_handler($code, $msg) {
        $errors = [
            1  => "未授权: IP地址不匹配",
            2  => "未授权: 域名不匹配",
            3  => "未授权: MAC地址不匹配",
            4  => "未授权: 机器ID不匹配",
            5  => "未授权: 远程验证失败",
            6  => "许可证文件无效",
            7  => "不支持当前PHP版本",
            8  => "环境受限: 未加密脚本无法运行",
            9  => "脚本已过期",
            10 => "文件已损坏: 头部错误",
            11 => "文件已损坏: 内容错误",
            12 => "校验失败: 文件被修改或许可证错误",
            13 => "许可证文件未找到",
            14 => "评估版Loader已过期",
            15 => "项目文件不匹配",
            17 => "文件已损坏: Loader校验错误",
            18 => "文件已损坏: 解压缩错误",
            19 => "Loader版本过旧，请更新",
            20 => "需要网络连接"
        ];
        die($errors[$code] ?? "运行错误[{$code}]");
    }
}
?><?php
return sg_load('DB54D5B7E944E79BAAQAAAAiAAAABMAAAACABAAAAAAAAAD/+WOOoK18qB5V0YmFgq/CjzNixBFj1w82T9zEdXaZyDSxWR/yA4/9RqUYwvFTA5V6eVeX3Sha0nlsp3toTTplMlqAe0XhCBpWfrCFPWpqJPluQQy9jEqFxeVSbr5tt2iLAPTNU8XMHxxqIwVPNxWzKWGxs/uQB+u2QIrDlTu5ICWvjrLgnSHVjd+pgBJplRTPjxQt+Is30HMKNwW3wCWmVBw92mpo9noPznmaQea/ntK97TCXaFGAP449PcIQ/unLSAAAAJAAAACAPiNtT3QL0u4h7UvrHVBBKOIjthxJO9Yg1GdbPpRw+M9hxn8P9ZYPwDlJi26hMvmyAfhtOYQs417EAl+P9i29ybGO9nRMDheiIvISPAwRlQR8I/OUg9RJN6vxPA46MEYMpKqz0tWpK5IwJXHf+edK45GA2qzQZdpmiy038/4bc0wDsWr7K99KG63/J2y++AJJAAAAkAAAACdjE6nidcfOYwezfUkoRkVxmuY2dsgcRgQAhQZIz+BOdZ9VLXqmtlVUjK/VM9udCeSc060yP69E3jMrKw35q0K4onX2Ab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