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/Pkg_er_report.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once("Secure_Controller.php");

class Pkg_er_report extends Secure_Controller
{
	public function __construct()
	{
		parent::__construct('pkg_er_report');
		$this->load->model('Pkg_er_report_model');
	}

	public function index()
	{

		if(!$this->Appconfig->isAppvalid()){
			redirect('config');
		}
		 $data['table_headers'] = $this->xss_clean(get_Pkg_er_report_table_headers());

		$this->load->view('pkg_er_report/manage', $data);
	}

	/*
	Returns Supplier table data rows. This will be called with AJAX.
	*/
	public function search()
	{
		$search = $this->input->get('search');
  		$limit = $this->input->get('limit');
  		$offset = $this->input->get('offset');
  		$sort = $this->input->get('sort');
  		$order = $this->input->get('order');
        $filters = array('start_date' => $this->input->get('start_date'),
      	               'end_date' => $this->input->get('end_date'));
       $all_leads = $this->Pkg_er_report_model->search($search, $filters, $limit, $offset, $sort, $order);
        $total_rows = $this->Pkg_er_report_model->get_found_rows($search, $filters);
        $data_rows = array();
        foreach($all_leads->result() as $leads){
            $data_rows[] = get_Pkg_er_report_data_row($leads, $this);
        }
        echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
	}	



}
?>