Changeset 690 for pro-violet-viettel
- Timestamp:
- Jan 9, 2015 10:35:30 AM (10 years ago)
- Location:
- pro-violet-viettel
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php
r576 r690 53 53 54 54 } 55 55 $data['daterange_start'] = ""; 56 $data['daterange_end'] = ""; 57 if ($this->input->post('daterange')){ 58 $daterange = explode(" - ", $this->input->post('daterange')); 59 $data['daterange_start'] = date('Y-m-d H:i:s', strtotime($daterange[0])); 60 $data['daterange_end'] = date('Y-m-d H:is:s', strtotime($daterange[1].' + 1 day')); 61 } 56 62 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 57 63 $data['total'] = $this->collabolator_model->countCollaborator($data); -
pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php
r594 r690 59 59 } 60 60 } 61 61 $data['daterange_start'] = ""; 62 $data['daterange_end'] = ""; 63 if ($this->input->post('daterange')){ 64 $daterange = explode(" - ", $this->input->post('daterange')); 65 $data['daterange_start'] = date('Y-m-d H:i:s', strtotime($daterange[0])); 66 $data['daterange_end'] = date('Y-m-d 23:59:59', strtotime($daterange[1])); 67 } 62 68 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 63 69 $data['total'] = $this->paidlog_model->countPaidlog($data); -
pro-violet-viettel/sourcecode/application/modules/admin/controllers/user.php
r584 r690 55 55 $data['keyword'] = $this->input->post('keyword'); 56 56 } 57 $data['daterange_start'] = ""; 58 $data['daterange_end'] = ""; 59 if ($this->input->post('daterange')){ 60 $daterange = explode(" - ", $this->input->post('daterange')); 61 $data['daterange_start'] = date('Y-m-d H:i:s', strtotime($daterange[0])); 62 $data['daterange_end'] = date('Y-m-d H:is:s', strtotime($daterange[1].' + 1 day')); 63 } 57 64 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 58 65 $data['total'] = $this->user_model->get_total_users($data); … … 62 69 foreach($us as $u) { 63 70 $id = $u['us_id']; 64 $username = $this->get_username($id); 65 $u['username'] = $username; 66 array_push($users, $u); 71 //$username = $this->get_username($id); 72 $userinfo = $this->get_userinfo($id); 73 if($userinfo){ 74 $u['username'] = $userinfo['username']; 75 $u['province'] = $userinfo['province']; 76 array_push($users, $u); 77 } 67 78 } 68 79 … … 151 162 } 152 163 153 private function get_user name($us_id)164 private function get_userinfo($us_id) 154 165 { 155 166 $src = 'violet'; … … 158 169 $data = $this->user_model->get_user_info($src, $us_id, $token); 159 170 //var_dump($data); 171 $result = array(); 172 parse_str($data, $result); 173 return $result; 174 /* 160 175 if (strpos($data, '&')){ 161 176 $arr_users = explode("&", $data); … … 166 181 { 167 182 return ""; 168 } 183 }*/ 169 184 170 185 } -
pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php
r594 r690 16 16 if ($data['keyword']) { 17 17 if ($data['search_field'] == "cellphone") { 18 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%')"; 18 if(strlen($data['daterange_start'])>0){ 19 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 20 }else{ 21 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 22 } 19 23 } else { 20 $sql.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 21 } 22 } 24 if(strlen($data['daterange_start'])>0){ 25 $sql.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 26 }else{ 27 $sql.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 28 } 29 } 30 }else{ 31 if(strlen($data['daterange_start'])>0){ 32 $sql.=" WHERE created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."'"; 33 } 34 } 23 35 24 36 $order = ""; … … 65 77 if ($data['keyword']) { 66 78 if ($data['search_field'] == "cellphone") { 67 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%' )";79 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 68 80 } else { 69 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' ) ";81 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') "; 70 82 } 71 83 } … … 92 104 if ($data['keyword']) { 93 105 if ($data['search_field'] == "cellphone") { 94 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%')"; 106 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 107 95 108 } else { 96 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 97 } 98 } 109 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') "; 110 } 111 } 112 99 113 // $from = date("Y-m-d 00:00:00",$from); 100 114 $sql="SELECT *,tblcollaborator.created_time as collaborator_created_time,tblcollaborator.cellphone as collaborator_cellphone, tbluser.created_time as user_created_time, COUNT(tbluser.collaborator) as total_user FROM ".$this->table_name." INNER JOIN tbluser ON tbluser.collaborator = tblcollaborator.id ".$where." GROUP BY tblcollaborator.id ".$order." LIMIT " . $data['start'] . ", " . $data['perpage'] . " "; … … 123 137 if ($data['keyword']) { 124 138 if ($data['search_field'] == "cellphone") { 125 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%' )";139 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 126 140 } 127 141 } … … 151 165 if ($data['keyword']) { 152 166 if ($data['search_field'] == "cellphone") { 153 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%' )";167 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 154 168 } 155 169 } … … 184 198 if ($data['keyword']) { 185 199 if ($data['search_field'] == "cellphone") { 186 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%')"; 200 if(strlen($data['daterange_start'])>0){ 201 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 202 }else{ 203 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 204 } 187 205 } else { 188 $sql.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 189 } 190 } 206 if(strlen($data['daterange_start'])>0){ 207 $sql.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 208 }else{ 209 $sql.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') "; 210 } 211 } 212 }else{ 213 if(strlen($data['daterange_start'])>0){ 214 $sql.=" WHERE created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."'"; 215 } 216 } 191 217 $result = $this->db->query($sql)->row_array(); 192 218 return $result['total']; -
pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php
r586 r690 18 18 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%')"; 19 19 } 20 } 20 }else{ 21 if(strlen($data['daterange_start'])>0){ 22 23 $sql.=" WHERE paid_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."'"; 24 write_file('./log/sql.log', date("m/d/Y H:i:s")." ".$sql."\n", FOPEN_WRITE_CREATE); 25 } 26 } 21 27 22 28 $order = ""; … … 42 48 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%')"; 43 49 } 44 } 50 }else{ 51 if(strlen($data['daterange_start'])>0){ 52 53 $sql.=" WHERE paid_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."'"; 54 //write_file('./log/sql.log', date("m/d/Y H:i:s")." ".$sql."\n", FOPEN_WRITE_CREATE); 55 } 56 } 57 45 58 46 59 $result = $this->db->query($sql)->row_array(); -
pro-violet-viettel/sourcecode/application/modules/admin/models/user_model.php
r610 r690 34 34 if (strlen($data['keyword'])>0){ 35 35 if ($data['status']==0){ 36 $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%') "; 36 if(strlen($data['daterange_start'])>0){ 37 $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 38 }else 39 { 40 $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 41 } 37 42 }else 38 43 { 39 $sql.=" AND (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%') "; 44 if(strlen($data['daterange_start'])>0){ 45 $sql.=" AND (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 46 }else{ 47 $sql.=" AND (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') "; 48 } 49 } 50 }else 51 { 52 if(strlen($data['daterange_start'])>0){ 53 if ($data['status']==0){ 54 $sql.=" WHERE created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."'"; 55 }else{ 56 $sql.=" AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 57 } 40 58 } 41 59 } … … 68 86 if (strlen($data['keyword'])>0){ 69 87 if ($data['status']==0){ 70 $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%') "; 88 if(strlen($data['daterange_start'])>0){ 89 $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 90 }else 91 { 92 $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')"; 93 } 71 94 }else 72 95 { 73 $sql.=" AND (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%') "; 96 if(strlen($data['daterange_start'])>0){ 97 $sql.=" AND (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 98 }else{ 99 $sql.=" AND (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') "; 100 } 101 } 102 }else 103 { 104 if(strlen($data['daterange_start'])>0){ 105 if ($data['status']==0){ 106 $sql.=" WHERE created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."'"; 107 }else{ 108 $sql.=" AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')"; 109 } 74 110 } 75 111 } 112 76 113 } 77 114 -
pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/index.php
r576 r690 18 18 $("#content").html(data); 19 19 init_page(); 20 20 $('.daterangepicker').daterangepicker(); 21 21 }, 22 22 error: function (jqXHR, textStatus, errorThrown) … … 34 34 }); 35 35 36 $(document).on('click', '.applyBtn', function(){ 37 //$('#loading').css('display', 'block'); 38 //$('#table_content').hide(); 39 filter(); 40 }); 36 41 37 42 $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) { … … 92 97 $("#keyword").focus(); 93 98 $("#keyword").setCursorToTextEnd(); 99 $('.daterangepicker').daterangepicker(); 94 100 95 101 }, -
pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php
r590 r690 72 72 <div class="dataTables_filter" id="sample-table-2_filter"> 73 73 <label>Tìm kiếm: 74 <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' aria-controls="sample-table-2"></label>74 <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label> 75 75 </div> 76 <div id="daterangepicker" class="selectbox pull-right"> 77 <i class="icon-calendar"></i> 78 <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;"> 79 80 </span> 81 </div> 76 82 </div> 77 83 </div> … … 86 92 <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: 183px;" aria-label="Há» tên: activate to sort column ascending">Há» tên</th> 87 93 <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: 176px;" aria-label="Sá» Äiá»n thoại: activate to sort column ascending">Sá» Äiá»n thoại</th> 88 94 <th>Quáºn/Huyá»n</th> 95 <th>Tá»nh/TP</th> 89 96 <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: 209px;" aria-label="Ngà y ÄÄng kÜ: activate to sort column ascending"> 90 97 <i class="icon-time bigger-110 hidden-480"></i> … … 107 114 <td class=" "><a href="<?php echo base_url();?>admin/thong_ke_cong_tac_vien/<?php echo $collaborator['id'];?>"><?php echo $collaborator['full_name']?></a></td> 108 115 <td class=" "><?php echo $collaborator['cellphone'];?></td> 109 116 <td class=" "><?php echo $collaborator['district'];?></td> 117 <td class=" "><?php echo $collaborator['province'];?></td> 110 118 <td class=" "><?php echo $collaborator['created_time'];?></td> 111 119 -
pro-violet-viettel/sourcecode/application/modules/admin/views/home/editSms.php
r585 r690 1 1 2 2 <div class="modal-dialog"> 3 3 <div class="modal-content"> -
pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php
r461 r690 18 18 $("#content").html(data); 19 19 init_page(); 20 20 $('.daterangepicker').daterangepicker(); 21 21 }, 22 22 error: function (jqXHR, textStatus, errorThrown) … … 33 33 return false; 34 34 }); 35 35 $(document).on('click', '.applyBtn', function(){ 36 //$('#loading').css('display', 'block'); 37 //$('#table_content').hide(); 38 filter(); 39 }); 36 40 37 41 $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) { … … 105 109 function filter() 106 110 { 111 daterange = $('input[name="daterange"]').val(); 107 112 $.ajax({ 108 113 url: '<?php echo base_url();?>admin/doanh_thu_tong_hop/trang/1', … … 116 121 $("#keyword").focus(); 117 122 $("#keyword").setCursorToTextEnd(); 118 123 $('.daterangepicker').daterangepicker(); 124 $('input[name="daterange"]').val(daterange); 119 125 }, 120 126 error: function (jqXHR, textStatus, errorThrown) … … 204 210 </div><!-- /.modal-dialog --> 205 211 <?php 206 $this->load->view('layout/admin/footer', array('base_url' => $base_url ));212 $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/report.js'))); 207 213 ?> -
pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php
r573 r690 1 1 2 2 3 3 … … 13 13 <div class="row"> 14 14 <div class="col-sm-6"> 15 <div id="sample-table-2_length" class="dataTables_length"><label>Hi á»n thá»15 <div id="sample-table-2_length" class="dataTables_length"><label>Hiện thị 16 16 <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2"> 17 17 <?php foreach ($itemsoptions as $option) { ?> 18 18 <option <?php if($option == $perpage) echo "selected"; ?> value="<?php echo $option;?>"><?php echo $option;?></option> 19 19 <?php } ?> 20 </select> b ản ghi</label>20 </select> bản ghi</label> 21 21 22 22 </div> … … 25 25 <div class="col-sm-6"> 26 26 <div class="dataTables_filter" id="sample-table-2_filter"> 27 <label>T ìm kiếm:28 <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' aria-controls="sample-table-2"></label>27 <label>Tìm kiếm: 28 <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label> 29 29 </div> 30 <div id="daterangepicker" class="selectbox pull-right"> 31 <i class="icon-calendar"></i> 32 <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;"> 33 34 </span> 35 </div> 36 </div> 30 37 </div> 31 38 </div> … … 37 44 <tr role="row"> 38 45 39 <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>40 <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>41 <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>42 <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>43 <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>46 <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> 47 <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> 48 <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> 49 <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> 50 <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> 44 51 45 52 </thead> … … 76 83 77 84 </tbody></table><div class="row"><div class="col-sm-6"> 78 <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>85 <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> 79 86 80 87 </div> -
pro-violet-viettel/sourcecode/application/modules/admin/views/user/index.php
r461 r690 16 16 $("#content").html(data); 17 17 init_page(); 18 $('.daterangepicker').daterangepicker(); 18 19 }, 19 20 error: function (jqXHR, textStatus, errorThrown) … … 24 25 return false; 25 26 }); 26 $('#keyword').bind('input', function(){ 27 $('#keyword').keyup(function (event) { 28 if (event.keyCode == '13') { 29 filter(); 30 } 31 return false; 32 }); 33 /*$('#keyword').bind('input', function(){ 34 filter(); 35 });*/ 36 $('#daterange').keyup(function (event) { 37 if (event.keyCode == '13') { 38 filter(); 39 } 40 return false; 41 }); 42 43 $(document).on('click', '.applyBtn', function(){ 44 $('#loading').css('display', 'block'); 45 $('#table_content').hide(); 27 46 filter(); 28 47 }); … … 59 78 function filter() 60 79 { 80 daterange = $('input[name="daterange"]').val(); 61 81 $.ajax({ 62 82 url: '<?php echo base_url();?>admin/nguoi_dung/trang/1', … … 65 85 success: function (data, textStatus, jqXHR) 66 86 { 87 $('#loading').css('display', 'none'); 88 $('#table_content').show(); 67 89 $("#content").html(data); 68 90 init_page(); 69 91 $("#keyword").focus(); 70 92 $("#keyword").setCursorToTextEnd(); 71 93 $('.daterangepicker').daterangepicker(); 94 $('input[name="daterange"]').val(daterange); 72 95 }, 73 96 error: function (jqXHR, textStatus, errorThrown) -
pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
r644 r690 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;?>' aria-controls="sample-table-2"></label>68 <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label> 69 69 </div> 70 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: 1 39px; height: 28px;" aria-controls="sample-table-2" class="">71 <select onchange="filter();" name="status" size="1" style="width: 176px; height: 28px;"> 72 72 <?php foreach ($statusoptions as $key=>$option):?> 73 73 <option <?php if ($key == $status) echo "selected"; ?> value="<?php echo $key; ?>"><?php echo $option; ?></option> 74 74 <?php endforeach; ?> 75 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> 76 84 </div> 77 85 </div> … … 82 90 <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/> 83 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"> 84 95 <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info"> 85 96 <thead> … … 91 102 </label> 92 103 </th> 93 <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: 176px;" aria-label="Tà i khoản: activate to sort column ascending">Username</th> 94 <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: 176px;" aria-label="Sá» Äiá»n thoại: activate to sort column ascending">Sá» Äiá»n thoại</th> 95 <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: 176px;" aria-label="Tiá»n: activate to sort column ascending">Tà i khoản (VNÄ)</th> 96 <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: 150px;" aria-label="Ngà y ÄÄng kÜ: activate to sort column ascending"> 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;">Quáºn/Huyá»n</th> 108 <th style="width: 140px;">Tá»nh/TP</th> 109 <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"> 97 110 <i class="icon-time bigger-110 hidden-480"></i> 98 111 Ngà y ÄÄng kÜ 99 112 </th> 100 <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: 1 50px;" aria-label="Ngà y hết hạn: activate to sort column ascending">113 <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"> 101 114 <i class="icon-time bigger-110 hidden-480"></i> 102 115 Ngà y hết hạn 103 116 </th> 104 <th class="sorting_disabled" id="status" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 1 76px;">Tình trạng</th>117 <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> 105 118 </tr> 106 119 </thead> … … 119 132 </td> 120 133 <td class=" "> 121 <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo @$user['username']; ?></a>134 <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo $user['username']; ?></a> 122 135 <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>--> 123 136 </td> … … 126 139 </td> 127 140 <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td> 141 <td><?php echo $user['district']; ?></td> 142 <td><?php echo $user['province']; ?></td> 128 143 <td class=" "><?php echo $user['created_time']; ?></td> 129 144 <td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date'])>0 ? date('d/m/Y', strtotime($user['expire_date'])) : '';?></td> 145 130 146 <td class=" "> 131 147 <?php if(strtotime($user['expire_date'])>time()){ ?> … … 151 167 </div> 152 168 </div> 169 </div> 153 170 </div> 154 171 … … 249 266 } 250 267 251 252 268 </script> -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r647 r690 29 29 $data['packages'] = $this->servicepackage_model->getAllPackages(); 30 30 $data['is_viettel'] = $user_info['is_viettel']; 31 32 $data = array_merge($data, $u); 31 $data = array_merge($data, $u); 33 32 $data = array_merge($data, $user_info); 34 33 … … 358 357 foreach ($result as $paidlog): 359 358 $paidlog['amount'] = number_format($paidlog['amount'], 0); 360 $paidlog['paid_time'] = date('d -m-Y H:i:s', strtotime($paidlog['paid_time']));359 $paidlog['paid_time'] = date('d/m/Y H:i:s', strtotime($paidlog['paid_time'])); 361 360 array_push($paidlogs, $paidlog); 362 361 endforeach; -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r673 r690 86 86 $this->load->model('frontend/Servicepackage_model'); 87 87 $trialpackage=$this->Servicepackage_model->getTrialPackage(); 88 88 $us_id = $id; 89 89 $user ['created_time'] = date ( 'Y-m-d H:i:s' ); 90 90 $user ['us_id'] = $us_id; 91 92 91 $user ['p_id'] = $trialpackage['p_id']; 92 $user ['expire_date'] = date('Y-m-d', strtotime("+" . $this->config->item("trial_period") . " days", time())); 93 93 $user ['cellphone'] = $username; 94 $user['province'] = $province; 94 95 if (! is_null ( $collaborator ) || $collaborator != '') { 95 96 $user ['collaborator'] = $collaborator; … … 163 164 'oldpass' => $user ['oldpass'] 164 165 ), 'user' ); 166 $u = array('province'=>$user['province'], 167 'district'=>$user['district'], 168 'updated_time'=>date('Y-m-d H:i:s') 169 ); 170 $this->db->where('us_id', $us_id); 171 $this->db->update('tbluser', $u); 165 172 return $data; 166 173 } -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r672 r690 101 101 102 102 <div class="col-sm-8"> 103 <input type="text" name="province" value="<?php echo @$province; ?>" placeholder="Tá»nh / Thà nh phá»" id="form-field-username" class="col-xs-12 col-sm-10"> 103 <input type="text" name="province" value="<?php echo @$province; ?>" placeholder="Tá»nh / Thà nh phá»" id="form-field-province" class="col-xs-12 col-sm-10"> 104 </div> 105 </div> 106 <div class="form-group"> 107 <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáºn / Huyá»n</label> 108 109 <div class="col-sm-8"> 110 <input type="text" name="district" value="<?php echo @$district; ?>" placeholder="Quáºn / Huyá»n" id="form-field-district" class="col-xs-12 col-sm-10"> 104 111 </div> 105 112 </div> -
pro-violet-viettel/sourcecode/application/views/layout/admin/footer.php
r623 r690 42 42 <script src="<?php echo $base_url; ?>assets/js/ace.min.js"></script> 43 43 44 <script src="<?php echo $base_url; ?>assets/js/date-time/moment.min.js"></script> 45 <script src="<?php echo $base_url; ?>assets/js/date-time/daterangepicker.min.js"></script> 46 44 47 <!-- inline scripts related to this page --> 45 48 46 49 <script type="text/javascript"> 50 $('.daterangepicker').daterangepicker(); 47 51 jQuery(function ($) { 48 52 -
pro-violet-viettel/sourcecode/application/views/layout/admin/header.php
r644 r690 22 22 <link rel="stylesheet" href="<?php echo $base_url;?>assets/css/ace-rtl.min.css" /> 23 23 <link rel="stylesheet" href="<?php echo $base_url;?>assets/css/ace-skins.min.css" /> 24 <link rel="stylesheet" href="<?php echo $base_url;?>assets/css/custom.css" /> 24 <link rel="stylesheet" href="<?php echo $base_url;?>assets/css/custom.css" /> 25 <link rel="stylesheet" href="<?php echo $base_url;?>assets/css/daterangepicker.css" /> 26 27 25 28 <script src="<?php echo $base_url;?>assets/js/ace-extra.min.js"></script> 26 29 -
pro-violet-viettel/sourcecode/assets/js/admin/user.js
r645 r690 66 66 for (var i in result) 67 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 68 source = result[i].source; 69 if (result[i].source == null || result[i].source == '') source = 'Thẻ cà o'; 70 content += '<tr><td class="center">'+source+'</td><td class="center">'+result[i].amount+'</td><td>'+result[i].paid_time+'</td></tr>'; 70 71 } 71 72 }else -
pro-violet-viettel/sourcecode/assets/js/frontend/user.js
r656 r690 226 226 for (var i in result) 227 227 { 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>'; 228 source = result[i].source; 229 if (result[i].source == null || result[i].source == '') source = 'Thẻ cà o'; 230 content += '<tr><td class="center">'+source+'</td><td class="center">'+result[i].p_name+'</td><td>'+result[i].created_time+'</td></tr>'; 229 231 230 232 }
Note: See TracChangeset
for help on using the changeset viewer.