header.html 13.8 KB
{template 'public/header-base'}
<!-- 餐饮 -->
<style>
	body{background-color: #F5F7F9;}
	.nav.nav-tabs{border-color:#20a0ff;}
	.nav-tabs>li>a:hover{border-color:#eee #eee #20a0ff #eee;}
	.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{background-color:#20a0ff; border-color:#20a0ff;}
	.nav-tabs>li>a {border-radius: 0 0 0 0;}
	.nav{background-color: white;}
	.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
		color: #FFF;
		background-color: #20a0ff;
		border-color: #20a0ff;
	}
	.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus{
		color: #24303C;
	}
	.list-group-item.active{
		background-color: #edf6ff;
		border:none;
		color: #00aeff;
	}
	.navbar-inverse {
		background-color: #fff;
		border-color: #20a0ff
	}
	.block {
		display: block;
	}
	.clear {
		display: block;
		overflow: hidden;
	}
	.navbar-nav > li > a {
		padding-top: 10px;
		padding-bottom: 10px;
		line-height: 40px
	}
	.navbar-inverse .navbar-nav>li>a:hover, .navbar-inverse .navbar-nav>li>a:focus{
		color: #777;
		background-color: #eee;
	}
	.big-menu{
		background-color: #24303C;
		padding-right: 0px;
		padding-left: 0px;
		padding-top: 10px;
		height: 95%;
		width: 150px;
		position: fixed;
		left: 0px;
		top: 50px;
		z-index: 88;
		overflow-y: scroll;
	}
	.navback{
		background-color: white;
		width: 110px;
		height: 100%;
		position: fixed;
		left: 150px;
		top: 50px;
		z-index: 80;
		color: #666;
		line-height: 50px;
		border-right: 1px solid #eee;
	}
	.therji{
		background-color: white;
		width: 109px;
		position: fixed;
		left: 150px;
		top: 50px;
		z-index: 89;
		color: #666;
		line-height: 50px;
		display: none;
	}
	.therji:nth-child(1){display: block;}
	.therji>li:nth-child(1){
		margin-top: 20px;
	}
	.big-menu .panel .list-group-item{
		border:none;overflow:hidden; white-space:normal; text-overflow:clip;
		font-size: 13px;		
		height: 50px;		
		padding: 0px 15px;
	}
	.panel>.list-group .list-group-item{padding-left: 34px;}
	.big-menu .panel .list-group-item:hover{
		background-color: #edf6ff;
		color:#00aeff;
	}
	.btn-primary {
		color: #fff;
		background-color: #0066cd;
		border-color: #0066cd;
	}
	.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
	.open > .dropdown-toggle.btn-primary {
		color: #fff;
		background-color: #0066cd;
		border-color: #0066cd;
	}
	.open{position: relative;}
	.big-menu .panel .panel-heading .panel-title{
		width: 100px;
		float: left;
		font-size: 14px;
	}
	.dropdown-menu{left:32px;}
	.big-menu .panel .panel-heading .panel-title .fa{font-size: 16px;}
	.navbar-inverse .navbar-nav>.active>a, .navbar-inverse .navbar-nav>.active>a:hover, .navbar-inverse
	.navbar-nav>.active>a:focus{
		color: #f60;
		background-color: #e7e7e7;
		border-bottom: 2px solid transparent;
		border-color: #f60;
	}
	button{outline: none;}
	.left{float: left;}
	.right{float: right;}
	a{text-decoration: none;}
	a:hover{text-decoration: none;}
	ul,li{list-style: none;}
	ul{margin-bottom: 0px;}
	body{font-size: 14px;font-family: "微软雅黑";}
	.clearfix{clear:both;}
	.header{
	    background-color: #fff;
	    color: #666;
	    height: 50px;
	    position: fixed;
	    top: 0px;
	    left: 0px;
	    z-index: 90;
	    width: 100%;
	    border-bottom:1px solid #eee;
	}
	.header_left{
	    height: 50px;
	    padding-top: 10px;
	    float: left;
	}
	.wheaderbox{
		color: #666;
		padding: 10px 5px 0px 20px;
		float: left;
	}
	.header_logo{
	    width: 34px;
	    height: 34px;
	    border-radius: 50%;
	    background-color: #009B4D;
	    margin-right: 10px;
	}
	.header_title{
	    font-size: 14px;
	    text-align: center;
	    margin-top: 15px;
	}
	.header_right{
	    height: 50px;
	    padding: 8px 0px;
	    float: right;
	    margin-right: 54px;
	    width: 400px;
	}
	.header_right>li>a:hover{color: #666;}
	.header_right>li{
	    float: left;
	    padding: 0px 20px;
	    border-right: 1px solid #eee;
	    line-height: 33px;
	}
	.ymargin{
		float: right;
		width: 30px;
		height: 30px;
		margin-top: 5px;
	}
	.yg_back{
		background-color: #F5F7F9;
		margin-left: 260px;
		margin-top: 50px;
	}
	.yyhome{font-size: 15px;position: relative;}
	.yyhome:hover .fanhuihome{display: block;}
	.fanhuihome{position: absolute;top: 40px;left: 0px;font-size: 14px;width: 100px;display: none;}
	.wyactive{background-color: #39485D;border-left: 3px solid #44ABF7;}
	.panel-default>.navtitle{background-color: #24303C;color: white;border:none;}
	.big-menu .panel .panel-heading .wytitle{height: 50px;padding: 15px 15px;width: 130px;}
	.navtitle{padding: 0px;}
	.panel,.panel-heading{border-radius: 0px;}
	.list-group-item:last-child,.list-group-item:first-child{border-radius: 0px;}
	.yg_login{height: auto;background-color: #24303C;padding: 10px 10px 15px;text-align: center;color: white;font-size: 14px;}
	.yg_login>img{margin: 0px auto;width: 60px;height: 60px;background-color: #5CB85C;border-radius: 50%;border: none;margin-bottom: 10px;}
	.header_btn{text-align: center;float: left;margin-left: 10px;width: 100px;border-right: 1px solid #fff;border-right: 1px solid #eee;height: 30px;line-height: 30px;}
	.wytitle:hover{color: white;}

	.fa-pencil-square-o,.fa-comments,.fa-star-half-o,.fa-users,.fa-user,.fa-clipboard,.fa-money,.fa-life-ring,.fa-bars,.fa-recycle,.fa-cog,.fa-book,.fa-database,.fa-gift,.fa-user,.fa-newspaper-o,.fa-binoculars,.fa-trophy,.fa-key{margin-right: 15px;}
	.fa-cubes{margin-right: 8px;}
	.fa-university{margin-right: 10px;}
	.fa-map-marker{margin-right: 18px;}
	.fa-jpy{margin-right: 20px;}
</style>

{php $res=pdo_get('cjdc_system',array('uniacid'=>$_W['uniacid']));}
<div class="header">
	<div class="wheaderbox">
		<img class="header_logo" src="{if $res['link_logo']}{php echo tomedia($res['link_logo'])}{else}../addons/zh_cjdianc/template/images/htlogo.png{/if}" alt=""/>
		<span class="header_title">
			{if $res['link_name']}{$res['link_name']}
			{else}后台管理系统{/if}
		</span>
	</div>
    <div class="header_left">        
        {if $_W['role'] == 'founder'}
        <a href="{php echo $this->createWebUrl('store')}"><div class="header_btn">返回首页</div></a>
         {/if}  
    </div>
    <ul class="header_right">       
        <li>
			<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" style="display:block; max-width:185px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; "><i class="fa fa-user"></i>{$_W['user']['username']} ({if $_W['role'] == 'founder'}系统管理员{elseif $_W['role'] == 'manager'}小程序管理员{else}小程序操作员{/if}) <b class="caret"></b></a>
			<ul class="dropdown-menu">
				{if $_W['role'] != 'operator'}
				<li><a href="{url 'user/profile/profile'}" target="_blank"><i class="fa fa-weixin fa-fw"></i> 我的账号</a></li>
				<li class="divider"></li>
				<li><a href="{url 'home/welcome/system'}" target="_blank"><i class="fa fa-sitemap fa-fw"></i> 系统选项</a></li>
				<li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="fa fa-cloud-download fa-fw"></i> 自动更新</a></li>
				<li><a href="{url 'system/updatecache'}" target="_blank"><i class="fa fa-refresh fa-fw"></i> 更新缓存</a></li>
				<li class="divider"></li>
				{/if}
			</ul>
			{if $_W['role'] == 'founder'}

        	<li>
                <a href="index.php?c=miniapp&a=version&do=home&version_id={$_COOKIE['newstr']}" class="yyhome">
                  	<span class="fa fa-home"></span>
	            	<div class="fanhuihome">返回系统</div>
                </a>
            </li>   
            {/if}  
        <!-- <li>
            <img src="../addons/zh_cjdianc/template/images/tongzhi.png" width="15px" height="18px" alt=""/>
        </li> -->
        <li>
        	
            <a href="{url 'user/logout'}" class="yyhome">
            <!-- <img src="../addons/zh_cjdianc/template/images/kaiguan.png" width="20px" height="20px" title="退出系统"/> -->
            	<span class="fa fa-power-off"></span>
            	<div class="fanhuihome">退出系统</div>
            </a>
        </li>
    </ul>
</div>
<div class="container-fluid col-md-12 col-xs-12 col-sm-12">
	{if defined('IN_MESSAGE')}
	<div class="jumbotron clearfix alert alert-{$label}">
		<div class="row">
			<div class="col-xs-12 col-sm-3 col-lg-2">
				<i class="fa fa-5x fa-{if $label=='success'}check-circle{/if}{if $label=='danger'}times-circle{/if}{if $label=='info'}info-circle{/if}{if $label=='warning'}exclamation-triangle{/if}"></i>
			</div>
			<div class="col-xs-12 col-sm-8 col-md-9 col-lg-10">
				{if is_array($msg)}
				<h2>MYSQL 错误:</h2>
				<p>{php echo cutstr($msg['sql'], 300, 1);}</p>
				<p><b>{$msg['error'][0]} {$msg['error'][1]}:</b>{$msg['error'][2]}</p>
				{else}
				<h2>{$caption}</h2>
				<p>{$msg}</p>
				{/if}
				{if $redirect}
				<p><a href="{$redirect}">如果你的浏览器没有自动跳转,请点击此链接</a></p>
				<script type="text/javascript">
					setTimeout(function () {
						location.href = "{$redirect}";
					}, 3000);
				</script>
				{else}
				<p>[<a href="javascript:history.go(-1);">点击这里返回上一页</a>] &nbsp; [<a href="./?refresh">首页</a>]</p>
				{/if}
			</div>
			{else}
			<div class="row yg_top">
				{php $frames = empty($frames) ? $GLOBALS['frames'] : $frames; _calc_current_frames($frames);}
				{if !empty($frames)}
				<div class="big-menu">									
        			<div class="navback"></div>
					{if $cur_store}
					<div class="yg_login">
						<img src="{$cur_store['logo']}">
						<div>{$cur_store['name']}</div>
					</div>
					<!-- <div class="panel panel-default" style="padding-bottom: 10px;padding-top: 5px;">
						<span style="width:13.3333337%; height:160px;display: table-cell; line-height:160px; vertical-align:middle;text-align: center;padding-top: 5px;">
							<img style="display: inline-block;width: 160px;height: 160px;
box-sizing: border-box;margin-top:10px;padding: 10px;border: 1px solid #f2f2f2;box-sizing: border-box;max-width: 100%;" alt="image" src="{php echo tomedia($cur_store['md_logo'])}" onerror="this.src='../addons/zh_dianc/template/images/logo.png';"/>
						</span>
						<a href="#" >
							<span style="text-align:center;margin-top: 8px;" class="block m-t-xs"><strong class="font-bold">{$cur_store['md_name']}</strong></span>
							<span style="text-align:center;" class="text-muted text-xs block"><strong class="font-bold">{$_W['user']['username']}</strong>({if $_W['role'] == 'founder'}系统管理员{elseif $_W['role'] == 'manager'}公众号管理员{else}门店管理员{/if})</span>
						</a>
					</div> -->
					{/if}
					{loop $frames $k $frame}
					<div class="panel panel-default" style="border:none;margin-bottom: 0px;">
						<div class="panel-heading navtitle" style="cursor: pointer;height: 50px;">
							{$frame['title']}							
							<ul class="therji" id="frame-{$k}">
								{loop $frame['items'] $link}
								{if !empty($link['append'])}
								<li class="list-group-item{$link['active']}" onclick="window.location.href = '{$link['url']}';" style="cursor:pointer;" kw="{$link['title']}">
									{$link['title']}
									<a class="pull-right" href="{$link['append']['url']}">{$link['append']['title']}</a>
								</li>
								{else}
								<a class="list-group-item{$link['active']}" href="{$link['url']}" kw="{$link['title']}" style="padding-left: 40px;"> {$link['title']}</a>
								{/if}
								{/loop}
							</ul>
						</div>						
					</div>
					{/loop}
					<script type="text/javascript">
						/*$(".navtitle").each(function(){
							$(this).click(function(){
								// console.log($(this).children(".therji").attr('id'))
								var thid = $(this).children(".therji").attr('id');
								$(this).children(".therji").show();
								$(this).children(".wytitle").addClass("wyactive");
								var erjinav = $(this).parent().siblings()
								$(this).parent().siblings(".panel").children().children().removeClass("wyactive");
								// console.log($(this).parent().siblings(".panel").children().attr("class"))
								for(var i=0;i<erjinav.length;i++){
									// console.log(erjinav.children().children(".therji").attr('id'))
									erjinav.children().children(".therji").hide();
								}								
								
							})
						})*/

						require(['bootstrap'], function(){
							$('#search-menu input').keyup(function() {
								var a = $(this).val();
								$('.big-menu .list-group-item, .big-menu .panel-heading').hide();
								$('.big-menu .list-group-item').each(function() {
									$(this).css('border-left', '0');
									if(a.length > 0 && $(this).attr('kw').indexOf(a) >= 0) {
										$(this).parents(".panel").find('.panel-heading').show();
										$(this).show().css('border-left', '3px #428bca double');
									}
								});
								if(a.length == 0) {
									$('.big-menu .list-group-item, .big-menu .panel-heading').show();
								}
							});
						});
					</script>
				</div>

				<div class="col-lg-10 col-md-10 col-xs-10 col-sm-10 yg_back">
					<style>.topNav{border-bottom-color: rgb(0, 0, 0);border-bottom-width: 0.1em;border-bottom-style: inset;}</style>
					{if CRUMBS_NAV == 1}
					{php global $module_types;global $module;global $ptr_title;}
					{php $frames = empty($frames) ? $GLOBALS['frames'] : $frames; _calc_current_frames($frames);}
					<script language='javascript'>
						$(function(){
							$(".breadcrumb").remove();
						})
					</script>
					{elseif CRUMBS_NAV == 2}
					{php global $module_types;global $module;global $ptr_title; global $site_urls; $m = $_GPC['m'];}
					<ul class="nav nav-tabs">
						<li><a href="{url 'platform/reply' array('m' => $m)}">管理{$module['title']}</a></li>
						<li><a href="{url 'platform/reply/post' array('m' => $m)}"><i class="fa fa-plus"></i> 添加{$module['title']}</a></li>
						{if !empty($site_urls)}
						{loop $site_urls $site_url}
						<li {if $_GPC['do'] == $site_url['do']} class="active"{/if}><a href="{$site_url['url']}"> {$site_url['title']}</a></li>
						{/loop}
						{/if}
					</ul>
					{/if}
					{else}
					<div>
					{/if}
					{/if}