<?php defined('IN_YUNYECMS') or exit('No permission.'); ?><!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $seo["title"] ;?></title>
  <meta name="keywords" content="<?php echo $seo["keywords"] ;?>" />
  <meta name="description" content="<?php echo $seo["description"] ;?>" />
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

  <link href="<?php echo YUNYECMS_PUBLIC;?>plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" />
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/fontawesome-free/css/all.min.css"> <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/iCheck/all.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/skins/_all-skins.min.css">
  <link href="<?php echo YUNYECMS_UI;?>plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/plugins.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/member.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_PUBLIC;?>member/css/buy.css">
  <link rel="shortcut icon" href="<?php echo YUNYECMS_UI;?>dist/img/favicon.ico" />
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body class="hold-transition skin-green sidebar-mini fixed">
  <div class="wrapper">
    <?php include tpl("left","member"); ?>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-left">
                <li class="breadcrumb-item" id="homeitem"><a href="<?php echo url('member/member/index');?>"
                    target="maincontent"> <i class="fa fa-home"></i>
                    首页</a></li>
                <?php if(is_array($breadcumb)): $i = -1; $__DATA__ = $breadcumb;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <?php if($i+1!=count($breadcumb)) { ?>
                <li class="breadcrumb-item"><a href="<?php echo $v["url"] ;?>"><?php echo $v["title"] ;?></a></li>
                <?php } else { ?>
                <li class="breadcrumb-item active"><?php echo $v["title"] ;?></li>
                <?php } ?>
                <?php  endforeach;  endif; ?>
              </ol>
            </div>
            <div class="col-sm-6">
              <?php include tpl("fast","member"); ?>
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid" id="mainwrap">
        <!-- Main content -->
        <section class="content">
          <div class="row">
            <!-- left column -->
            <div class="col-md-12">
              <div class="card box-primary card-outline">
                <div class="card-header">
                  <div class="col-xs-12 col-sm-12 col-md-8 pb10">
                    <h3 class="card-title">会员升级</h3> &nbsp;
                  </div>
                </div>
                <!-- /.box-header -->
                <?php if(!empty($list)) { ?>
                <div class="card-body">
                  <div class="col-md-12" style="padding-bottom: 120px;">
                    <?php if(is_array($list)): $i = -1; $__DATA__ = $list;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                    <div class="product-details">
                      <div class="row">
                        <div class="col-lg-3 col-md-6">
                          <a href="#<?php echo url('member/membergroup_goods/show',array('id'=>$v['goods_id']));?>"> <img
                              src="<?php echo $v["pic"] ;?>" alt="Gallery image" data-rjs="2"></a>
                        </div>
                        <div class="col-lg-5 col-md-4">
                          <div class="product-info" style="padding-bottom: 10px;">
                            <h2><?php echo $v["goods_title"] ;?></h2>
                            <div class="product-abelity" style=" margin-top: 10px;">
                              <h6><span class="gprice text-red" id="zongjia">￥<?php echo $v["price"] ;?>元</span></h6>
                            </div>
                          </div>
                          <div class="row margin-top-30 buywrap">
                            <form class="form-horizontal" id="defaultForm" method="post"
                              action="<?php echo url('member/membergroup_goods/pay')?>">
                              <div class="form-group row">
                                <div class="col-md-12">
                                  <dl class="host" style="padding-left: 15px;">
                                    <?php if(is_array($v['time_limit'])): $index2 = -1; $__DATA__ = $v['time_limit'];if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$var): $mod = ($index2 % 2 );++$index2;?>
                                    <?php if($var['price']) { ?>
                                    <dd <?php if($index2==0) { ?> class="buy_hover" <?php  } ?> ><b
                                        data-value="<?php echo $var["price"] ;?>" name="<?php echo $var["name"] ;?>" id="<?php echo $var["id"] ;?>"><?php echo $var["name"] ;?></b></dd>
                                    <?php } ?>
                                    <?php  endforeach;  endif; ?>
                                  </dl>
                                </div>
                              </div>
                              <div class="form-group row" style="padding-left: 15px;">
                                <div class="col-md-9">
                                  <input type="radio" name='paymode' value="1" id="payment_1"> <label
                                    for="payment_1">支付宝 <i></i></label> &nbsp; &nbsp;
                                  <input type="radio" name='paymode' value="2" id="payment_2" checked> <label
                                    for="payment_2">微信支付 <i></i></label>
                                </div>
                              </div>
                              <div class="form-group row" style="padding-left: 15px;">
                                <div class="col-md-9">
                                  <input name="goods_id" id="goods_id" type="hidden" value="<?php echo $v["goods_id"] ;?>">
                                  <input type="hidden" name="token" id="token" value="<?php echo $token;?>">
                                  <input name="orderprice" id="orderprice" type="hidden">
                                  <input name="timelimit_name" id="timelimit_name" type="hidden">
                                  <input name="timelimit_id" id="timelimit_id" type="hidden">
                                  <button type="submit" class="btn btn-info btn-lg btn-flat margin-right-10"> <i
                                      class="icon-basket"></i> 购买 </button>
                                </div>
                              </div>
                            </form>
                          </div>
                        </div>
                      </div>
                    </div>
                    <?php  endforeach;  endif; ?>
                  </div>
                  <ul class="pagination pull-left" style="display: none;">
                    <?php echo $page;?>
                  </ul>
                </div>
                <?php } else { ?>
                <div class="container">
                  <div class="callout callout-info">
                    <h4><i class="icon fa fa-info"></i> 提示信息：</h4>
                    暂时没有任何信息<br />
                  </div>
                </div>
                <?php } ?>
              </div>
              <!-- /.box -->
            </div>
            <!--/.col (left) -->
          </div>
          <!-- /.row -->
        </section>
        <!-- /.content -->
      </div>

    </div>
    <!-- /.content-wrapper -->
    <?php include tpl("foot","member"); ?>
    <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->

  </div>
  <!-- ./wrapper -->
  <!-- jQuery 2.2.3 -->
  <script src="<?php echo YUNYECMS_UI;?>plugins/jQuery/jquery-3.6.1.min.js"></script>
  <!-- Bootstrap 3.3.6 -->
  <script src="<?php echo YUNYECMS_UI;?>bootstrap/js/bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="<?php echo YUNYECMS_UI;?>dist/js/adminlte.js"></script>


  <script type="text/javascript">
    $(document).ready(function () {
      $(".search-option").toggle(function () {
        $(this).next(".select").slideDown();
      }, function () {
        $(this).next(".select").slideUp();
      });
      $(".select dd").click(function () {
        $a = $(this).attr('id');
        $b = $(this).html();
        $("#typeid").val($a);

        $(".search-option").html($b + '<i><em></em><span></span></i>');
        $(".select").slideUp();
      });

    });
  </script>
  <script type="text/javascript">
    price();
    function price() {
      var price = $(".host .buy_hover b").data("value");
      var timelimit_name = $(".host .buy_hover b").attr("name");
      var timelimit_id = $(".host .buy_hover b").attr("id");
      $("#zongjia").html("￥" + price + "元");
      $("#orderprice").val(price);
      $("#timelimit_name").val(timelimit_name);
      $("#timelimit_id").val(timelimit_id);
    }
    $(".buywrap").each(function () {
      $(this).find("dd").click(function () {
        $(this).siblings().removeClass("buy_hover");
        $(this).addClass("buy_hover");
        price();
      })
    });
    $(".buywrap dl").hover(
      function () { $(this).css("background", "#f9f9f9"); },
      function () { $(this).css("background", "none"); }
    );
  </script>


</body>

</html>