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

class riwayat_perkara_c extends CI_Controller {
	function index(){
        if($this->nativesession->is_flash_session('security')===FALSE){
        redirect('main'); }

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

		$data['idperkara']=$this->encrypt->decode(base64_decode($this->nativesession->get_flash_session('enc')));
        if(!is_numeric($data['idperkara']) OR !intval($data['idperkara'])>0){
            show_404();
            exit();
        }
		
		$this->load->model('riwayatperkara/riwayat_perkara_m'); //panggil file model jadwalsidang/jadwal_sidang
		if ($query=$this->riwayat_perkara_m->get_data_riwayat_perkara($data['idperkara'])) // mejalankan function get_data_jadwal di file/class jadwal_sidang_m
		{
			$data['riwayatperkararecords']=$query;
		}
		$this->load->view('perkara_tab/riwayat_perkara_v',$data);
	}
}
