<?php if ( !isset($islogin)) header("Location: /");//非法访问 ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title><?php echo WEB_TITLE ?> - <?php echo (isset($title))?$title:'首页' ?></title>
    <meta name="description" content="<?php echo WEB_DESC ?>">
    <meta name="keywords" content="<?php echo WEB_KEY ?>">
    <link rel="shortcut icon" href="/assets/media/favicon.png" type="image/x-icon">
    <!-- 框架核心样式 -->
    <link rel="stylesheet" id="css-main" href="<?php echo __CSS__ ?>oneui.min-5.6.css">
    <!-- 图片预览 -->
    <link rel="stylesheet" href="<?php echo __JS__ ?>plugins/magnific-popup/magnific-popup.css">
    <!-- nprogress -->
    <link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-0-M/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">

    <!-- jquery -->
    <script src="<?php echo __JS__ ?>lib/jquery.min.js"></script>
    <!-- jquery pjax-->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>
    <!--nprogress-->
    <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-0-M/nprogress/0.2.0/nprogress.min.js"></script>
    <!-- layer -->
    <script src="<?php echo __JS__ ?>lib/layer.min.js"></script>
    <!-- 框架核心js -->
    <script src="<?php echo __JS__ ?>oneui.app.min-5.6.js"></script>
    <!-- 图表库 -->
    <script src="<?php echo __JS__ ?>plugins/chart.js/chart.min.js"></script>
    <!-- 通知库 -->
    <script src="<?php echo __JS__ ?>plugins/bootstrap-notify/bootstrap-notify.min.js"></script>
    <!-- 图片预览 -->
    <script src="<?php echo __JS__ ?>plugins/magnific-popup/jquery.magnific-popup.min.js"></script>
    <!-- 日期选择 -->
    <script src="<?php echo __JS__ ?>plugins/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
    <!-- Bootstrap-table-->
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.18.3/bootstrap-table.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.15.4/locale/bootstrap-table-zh-CN.min.js"></script>
    <!-- 引入 filter-control 插件所需的 CSS 和 JS 文件 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.3/extensions/filter-control/bootstrap-table-filter-control.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.18.3/extensions/filter-control/bootstrap-table-filter-control.js"></script>

    <!-- 地图插件-->
    <script src="https://img.hcharts.cn/highmaps/highmaps.js"></script>
    <!-- 地图插件-->
    <script src="https://data.jianshukeji.com/geochina/china.js"></script>
    <!-- App核心文件 -->
    <script src="<?php echo __JS__ ?>app.js"></script>

    <style>
        .btn-xs {
            --bs-btn-padding-y: 0.125rem;
            --bs-btn-padding-x: 0.25rem;
            --bs-btn-font-size: 0.75rem;
            /*--bs-btn-border-radius: 0.125rem;*/
        }
         .table thead th {
             text-transform: none;
         }
        tbody, td, tfoot, th, thead, tr {
            border-color: inherit;
            border-style: none;
            border-width: 0;
        }
    </style>
</head>

<body>
    <div id="page-container"
         class="sidebar-o sidebar-dark enable-page-overlay side-scroll page-header-fixed main-content-narrow side-trans-enabled">
        <nav id="sidebar" aria-label="Main Navigation">
            <div class="content-header">
                <a class="fw-semibold text-dual" data-pjax href="index.php">
                    <span class="smini-visible">
                        <i class="fa fa-circle-notch text-primary"></i>
                    </span>
                    <span class="smini-hide fs-5 tracking-wider"><?php echo WEB_NAME ?></span></span>
                </a>
                <div>
                    <button type="button" class="btn btn-sm btn-alt-secondary" data-toggle="layout"
                            data-action="dark_mode_toggle">
                        <i class="far fa-moon"></i>
                    </button>
                    <div class="dropdown d-inline-block ms-1">
                        <button type="button" class="btn btn-sm btn-alt-secondary" id="sidebar-themes-dropdown"
                                data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fa fa-brush"></i>
                        </button>
                        <div class="dropdown-menu dropdown-menu-end fs-sm smini-hide border-0"
                             aria-labelledby="sidebar-themes-dropdown">
                            <a class="dropdown-item d-flex align-items-center justify-content-between fw-medium active"
                               data-toggle="theme" data-theme="default" href="#">
                                <span>Default</span>
                                <i class="fa fa-circle text-default"></i>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between fw-medium"
                               data-toggle="theme" data-theme="../assets/css/themes/amethyst.min-5.5.css" href="#">
                                <span>Amethyst</span>
                                <i class="fa fa-circle text-amethyst"></i>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between fw-medium"
                               data-toggle="theme" data-theme="../assets/css/themes/city.min-5.5.css" href="#">
                                <span>City</span>
                                <i class="fa fa-circle text-city"></i>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between fw-medium"
                               data-toggle="theme" data-theme="../assets/css/themes/flat.min-5.5.css" href="#">
                                <span>Flat</span>
                                <i class="fa fa-circle text-flat"></i>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between fw-medium"
                               data-toggle="theme" data-theme="../assets/css/themes/modern.min-5.5.css" href="#">
                                <span>Modern</span>
                                <i class="fa fa-circle text-modern"></i>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between fw-medium"
                               data-toggle="theme" data-theme="../assets/css/themes/smooth.min-5.5.css" href="#">
                                <span>Smooth</span>
                                <i class="fa fa-circle text-smooth"></i>
                            </a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item fw-medium" data-toggle="layout" data-action="sidebar_style_light"
                               href="javascript:void(0)">
                                <span>Sidebar Light</span>
                            </a>
                            <a class="dropdown-item fw-medium" data-toggle="layout" data-action="sidebar_style_dark"
                               href="javascript:void(0)">
                                <span>Sidebar Dark</span>
                            </a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item fw-medium" data-toggle="layout" data-action="header_style_light"
                               href="javascript:void(0)">
                                <span>Header Light</span>
                            </a>
                            <a class="dropdown-item fw-medium" data-toggle="layout" data-action="header_style_dark"
                               href="javascript:void(0)">
                                <span>Header Dark</span>
                            </a>
                        </div>
                    </div>
                    <a class="d-lg-none btn btn-sm btn-alt-secondary ms-1" data-toggle="layout"
                       data-action="sidebar_close" href="javascript:void(0)">
                        <i class="fa fa-fw fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="js-sidebar-scroll" data-simplebar="init">
                <div class="simplebar-wrapper" style="margin: 0px;">
                    <div class="simplebar-height-auto-observer-wrapper">
                        <div class="simplebar-height-auto-observer"></div>
                    </div>
                    <div class="simplebar-mask">
                        <div class="simplebar-offset" style="right: 0px; bottom: 0px;">
                            <div class="simplebar-content-wrapper" tabindex="0" role="region"
                                 aria-label="scrollable content" style="height: 100%; overflow: hidden;">
                                <div class="simplebar-content" style="padding: 0px;">
                                    <div class="content-side" id="nav-main">
                                        <ul class="nav-main">
                                            <li class="nav-main-item">
                                                <a class="nav-main-link " data-pjax href="./index.php">
                                                    <i class="nav-main-link-icon si si-speedometer"></i>
                                                    <span class="nav-main-link-name">首页</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu"
                                                   aria-haspopup="true" aria-expanded="false" href="#">
                                                    <i class="nav-main-link-icon si si-layers"></i>
                                                    <span class="nav-main-link-name">系统设置</span>
                                                </a>
                                                <ul class="nav-main-submenu">
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax href="set.php">
                                                            <span class="nav-main-link-name">网站设置</span>
                                                        </a>
                                                    </li>
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax href="membership.php">
                                                            <span class="nav-main-link-name">开关配置</span>
                                                        </a>
                                                    </li>
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax href="set_adm.php">
                                                            <span class="nav-main-link-name">修改资料</span>
                                                        </a>
                                                    </li>
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax  href="plans.php">
                                                            <span class="nav-main-link-name">套餐设置</span>
                                                        </a>
                                                    </li>
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax href="pay_set.php">
                                                            <span class="nav-main-link-name">支付配置</span>
                                                        </a>
                                                    </li>
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax href="send.php">
                                                            <span class="nav-main-link-name">发信设置</span>
                                                        </a>
                                                    </li>
                                                    <li class="nav-main-item">
                                                        <a class="nav-main-link" data-pjax href="fastlogin.php">
                                                            <span class="nav-main-link-name">快捷登录</span>
                                                        </a>
                                                    </li>                                                    
                                                </ul>
                                            </li>
                                            
                                            <li class="nav-main-heading">导航</li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="user.php">
                                                    <i class="nav-main-link-icon si si-users"></i>
                                                    <span class="nav-main-link-name">用户列表</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="keylist.php">
                                                    <i class="nav-main-link-icon si si-key"></i>
                                                    <span class="nav-main-link-name">Key列表</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="card_list.php">
                                                    <i class="nav-main-link-icon si si-chemistry"></i>
                                                    <span class="nav-main-link-name">卡密列表</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="order.php">
                                                    <i class="nav-main-link-icon si si-heart"></i>
                                                    <span class="nav-main-link-name">订单列表</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="order_map.php">
                                                    <i class="nav-main-link-icon si si-map"></i>
                                                    <span class="nav-main-link-name">订单地图</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" onclick="checkVersion()">
                                                    <i class="nav-main-link-icon si si-reload"></i>
                                                    <span class="nav-main-link-name">检查更新</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="simplebar-placeholder" style="width: auto; height: 735px;"></div>
                </div>
                <div class="simplebar-track simplebar-horizontal" style="visibility: hidden;">
                    <div class="simplebar-scrollbar" style="width: 0px; display: none;"></div>
                </div>
                <div class="simplebar-track simplebar-vertical" style="visibility: hidden;">
                    <div class="simplebar-scrollbar" style="height: 0px; display: none;"></div>
                </div>
            </div>
        </nav>
        <header id="page-header">
            <div class="content-header">
                <div class="d-flex align-items-center">
                    <button type="button" class="btn btn-sm btn-alt-secondary me-2 d-lg-none" data-toggle="layout"
                            data-action="sidebar_toggle">
                        <i class="fa fa-fw fa-bars"></i>
                    </button>
                    <button type="button" class="btn btn-sm btn-alt-secondary me-2 d-none d-lg-inline-block"
                            data-toggle="layout" data-action="sidebar_mini_toggle">
                        <i class="fa fa-fw fa-ellipsis-v"></i>
                    </button>


                </div>
                <div class="d-flex align-items-center">
                    <div class="dropdown d-inline-block ms-2">
                        <button type="button" class="btn btn-sm btn-alt-secondary d-flex align-items-center"
                                id="page-header-user-dropdown" data-bs-toggle="dropdown" aria-haspopup="true"
                                aria-expanded="false">
                            <img class="rounded-circle" src="https://q2.qlogo.cn/g?b=qq&nk=<?php echo ADMQQ ?>%3E&s=100" alt="Header Avatar"
                                 style="width: 21px;">
                            <span class="d-none d-sm-inline-block ms-2"><?php echo ADMNICK ?></span>
                            <i class="fa fa-fw fa-angle-down d-none d-sm-inline-block opacity-50 ms-1 mt-1"></i>
                        </button>
                        <div class="dropdown-menu dropdown-menu-md dropdown-menu-end p-0 border-0"
                             aria-labelledby="page-header-user-dropdown">
                            <div class="p-3 text-center bg-body-light border-bottom rounded-top">
                                <img class="img-avatar img-avatar48 img-avatar-thumb"
                                     src="https://q2.qlogo.cn/g?b=qq&nk=<?php echo ADMQQ ?>%3E&s=100" alt="">
                                <p class="mt-2 mb-0 fw-medium"><?php echo ADMNICK ?></p>
                                <p class="mb-0 text-muted fs-sm fw-medium">Web Admin,Developer</p>
                            </div>
                            <div class="p-2">
                                <a class="dropdown-item d-flex align-items-center justify-content-between"
                                   data-pjax href="set.php">
                                    <span class="fs-sm fw-medium">设置</span>
                                    <i class="fa-fw si si-settings ms-1 opacity-50"></i>
                                </a>
                                <a class="dropdown-item d-flex align-items-center justify-content-between" data-pjax href="set_adm.php">
                                    <span class="fs-sm fw-medium">修改</span>
                                    <i class="fa-fw si si-wrench ms-1 opacity-50"></i>
                                </a>
                                <a class="dropdown-item d-flex align-items-center justify-content-between"
                                   href="./?action=logout">
                                    <span class="fs-sm fw-medium">登出</span>
                                    <i class="fa-fw si si-logout ms-1 opacity-50"></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="page-header-loader" class="overlay-header bg-body-extra-light">
                <div class="content-header">
                    <div class="w-100 text-center">
                        <i class="fa fa-fw fa-circle-notch fa-spin"></i>
                    </div>
                </div>
            </div>
        </header>
        <main id="main-container">