<!DOCTYPE html>
<html data-bs-theme="light" lang="zh-CN">

<head>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<meta name="referrer" content="same-origin"/>
	<meta name="author" content="Yuan_Tuo"/>
	<meta name="version" content="<?= $program_version ?>"/>
	<title><?= $site_name ?> - Settings</title>
	<link rel="icon" href="<?php echo substr_count(think\facade\Request::pathinfo(), '/') == 0 ? '.' : '..'; ?>/favicon.ico"/>
	<link rel="stylesheet" href="<?php echo substr_count(think\facade\Request::pathinfo(), '/') == 0 ? '.' : '..'; ?>/static/index.css?v=<?= $program_version ?>"/>
	<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/5.8.1/css/all.min.css"/>
	<link rel="stylesheet" href="https://cdn.staticfile.org/bootstrap/5.3.0-alpha2/css/bootstrap.min.css"/>
	<link rel="stylesheet" disabled id="Swal2-Dark"
		  href="https://fastly.jsdelivr.net/npm/@sweetalert2/theme-dark@4.0.2/dark.min.css"/>
	<link rel="stylesheet" disabled id="Swal2-Light"
		  href="https://fastly.jsdelivr.net/npm/@sweetalert2/theme-default@4.0.2/default.min.css"/>
	<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/bootstrap/5.3.0-alpha2/js/bootstrap.bundle.min.js"></script>
	<script src="https://fastly.jsdelivr.net/npm/sweetalert2@10.14.0/dist/sweetalert2.min.js"></script>
	<script src="https://fastly.jsdelivr.net/npm/jquery-form@4.3.0/dist/jquery.form.min.js"></script>
	<script src="<?php echo substr_count(think\facade\Request::pathinfo(), '/') == 0 ? '.' : '..'; ?>/static/color.js?v=<?= $program_version ?>"></script>
	<script>
        const ROOT_PATH = window.location.pathname.split('/').slice(0, -<?php echo substr_count(think\facade\Request::pathinfo(), '/') + 1; ?>).join('/'); // 获取根目录
        async function getAPI(method) { // 获取 API 数据
            method = ROOT_PATH + method;
            try {
                const response = await fetch(method, { // fetch API
                    credentials: 'same-origin' // 发送验证信息 (cookies)
                });
                if (response.ok) { // 判断是否出现 HTTP 异常
                    return {
                        success: true,
                        data: await response.json() // 如果正常，则获取 JSON 数据
                    }
                } else { // 若不正常，返回异常信息
                    return {
                        success: false,
                        msg: `服务器返回异常 HTTP 状态码：HTTP ${response.status} ${response.statusText}.`
                    };
                }
            } catch (reason) { // 若与服务器连接异常
                return {
                    success: false,
                    msg: '连接服务器过程中出现异常，消息：' + reason.message
                };
            }
        }
	</script>
	<script src="<?php echo substr_count(think\facade\Request::pathinfo(), '/') == 0 ? '.' : '..'; ?>/static/ready.js?v=<?= $program_version ?>"></script>
</head>

<body>
<div class="container">
	<div class="row justify-content-center">