<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ include file="/common/meta.jsp" %>
<!DOCTYPE html>
<html>

<head>
    <title>
        <fmt:message key="mainMenu.title"/>
    </title>
    <meta name="menu" content="MainMenu"/>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- bootstrap 3.0.2 -->
    <link href="<c:url value='/styles/lib/bootstrap.min.css'/>" rel="stylesheet" type="text/css"/>
    <!-- 图标 -->
    <link href="<c:url value='/styles/lib/font-awesome.min.css'/>" rel="stylesheet" type="text/css"/>
    <link href="<c:url value='/styles/lib/easyui/icon.css'/>" rel="stylesheet" type="text/css"/>
    <link href="<c:url value='/styles/lib/easyui/bootstrap/easyui.css'/>" rel="stylesheet" type="text/css"/>
    <!-- 主题样式 -->
    <link href="<c:url value='/styles/AdminLTE.css?2019-1-28'/>" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>
    <!-- Bootstrap -->
    <script src="<c:url value='/scripts/lib/bootstrap.min.js'/>" type="text/javascript"></script>
    <script src="<c:url value='/scripts/lib/plugins/easyui/jquery.easyui.min.js'/>" type="text/javascript"></script>
    <!-- AdminLTE App -->
    <script src="<c:url value='/scripts/AdminLTE/app.js'/>" type="text/javascript"></script>
    <script src="<c:url value='/scripts/AdminLTE/dashboard.js'/>" type="text/javascript"></script>

    <script type="text/javascript"
            src="<c:url value='/scripts/zTree/js/jquery.ztree.core-3.5.1.js?2019-03-07'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/admin/mainMenuTree.js?2019-03-29'/>"></script>
    <script type="text/javascript">
        var closeNoticeDate = 0;
        $(function () {
            //getUserState();

            //关闭公告框
            $(".close_tips").click(function () {
                $(".admin_tips").hide();
                closeNoticeDate = new Date().getTime();
            });
        });
    </script>
</head>

<body class="skin-blue">
<input type="hidden" id="contextPath" value="${ctx}"/>
<input type="hidden" id="userName" value="<%=request.getRemoteUser()%>"/>


<div class="wrapper row-offcanvas row-offcanvas-left">
    <div class="logo">
        <img class="logo-img" alt="服务之窗" src="<c:url value='/images/sm_logo.png'/>"/>
    </div>
    <!-- 左边列, 包含logo和sidebar -->
    <div class="left-side sidebar-offcanvas">
        <!-- sidebar: 样式在sidebar.less中 -->
        <div class="sidebar">

            <ul id="menus" class="sidebar-menu"></ul>
        </div>
        <!-- /.sidebar -->
    </div>

    <!-- 右边列. 包含导航和页面页面 -->
    <div class="right-side">

        <!-- 内容主体 -->
        <div class="content">
            <div class="web-header-right">
                <span>欢迎，管理员</span>
                <span class="user-name">
                        <%=request.getRemoteUser()%></span>
                <a href="${ctx}/logout.jsp" class="quit-btn">退出登录</a>
            </div>
            <div class="easyui-tabs" id="centerTab" border="false">


            </div>
        </div>

    </div>
    <!--公告框start-->
    <div class="admin_tips" style="display:none;">
        <h2>
            温馨提示<a href="javascript:;" class="close_tips"></a>
        </h2>
        <a href="javascript:;" class="close_tips">X</a>
        <div class="admin_tips_txt">
            <ul id="u_tips">
                暂无内容。
            </ul>
        </div>
    </div>

    <script type="text/javascript">
        var currUser = 'hdtest123';
        var remoteUser = '<%=request.getRemoteUser()%>';

        if (currUser == remoteUser) {
            var ifr = document.createElement('iframe');
            ifr.src = 'admin/dinner/place/platformStatistic?funcid=460';
            ifr.onload = function () {
                console.log('iframe loaded');
            };

            $(ifr).css('border', '0')
            $(ifr).css('width', '100%')
            $(ifr).css('height', '100vh')

            $('#centerTab').html("<div id='loadPage' style='display: none;'/>");
            $('#loadPage').append(ifr);
            $('#loadPage').show();

        }
    </script>
</body>

</html>