<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class ZakatReport extends CI_Controller {
	
	public function __construct(){
		parent::__construct();
		$this->load->model('Useraccess');
		$query = $this->Useraccess->useraccess_id_module2('7', 'reports');
		if(!$query){
			echo '<script>alert("Not authorised..");
				window.location.replace("'.base_url().'Error");
				</script>';
		}
		$this->load->library('layouts');
		$this->load->model('menu');
	}
	
	public function groupList(){
		$this->lang->load("zakatGroup",$this->session->userdata('language'));
 	  	$this->load->model('ZakatGroup');
		$data['datatbls'] = $this->ZakatGroup->group_all();
        $this->layouts->add_includes('js/datatables/jquery.dataTables.min.js');
		$this->layouts->view('zakat/reports/groupList', array('latest' => 'sidebar/latest'), $data);
	}
	
	public function centerList(){
		$this->lang->load("ZakatCenter",$this->session->userdata('language'));
 	  	$this->load->model('ZakatCenter');
		$data['datatbls'] = $this->ZakatCenter->group_all();
        $this->layouts->add_includes('js/datatables/jquery.dataTables.min.js');
		$this->layouts->view('zakat/reports/centerList', array('latest' => 'sidebar/latest'), $data);
	}
	
	public function nisabList(){
		$this->lang->load("ZakatNisab",$this->session->userdata('language'));
 	  	$this->load->model('ZakatNisab');
		$data['datatbls'] = $this->ZakatNisab->group_all();
        $this->layouts->add_includes('js/datatables/jquery.dataTables.min.js');
		$this->layouts->view('zakat/reports/nisabList', array('latest' => 'sidebar/latest'), $data);
	}
	public function zakatSummaryList(){
		$this->lang->load("ZakatSummary",$this->session->userdata('language'));
 	  	$this->load->model('ZakatSummary');
		$data['datatbls'] = $this->ZakatSummary->group_all();
        $this->layouts->add_includes('js/datatables/jquery.dataTables.min.js');
		$this->layouts->view('zakat/reports/zakatList', array('latest' => 'sidebar/latest'), $data);
	}
}