

   
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <div style="padding-bottom:4px" class="table-header">
                Doanh thu
            </div>

            <div class="table-responsive">
                <div role="grid" class="dataTables_wrapper" id="sample-table-2_wrapper">
                    <form autocomplete="off" onsubmit="return false;" id="collaborator" >
                        <div class="row">
                            <div class="col-sm-6">
                                <div id="sample-table-2_length" class="dataTables_length"><label>Hiện thị 
                                        <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2">                                      
                                            <?php foreach ($itemsoptions as $option) { ?>
                                            <option <?php if($option == $perpage) echo "selected"; ?> value="<?php echo $option;?>"><?php echo $option;?></option>
                                            <?php } ?>
                                        </select> bản ghi</label>

                                </div>
                            </div>

                            <div class="col-sm-6">
                                <div class="dataTables_filter" id="sample-table-2_filter">
                                    <label>Tìm kiếm: 
                                        <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' aria-controls="sample-table-2"></label>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order;?>" />
                        <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/>
                    </form>
                    <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
                        <thead>
                            <tr role="row">
                               
                                <th class="<?php if ($sorting_field == 'full_name') {echo $sorting_order;} else {echo "sorting";}?>" id="full_name" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Tên cộng tác viên</th>
                                <th class="<?php if ($sorting_field == 'collaborator_cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="collaborator_cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 283px;" aria-label="Họ tên: activate to sort column ascending">Số điện thoại</th>
                                <th class="<?php if ($sorting_field == 'total_user') {echo $sorting_order;} else {echo "sorting";}?>" id="total_user" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Đã giới thiệu</th>  
                                <th class="<?php if ($sorting_field == 'collaborator_created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="collaborator_created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="Ngày đăng ký: activate to sort column ascending">Ngày đăng ký</th>
                                  
                        </thead>


                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                            
                            <?php
                            foreach ($paidlogs as $paidlog) {
                                ?>
                            <tr class="odd">
                                

                                <td class=" ">
                                    <a href="<?php echo base_url();?>admin/thong_ke_cong_tac_vien/<?php echo $paidlog['id']?>"><?php echo $paidlog['full_name'];?></a>
                                </td>
                                <td class=" "><?php echo $paidlog['collaborator_cellphone']?></td>
                                
                                <td class="hidden-480 "><?php echo $paidlog['total_user'];?></td>
                                <td class="hidden-480 "><?php echo $paidlog['collaborator_created_time'];?></td>
                                
                               

                                
                            </tr>
                            <?php } ?>







                        </tbody></table><div class="row"><div class="col-sm-6">
                                <div class="dataTables_info" id="sample-table-2_info">Hiển thị <?php echo ($start+1)?> đến <?php echo ($start+$perpage)?> của <?php echo $total?> bản ghi</div>
                                    
                            </div>
                        <div class="col-sm-6">
                            <div class="dataTables_paginate paging_bootstrap">
                                <ul class="pagination">
                                    <?php echo $paging; ?>
                                </ul>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            
        </div>


<script type="text/javascript">
    window.onload = function ()
    {
        init_page();
    }


</script>