<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<?php $this->load->view("admin/header"); ?>
<style type="text/css">.layui-form-item .layui-inline {margin:0}</style>
<?=form_open(ADMINPATH . '/user/home/list', ['class' => "layui-form"])?>
    <input type="hidden" id="page" name="page" value="1" />
    <blockquote class="layui-elem-quote news_search">
        <div class="layui-form-item" style="margin-bottom:0">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" name="keyword" value="" placeholder="请输入关键字" class="layui-input search_input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline" style="width:100px;">
                    <select name="status" lay-verify="">
                        <option value="0">选择状态</option>
                        <option value="1">正常</option>
                        <option value="2">锁定</option>
                    </select>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label" style="width:60px;">注册时间</label>
                <div class="layui-input-inline" style="width:100px;">
                    <input type="text" name="start_date" value="" placeholder="开始时间" class="layui-input laydate">
                </div>
                <div class="layui-form-mid">-</div>
                <div class="layui-input-inline" style="width:100px;">
                    <input type="text" name="end_date" value="" placeholder="结束时间" class="layui-input laydate">
                </div>
            </div>

            <div class="layui-inline">
                <a class="layui-btn search_btn">搜索</a>
                <a class="layui-btn layui-btn-normal add_edit" data-url="<?=site_url(ADMINPATH.'/user/home/add')?>" data-title="添加会员">添加会员</a>
                <a class="layui-btn layui-btn-danger batchDel" data-url="<?=site_url(ADMINPATH . '/user/home/del')?>">批量删除</a>
            </div>
        </div>
    </blockquote>
    <div class="layui-form users_list">
        <table class="layui-table" lay-even>
            <colgroup>
                <col width="50">
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>
                <th class="text-center">会员ID</th>
                <th class="text-center">会员昵称</th>
                <th class="text-center">聊天记录</th>
                <th class="text-center">流水记录</th>
                <th class="text-center">邮箱</th>
                <th class="text-center">手机</th>
                <th class="text-center">可用余额</th>
                <th class="text-center">冻结金额</th>
                <th class="text-center">充值金额</th>
                <th class="text-center">注册IP</th>
                <th class="text-center">注册时间</th>
                <th class="text-center">状态</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody id="dataList"></tbody>
        </table>
    </div>
    <div class="text-center" id="pageHtml"></div>
<?=form_close()?>

<script type="text/javascript">
    var _count_url = "<?=site_url(ADMINPATH.'/user/home/count')?>";
</script>
<?php $this->load->view("admin/common_js"); ?>
<script type="text/javascript">
    layui.use(['jquery', 'laydate'], function(){
        var laydate = layui.laydate,
            $ = layui.jquery;

        $('.laydate').click(function () {
            var map = {
                elem: this,
                format: 'YYYY-MM-DD',
            };
            if($(this).attr('name') == 'start_date') {
                var end_date = $('input[name=end_date]').val();
                map.max = end_date ? end_date : '<?=date('Y-m-d')?>';
            } else if($(this).attr('name') == 'end_date') {
                map.min = $('input[name=start_date]').val();
                map.max = '<?=date('Y-m-d')?>';
            }
            laydate(map);
        });
    });
</script>
<?php $this->load->view("admin/footer"); ?>