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

class c_template_akta_cerai_agama extends CI_Controller {

    function index() {
        if($this->session->userdata('is_logged_in')==FALSE){
        redirect('login'); 
        }
    }

	function cetak_akta_cerai(){  
        if($this->session->userdata('is_logged_in')==FALSE){
            redirect('login'); 
        }
		
		$data['enc']=$this->uri->segment('3');
        $data['blangko']=$this->uri->segment('4');
		$idperkara=$this->encrypt->decode(base64_decode($data['enc']));
        if(!is_numeric($idperkara) OR !intval($idperkara)>0){
            show_404();
            exit();
        }    
		
		$this->load->model('generate_template/peradilan_agama/m_template_akta_cerai_agama','template');
        $this->load->model('perkara/info_perkara_agama','agama');
        $data['data']=$this->template->getdata($idperkara);
        $data['is_islam_ikrar']=$this->agama->getInfoAgamaPeCT($idperkara);
		$this->template->update_blangko($idperkara);
        
        $this->load->view('generate_template/peradilan_agama/cetak_akta_cerai',$data,FALSE);
    }
	
	
   

}
?>