Changeset 442 for pro-violet-viettel/sourcecode/application/modules/admin
- Timestamp:
- Nov 10, 2014 11:07:50 AM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php
r441 r442 6 6 class Report extends MX_Controller { 7 7 8 const TOKENPW = 'violet'; 8 9 public function __construct() { 9 10 parent::__construct(); … … 140 141 $data['num_links'] = 2; 141 142 $data['paging'] = pagging($data); 142 143 foreach ($data['paidlogs'] as $index=>$paidlog) 144 { 145 $data['paidlogs'][$index]['username']= @$this->get_username($paidlog['us_id']); 146 } 147 143 148 if ($this->input->is_ajax_request()) { 144 149 return $this->load->view('report/listview', $data); … … 146 151 return $this->load->view('report/listview', $data, true); 147 152 } 153 public function get_username($us_id) 154 { 155 $us_id=33; 156 $src = 'violet'; 157 $token = md5($us_id.self::TOKENPW); 158 $this->load->model('user_model'); 159 $data = $this->user_model->get_user_info($src, $us_id, $token); 160 if (strlen($data) > 0){ 161 $arr_users = explode("&", $data); 162 $str_username = $arr_users[1]; 163 $arr_username = explode("=", $str_username); 164 return $arr_username[1]; 165 }else 166 { 167 return ""; 168 } 169 170 } 148 171 149 172 public function addPaidlog() { -
pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php
r441 r442 10 10 { 11 11 parent::__construct(); 12 12 13 } 13 14 function getPaidlogs($data) { … … 15 16 if ($data['keyword']) { 16 17 if ($data['search_field'] == "cellphone") { 17 $sql.=" WHERE (service_id LIKE '%" . $data['keyword'] . "%')"; 18 } else { 19 $sql.=" WHERE (sms_content LIKE '%" . $data['keyword'] . "%' OR sms_reply LIKE '%" . $data['keyword'] . "%') "; 20 } 18 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%')"; 19 } 21 20 } 22 21 … … 51 50 52 51 function countPaidlog($data) { 53 $sql = "SELECT COUNT(".$this->id_name.") as total FROM " . $this->table_name ;52 $sql = "SELECT COUNT(".$this->id_name.") as total FROM " . $this->table_name." INNER JOIN tbluser ON tbluser.us_id = tblpaidlog.us_id"; 54 53 if ($data['keyword']) { 55 54 if ($data['search_field'] == "cellphone") { 56 $sql.=" WHERE (service_id LIKE '%" . $data['keyword'] . "%')"; 57 } else { 58 $sql.=" WHERE (sms_content LIKE '%" . $data['keyword'] . "%' OR sms_reply LIKE '%" . $data['keyword'] . "%') "; 59 } 55 $sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%')"; 56 } 60 57 } 58 61 59 $result = $this->db->query($sql)->row_array(); 62 60 return $result['total']; -
pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php
r441 r442 48 48 </label> 49 49 </th> 50 <th class="<?php if ($sorting_field == 'fullname') {echo $sorting_order;} else {echo " sorting";}?>" 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>50 <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> 51 51 <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> 52 52 <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> … … 71 71 72 72 <td class=" "> 73 <a href="#"> Ho va ten</a>73 <a href="#"><?php echo $paidlog['username'];?></a> 74 74 </td> 75 75 <td class=" "><?php echo $paidlog['cellphone']?></td>
Note: See TracChangeset
for help on using the changeset viewer.