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

class Slide_sidang extends CI_Controller {
	function index(){
		$this->load->model('jadwalsidang/slide_sidang_m','slide');
		$query = $this->slide->getSystemInfo();
		foreach ($query->result() as $row) {
			if($row->id == 62){
				if(!empty($row->value)){
					$namaPN = $row->value;
					$this->session->set_userdata('namaPN',$row->value);
				}
			}

			if($row->id == 83){
				if(!empty($row->value)){
					$this->session->set_userdata('jenis_pengadilan',$row->value);
				}else{
					$this->session->set_userdata('jenis_pengadilan',1);
				}
			}
		}
		
		$data['tanggalSidang'] = date('Y-m-d'); 
		$data['namaPN'] = $this->slide->getNamaPN();		
		$data['slidePerdata'] = $this->slide->getJadwalSidang($data['tanggalSidang']);
		$data['jenisPengadilan'] = 4;

		$this->load->vars($data);		
		$this->load->view('slide_sidang/slide_sidang');die();
	}
}