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

class c_template_mil_pengumuman_putusan extends CI_Controller {
	
	function cetak_pengumuman(){
        if($this->session->userdata('is_logged_in')==FALSE){
            redirect('login');
        } 
		$segment=$this->uri->segment_array();
		
        $data['enc']=$this->uri->segment('3');
        $idperkara=$this->encrypt->decode(base64_decode($data['enc']));
        if(!is_numeric($idperkara) OR !intval($idperkara)>0){
             show_404();
             exit();
        }
		$data['jenistemplate']=$this->uri->segment('4');
        if(!is_numeric($data['jenistemplate']) OR !intval($data['jenistemplate'])>0){
             show_404();
             exit();
        }
		$this->load->model('generate_template/m_template_mil','template');
		
		$data['dataputusan']=$this->template->getDataPutusan($idperkara);
		$data['datapengadilan']=$this->template->getDataPN();
		$data['dataterdakwa']=$this->template->getDataTerdakwaMil($idperkara);
        $data['databandingter']=$this->template->getDataPemohonBandingTer($idperkara); 
        //tambah
        $data['databanding']=$this->template->getDataPemohonBanding($idperkara); 

		$this->load->model('generate_template/m_template_ambil_identitas_template','template2');
        if ($data['jenistemplate']==1){
			$data['template']=$this->template2->getDataDocumentTemplate('120','20','400','3','');			
        }elseif ($data['jenistemplate']==2){
			$data['template']=$this->template2->getDataDocumentTemplate('120','20','400','4','');			
        }elseif ($data['jenistemplate']==3){
            $data['template']=$this->template2->getDataDocumentTemplate('120','14','200','5','');           
        }
        $this->load->view('generate_template/cetak_mil_pengumuman_putusan',$data,FALSE);
	}
}
/* End of file c_template_mil_pengumuman_putusan.php */
/* Location: ./application/controllers/c_template_mil_pengumuman_putusan.php */