<!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>{$meta_title}｜{:C('WEB_SITE_TITLE')}后台管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="author" content="{:C('WEB_SITE_TITLE')}">
    <meta name="keywords" content="{$meta_keywords}">
    <meta name="description" content="{$meta_description}">
    <meta name="generator" content="CoreThink">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="{:C('WEB_SITE_TITLE')}">
    <meta name="format-detection" content="telephone=no,email=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="apple-touch-icon" type="image/x-icon" href="__ROOT__/favicon.ico">
    <link rel="shortcut icon" type="image/x-icon" href="__ROOT__/logo.png">
    <link rel="stylesheet" type="text/css" href="__CUI__/css/cui.min.css">
    <link rel="stylesheet" type="text/css" href="__ADMIN_CSS__/admin.css">
    <link rel="stylesheet" type="text/css" href="__ADMIN_CSS__/theme/{:C('ADMIN_THEME')}.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/libs/animate/animate.min.css">
    <block name="style"></block>
    <!--[if lt IE 9]>
        <script src="http://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
        <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="__PUBLIC__/libs/jquery/1.x/jquery.min.js"></script>
</head>
<body class="{$_page_name}">
    <div class="clearfix full-header">
        <block name="full-header">
            <?php if (!C('ADMIN_TABS')): ?>
                <!-- 顶部导航 -->
                <div class="navbar navbar-inverse navbar-fixed-top main-nav" role="navigation">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-top">
                        <span class="sr-only">切换导航</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <php>if(C('WEB_SITE_LOGO')):</php>
                        <a class="navbar-brand" target="_blank" href="__ROOT__/">
                            <img class="logo img-responsive" src="{$Think.config.WEB_SITE_LOGO|get_cover}">
                        </a>
                    <php>else:</php>
                        <a class="navbar-brand" target="_blank" href="__ROOT__/">
                            <span>{:C('PRODUCT_LOGO')}</span>
                        </a>
                    <php>endif;</php>
                </div>
                <div class="collapse navbar-collapse navbar-collapse-top">
                    <ul class="nav navbar-nav">
                        <!-- 主导航 -->
                        <?php if (count($_menu_list) > 7): ?>
                            <volist name="_menu_list" id="vo" offset="0" length="7">
                                <li <?php if($_parent_menu_list[0]['title'] == $vo['title']) echo 'class="active"'; ?>>
                                    <a href="{:U($vo['_child'][0]['_child'][0]['url'])}" target="<php>echo C(strtolower($vo['name']).'_config.target');</php>">
                                        <i class="fa {$vo.icon}"></i>
                                        <span>{$vo.title}</span>
                                    </a>
                                </li>
                            </volist>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-th-large"></i> 更多 <b class="caret"></b>
                                </a>
                                <ul class="dropdown-menu" role="menu">
                                    <volist name="_menu_list" id="vo" offset="7">
                                        <li <?php if($_parent_menu_list[0]['title'] == $vo['title']) echo 'class="active"'; ?>>
                                            <a href="{:U($vo['_child'][0]['_child'][0]['url'])}" target="<php>echo C(strtolower($vo['name']).'_config.target');</php>">
                                                <i class="fa {$vo.icon}"></i>
                                                <span>{$vo.title}</span>
                                            </a>
                                        </li>
                                    </volist>
                                </ul>
                            </li>
                        <?php else: ?>
                            <volist name="_menu_list" id="vo">
                                <li <?php if($_parent_menu_list[0]['title'] == $vo['title']) echo 'class="active"'; ?>>
                                    <a href="{:U($vo['_child'][0]['_child'][0]['url'])}" target="<php>echo C(strtolower($vo['name']).'_config.target');</php>">
                                        <i class="fa {$vo.icon}"></i>
                                        <span>{$vo.title}</span>
                                    </a>
                                </li>
                            </volist>
                        <?php endif; ?>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="{:U('Admin/Index/removeRuntime')}" class="btn ajax-get no-refresh"><i class="fa fa-trash"></i> 清空缓存</a></li>
                        <li><a target="_blank" href="__ROOT__/"><i class="fa fa-external-link-square"></i> 打开前台</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-user"></i> {$_user_auth.username} <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="{:U('Admin/Public/logout')}" class="ajax-get"><i class="fa fa-sign-out"></i> 退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
            <?php endif; ?>
        </block>
    </div>

    <div class="clearfix full-container">
        <block name="full-container">
            <?php if (!C('ADMIN_TABS')): ?>
                <div class="container-fluid with-top-navbar">
                    <div class="row">
                        <!-- 后台左侧导航 -->
                        <div id="sidebar" class="col-xs-12 col-sm-2 sidebar tab-content">
                            <!-- 模块菜单 -->
                            <nav class="navside navside-default" role="navigation">
                                <?php if($_current_menu_list['_child']): ?>
                                    <ul class="nav navside-nav navside-first">
                                        <volist name="_current_menu_list._child" id="_ns_first" key="fkey">
                                            <li>
                                                <a data-toggle="collapse" href="#navside-collapse-{$_ns.id}-{$fkey}">
                                                    <i class="{$_ns_first.icon}"></i>
                                                    <span class="nav-label">{$_ns_first.title}</span>
                                                    <span class="fa arrow"></span>
                                                </a>
                                                <notempty name="_ns_first._child">
                                                    <ul class="nav navside-nav navside-second collapse in" id="navside-collapse-{$_ns.id}-{$fkey}">
                                                        <volist name="_ns_first._child" id="_ns_second" key="skey">
                                                            <li <?php if($_parent_menu_list[2]['id'] == $_ns_second['id']) echo 'class="active"'; ?>>
                                                                <a href="{:U($_ns_second['url'])}" >
                                                                    <i class="{$_ns_second.icon}"></i>
                                                                    <span class="nav-label">{$_ns_second.title}</span>
                                                                </a>
                                                            </li>
                                                        </volist>
                                                    </ul>
                                                </notempty>
                                            </li>
                                        </volist>
                                    </ul>
                                <?php endif; ?>
                            </nav>
                        </div>

                        <!-- 右侧内容 -->
                        <div id="main" class="col-xs-12 col-sm-10 main"  style="overflow-y: scroll;">
                            <!-- 面包屑导航 -->
                            <ul class="breadcrumb">
                                <li><i class="fa fa-map-marker"></i></li>
                                <volist name="_parent_menu_list" id="vo">
                                    <li class="text-muted">{$vo.title}</li>
                                </volist>
                            </ul>

                            <!-- 主体内容区域 -->
                            <div class="tab-content ct-tab-content">
                                <block name="main"></block>
                            </div>

                            <div class="clearfix footer hidden-xs">
                                <div class="navbar navbar-default" role="navigation">
                                    <div class="container-fluid">
                                        <div class="navbar-header">
                                            <a class="navbar-brand" target="_blank" href="__ROOT__/">
                                                <span>{:C('PRODUCT_NAME')}</span>
                                            </a>
                                        </div>
                                        <div class="collapse navbar-collapse navbar-collapse-bottom">
                                            <ul class="nav navbar-nav">
                                                <li>
                                                    <a href="{:C('WEBSITE_DOMAIN')}" class="text-muted" target="_blank">
                                                        <span>版权所有 © 2014-<php>echo date("Y",time());</php></span>
                                                    </a>
                                                </li>
                                            </ul>
                                            <ul class="nav navbar-nav navbar-right">
                                                <li><a class="text-muted pull-right">框架开发：{:C('COMPANY_NAME')}</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <?php else: ?>
                <block name="main"></block>
            <?php endif; ?>
        </block>
    </div>

    <div class="clearfix full-footer">
        <block name="full-footer"></block>
    </div>

    <div class="clearfix full-script">
        <div class="container-fluid">
            <input type="hidden" id="corethink_home_img" value="__HOME_IMG__">
            <script type="text/javascript" src="__CUI__/js/cui.min.js"></script>
            <script type="text/javascript">
                (function(){
                    var OpenCMF = window.OpenCMF = {
                        "ROOT"   : "__ROOT__", //当前网站地址
                        "APP"    : "__APP__", //当前项目地址
                        "PUBLIC" : "__PUBLIC__", //项目公共目录地址
                        "DEEP"   : "{:C('URL_PATHINFO_DEPR')}", //PATHINFO分割符
                        "MODEL"  : ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
                        "VAR"    : ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"]
                    }
                })();
            </script>
            <script type="text/javascript" src="__ADMIN_JS__/admin.js"></script>
            <script type="text/javascript">
                // 如果是多标签方式自动跳转后台首页
                var admin_tabs = '{$_admin_tabs}';
                if(admin_tabs == '1' && !(self.frameElement != null && (self.frameElement.tagName == "IFRAME" || self.frameElement.tagName == "iframe"))){
                    parent.parent.location = "{:U('Admin/Index/index')}";
                }
            </script>
            <block name="script"></block>
        </div>
    </div>
</body>
</html>
