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/.trash/application.1/controllers/Allowance_summary.php
<?php if ( ! defined('BASEPATH')) exit('No direct script is allowed');
require_once("Action_controller.php");
class Allowance_summary  extends Action_controller{	
	public function __construct(){
		parent::__construct('allowance_summary');
	}
	
	// LOAD PAGE QUICK LINK,FILTERS AND TABLE HEADERS
	public function index(){
		$data["allowance_list"]      = array("" => "Select Type","1" => "Food Allowance","2" => "1st Shift Allowance","3" => "2nd Shift Allowance","4" => "Overtime Allowance",);
		$data['key']                 = $this->generateKey();
		$this->load->view("$this->control_name/manage",$data);
	}

	//FUNCTION FOR GET A ALLOWANCE ELIGIBILITY COUNT DETAILS 
	public function get_allowance_summary(){
		$encString         = file_get_contents('php://input');
		$_POST             = $this->cryptoDecrypt($encString);
		if(!$_POST){
			echo json_encode(array('success' => false,'message' => 'Invalid Request..','table_data' => ""));
			exit(0);
		}
		$allowance_type    = (int)$this->input->post('allowance_type');
		$process_month     = $this->input->post('process_month');
		
		$info              = $this->db->query("CALL sp_allowance_eligible_count ($allowance_type,'$process_month')");
		$result            = $info->result_array();
		$info->next_result();

		if($result){
			echo json_encode(array('success' => TRUE, 'message' => "Successfully Generated.!",'return_arr' => $result));
		}else{
			echo json_encode(array('success' => FALSE, 'message' => "No Data Found.!"));
		}
	}
	
}
?>