<!doctype html>
  <html class="no-js">
  <head>
    <include file="Common/head" />
    <style type="text/css">
      .am-form{width:500px;margin-left:20px;float: left;}
      #editor {font-size: 12px;}
      .am-form label span{font-size: 13px;font-weight:normal;}
      .am-form label p{display: inline;color: #f00;}
      .am-form .am-form-inline-2 input[type=file]{width: 246px}
      .am-form .am-form-inline-3 input[type=text]{width: 160px}
      .am-form .am-form-inline-3 select{width: 160px}
      .am-form .am-form-inline-4 input[type=text]{width: 120px}
      .am-form .am-form-inline-4 select{width: 120px}
      .two-input {display: flex;}
      .am-form .am-form-inline-4 .two-input input[type=text]{width: 50px;}
      .am-form .am-form-inline-4 .two-input input[type=text]:nth-of-type(2){width: 20px;padding: 8px 2px;cursor: default;background: #fff; border-left: 0; border-right: 0;}

      .am-form input[type=file]{display:none;}
      .am-form .am-form-group img{height: 60px;min-width: 60px;max-width: 100px;margin-top: 2px;display: block;cursor: pointer;}
      input[readonly]{background-color: #fff!important;cursor: default!important;}
      .am-form-group input{
        height: 30px;font-size: 14px;margin-bottom: 10px !important;
      }
      .am-form-group select{
        height: 30px;font-size: 14px;margin-bottom: 10px !important;
      }
    </style>
  </head>
  <body>
  <include file="Common/header" />
  <div class="am-cf admin">
    <include file="Common/sidebar" nav="$nav" navv="$nav"/>
    <div class="content-page" style="background: white;">
      <div class="admin-content" style="background: white;">
        <div class="admin-content-body">
          <div class="am-cf am-padding">
            <div class="am-fl am-cf">
              <strong class="am-text-primary am-text-lg">决策支持</strong> /
              <small>会员增长趋势</small>
            </div>
          </div>
          <hr style="margin-top:0px;">
          <div class="am-g" style="padding: 0 1.6rem;">
           <div class="am-panel am-panel-secondary">
            <div class="am-panel-hd">查询会员增长趋势</div>
             <div class="am-panel-bd">
              <form action="" method="GET" class="am-form">
                <div class="am-g">
                  <div class="am-form-group">
                    <div class="am-u-sm-2 txtr">日期</div>
                    <div class="am-u-sm-2">
                      <select name="yy">
                        <?php
                          $year_first = date('Y',M('wx_users')->order('create_time')->getField('create_time'));
                          $year_now = date('Y');
                          for ($i=$year_now; $i >= $year_first; $i--) { ?>
                          <option value="{$i}" <?php if($_GET["yy"]==$i){ ?>selected<?php } ?>>{$i}年</option>
                        <?php } ?>
                      </select>
                    </div>
                    <div class="am-u-sm-2">
                      <select name="mm">
                        <option value="0">全年</option>
                        <?php for ($i=1; $i <= 12; $i++) { ?>
                          <option value="{$i}" <?php if($_GET["mm"]==$i){ ?>selected<?php } ?>>{$i}月</option>
                        <?php } ?>
                      </select>
                    </div>
                    <div class="am-u-sm-6" style="line-height: 37px;">&nbsp;</div>
                  </div>
                  <div class="am-form-group" style="padding-top: 30px;">
                    <div class="am-u-sm-2">&nbsp;</div>
                    <div class="am-u-sm-3">
                      <button type="submit" class="am-btn am-btn-default">搜索</button>
                    </div>
                    <div class="am-u-sm-1">&nbsp;</div>
                  </div>
                </div>
              </form>
            </div>
          </div>
          <div class="am-panel am-panel-default">
            <div class="am-panel-hd">趋势图示例</div>
            <div class="am-panel-bd">
              <div id="container" style="min-width: 300px; height: 400px; margin: 0 auto"></div>  
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <include file="Common/footer" />
  </body>
  <script src="__PUBLIC__/js/highcharts/highcharts.js"></script>
  <script type="text/javascript">
    $(function(){
      $('#container').highcharts({
        chart: {type: 'line'},
        title: {text: ''},
        subtitle: {text: ''},
        credits: {text: '', href: ''},
        colors: ['#0061a5', '#ff0000'],
        xAxis: {categories: [{:implode(',',$data['title'])}] },
        yAxis: {title: {text: '人数'},allowDecimals:false },
        series: [{
          name: '新会员',
          data: [{:implode(',',$data['count'])}]
        }]
      });
    });
  </script>
  </html>