<div class="col-md-10" role="main">
    <nav class="breadcrumb"></i> 邀请好友模块 <span class="c-gray en">&gt;</span> 邀请用户列表 </nav>
    <div class="title-box">
        <p class="t-p" style="font-size: 28px; color: #7d7d7d;vertical-align: middle; padding-top: 15px; padding-bottom: 15px;">邀请用户列表</p>
        <div class="t-e">
            <img src="assets/images/explain.png" alt="">
            <span>说明：本列表记录所有已获取得邀请码的用户以及被邀请的用户信息。</span>
        </div>
    </div>

    <div class="m_table_box">
        <form method="post" action="<?php echo site_url('mocuzfun/Client_fun/invite');?>" id="search">
            <div class="invite_select">
                <input type="text" placeholder="搜索用户名或者UID" name="search" value="<?php echo empty($search) ? '' : $search;?>">
                <!-- 原来button的 onclick="search.submit()" -->
                <button class="in_btn"  type="submit"><i class="fa fa-search"></i></button>
            </div>
        </form>
        <table>
            <thead>
                <tr>
                    <th class="s-thead">UID</th>
                    <th class="s-thead">用户名</th>
                    <th class="s-thead">邀请时间</th>
                    <th class="s-thead">推广码</th>
                    <th class="s-thead">邀请人数</th>
                    <th class="s-thead">操作</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($listInfo as $k => $v) {
                ?>
                <tr>
                    <td><?php echo $v['uid'];?></td>
                    <td><?php echo $v['username'];?></td>
                    <td><?php echo date('Y-m-d H:i',$v['create_time']);?></td>
                    <td><?php echo $v['code'];?></td>
                    <td><?php echo $v['invite_num'];?></td>
                    <td><button <?php if($v['invite_num']<=0){?>disabled="disabled" style="color:#ccc;background-color:#F8F8F8;"<?php }?>>邀请的用户</button></td>
                </tr>
                <?php
                }?>
            </tbody>
        </table>
        <?php echo $pageinfo;?>
    </div>
</div>
<script>
    $(document).ready(function() {
        $('table button').on('click',function(event) {
            event.preventDefault();
            /* Act on the event */
            var uid = $(this).parent('td').parent('tr').children('td').eq(0).text();
            location.href="<?php echo site_url('mocuzfun/client_fun/invite_user/"+uid+"');?>";
        });
    });
</script>
<script type="text/javascript" src="<?php echo asset_url('js/paging.js');?>"></script>