File: //home/cafsindia/allyindian_com/sbltt/application/controllers/Customer_data_report.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once("Secure_Controller.php");
class Customer_data_report extends Secure_Controller{
public function __construct(){
parent::__construct('customer_data_report');
$this->load->model('Customer_data_model');
}
public function index(){
if(!$this->Appconfig->isAppvalid()){
redirect('config');
}
$data['cust_sts'] = array('Active'=>'Active','Blacklisted' => 'Black listed');
$data['referral_type'] = array('Direct'=>'Direct','Walkin_Customer'=>'Walkin Customer','Staff'=>'Staff','Driver'=>'Driver','Vehicle'=>'Vehicle','Web_Portal'=>'Web Portal','Advertisement'=>'Advertisement');
$this->load->view('customer_data_report/manage', $data);
}
public function search(){
$start_date = $this->input->post('start_date');
$end_date = $this->input->post('end_date');
$cust_sts = $this->input->post('cust_sts');
$referral_type = $this->input->post('referral_type');
$result = $this->Customer_data_model->search($start_date,$end_date,$cust_sts,$referral_type);
echo json_encode(array('success' => TRUE, 'result' => $result));
}
}
?>