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

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

	function show_data(){
		if($this->session->userdata('jenis_pengadilan')==1 || $this->session->userdata('jenis_pengadilan')==4){
			$data['main_body'] = 'generate_template/blanko_template/blanko_detil';
			$data['page_title']="Blanko Template";
		} else {
			redirect('main');
		}

		$this->load->model('generate_template/m_template_mediasi','template');
        $data['enc']=$this->nativesession->get_flash_session('enc');
        $data['template']=$this->template->get_file();
        
		$this->load->vars($data);
		$this->load->view('header');
		$this->load->view('body/body_new');
	}

	function show_tab($tab){
		if ($tab=="mediasi"){
			$this->load->view('generate_template/blanko_template/tab_mediasi');
		}

	}

	function show_blanko_pidana(){
		if($this->session->userdata('jenis_pengadilan')==1){
			$data['main_body'] = 'generate_template/blanko_template/blanko_pidana_detil';
			$data['page_title']="Blanko Template";
		} else {
			redirect('main');
		}

		$this->load->model('generate_template/m_template_mediasi','template');
        $data['enc']=$this->nativesession->get_flash_session('enc');
        $data['template']=$this->template->get_file();
        
		$this->load->vars($data);
		$this->load->view('header');
		$this->load->view('body/body_new');
	}

	function show_tab_blanko_pidana($tab){
		if ($tab=="penetapan"){
			$this->load->view('generate_template/blanko_template/tab_penetapan_pidana');
		}

	}

	function cetak_blanko_pidana_kosong($kode){
        $this->load->model('generate_template/m_template_mediasi','mediasi');
        $data['info_pn']=$this->mediasi->get_data_pn()->result();
        $data['template']=$this->mediasi->get_file($kode);
        $this->load->view('generate_template/umum/blanko/cetak_blanko_kosong', $data, FALSE);

    }

}
/* End of file detil_perkara.php */
/* Location: ./application/controllers/detil_perkara.php */
