MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/allyindian_com/sbltt/application/controllers/Vehicle_trip_report.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once("Secure_Controller.php");

class Vehicle_trip_report extends Secure_Controller{
	
	public function __construct(){
		parent::__construct('vehicle_trip_report');
		$this->load->model('Vehicle_trip_model');
	}

	public function index(){
		if(!$this->Appconfig->isAppvalid()){
			redirect('config');
		}
		
		
		foreach($this->Vehicle_trip_model->get_vehicle_type() as $row){
		    $vehicle_type[$this->xss_clean($row->veh_type_id)] = $this->xss_clean($row->veh_type);
		}		
		$data['vehicle_type'] = $vehicle_type;
		
		$this->load->view('vehicle_trip_report/manage', $data);
		
	}
	
	public function get_vehicle_no(){
		$vehicle_type = $this->input->post('vehicle_type');
		$vehicle_list = $this->Vehicle_trip_model->get_vehicle_no($vehicle_type);
		echo json_encode(array('status' =>"SUCCESS",'vehicle_list' => $vehicle_list));
	}
	
	public function search(){
		$start_date    = $this->input->post('start_date');
		$end_date      = $this->input->post('end_date');
		$vehicle_type  = $this->input->post('vehicle_type');
		$vehicle_no    = $this->input->post('vehicle_no');
		
		$result        = $this->Vehicle_trip_model->search($start_date,$end_date,$vehicle_type,$vehicle_no);
		
		echo json_encode(array('success' => TRUE, 'result' => $result));
	}
}
?>