<?php 
// if ( ! defined('BASEPATH')) exit('No direct script access allowed');
defined('BASEPATH') OR exit('No direct script access allowed');
class Claim_report_fa extends CI_Controller {

	function __construct() {
		parent::__construct();
		$this->load->model('My_model');
		$this->load->model('Claim_model');
		$this->load->library('admin_layout');
		$this->load->helper('jsondata_helper');	
	}

	function index() {
		if(!$username=$this->session->userdata('logged_in')) redirect(base_url().'login');
		$user_id = $this->session->userdata('user_id');
		$data['type'] = $this->session->userdata('type');

        if($data['type']!=3) redirect(base_url().'login');
			
		$header_data = array(
		  'username'  		=> $username,
		  'user_id'    		=> $user_id
		);
		
		$this->admin_layout->set_title("Claim Report");
		$this->admin_layout->set_description("");
		$this->admin_layout->set_data($header_data);

		$get_claims = $this->Claim_model->getclaims_fa($user_id);
		// echo $this->db->last_query();
	

		$data['claims'] = $get_claims;
		$data['err_claim'] = 'No Claims available'; 


		
		$content = "admin/view_claim_report_fa";
		$this->admin_layout->view_final($content,'',$data,true);
	
	}
}
