���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/admin.adimi/code/management/customer/ |
<?php $txt_where = ''; $keyword= ''; if(isset($CORE->input['search']) && $CORE->input['search']!=''){ $keyword= trim($CORE->input['search']); } $v_where_clause = " AND customer_id>0 AND customer_status NOT IN ('ngung_cong_no') "; if($keyword!=''){ $v_where_clause .= " AND (customer_fullname LIKE '%".$keyword."%' OR customer_company LIKE '%".$keyword."%' OR customer_mobile LIKE '%".$keyword."%' OR customer_email LIKE '%".$keyword."%' OR customer_cmnd LIKE '%".$keyword."%') "; } $pageNum = (isset($_GET['pageNum'])) ? intval($_GET['pageNum']) : 1; $pageSize = 20 ; $from = (($pageNum * $pageSize) - $pageSize); $row_total = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_customer WHERE 1 ".$v_where_clause." ")); $total = $row_total['total']; $totalPage = ceil($total/$pageSize); $q_customer = $DB->query("SELECT * FROM tb_customer WHERE 1 ".$v_where_clause." ORDER BY time_update DESC LIMIT $from,$pageSize "); while ($r_customer = $DB->fetch_row($q_customer)) { $list_customer['id'] = $r_customer['customer_id']; if($r_customer['customer_company']!='') { $list_customer['text'] = $r_customer['customer_fullname'] . ' - ' . $r_customer['customer_company']; }else{ $list_customer['text'] = $r_customer['customer_fullname'] . ' - ' . $r_customer['customer_cmnd']; } $list['results'][] = $list_customer; } if(!empty($list['results'])) { $list['pagination']['more'] = true; }else{ $list['pagination']['more'] = false; } echo json_encode($list); exit(); ?>