Changeset 644
- Timestamp:
- Dec 4, 2014 3:10:46 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
r590 r644 119 119 </td> 120 120 <td class=" "> 121 <a><?php echo @$user['username']; ?></a> 121 <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo @$user['username']; ?></a> 122 <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>--> 122 123 </td> 123 124 <td class=" "> … … 161 162 </div><!-- /.col --> 162 163 </div> 164 165 <!-- Modal User History --> 166 <div class="modal fade" id="user-history" tabindex="-1" role="dialog"aria-hidden="true"> 167 <div class="modal-dialog"> 168 <div class="modal-content"> 169 <div class="modal-header"> 170 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 171 <h4 class="modal-title">Lá»ch sá»</h4> 172 </div> 173 <div class="modal-body"> 174 <ul class="nav nav-tabs padding-16"> 175 <li class="active" > 176 <a id="regis-tab" href="#regis" data-toggle="tab"> 177 ÄÄng kÜ dá»ch vụ 178 </a> 179 </li> 180 <li> 181 <a id="trade-tab" href="#trade" data-toggle="tab"> 182 Giao dá»ch 183 </a> 184 </li> 185 </ul> 186 <div class="tab-content history-tab-content"> 187 <div class="tab-pane in active" id="regis"> 188 <div class="table-responsive"> 189 <table id="sample-table-1" class="table table-striped table-bordered table-hover"> 190 <thead> 191 <tr> 192 <th class="center"> 193 Từ 194 </th> 195 <th class="center"> Gói dá»ch vụ </th> 196 <th> 197 <i class="icon-time bigger-110 hidden-480"></i> 198 Thá»i gian 199 </th> 200 </tr> 201 </thead> 202 <tbody id="content-regis-histoty"> 203 </tbody> 204 </table> 205 <div> 206 <div class="dataTables_paginate paging_bootstrap"> 207 <ul class="pagination" id="regis-pagination"> 208 </ul> 209 </div> 210 </div> 211 </div><!-- /.table-responsive --> 212 </div> 213 <div class="tab-pane" id="trade"> 214 <div class="table-responsive"> 215 <table id="sample-table-1" class="table table-striped table-bordered table-hover"> 216 <thead> 217 <tr> 218 <th class="center"> 219 Từ 220 </th> 221 <th class="center">Sá» tiá»n (VNÄ)</th> 222 <th> 223 <i class="icon-time bigger-110 hidden-480"></i> 224 Thá»i gian 225 </th> 226 </tr> 227 </thead> 228 <tbody id="content-trade-histoty"> 229 </tbody> 230 </table> 231 <div> 232 <div class="dataTables_paginate paging_bootstrap"> 233 <ul class="pagination" id="trade-pagination"> 234 </ul> 235 </div> 236 </div> 237 </div><!-- /.table-responsive --> 238 </div> 239 </div> 240 </div><!-- Modal Body --> 241 </div> <!-- Modal Content --> 242 </div> 243 </div> 244 163 245 <script type="text/javascript"> 164 246 window.onload = function () -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r643 r644 387 387 $packagelogs = array(); 388 388 foreach ($result as $packagelog): 389 $packagelog['vip_name'] = 'VIP '.$packagelog['p_code'];390 389 $packagelog['created_time'] = date('d/m/Y H:i:s', strtotime($packagelog['created_time'])); 391 390 array_push($packagelogs, $packagelog); -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r642 r644 534 534 $username = $data['username']; 535 535 $this->db->query ( 'UNLOCK TABLES' ); 536 $sql = "SELECT * FROM tblregisterpackagelog where username = ? ORDER BY created_time DESC LIMIT ".$data['start'].", ".$data['perpage']." ";536 $sql = "SELECT * FROM tblregisterpackagelog INNER JOIN tblservicepackage ON tblservicepackage.p_code = tblregisterpackagelog.p_code where username = ? ORDER BY created_time DESC LIMIT ".$data['start'].", ".$data['perpage']." "; 537 537 $query = $this->db->query ( $sql, array ( 538 538 $username -
pro-violet-viettel/sourcecode/application/views/layout/admin/header.php
r503 r644 31 31 <script src="<?php echo $base_url;?>assets/js/respond.min.js"></script> 32 32 <![endif]--> 33 <style> 34 table a 35 { 36 cursor: pointer; 37 font-size: 13px; 38 font-weight: normal; 39 } 40 </style> 33 41 </head> 34 42 -
pro-violet-viettel/sourcecode/assets/js/admin/user.js
r412 r644 6 6 }; 7 7 })(jQuery); 8 9 function regisHistory(id, page) 10 { 11 $.ajax({ 12 url: '/frontend/user/regis_history/'+id +'/page/'+page, 13 type: 'POST', 14 success: function(data) 15 { 16 results = jQuery.parseJSON(data); 17 paging = results.paging; 18 result = results.packagelogs; 19 content = ""; 20 if(result.length>0){ 21 for (var i in result) 22 { 23 content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].p_name+'</td><td>'+result[i].created_time+'</td></tr>'; 24 25 } 26 }else 27 { 28 content += '<tr><td class="center" colspan=3>Chưa ÄÄng kà gói dá»ch vụ nà o!</td></tr>'; 29 } 30 $("#user-history").find("#content-regis-histoty").html(content); 31 $("#user-history").find("#regis-pagination").html(paging); 32 $(".ajax_paging").click(function () 33 { 34 $.ajax({ 35 url: $(this).attr("href"), 36 type: "POST", 37 success: function (data, textStatus, jqXHR) 38 { 39 results = jQuery.parseJSON(data); 40 regisHistory(id, results.current_page); 41 }, 42 error: function () 43 { 44 $(".ajaxloading").hide(); 45 } 46 }); 47 return false; 48 }); 49 50 } 51 }); 52 } 53 54 function tradeHistory(id, page) 55 { 56 $.ajax({ 57 url: '/frontend/user/trade_history/'+id +'/page/'+page, 58 type: 'POST', 59 success: function(data) 60 { 61 results = jQuery.parseJSON(data); 62 paging = results.paging; 63 result = results.paidlogs; 64 content = ""; 65 if(result.length>0){ 66 for (var i in result) 67 { 68 content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].amount+'</td><td>'+result[i].paid_time+'</td></tr>'; 69 70 } 71 }else 72 { 73 content += '<tr><td class="center" colspan=3>Chưa có giao dá»ch nà o!</td></tr>'; 74 } 75 $("#user-history").find("#content-trade-histoty").html(content); 76 $("#user-history").find("#trade-pagination").html(paging); 77 $(".ajax_paging").click(function () 78 { 79 $.ajax({ 80 url: $(this).attr("href"), 81 type: "POST", 82 success: function (data, textStatus, jqXHR) 83 { 84 results = jQuery.parseJSON(data); 85 tradeHistory(id, results.current_page); 86 }, 87 error: function () 88 { 89 $(".ajaxloading").hide(); 90 } 91 }); 92 return false; 93 }); 94 95 } 96 }); 97 } 98 99 function getUserHistory(id, page) 100 { 101 regisHistory(id, page); 102 tradeHistory(id, page); 103 $("#user-history").modal('show'); 104 } -
pro-violet-viettel/sourcecode/assets/js/frontend/user.js
r643 r644 186 186 }else 187 187 { 188 content += '<tr><td class="center" colspan=3> QuÜ vá» chưa có giao dá»ch nà o!</td></tr>';188 content += '<tr><td class="center" colspan=3>Chưa có giao dá»ch nà o!</td></tr>'; 189 189 } 190 190 $("#trade-history").find("#content-trade-histoty").html(content); … … 226 226 for (var i in result) 227 227 { 228 content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i]. vip_name+'</td><td>'+result[i].created_time+'</td></tr>';228 content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].p_name+'</td><td>'+result[i].created_time+'</td></tr>'; 229 229 230 230 } 231 231 }else 232 232 { 233 content += '<tr><td class="center" colspan=3> QuÜ vá» chưa ÄÄng kà gói dá»ch vụ nà o!</td></tr>';233 content += '<tr><td class="center" colspan=3>Chưa ÄÄng kà gói dá»ch vụ nà o!</td></tr>'; 234 234 } 235 235 $("#regis-history").find("#content-regis-histoty").html(content);
Note: See TracChangeset
for help on using the changeset viewer.