File: /home/cafsindia/allyindian_com/sbltt/application/controllers/Online_fb_report.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once("Secure_Controller.php");
class Online_fb_report extends Secure_Controller{
public function __construct(){
parent::__construct('online_fb_report');
$this->load->model('Online_fb_model');
}
public function index(){
if(!$this->Appconfig->isAppvalid()){
redirect('config');
}
$this->load->view('online_fb_report/manage', $data);
}
public function get_vehicle_no(){
//input
$start_date = $this->input->post('start_date');
$end_date = $this->input->post('end_date');
//output
$vehicle_no = $this->Online_fb_model->get_vehicle_no($start_date,$end_date);
echo json_encode(array('status' =>"SUCCESS",'vehicle_no' => $vehicle_no));
}
public function get_tour_no(){
//input
$start_date = $this->input->post('start_date');
$end_date = $this->input->post('end_date');
$vehicle_no = $this->input->post('vehicle_no');
//output
$tour_no = $this->Online_fb_model->get_tour_no($start_date,$end_date,$vehicle_no);
echo json_encode(array('status' =>"SUCCESS",'tour_no' => $tour_no));
}
public function search(){
//input
$start_date = $this->input->post('start_date');
$end_date = $this->input->post('end_date');
$vehicle_no = $this->input->post('vehicle_no');
$tour_no = $this->input->post('tour_no');
//output
$result = $this->Online_fb_model->search($start_date,$end_date,$vehicle_no,$tour_no);
echo json_encode(array('success' => TRUE, 'result' => $result));
}
}
?>