<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title><?php echo $data['gname'].$data['title'].$this->config['sitename']?></title>
    <meta name="description" content="<?php echo $this->config['description']?>">
    <meta name="keywords" content="<?php echo $this->config['keyword']?>">
	<link rel="stylesheet" href="https://lib.baomitu.com/amazeui/2.7.2/css/amazeui.min.css">
	<link href="//lib.baomitu.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
	<script src="https://lib.baomitu.com/jquery/2.0.3/jquery.min.js"></script>
	<script src="https://lib.baomitu.com/amazeui/2.7.2/js/amazeui.min.js"></script>	
	<script src="https://lib.baomitu.com/layer/2.3/layer.js"></script>
    <link rel="stylesheet" href="/static/default/assets/css/admin.css">
    <link rel="stylesheet" href="/static/default/assets/css/app.css">
    <style type="text/css"> 
  	.am-topbar-inverse{
		background-color:<?php echo $this->config['color'];?>;
		border-color:<?php echo $this->config['color'];?>;
	}
	.am-footer-default{
		background-color:<?php echo $this->config['color'];?>;
	}
	.am-panel-primary{
		border-color:<?php echo $this->config['color'];?>;
	}
	.am-footer-default .am-footer-miscs{
		color: #fff;
	}
        .am-container{
          max-width: 1200px;
        }
    
        /* 色调设置 */
                /* 色调设置 */
		.am-thumbnails {
			margin-right: -.1rem;
		}
		.item-shop {
			width: 100%;
			height: 188px;
			border-radius: 10px;
			background: white;
			text-align: center;
			float: left;
			margin-right: 8px;
			margin-left: 8px;
			margin-bottom: 20px;
			overflow: hidden;
		}
		.goods{			
			background-color: rgba(193, 193, 193, 0.88);
		}
		.item-title {
			font-size: 18px;
			margin-bottom: 10px;
			border-radius: 5px;
			height: 40px;
			line-height: 40px;
			color: white;
			background: #274D81;
		}
		.alert-info {
			color: #F86539;
			background-color: #FAFBF9;
			border-color: #bce8f1;
		}
		.red {
			color: blue;
		}
		.but2 {
			border-radius: 10px;
			width: 100%;
			padding: 10px 10px !important;
			background: rgb(61, 121, 210);
			color: white;
		}
		.item-title:hover{
			background: #0B0EF2;
			}
		.but2:hover {
			background: #0652c1;
		}
       .liebiaocatname{         
      	 width:100%;
		 margin: 0 auto;
		background: <?php echo $this->config['color'];?>;
		color: #ffffff;
		line-height: 35px;
		text-align: center;
		font-size: 20px;
		border-radius: 5px;
		margin-bottom: 15px;
		float: left;
		cursor: pointer;
      }
       .liebiaocatname a{         
      	 color:#fff;text-align:center
      }
       .good-trade{
             background-color: #fff;
        }
		.sy-form{
				background-color: #fff;				
		}
		.floatfl{
			    text-align: center!important;
			float:left!important;
		}
    </style>
</head>
<body id="bg">
  <header class="am-topbar am-topbar-inverse am-header-fixed">
<div class="am-container">
<h1 class="am-topbar-btn am-fl am-btn am-btn-sm am-btn-success am-show-sm-only">
    <a href="/"><i class="am-header-icon am-icon-home"></i></a>
  </h1>
  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
  <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
    <ul class="am-nav am-nav-pills am-topbar-nav ">
      <li><a href="/"><span class="am-icon-home am-icon-sm"></span>首页</a></li>
      <li><a href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $this->config['qq']?>&site=qq&menu=yes" target="_blank"><i class="am-icon-qq"></i>客服</a></li>
      	  <?php if($this->session->get('login_name')) { ?>		  
				  <li><a href="/user"><span class="am-icon-users"></span>会员中心</a></li>
				  <li><a href="/user/sett"><span class="am-icon-cog"></span>个人资料</a></li>	  	  
				  <li><a href="javascript:;" onclick="repwd()"><span class="am-icon-lock"></span>修改密码</a></li>
				  <li><a href="/login/logout"><span class="am-icon-sign-out"></span>退出</a></li>
           <?php }else{ ?>		   
			  <li><a href="/login"><span class="am-icon-sign-in"></span>登录</a></li>	
			  <li><a href="/reg"><span class="am-icon-sign-out"></span>注册</a></li> 
              <?php } ?> 
    </ul>	
    <form action="//<?php echo $_SERVER['SERVER_NAME'];?>" method="get" class="am-topbar-form am-topbar-left am-form-inline sy-form" role="search">
      <div class="am-form-group">
        <input type="text" name="gname" class="am-form-field am-input-sm" placeholder="搜索">
      </div>
    </form>

    <div class="am-topbar-right">
			<ul class="am-nav am-nav-pills am-topbar-nav">
            <li><a href="/chaka"><span class="am-icon-search"></span>订单查询</a></li>
            <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
          </ul>     
    </div>
  </div>
</div>
</header>
<div class="am-topbar"></div>

<div class="am-container" style="padding:2px">    
        <div class="am-panel am-panel-default" style="margin:5px 0 5px 0;border-radius: 0px">
      <div class="am-panel-bd "><?php echo $this->config['tips'] ?></div>
    </div>
   <div class="goods">
   <?php foreach($class as $vals):?>
    <div class="liebiaocatname am-show-landscape"><a href="?cid=<?php echo $vals['id'];?>"><b><?php echo $vals['title'];?></b></a></div>
					 <div class="am-show-landscape">
                              <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 am-thumbnails">
							  <?php foreach ($lists as $val): ?>
						   <?php if ($vals['id']==$val['cid']){ ?>
                                <li ><a onclick="getnewGoods(<?php echo $val['id'].", ".$this->config['cp_jt']; ?>)">
                                    <div style="background-color: #fff;" class="index_good_body">     
										<div class="item-shop" id="231" name="14">	
											<div class="item-title"><?php echo $val['gname'] ?></div>
											
											<div class="item-bz">
												<p><label id="tip" style="padding:5px; margin-bottom: 0px;" class="alert alert-info">1个=<?php echo $val['price'] ?>元</label></p>
																		<p>实时库存：<span class="red"><?php echo $val['kuc'] ?></span></p>											
											</div>
											<div>						
												<input type="submit" class="but2" value="在线购买">
											</div>
											</div>
										</div>
                                </a>
                                </li>
						   <?php }?>
						   <?php endforeach;?>                                
                       		</ul>
						</div>     
				   <?php endforeach;?>
				   
				   
						<div class="am-show-portrait">
                            <div class="am-container">
                              <div class="am-g">                                
                                  <?php foreach($class as $vals):?>
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12" style="padding:2px">
                                   <a href="?cid=<?php echo $vals['id'];?>"><div style="background-color: #393D49;color: #fff;padding: 10px;text-align: center"><?php echo $vals['title'];?></div></a>
                                </div>
                                <?php foreach ($lists as $val): ?>
                  				 <?php if ($vals['id']==$val['cid']){ ?>
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12" style="margin-bottom: 5px;padding:2px">
                                  <div style="background-color: #fff;height: 80px">
                                    <div style="padding:5px">
                                      <a onclick="getnewGoods(<?php echo $val['id'].", ".$this->config['cp_jt']; ?>)"  style="color: #000;">
                                        <img class="am-radius" alt="140*140" src="<?php echo $val['image']?>" width="70" height="70" style="float: left" />
                                        <div class="am-text-truncate" style="margin-left: 15px;">
                                          <span style="margin-left: 5px"><?php echo $val['gname']?></span>
                                          <br>
                                          <div style="margin-top: 18px">
                                            <span class="am-badge am-badge-danger am-radius" style="margin-left: 5px">库存(<?php echo $val['kuc']?>)</span>
                                            <span style="color: #ff0000">
                                              <b>¥<?php echo $val['price']?></b>
                                            </span>
                                          </div>
                                        </div>
                                      </a>
                                    </div>
                                  </div>
                                </div>
                                
                   <?php }?>
                   <?php endforeach;?>
                   <?php endforeach;?>
                              </div>
                            </div>
                          </div>
						  <?php echo $lists ? $pagelist : '' ?>
    </div>
    </div>
      <footer data-am-widget="footer"
          class="am-footer am-footer-default"
          data-am-footer="{  }">
    <div class="am-footer-switch">
        友情链接：
	<?php 
	$link = $this->links;
	if($link):?>
	<?php foreach($link as $key=>
	$val):?>
	<span class="am-footer-divider"> | </span>
	<a class="am-footer-desktop" href="<?php echo $val['url']?>" target="_blank">
	<?php echo $val['title']?>
	</a>
	<?php endforeach;?>
	<?php endif;?>
    </div>
    
    <div class="am-footer-miscs ">
      <p><?php echo $this->config['copyright']?></p>
      <p><?php echo $this->config['icpcode']?></p>
      <p><?php echo $this->config['tel']?></p>
    </div>
  </footer>

  <div id="am-footer-modal"
       class="am-modal am-modal-no-btn am-switch-mode-m am-switch-mode-m-default">
    <div class="am-modal-dialog">
      <div class="am-modal-hd am-modal-footer-hd">
        <a href="javascript:void(0)" data-dismiss="modal" class="am-close am-close-spin " data-am-modal-close>&times;</a>
      </div>
      <div class="am-modal-bd">
		<?php echo $this->config['copyright']?>
		<?php echo $this->config['icpcode']?>
		<?php echo $this->config['tel']?>
	
      </div>
    </div>
  </div>
<?php echo $this->bgrand();?>
<script src="/static/default/assets/js/app.js"></script>
<script src="/static/default/js/app.js"></script>
<script src="https://lib.baomitu.com/screenfull.js/5.0.0/screenfull.min.js"></script>
<?php echo $this->config['stacode']?>
</body>
  <?php if ($this->config['mp3_state']=='1'){
	echo $this->config['mp3list'];}
	?>
</html>