Changeset 728
- Timestamp:
- Jan 30, 2015 6:49:37 PM (10 years ago)
- 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 67 67 } 68 68 } 69 69 70 return $provinces; 70 71 } … … 74 75 $provinces = lang('_PROVINCES_'); 75 76 // 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 "; 77 78 $query = $this->db->query($sql); 78 79 $users = $query->result_array(); … … 96 97 97 98 foreach ($provinces as $index => $province) { 98 $provinces[$index]['stt'] =$index+1;99 $provinces[$index]['stt'] = $index + 1; 99 100 $provinces[$index]['total'] = 0; 100 101 $totaluser = 0; … … 123 124 } 124 125 } 125 126 $data['packages'] =$packages;127 $data['provinces'] =$provinces;126 127 $data['packages'] = $packages; 128 $data['provinces'] = $provinces; 128 129 return $data; 129 130 } -
pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
r706 r728 56 56 <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2"> 57 57 <?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> 59 59 <?php } ?> 60 60 </select> bản ghi</label> … … 62 62 </div> 63 63 </div> 64 64 65 65 <div class="col-sm-6"> 66 66 <div class="dataTables_filter" id="sample-table-2_filter"> 67 67 <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> 87 85 </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"> 95 95 <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info"> 96 96 <thead> … … 102 102 </label> 103 103 </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"> 109 133 <i class="icon-time bigger-110 hidden-480"></i> 110 134 Ngà y ÄÄng kÜ 111 135 </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"> 113 143 <i class="icon-time bigger-110 hidden-480"></i> 114 144 Ngà y hết hạn 115 145 </th> 116 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> 117 147 </tr> 118 148 </thead> 119 149 120 150 <tbody role="alert" aria-live="polite" aria-relevant="all"> 121 122 123 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 133 <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo $user['username']; ?></a>134 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 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 145 <?php if(strtotime($user['expire_date'])>time()){ ?>146 147 <?php }else{ ?>148 149 150 151 152 </tr>153 <?php } ?>151 152 <?php 153 foreach ($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 } ?> 154 184 155 185 </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> 170 198 </div> 199 171 200 </div> 172 173 174 201 </div> 175 202 176 <!-- PAGE CONTENT ENDS --> 177 </div><!-- /.col --> 203 204 </div> 205 206 <!-- PAGE CONTENT ENDS --> 207 </div><!-- /.col --> 178 208 </div> 179 209 180 210 <!-- Modal User History --> 181 211 <div class="modal fade" id="user-history" tabindex="-1" role="dialog"aria-hidden="true"> 182 212 <div class="modal-dialog"> 183 213 <div class="modal-content"> 184 214 <div class="modal-header"> … … 186 216 <h4 class="modal-title">Lá»ch sá»</h4> 187 217 </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> 258 277 </div> 259 278
Note: See TracChangeset
for help on using the changeset viewer.