'; print_r($this->data['list']); exit; $this->load->vars($this->data); $this->load->view($this->data['theme'].'/template'); } } public function request_list() { $lists = $this->service->request_list(); $data = array(); $no = $_POST['start']; foreach ($lists as $template) { $no++; $row = array(); $row[] = $no; $profile_img = $template['profile_img']; if(empty($profile_img)){ $profile_img = 'assets/img/user.jpg'; } $row[] = ' '.$template['username'].''; $row[] = $template['contact_number']; $row[] = $template['title']; $row[] = 'RM'.$template['proposed_fee'].''; $row[] = ''.date("d M Y", strtotime($template['request_date'])).''.date("H.i A", strtotime($template['request_time'])).''; $row[] = date("d M Y", strtotime($template['created'])); $val = ''; $status = $template['status']; if($status == -1) { $val = 'Expired'; } if($status == 0) { $val = 'Pending'; } elseif($status == 1) { $val = 'Accepted'; } elseif($status == 2) { $val = 'Completed'; } elseif($status == 3) { $val = 'Declined'; } elseif($status == 4) { $val = 'Deleted'; } $row[] = $val; $data[] = $row; } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $this->service->request_list_all(), "recordsFiltered" => $this->service->request_list_filtered(), "data" => $data, ); //output to json format echo json_encode($output); } public function delete_service() { $id=$this->input->post('service_id'); $inputs['status']= '0'; $WHERE =array('id' => $id); $result=$this->service->update_service($inputs,$WHERE); if($result) { $this->session->set_flashdata('success_message','Service deleted successfully'); redirect(base_url()."service-list"); } else { $this->session->set_flashdata('error_message','Something wrong, Please try again'); redirect(base_url()."service-list"); } } public function getProivdierBankDetails() { $provider_id = $this->input->post('id'); $bank_details = $this->db->select('account_holder_name,account_number,account_iban,bank_name, bank_address,sort_code,routing_number,account_ifsc')->get_where('providers', array('id'=>$provider_id))->row(); //$bank_details = $this->db->get_where('providers', array('id'=>$provider_id))->row(); //echo ''; print_r($bank_details); exit; echo json_encode($bank_details); //exit; } }
RM'.$template['proposed_fee'].'
'; print_r($bank_details); exit; echo json_encode($bank_details); //exit; } }