<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/plugins/datatables/jquery.dataTables.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/plugins/datatables/extensions/Responsive/css/dataTables.responsive.css">
<div class="content_wrapper">
    <div id="msg-tip"></div>

    <style>
        .change {
            background: lightgoldenrodyellow;
        }
        .td-nowrap {
            white-space: nowrap;
        }
    </style>

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>时间查询</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-inline" role="form" method="post" action="#" >
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>开始时间</label>
                                            <input type="text" class="form-control datetimepicker" value="<?php echo $stime?>" placeholder="开始时间" name="stime" />
                                        </div
                                        <span class="gap"></span>
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>结束时间</label>
                                            <input type="text" class="form-control datetimepicker" value="<?php echo $etime?>" placeholder="结束时间" name="etime" />
                                        </div>
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>类型:</label>
                                            <select  name="flag" id="flag" class="selectpicker show-tick form-control">
                                                <option value="1">--全部--</option>
                                                <option value="2">安卓</option>
                                                <option value="3">IOS</option>
                                            </select>
                                        </div>
                                        <span class="gap"></span>
                                        <button type="button" class="btn btn-primary" id="searchBtn">查询</button>
                                        <a style="margin:5px;" class="btn btn-primary " href="#Statistics/ltv/2" role="button">LTV曲线</a>
                                    </form>

                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>基础数据</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table id="reportTable" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th colspan="3" style="text-align: center"></th>
                                                <th colspan="4" style="text-align: center">首日</th>
                                                <th colspan="4" style="text-align: center">3日</th>
                                                <th colspan="4" style="text-align: center">7日</th>
                                                <th colspan="4" style="text-align: center">30日</th>
                                                <th colspan="4" style="text-align: center">60日</th>
                                                <th colspan="4" style="text-align: center">90日</th>
                                            </tr>
                                            <tr>
                                                <th>序号</th>
                                                <th>日期</th>
                                                <th>新增用户数</th>
                                                <th>充值金额</th>
                                                <th>充值人数</th>
                                                <th>付费率</th>
                                                <th>LTV</th>
                                                <th>充值金额</th>
                                                <th>充值人数</th>
                                                <th>付费率</th>
                                                <th>LTV</th>
                                                <th>充值金额</th>
                                                <th>充值人数</th>
                                                <th>付费率</th>
                                                <th>LTV</th>
                                                <th>充值金额</th>
                                                <th>充值人数</th>
                                                <th>付费率</th>
                                                <th>LTV</th>
                                                <th>充值金额</th>
                                                <th>充值人数</th>
                                                <th>付费率</th>
                                                <th>LTV</th>
                                                <th>充值金额</th>
                                                <th>充值人数</th>
                                                <th>付费率</th>
                                                <th>LTV</th>
                                            </tr>
                                            </thead>
                                            <tbody id="reportBody">


                                            </tbody>
                                            <tr>
                                                <th colspan="3" style="text-align: center">汇总<span class="fa fa-question-circle " style="color:red;"   data-toggle="tooltip" title="颜色为红色表示该阶段的值还不能汇总"></span></th>
                                                <th colspan="3" style="text-align: right" id="oneNumAvg"></th>
                                                <th colspan="1" style="text-align: right" id="oneAvg"></th>
                                                <th colspan="3" style="text-align: right" id="threeNumAvg"></th>
                                                <th colspan="1" style="text-align: right" id="threeAvg"></th>
                                                <th colspan="3" style="text-align: right" id="sevenNumAvg"></th>
                                                <th colspan="1" style="text-align: right" id="sevenAvg"></th>
                                                <th colspan="3" style="text-align: right" id="thirtyNumAvg"></th>
                                                <th colspan="1" style="text-align: right" id="thirtyAvg"></th>
                                                <th colspan="3" style="text-align: right" id="sixtyNumAvg"></th>
                                                <th colspan="1" style="text-align: right" id="sixtyAvg"></th>
                                                <th colspan="3" style="text-align: right" id="ninetyNumAvg"></th>
                                                <th colspan="1" style="text-align: right" id="ninetyAvg"></th>
                                            </tr>
                                        </table>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>


<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="<?php echo base_url();?>public/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url();?>public/plugins/datatables/extensions/Responsive/js/dataTables.responsive.min.js"></script>
<script src="<?php echo base_url();?>public/js/common.js?version=1"></script>
<script src="<?php echo base_url();?>public/js/statistics/ltv.js?version=13"></script>
<script type="text/javascript">
    //选择日期
    $('.datetimepicker').datepicker({
        language:'zh-CN',
        format:'yyyy-mm-dd',
        zIndexOffset:906  //控制z-index
    });


</script>