

   
        <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 == 'fullname') {echo $sorting_order;} else {echo "";}?>" 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">Họ tên</th>
                                <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="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 == 'amount') {echo $sorting_order;} else {echo "sorting";}?>" id="amount" 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">Số tiền</th> 
                                <th class="<?php if ($sorting_field == 'paid_type') {echo $sorting_order;} else {echo "sorting";}?>" id="paid_type" 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">SMS/Card</th> 
                                <th class="<?php if ($sorting_field == 'paid_time') {echo $sorting_order;} else {echo "sorting";}?>" id="paid_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</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 $paidlog['username'];?></a>
                                </td>
                                <td class=" "><?php echo $paidlog['cellphone']?></td>
                                
                                <td class="hidden-480 "><?php echo number_format($paidlog['amount'],0);?></td>
                                <td class="hidden-480 "><?php if ($paidlog['paid_type']==1) {echo "SMS";} else { echo "Card";}?></td>
                                <td class=" "><?php echo $paidlog['paid_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>