load->model('pagination/CustomerAccountOpeningRequests_model', 'model'); } function getLists() { $data = $row = array(); // Fetch member's records $witData = $this->model->getRows($_POST); $i = $_POST['start']; $current_url = $_POST['currentURL']; foreach ($witData as $row) { $buttons = ' '.$this->lang->line('Voir plus...').''; $data[] = array($row->unique_id , $row->customer_account_type_name, $row->lastname , $row->firstname, $row->phone_number, mb_strtoupper($this->lang->line($row->status),'UTF-8'), $row->created_at ,$buttons); } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $this->model->countAll($_POST), "recordsFiltered" => $this->model->countFiltered($_POST), "data" => $data, ); // Output to JSON format echo json_encode($output); } }