<?php /*a:3:{s:63:"/home/affivpnx/app.peakwork.pro/app/admin/view/index/index.html";i:1763742184;s:65:"/home/affivpnx/app.peakwork.pro/app/admin/view/public/header.html";i:1763742186;s:65:"/home/affivpnx/app.peakwork.pro/app/admin/view/public/footer.html";i:1763742186;}*/ ?>
<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>后台登录-<?php echo htmlentities($system_name); ?></title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/static/admin/css/font.css">
    <link rel="stylesheet" href="/static/admin/css/xadmin.css">
    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/admin/js/xadmin.js?date=<?php echo date('Ymd'); ?>"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="/static/admin/js/html5.min.js"></script>
    <script src="/static/admin/js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="index">
<!-- 顶部开始 -->
<div class="container">
    <div class="logo">
        <a href="<?php echo url('Index/index'); ?>"><?php echo htmlentities($system_name); ?>-管理后台</a></div>
    <div class="left_open">
        <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
    </div>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item" style="width: 80px">
            <a href="javascript:;" onclick="xadmin.add_tab('提现订单','/admin/Finance/withdraw?status=1')">
                提现<span class="layui-badge layui-bg-red layuiadmin-badge" id="with_tip">0</span>
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;"><?php echo htmlentities($admin_name); ?></a>
            <dl class="layui-nav-child">
                <dd>
                    <a href="javascript:;" onclick="clearCache()">清除缓存文件</a>
                </dd>
                <dd>
                    <a href="javascript:;" onclick="logout()">退出</a>
                </dd>
            </dl>
        </li>
    </ul>
</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            <?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $p_k=>$p_menu): if(($admin_id == 1)||(in_array((string)$p_k,$rule_config,TRUE))): ?>
            <li>
                <a href="javascript:;"
                   <?php if(!empty($p_menu['url'])): ?>onclick="xadmin.add_tab('<?php echo htmlentities($p_menu['name']); ?>','<?php echo htmlentities($p_menu['url']); ?>')" <?php endif; ?>>
                <i class="iconfont left-nav-li"><?php echo htmlspecialchars_decode($p_menu['icon']); ?></i>
                <cite><?php echo htmlentities($p_menu['name']); ?></cite>
                <?php if($p_menu['is_open'] == 1): ?>
                <i class="iconfont nav_right">&#xe697;</i>
                <?php endif; ?>
                </a>
                <?php if(!empty($p_menu['children'])): ?>
                <ul class="sub-menu">
                    <?php if(is_array($p_menu['children']) || $p_menu['children'] instanceof \think\Collection || $p_menu['children'] instanceof \think\Paginator): if( count($p_menu['children'])==0 ) : echo "" ;else: foreach($p_menu['children'] as $c_k=>$c_menu): if(($admin_id == 1)||(in_array($p_k.'-'.$c_k,$rule_config))): if($c_menu['is_open'] > 0): ?>
                    <li>
                        <a href="javascript:;"
                           <?php if(!empty($c_menu['url'])): ?> onclick="xadmin.add_tab('<?php echo htmlentities($c_menu['name']); ?>','<?php echo htmlentities($c_menu['url']); ?>')" <?php endif; ?>>
                        <i class="iconfont"><?php echo htmlspecialchars_decode($c_menu['icon']); ?></i>
                        <cite><?php echo htmlentities($c_menu['name']); ?></cite>
                        </a>
                    </li>
                    <?php endif; ?>
                    <?php endif; ?>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
                <?php endif; ?>
            </li>
            <?php endif; ?>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul class="layui-tab-title">
            <li class="home">
                <i class="layui-icon">&#xe68e;</i>我的桌面
            </li>
        </ul>
        <div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">
            <dl>
                <dd data-type="this">关闭当前</dd>
                <dd data-type="other">关闭其它</dd>
                <dd data-type="all">关闭全部</dd>
            </dl>
        </div>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe src='<?php echo url("Index/welcome"); ?>' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
            </div>
        </div>
        <div id="tab_show"></div>
    </div>
</div>
<div class="page-content-bg"></div>
<style id="theme_style"></style>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
</body>
<script type="text/javascript">
    function logout() {
        layer.confirm('确定要退出吗', function () {
            // $('#tab_right dd:last').click();
            location.href = '<?php echo url('admin/Login/logout'); ?>';
        })
    }

    function clearCache() {
        layer.confirm('确定要清除缓存文件吗', function () {
            $.ajax({
                url: '<?php echo url("admin/Index/clearCache"); ?>',
                type: 'get',
                success: function (res) {
                    if (res.status == '200') {
                        tipAction(1, res.msg);
                    } else {
                        tipAction(2, res.msg);
                    }
                },
                error: function () {
                    tipAction(2, '系统繁忙');
                }
            });
        })
    }

    $(function () {
        getWithCount();
        setInterval(getWithCount, 10000);

        function getWithCount() {
            $.ajax({
                type: "post",
                url: '<?php echo url("admin/Index/getWithCount"); ?>',
                success: function (res) {
                    if (res.status == '200') {
                        $('#with_tip').text(res.data.with_count);
                    }
                }
            });
        }
    })
</script>
</html>
<script type="application/javascript">
    /**
     * 统一接口返回提示弹窗
     * type 1-成功 2-失败
     * info 提示信息
     * */
    function tipAction(type, info) {
        layer.msg(info, {icon: type, time: 1500})
    }

    //图片放大
    function showBig(obj) {
        let img_src = $(obj).attr('src');
        layer.open({
            type: 1,
            area: ['70%', 'auto'],
            shadeClose: true,
            title: false,
            closeBtn: false,
            content: `<div style=""><img src="${img_src}" alt="" width="100%"></div>`
        });
    }
</script>

