
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
		<?php $shoname = D('Home/Front')->get_config_by_name('shoname'); ?>
        <title><?php echo $shoname; ?></title>
        <link rel="shortcut icon" href="" />
        <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
        <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
        <link href="/static/css/animate.css" rel="stylesheet">
        <link href="/static/css/v3.css?v=4.1.0" rel="stylesheet">
        <link href="/static/css/common_v3.css?v=2.0.0" rel="stylesheet">
		
        <link href="/static/css/snailfish.css?v=2.0.0" rel="stylesheet">
        <link href="/static/css/weizan.common.css" rel="stylesheet">
		
		
        <link rel="stylesheet" type="text/css" href="/static/fonts/v3/iconfont.css?v=2016070717">
        <link rel="stylesheet" type="text/css" href="/static/fonts/iconfont.css?v=2016070717">
        <script src="/static/fonts/iconfont.js"></script>

        <script src="/web/resource/js/lib/jquery-1.11.1.min.js"></script>
        <script src="/static/js/dist/jquery/jquery.gcjs.js"></script>
        <script src="/web/resource/js/app/util.js"></script>


        <script type="text/javascript">
            window.sysinfo = {
				siteroot : '/'
            };
        </script>

        <script type="text/javascript" src="/web/resource/js/lib/bootstrap.min.js"></script>
        <script type="text/javascript" src="/web/resource/js/app/common.min.js?v=20170802"></script>
        
        <script src="/static/js/require.js"></script>

        <script src="/web/resource/js/app/config.js"></script>
     

        <script>
            require.config({
                waitSeconds: 0
            });
        </script>
        <script src="/static/js/myconfig.js"></script>
        <script type="text/javascript">
                if (navigator.appName == 'Microsoft Internet Explorer') {
                    if (navigator.userAgent.indexOf("MSIE 5.0") > 0 || navigator.userAgent.indexOf("MSIE 6.0") > 0 || navigator.userAgent.indexOf("MSIE 7.0") > 0) {
                        alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
                    }
                }
                myrequire.path = "/static/js/";

            function preview_html(txt)
            {
                var win = window.open("", "win", "width=300,height=600"); // a window object
                win.document.open("text/html", "replace");
                win.document.write($(txt).val());
                win.document.close();
            }
        </script>
    

    <body>
<?php $sysmenus = D('Seller/menu')->getMenu(true); ?>
<div class="wb-header" style="position: fixed;">
    <div class="logo <?php if(!empty($system['foldnav'])){ ?>small<?php } ?>">
		<?php $shoplogo = D('Home/Front')->get_config_by_name('shoplogo'); ?>
		<?php if(empty($shoplogo)){ ?>
            <img class='logo-img' src="/static/images/default-pic.jpg" />
		<?php }else{ ?>	
			<img class='logo-img' src="<?php echo tomedia($shoplogo);?>" />
		<?php } ?>
    </div>
    <ul>
        <li>
            <a href="{:U('index/index')}" data-toggle="tooltip" data-placement="bottom" title="管理首页"><i class="icow icow-homeL"></i></a>
        </li>
    </ul>
    
    <div class="wb-header-flex"></div>


    <ul>
        <li class="dropdown auto"> 
            <a class="javascript:;">
			<?php 
								
				if (defined('ROLE') && ROLE == 'agenter' ) 
				{
					$supper_info = get_agent_logininfo();
					echo $supper_info['shopname'];
				}else{
					echo $shoname;
				}
			?>
			<span></span></a>
        </li>
        <li data-toggle="tooltip" data-placement="bottom" title="退出登录" onclick="location.href='{:U('Public/logout')}';">
            <a class="wb-header-logout"><i class="icow icow-exit"></i></a>
        </li>
    </ul>

</div>

	<!-- 一级导航 -->
    <div class="wb-nav {if !empty($system['foldnav'])}fold<?php } ?>">
        <p class="wb-nav-fold"><i class="icow icow-zhedie"></i></p>
        <ul>
			<?php foreach( $sysmenus['menu'] as $sysmenu){ ?>
                <li <?php if($sysmenu['active']){ ?>class="active"<?php } ?>>
                    <a href="<?php echo empty($sysmenu['index']) ? U($sysmenu['route']):U($sysmenu['route']. '/'. $sysmenu['index']) ?>">
                        
						<?php if( !empty($sysmenu['icon']) ){ ?>
							<i class="snailfishicon snailfishicon-<?php echo $sysmenu['icon']; ?>"></i>
						<?php } ?>
                       
                        <span class="wb-nav-title"><?php echo $sysmenu['text']; ?></span>
                    </a>
                    <span class="wb-nav-tip"><?php echo $sysmenu['text']; ?></span>
                </li>
			<?php } ?>
        </ul>
    </div>

    <!-- 二级导航 -->
   
	<?php if( !empty($sysmenus['submenu']['items']) && empty($is_hide_nav) ){ ?>
        <div class="wb-subnav">
          <div style="width: 100%;height: 100%;overflow-y: auto">
				<div class="subnav-scene">
					<?php if( empty($sysmenus['submenu']['route']) && !$sysmenus['submenu']['main'] ){ ?>
						<?php echo $sysmenus['submenu']['subtitle']; ?>
					<?php }else{ ?>
						<a href="<?php echo U($sysmenus['submenu']['route']); ?>"><?php echo $sysmenus['submenu']['subtitle']; ?></a>
					<?php } ?>
				</div>

				<?php if( !empty($sysmenus['submenu']['items']) ){ ?>
					<?php foreach($sysmenus['submenu']['items'] as $submenu){ ?>
						
						<?php if( !empty($submenu['items']) ){ ?>
							<div  class='menu-header <?php if($submenu['active'] || empty($submenu['is_show_list'])){ ?>active data-active<?php } ?>'><div class="menu-icon fa fa-caret-<?php if($submenu['active'] || empty($submenu['is_show_list'])){ ?>down<?php }else{ ?>right<?php } ?>"></div><?php echo $submenu['title']; ?></div>
							<ul <?php if($submenu['active'] || empty($submenu['is_show_list'])){ ?>style="display: block"<?php } ?>>
								
								<?php foreach($submenu['items'] as $threemenu){ ?>
									<li  <?php if($threemenu['active']){ ?>class="active"<?php } ?>><a  href="<?php echo U($threemenu['route']); ?>" style="cursor: pointer;" data-route="<?php echo $threemenu['route']; ?>"><?php echo $threemenu['title']; ?></a>
								<?php } ?>
							</ul>
						<?php }else{ ?>
							<ul class="single">
								<li <?php if($submenu['active']){ ?>class="active"<?php } ?> style=" position: relative"><a href="<?php echo U($submenu['route']); ?>" style="cursor: pointer;" data-route="<?php echo $submenu['route']; ?>"><?php echo $submenu['title']; ?></a></li>
							</ul>
						<?php } ?>
					<?php } ?>
				<?php } ?>
              <div class="wb-subnav-fold icow"></div>
          </div>
        </div>
    <?php } ?>
	<div class="wb-panel in" style="display:none;" id="auth_upgrade">
         <div class="panel-group" id="panel-accordion">
			<div class="panel panel-default">
				<div class="panel-heading" role="tab" id="headingFive" data-toggle="collapse" data-parent="#panel-accordion" href="#collapseFive" aria-expanded="false" aria-controls="collapseThree">
					<h4 class="panel-title">
						<i class="icow icow-lingdang1"></i> <a style="position:relative;">系统提示 <i class="systips"></i></a> <span></span>
					</h4>
				</div>
				<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingFour">
					<ul class="panel-body">
						<li class="panel-list">
							<div class="panel-list-text nomsg">暂无消息提醒</div>
							<div class="panel-list-text upmsg" style="display: none; max-height: none;">
								<div>检测到更新</div>
								<div>新版本 <span id="sysversion">------</span></div>
								<div>新版本 <span id="sysrelease">------</span></div>
								<div>
									<a class="text-primary" href="{:U('system/auth_upgrade')}">立即更新</a>
									<a class="text-warning" href="javascript:check_check_upgrade_hide();" style="margin-left: 15px;">暂不提醒</a>
								</div>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</div>
   </div>

   
   <div class="wb-container {if !empty($system['foldpanel'])}right-panel<?php } ?>">
<block name="content">
								
</block>


    <div id="page-loading">
        <div class="page-loading-inner">
            <div class="sk-three-bounce">
                <div class="sk-child sk-bounce1"></div>
                <div class="sk-child sk-bounce2"></div>
                <div class="sk-child sk-bounce3"></div>
            </div>
        </div>
    </div>

    

</div>




<script language='javascript'>
    require(['bootstrap'], function ($) {
        $('[data-toggle="tooltip"]').tooltip("destroy").tooltip({
            container: $(document.body)
        });
        $('[data-toggle="popover"]').popover("destroy").popover({
            container: $(document.body)
        });
    });

	function check_lionfish_comshop_upgrade() {
        require(['util'], function (util) {
            if (util.cookie.get('checksnailfishshopupgrade_sys')) {
                return;
            }
            $.post('{:U("system/upgrade_check")}', function (ret) {
                if (ret && ret.status == '1') {
				
                    var result = ret.result;
                    if (result.filecount > 0 || result.database || result.upgrades) {
						$('#auth_upgrade').show();
                        $('#headingFive').find('.systips').show();
                        if($('#headingFive').attr('aria-expanded')=='false'){
                            $('#headingFive').click();
                        }
                        $('#collapseFive .nomsg').hide();
                        $('#sysversion').text(result.version);
                        $('#sysrelease').text(result.release);
                        $('#collapseFive .upmsg').show();
                    }
                }
            }, 'json');
        });
    }
    function check_check_upgrade_hide() {
        require(['util'], function (util) {
            util.cookie.set('checkeweishopv2upgrade_sys', 1, 3600);
			$('#auth_upgrade').hide();
            $('#collapseFive .nomsg').show();
            $('#collapseFive .upmsg').hide();
            $('#headingFive').find('.systips').hide();
        });
    }
	<?php if(is_seller_login() == 1){ ?>
    $(function () {
        setTimeout( function() {
            check_lionfish_comshop_upgrade();
        },4000);
    });
	<?php } ?>
	
	$(function () {
        //$('.page-content').show();
		 $.getJSON("<?php echo "index.php?s=/Cron/index"; ?>");
        $('.img-thumbnail').each(function () {
            if ($(this).attr('src').indexOf('nopic.jpg') != -1) {
               
            }
        })
    });
</script>
<script language="javascript">
    myrequire(['web/init']);
    if( $('form.form-validate').length<=0){
        window.formInited = true;
    }
    window.formInitTimer = setInterval(function () {
        if (typeof(window.formInited ) !== 'undefined') {
            $('#page-loading').remove();
            clearInterval(window.formInitTimer);
        }else{
            //$('#page-loading').show();
        }
    }, 1);
</script>


</body>
</html>

