Changeset 728


Ignore:
Timestamp:
Jan 30, 2015 6:49:37 PM (10 years ago)
Author:
quyenla
Message:

user

Location:
pro-violet-viettel/sourcecode/application/modules/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php

    r702 r728  
    6767            }
    6868        }
     69       
    6970        return $provinces;
    7071    }
     
    7475        $provinces = lang('_PROVINCES_');
    7576        // tinh thue bao theo thang
    76         $sql = "SELECT * FROM tbluser LEFT JOIN tblservicepackage ON tbluser.p_id=tblservicepackage.p_id  WHERE tbluser.created_time >'".$input['year']."-".$input['month']."-01' AND tbluser.created_time <'".$input['year']."-".$input['month']."-31' AND tblservicepackage.p_period > 0 " ;
     77        $sql = "SELECT * FROM tbluser LEFT JOIN tblservicepackage ON tbluser.p_id=tblservicepackage.p_id  WHERE tbluser.created_time >'" . $input['year'] . "-" . $input['month'] . "-01' AND tbluser.created_time <'" . $input['year'] . "-" . $input['month'] . "-31' AND tblservicepackage.p_period > 0 ";
    7778        $query = $this->db->query($sql);
    7879        $users = $query->result_array();
     
    9697
    9798        foreach ($provinces as $index => $province) {
    98             $provinces[$index]['stt']=$index+1;
     99            $provinces[$index]['stt'] = $index + 1;
    99100            $provinces[$index]['total'] = 0;
    100101            $totaluser = 0;
     
    123124            }
    124125        }
    125      
    126         $data['packages']=$packages;
    127         $data['provinces']=$provinces;
     126
     127        $data['packages'] = $packages;
     128        $data['provinces'] = $provinces;
    128129        return $data;
    129130    }
  • pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php

    r706 r728  
    5656                                        <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2">
    5757                                            <?php foreach ($itemsoptions as $option) { ?>
    58                                             <option <?php if($option == $perpage) echo "selected"; ?> value="<?php echo $option;?>"><?php echo $option;?></option>
     58                                                <option <?php if ($option == $perpage) echo "selected"; ?> value="<?php echo $option; ?>"><?php echo $option; ?></option>
    5959                                            <?php } ?>
    6060                                        </select> bản ghi</label>
     
    6262                                </div>
    6363                            </div>
    64                                                                
     64
    6565                            <div class="col-sm-6">
    6666                                <div class="dataTables_filter" id="sample-table-2_filter">
    6767                                    <label>Tìm kiếm:
    68                                         <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label>
    69                                 </div>
    70                                                                 <div class="dataTables_status" style="float: right;" id="sample-table-2_status"><label>Lọc:
    71                                                                         <select onchange="filter();" name="status" size="1" style="width: 176px; height: 28px;">                                     
    72                                                                                 <?php foreach ($statusoptions as $key=>$option):?>
    73                                                                                 <option <?php if ($key == $status) echo "selected"; ?> value="<?php echo $key; ?>"><?php echo $option; ?></option>
    74                                                                                 <?php endforeach; ?>
    75                                                                         </select>
    76                                                                 </div>
    77                                                                 <div style="clear: both;"></div>
    78                                                                 <div id="daterangepicker" class="selectbox pull-right">
    79                                                                         <i class="icon-calendar"></i>
    80                                                                         <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;">
    81                                                                                
    82                                                                         </span>
    83                                                                 </div>
    84                                                                 </div>
    85                             </div>
    86 
     68                                        <input type="text" name="keyword" id="keyword" value='<?php echo $keyword; ?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label>
     69                                </div>
     70                                <div class="dataTables_status" style="float: right;" id="sample-table-2_status"><label>Lọc:
     71                                        <select onchange="filter();" name="status" size="1" style="width: 176px; height: 28px;">                                     
     72                                            <?php foreach ($statusoptions as $key => $option): ?>
     73                                                <option <?php if ($key == $status) echo "selected"; ?> value="<?php echo $key; ?>"><?php echo $option; ?></option>
     74                                            <?php endforeach; ?>
     75                                        </select>
     76                                </div>
     77                                <div style="clear: both;"></div>
     78                                <div id="daterangepicker" class="selectbox pull-right">
     79                                    <i class="icon-calendar"></i>
     80                                    <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;">
     81
     82                                    </span>
     83                                </div>
     84                            </div>
    8785                        </div>
    88                                                        
    89                                                 <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order;?>" />
    90                                                 <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/>
    91                     </form>
    92                                         <!-- Table Content -->
    93                                         <center><div id="loading" style="display:none;"><img src="<?php echo base_url();?>/assets/img/loading.gif"/></div></center>
    94                                         <div id="table_content">
     86
     87                </div>
     88
     89                <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order; ?>" />
     90                <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field; ?>"/>
     91                </form>
     92                <!-- Table Content -->
     93                <center><div id="loading" style="display:none;"><img src="<?php echo base_url(); ?>/assets/img/loading.gif"/></div></center>
     94                <div id="table_content">
    9595                    <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
    9696                        <thead>
     
    102102                                    </label>
    103103                                </th>
    104                                                                 <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: 156px;" aria-label="Tài khoản: activate to sort column ascending">Username</th>
    105                                 <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: 156px;" aria-label="Số điện thoại: activate to sort column ascending">Số điện thoại</th>
    106                                 <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Tiền: activate to sort column ascending">Tài khoản (VNĐ)</th>
    107                                                                 <th style="width: 140px;">Tỉnh/TP</th>
    108                                 <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Ngày đăng kÜ: activate to sort column ascending">
     104                                <th class="<?php
     105                                if ($sorting_field == 'cellphone') {
     106                                    echo $sorting_order;
     107                                } else {
     108                                    echo "sorting";
     109                                }
     110                                ?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Tài khoản: activate to sort column ascending">Username</th>
     111                                <th class="<?php
     112                                if ($sorting_field == 'cellphone') {
     113                                    echo $sorting_order;
     114                                } else {
     115                                    echo "sorting";
     116                                }
     117                                ?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Số điện thoại: activate to sort column ascending">Số điện thoại</th>
     118                                <th class="<?php
     119                                if ($sorting_field == 'acc_balanced') {
     120                                    echo $sorting_order;
     121                                } else {
     122                                    echo "sorting";
     123                                }
     124                                ?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Tiền: activate to sort column ascending">Tài khoản (VNĐ)</th>
     125                                <th style="width: 140px;">Tỉnh/TP</th>
     126                                <th class="<?php
     127                                if ($sorting_field == 'created_time') {
     128                                    echo $sorting_order;
     129                                } else {
     130                                    echo "sorting";
     131                                }
     132                                ?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Ngày đăng kÜ: activate to sort column ascending">
    109133                                    <i class="icon-time bigger-110 hidden-480"></i>
    110134                                    Ngày đăng kÜ
    111135                                </th>
    112                                                                 <th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 140px;" aria-label="Ngày hết hạn: activate to sort column ascending">
     136                                <th class="<?php
     137                                if ($sorting_field == 'expire_date') {
     138                                    echo $sorting_order;
     139                                } else {
     140                                    echo "sorting";
     141                                }
     142                                ?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 140px;" aria-label="Ngày hết hạn: activate to sort column ascending">
    113143                                    <i class="icon-time bigger-110 hidden-480"></i>
    114144                                    Ngày hết hạn
    115145                                </th>
    116                                                                 <th class="sorting_disabled" id="status" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;">Tình trạng</th>
     146                                <th class="sorting_disabled" id="status" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;">Tình trạng</th>
    117147                            </tr>
    118148                        </thead>
    119149
    120150                        <tbody role="alert" aria-live="polite" aria-relevant="all">
    121                            
    122                             <?php
    123                             foreach ($users as $user) {
    124                                 ?>
    125                             <tr class="odd">
    126                                 <td class="center  sorting_1">
    127                                     <label>
    128                                         <input type="checkbox" class="ace">
    129                                         <span class="lbl"></span>
    130                                     </label>
    131                                 </td>
    132                                                                 <td class=" ">
    133                                     <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo $user['username']; ?></a>
    134                                                                         <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>-->
    135                                 </td>
    136                                 <td class=" ">
    137                                     <?php echo $user['cellphone']; ?>
    138                                 </td>
    139                                 <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td>
    140                                                                 <td><?php echo $user['province']; ?></td>
    141                                 <td class=" "><?php echo $user['created_time']; ?></td>
    142                                                                 <td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date'])>0 ? date('d/m/Y', strtotime($user['expire_date'])) : '';?></td>
    143 
    144                                                                 <td class=" ">
    145                                                                 <?php  if(strtotime($user['expire_date'])>time()){ ?>
    146                                                                         <span class="label label-sm label-success">Đã đăng kÜ</span>
    147                                                                 <?php }else{ ?>
    148                                                                         <span class="label label-sm label-warning">Dùng thá»­</span>
    149                                                                 <?php } ?>
    150                                                                 </td>
    151 
    152                             </tr>
    153                             <?php } ?>
     151
     152<?php
     153foreach ($users as $user) {
     154    ?>
     155                                <tr class="odd">
     156                                    <td class="center  sorting_1">
     157                                        <label>
     158                                            <input type="checkbox" class="ace">
     159                                            <span class="lbl"></span>
     160                                        </label>
     161                                    </td>
     162                                    <td class=" ">
     163                                        <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo $user['username']; ?></a>
     164                                                                            <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>-->
     165                                    </td>
     166                                    <td class=" ">
     167                                        <?php echo $user['cellphone']; ?>
     168                                    </td>
     169                                    <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td>
     170                                    <td><?php echo $user['province']; ?></td>
     171                                    <td class=" "><?php echo $user['created_time']; ?></td>
     172                                    <td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date']) > 0 ? date('d/m/Y', strtotime($user['expire_date'])) : ''; ?></td>
     173
     174                                    <td class=" ">
     175    <?php if (strtotime($user['expire_date']) > time()) { ?>
     176                                            <span class="label label-sm label-success">Đã đăng kÜ</span>
     177    <?php } else { ?>
     178                                            <span class="label label-sm label-warning">Dùng thá»­</span>
     179    <?php } ?>
     180                                    </td>
     181
     182                                </tr>
     183                                    <?php } ?>
    154184
    155185                        </tbody></table>
    156                                                 <div class="row"><div class="col-sm-6">
    157                                                         <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>
    158                                    
    159                                                         </div>
    160                                                         <div class="col-sm-6">
    161                                                                 <div class="dataTables_paginate paging_bootstrap">
    162                                                                         <ul class="pagination">
    163                                                                                 <?php echo $paging; ?>
    164                                                                         </ul>
    165                                                                 </div>
    166                                                         </div>
    167                                                 </div>
    168                                                 </div>
    169 
     186                    <div class="row"><div class="col-sm-6">
     187                            <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>
     188
     189                        </div>
     190                        <div class="col-sm-6">
     191                            <div class="dataTables_paginate paging_bootstrap">
     192                                <ul class="pagination">
     193<?php echo $paging; ?>
     194                                </ul>
     195                            </div>
     196                        </div>
     197                    </div>
    170198                </div>
     199
    171200            </div>
    172 
    173            
    174201        </div>
    175202
    176         <!-- PAGE CONTENT ENDS -->
    177     </div><!-- /.col -->
     203
     204    </div>
     205
     206    <!-- PAGE CONTENT ENDS -->
     207</div><!-- /.col -->
    178208</div>
    179209
    180210<!-- Modal User History -->
    181211<div class="modal fade" id="user-history" tabindex="-1" role="dialog"aria-hidden="true">
    182         <div class="modal-dialog">
     212    <div class="modal-dialog">
    183213        <div class="modal-content">
    184214            <div class="modal-header">
     
    186216                <h4 class="modal-title">Lịch sá»­</h4>
    187217            </div>
    188                         <div class="modal-body">
    189                                 <ul class="nav nav-tabs padding-16">
    190                                         <li class="active" >
    191                                                 <a id="regis-tab" href="#regis" data-toggle="tab">
    192                                                         Đăng kÜ dịch vụ
    193                                                 </a>
    194                                         </li>
    195                                         <li>
    196                                                 <a id="trade-tab" href="#trade" data-toggle="tab">
    197                                                         Giao dịch
    198                                                 </a>
    199                                         </li>
    200                                 </ul>
    201                                 <div class="tab-content history-tab-content">
    202                                         <div class="tab-pane in active" id="regis">
    203                                                 <div class="table-responsive">
    204                                                         <table id="sample-table-1" class="table table-striped table-bordered table-hover">
    205                                                                 <thead>
    206                                                                         <tr>
    207                                                                                 <th class="center">
    208                                                                                         Từ
    209                                                                                 </th>
    210                                                                                 <th class="center"> Gói dịch vụ </th>
    211                                                                                 <th>
    212                                                                                         <i class="icon-time bigger-110 hidden-480"></i>
    213                                                                                         Thời gian
    214                                                                                 </th>
    215                                                                         </tr>
    216                                                                 </thead>
    217                                                                 <tbody id="content-regis-histoty">
    218                                                                 </tbody>
    219                                                         </table>
    220                                                         <div>
    221                                                                 <div class="dataTables_paginate paging_bootstrap">
    222                                                                         <ul class="pagination" id="regis-pagination">
    223                                                                         </ul>
    224                                                                 </div>
    225                                                         </div>
    226                                                 </div><!-- /.table-responsive -->
    227                                         </div>
    228                                         <div class="tab-pane" id="trade">
    229                                                 <div class="table-responsive">
    230                                                         <table id="sample-table-1" class="table table-striped table-bordered table-hover">
    231                                                                 <thead>
    232                                                                         <tr>
    233                                                                                 <th class="center">
    234                                                                                         Từ
    235                                                                                 </th>
    236                                                                                 <th class="center">Số tiền (VNĐ)</th>
    237                                                                                 <th>
    238                                                                                         <i class="icon-time bigger-110 hidden-480"></i>
    239                                                                                         Thời gian
    240                                                                                 </th>
    241                                                                         </tr>
    242                                                                 </thead>
    243                                                                 <tbody id="content-trade-histoty">
    244                                                                 </tbody>
    245                                                         </table>
    246                                                         <div>
    247                                                                 <div class="dataTables_paginate paging_bootstrap">
    248                                                                         <ul class="pagination" id="trade-pagination">
    249                                                                         </ul>
    250                                                                 </div>
    251                                                         </div>
    252                                                 </div><!-- /.table-responsive -->
    253                                         </div>
    254                                 </div>
    255                         </div><!-- Modal Body -->
    256                 </div> <!-- Modal Content -->
    257         </div>
     218            <div class="modal-body">
     219                <ul class="nav nav-tabs padding-16">
     220                    <li class="active" >
     221                        <a id="regis-tab" href="#regis" data-toggle="tab">
     222                            Giao dịch
     223                        </a>
     224                    </li>
     225                    <li>
     226                        <a id="trade-tab" href="#trade" data-toggle="tab">
     227                            ThÃŽng tin
     228                        </a>
     229                    </li>
     230                </ul>
     231                <div class="tab-content history-tab-content">
     232                    <div class="tab-pane in active" id="regis">
     233                        <div class="table-responsive">
     234                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
     235                                <thead>
     236                                    <tr>
     237                                        <th class="center">
     238                                            Từ
     239                                        </th>
     240                                        <th class="center"> Gói dịch vụ </th>
     241                                        <th>
     242                                            <i class="icon-time bigger-110 hidden-480"></i>
     243                                            Thời gian
     244                                        </th>
     245                                    </tr>
     246                                </thead>
     247                                <tbody id="content-regis-histoty">
     248                                </tbody>
     249                            </table>
     250                            <div>
     251                                <div class="dataTables_paginate paging_bootstrap">
     252                                    <ul class="pagination" id="regis-pagination">
     253                                    </ul>
     254                                </div>
     255                            </div>
     256                        </div><!-- /.table-responsive -->
     257                    </div>
     258                    <div class="tab-pane" id="trade">
     259                        <div class="row">
     260                           
     261                                <div id="content-trade-histoty">
     262
     263
     264               
     265
     266
     267                                </div>
     268                           
     269                           
     270                            </div>
     271                        </div><!-- /.table-responsive -->
     272                    </div>
     273                </div>
     274            </div><!-- Modal Body -->
     275        </div> <!-- Modal Content -->
     276    </div>
    258277</div>
    259278
Note: See TracChangeset for help on using the changeset viewer.