<?php
/**
 * 公共顶部文件
 */
$protect_admin = true; #勿动,否则后台瘫痪
include "../includes/fun.global.php";

?>
<!DOCTYPE html>
<html lang="en" style="font-size: 100%">
<head>
    <meta charset="utf-8"/>
    <title><?= $title ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description"/>
    <meta content="Coderthemes" name="author"/>
    <!-- App favicon -->
    <link rel="shortcut icon" href="<?= $cdnserver == null ? '../' : $cdnserver ?>assets/favicon.ico">

    <!-- third party css -->
    <link href="<?= $cdnserver == null ? '../' : $cdnserver ?>assets/css/vendor/jquery-jvectormap-1.2.2.css"
          rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css"
          href="<?= $cdnserver == null ? '../' : $cdnserver ?>assets/layui/css/layui.css"/>
    <!-- third party css end -->
    <link rel="shortcut icon" href="<?= $cdnserver == null ? '../' : $cdnserver ?>assets/favicon.ico"
          type="image/x-icon"/>
    <!-- App css -->
    <link href="<?= $cdnserver == null ? '../' : $cdnserver ?>assets/css/icons.min.css" rel="stylesheet"
          type="text/css"/>
    <link href="<?= $cdnserver == null ? '../' : $cdnserver ?>assets/css/app.min.css" rel="stylesheet" type="text/css"/>

</head>
<style>
    .card-title {
        font-weight: 300;
    };
</style>
<body>
<!-- Begin page -->
<div class="wrapper">
    <!-- ========== Left Sidebar Start ========== -->
    <div class="left-side-menu" style="z-index: 10;">
        <div class="slimscroll-menu" id="left-side-menu-container">
            <!-- LOGO -->

            <!--- Sidemenu -->
            <ul class="metismenu side-nav">

                <li class="side-nav-title side-nav-item" style="font-size: 2em;color: white;font-weight: 300">小储云商城
                </li>

                <li class="side-nav-item">
                    <a href="index.php" class="side-nav-link">
                        <i class="layui-icon layui-icon-home"></i>
                        <span> 后台首页 </span>
                    </a>
                </li>

                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-cart"></i>
                        <span> 商品管理 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.goods.list.php">商品列表</a>
                        </li>
                        <li>
                            <a href="admin.order.list.php">订单详情</a>
                        </li>
                        <li>
                            <a href="admin.goods.add.php">添加商品</a>
                        </li>
                        <li>
                            <a href="admin.goods.token.php">卡密库存</a>
                        </li>
                        <li>
                            <a href="admin.goods.express.php">运费模板</a>
                        </li>
                    </ul>
                </li>

                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-transfer"></i>
                        <span> 分类管理 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.class.list.php">分类列表</a>
                        </li>
                        <li>
                            <a href="admin.class.add.php">添加分类</a>
                        </li>
                    </ul>
                </li>

                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-cols"></i>
                        <span> 货源管理 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.source.add.php">添加社区</a>
                        </li>
                        <li>
                            <a href="admin.source.list.php">管理社区</a>
                        </li>
                    </ul>
                </li>

                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-username"></i>
                        <span> 用户管理 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.user.list.php">查看用户</a>
                        </li>
                        <li>
                            <a href="admin.user.rank.php">排行统计</a>
                        </li>
                        <li>
                            <a href="admin.user.log.php">用户日志</a>
                        </li>
                        <li>
                            <a href="admin.user.set.php">加盟配置</a>
                        </li>
                        <li>
                            <a href="admin.user.pay.php">提现管理</a>
                        </li>
                        <li class="side-nav-item">
                            <a href="javascript: void(0);" aria-expanded="false" class="">等级管理
                                <span class="menu-arrow"></span>
                            </a>
                            <ul class="side-nav-third-level collapse" aria-expanded="false">
                                <li>
                                    <a href="admin.level.list.php">等级列表</a>
                                </li>
                                <li>
                                    <a href="admin.level.add.php">规则创建</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>

                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-read"></i>
                        <span> 文章管理 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.article.list.php">文章管理</a>
                        </li>
                        <li>
                            <a href="admin.article.add.php">发布文章</a>
                        </li>
                    </ul>
                </li>

                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-set"></i>
                        <span> 网站设置 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.notice.set.php">公告设置</a>
                        </li>
                        <li>
                            <a href="admin.app.set.php">网站编辑</a>
                        </li>
                        <li>
                            <a href="admin.template.set.php">首页模板</a>
                        </li>
                        <li>
                            <a href="admin.pay.set.php">支付配置</a>
                        </li>
                        <li>
                            <a href="admin.sms.set.php">通知配置</a>
                        </li>
                    </ul>
                </li>
                <li class="side-nav-item">
                    <a href="javascript: void(0);" class="side-nav-link">
                        <i class="layui-icon layui-icon-util"></i>
                        <span> 功能扩展 </span>
                        <span class="menu-arrow"></span>
                    </a>
                    <ul class="side-nav-second-level" aria-expanded="false">
                        <li>
                            <a href="admin.security.center.php">安全中心</a>
                        </li>
                        <li>
                            <a href="admin.api.list.php">接口中心</a>
                        </li>
                        <li>
                            <a href="admin.goods.batch.php">一键上架</a>
                        </li>
                        <li>
                            <a href="admin.prevent.url.php">域名防红</a>
                        </li>
                        <li>
                            <a href="admin.goods.clone.php">商品克隆</a>
                        </li>
                        <li>
                            <a href="javascript:layer.alert('<font color=red>配置地方</font>：<a href=admin.goods.add.php >添加/编辑</a>商品界面<br><font color=red>监控类型</font>：自动开启监控的商品价格<br><font color=red>监控说明</font>：价格监控只会对对接货源且商品设置开启监控的商品进行监控<br><font color=red>监控规则</font>：用户打开商品购买界面会自动监控一次，若价格和对接价格不一致，则修复，若对接社区商品价格获取失败，则会监控失败，不改变商品价格，若获取对接社区商品已经下架，则直接清空库存！<br><font color=red>支持列表</font>：卡易信，小储系统，亿乐系统，玖伍系统',{title:'价格监控说明 [已开启]'})">价格监控</a>
                        </li>
                    </ul>
                </li>
                <li class="side-nav-item">
                    <a href="admin.panel.set.php" class="side-nav-link">
                        <i class="layui-icon layui-icon-component"></i>
                        <span> 网站维护 </span>
                    </a>
                </li>
                <li class="side-nav-item">
                    <a href="http://bbs.api.ln.cn/" target="_blank" class="side-nav-link">
                        <i class="layui-icon layui-icon-survey"></i>
                        <span> 意见反馈 </span>
                    </a>
                </li>
                <li class="side-nav-item">
                    <a href="?Loggedout=1" class="side-nav-link">
                        <i class="layui-icon layui-icon-logout"></i>
                        <span> 退出登陆 </span>
                    </a>
                </li>
            </ul>
        </div>
        <!-- Sidebar -left -->
    </div>
    <!-- Left Sidebar End -->
    <div class="content-page">
        <div class="content">
            <!-- Topbar Start -->
            <div class="navbar-custom">
                <ul class="list-unstyled topbar-right-menu float-right mb-0">
                    <li class="dropdown notification-list">
                        <a class="nav-link dropdown-toggle arrow-none" data-toggle="dropdown" href="#" role="button"
                           aria-haspopup="false" aria-expanded="false">
                            <i class="layui-icon layui-icon-email noti-icon"></i>
                            <span class="noti-icon-badge"></span>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-lg">

                            <!-- item-->
                            <div class="dropdown-item noti-title">
                                <h5 class="m-0">
                                    官方通知
                                </h5>
                            </div>
                            <div class="slimscroll" style="max-height: 230px;" id="message"></div>
                        </div>
                    </li>

                    <li class="dropdown notification-list">
                        <a class="nav-link dropdown-toggle nav-user arrow-none mr-0" data-toggle="dropdown" href="#"
                           role="button" aria-haspopup="false"
                           aria-expanded="false">
                                    <span class="account-user-avatar">
                                        <img id="head_image" src="../assets/img/image_index.png" alt="user-image"
                                             class="rounded-circle bg-warning" style="border: solid 2px #ccc">
                                    </span>
                            <span>
                                        <span class="account-user-name">Super</span>
                                        <span class="account-position" id="header_name">站长</span>
                                    </span>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right dropdown-menu-animated topbar-dropdown-menu profile-dropdown">
                            <!-- item-->

                            <div class=" dropdown-header noti-title">
                                <h6 class="text-overflow m-0">快捷导航</h6>
                            </div>

                            <!-- item-->
                            <a href="javascript:void(0);" target="_blank" class="dropdown-item notify-item group">
                                <i class="layui-icon layui-icon-chat mr-1"></i>
                                <span>联系官方</span>
                            </a>

                            <!-- item-->
                            <a href="admin.user.list.php" class="dropdown-item notify-item">
                                <i class="layui-icon layui-icon-user mr-1"></i>
                                <span>用户管理</span>
                            </a>
                            <!-- item-->
                            <a href="../" target="_blank" class="dropdown-item notify-item">
                                <i class="layui-icon layui-icon-home mr-1"></i>
                                <span>前往首页</span>
                            </a>
                            <!-- item-->
                            <a href="?Loggedout=1" class="dropdown-item notify-item">
                                <i class="layui-icon layui-icon-logout mr-1"></i>
                                <span>注销账号</span>
                            </a>

                        </div>
                    </li>

                </ul>
                <button class="button-menu-mobile open-left disable-btn">
                    <i class="layui-icon layui-icon-spread-left"></i>
                </button>
                <div class="app-search">
                    <form>
                        <div class="input-group">
                            <input type="text" class="form-control" id="dw" placeholder="输入下单信息搜索订单">
                            <span class="layui-icon layui-icon-search"></span>
                            <div class="input-group-append">
                                <button class="btn btn-primary"
                                        onclick="window.location.href='admin.order.list.php?val='+$('#dw').val()"
                                        type="button">搜索
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- end Topbar -->
            <!-- start page title -->
            <div class="row" style="width: 98%;margin: auto">
                <div class="col-12">

                    <?php if ($tise == 'index') { ?>

                        <div class="page-title-box">
                            <div class="page-title-right">
                                <form class="form-inline">
                                    <div class="form-group">
                                        <div class="input-group">
                                            <input type="text" class="form-control form-control-light"
                                                   id="dash-daterange">
                                            <div class="input-group-append">
                                                        <span
                                                                class="input-group-text bg-primary border-primary text-white">
                                                            <i class="layui-icon layui-icon-search font-13"></i>
                                                        </span>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <h4 class="page-title"><?= $title ?></h4>
                        </div>

                    <?php } else { ?>
                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box">
                                    <div class="page-title-right">
                                        <ol class="breadcrumb m-0">
                                            <li class="breadcrumb-item"><a href="index.php">首页</a></li>
                                            <li class="breadcrumb-item active"><?= $title ?></li>
                                        </ol>
                                    </div>
                                    <h4 class="page-title"><?= $title ?></h4>
                                </div>
                            </div>
                        </div>
                        <!-- end page title -->
                    <?php } ?>
                </div>
            </div>
            <!-- end page title -->
            <style>
                .note-popover{display: none}
                .note-toolbar{z-index: 9 !important;}
                .panel-heading{border-bottom: 1px solid #ccc;}
            </style>