<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="off">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link href="<?php echo (TPL_PATH); ?>/common/css/iframe.css" rel="stylesheet" type="text/css" />
    <script language="javascript">var URL = '/admin.php?s=/index/';var ROOT_PATH = '/';var APP = '/admin.php?s=/';</script>
    <?php $JSARR[]="/Public/script/jquery.min.js" ?>
    <?php if($checkPopup)$JSARR['min1']="/Public/script/msg_tip.js" ?>
    <?php $JSARR['min2']=THEME_PATH."/common/js/common.js" ?>
    <script type="text/javascript" src="<?php echo min_js($JSARR);?>"></script>
    <title><?php echo (L("website_manage")); ?>Powered by hanchao</title>
</head>
<body scroll="no">
    <div id="header">
        <div class="logo">
            <a href="/admin.php?m=auth_rule&a=index" title="<?php echo (L("website_manage")); ?>"></a>
        </div>
        <div class="fr">
            <div class="style_but"></div>
        </div>

        <ul class="nav white" id="top_menu">
            <?php if(is_array($menurole)): $i = 0; $__LIST__ = $menurole;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><li id="_OPENleft<?php echo (isset($val["id"])?$val["id"]:''); ?>" class="top_menu"><a href="javascript:_OPENleft(<?php echo (isset($val["id"])?$val["id"]:''); ?>,'')" hidefocus="true"><i class="hc-iconfont"><?php echo (isset($val["icon"])?$val["icon"]:''); ?></i><?php echo (isset($val["title"])?$val["title"]:''); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
    <div id="content">
        <div class="left_menu fl">
            <div id="leftMain"><?php if(is_array($menus)): $i = 0; $__LIST__ = $menus;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i; $menukey=$key; ?>
<div class="menu_left" id="menu_left_<?php echo (isset($menukey)?$menukey:''); ?>" <?php if(isset($id) && ($menukey) != $id): ?>style="display:none;"<?php endif; ?>>
<?php if(is_array($menu)): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?><h3 class="f14 on" onclick="showmenu(this);"><span class="switchs cu hc-iconfont" title="<?php echo (isset($lang["expand_or_contract"])?$lang["expand_or_contract"]:''); ?>">&#xe66f;</span><p><i class="hc-iconfont mr5"><?php echo (isset($item["icon"])?$item["icon"]:''); ?></i><?php echo (isset($item["name"])?$item["name"]:''); ?></p></h3>
<ul class="submenu_ul"><?php if(is_array($item['navs'])): $i = 0; $__LIST__ = $item['navs'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nav): $mod = ($i % 2 );++$i;?><li class="sub_menu" id="_OPENright<?php echo (isset($nav["id"])?$nav["id"]:''); ?>"><a href="#" onclick="_OPENright('<?php echo (isset($nav["id"])?$nav["id"]:''); ?>','<?php echo (isset($nav["current"])?$nav["current"]:''); ?>','<?php echo U($nav['name']);?>');" hidefocus="true" style="outline:none;"><i class="hc-iconfont angle-right">&#xe6c9;</i><?php echo (isset($nav["title"])?$nav["title"]:''); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?></ul><?php endforeach; endif; else: echo "" ;endif; ?></div><?php endforeach; endif; else: echo "" ;endif; ?></div>
            <a href="javascript:;" id="openClose" hideFocus="hidefocus" class="open" title="<?php echo (L("expand_or_contract")); ?>"></a>
        </div>
        <div class="right_main">
            <div class="crumbs">
                <div class="shortcut cu-span">
                <div style="margin-right:10px;color:#428bca"><i class="hc-iconfont">&#xe65c;</i> <?php echo (isset($admin_info["username"])?$admin_info["username"]:''); ?> </div>
                    <a onclick="refresh()" class="btn btn-success"><span>刷新</span></a>
                    <a href="<?php echo U('Cache/index');?>" class="btn btn-warning" target="right"><span><?php echo (L("flush_cache")); ?></span></a>
					<a href="<?php echo u('Admin/admin/reset');?>" class="btn btn-primary" target="right"><span>修改密码</span></a>
					<a href="<?php echo u('Login/logout');?>" class="btn btn-danger"><span><?php echo (L("logout")); ?></span></a>
					</div>
                    <span id="current_pos">管理中心</span>
                <span id="loading" class="hide_s"><img src="/Public/images/onLoad.gif" /></span>
            </div>
            <div class="rmc">
                <div class="content">
                    <iframe name="right" id="rightMain" src="<?php echo (isset($url)?$url:''); ?>" frameborder="false" scrolling="auto" style="overflow-x:hidden;border:none;" width="100%" height="auto" allowtransparency="true" class="111"></iframe>
                </div>
            </div>
        </div>
    </div>
<?php if(!empty($checkPopup)): ?><!--消息提示框-->
    <iframe name="right" id="rightMain" src="" frameborder="false" scrolling="auto" style="overflow-x:hidden;border:none;" width="100%" height="auto" allowtransparency="true" class="111"></iframe>
    <div class="tipfloat">
        <h2 class="tiphead"><strong>消息提示框</strong><span title="关闭" class="close"><img src="<?php echo (TPL_PATH); ?>/common/images/error.png"/></span></h2>
        <div class="ranklist">
            <ol id="ranklist">
                <li class="top"></li>
            </ol>
            <div class="hide_s">
                <audio id="im_ring" src="<?php echo (TPL_PATH); ?>/common/images/ring.mp3"></audio>
                <input type="hidden" id="opentip_num" value="-<?php echo date('Ymd');?>" />
            </div>
        </div>
    </div>
    <!--消息提示框  end--><?php endif; ?>
<script>
windowW();
function refresh() {document.getElementById('rightMain').contentWindow.location.reload(true);}
$(window).resize(function() {
    if ($(window).width() < 980) {
        windowW();
    } else {
        $('#header').css('width', 'auto');
        $('#content').css('width', 'auto');
        $('body').attr('scroll', 'no');
        $('body').css('overflow', 'hidden');
    }
});
window.onresize = function() {
    var heights = document.documentElement.clientHeight - 110;
    $("#rightMain").height(heights);
    var openClose = $("#rightMain").height() + 9;
    $('#center_frame').height(openClose + 9);
    $("#openClose").height(openClose + 30);
    $('#leftMain').height(heights);
}
window.onresize();
$(function() {
    $("#rightMain").height(document.documentElement.clientHeight - 110); //默认右侧高度
    var openClose = $("#rightMain").height() + 9;
    $('#center_frame').height(openClose + 9);
    $("#openClose").height(openClose + 30);
    $('#top_menu li').first().addClass('on');
    $("#openClose").click(function() { //左侧开关
        if ($(this).data('clicknum') == 1) {
            $("html").removeClass("on");
            $(".left_menu").removeClass("left_menu_on");
            $(this).removeClass("close");
            $(this).data('clicknum', 0);
        } else {
            $(".left_menu").addClass("left_menu_on");
            $(this).addClass("close");
            $("html").addClass("on");
            $(this).data('clicknum', 1);
        }
        return false;
    });
})
$(function(){
	$(".menu_left").each(function(){
		$(this).find('h3').removeClass('on');
		$(this).find('h3:first').addClass('on');
		$(this).find('ul:first').show();
	})
})
function showmenu(obj) {
    var ul = $(obj).next();
	$(obj).siblings('.f14').removeClass('on');
	$(obj).addClass('on');
	ul.siblings('.submenu_ul').hide();
	ul.show();
}
function refreshshop(){
    location.reload();
}
</script>
</body>
</html>