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

class Manage_perkara_eksekusi extends CI_Controller {

	function redir_show_detil(){
		$this->setParams();
		$this->nativesession->set_flash_session('url_requested',current_url());
		redirect('detil_eksekusi');
	}


	function redir_edit_eksekusi(){
		$this->setParams(FALSE);
		redirect('detil_eksekusi/edit_eksekusi');
	}

	function redir_open_eksekusi(){
		$this->setParams(FALSE);
		$this->nativesession->set_flash_session('view', TRUE);
		redirect('detil_eksekusi');
	}

	function redir_edit_data_umum_eksekusi(){
		$this->setParams(FALSE);
		redirect('detil_eksekusi/edit_eksekusi_data_umum');
	}

	function setParams($setUrl=TRUE){
		$segment = $this->uri->segment_array();
		if(count($segment)!=2){
			show_404();
		}

		if($setUrl==TRUE){
		$oldsess = $this->nativesession->get_flash_session('url_requested');
		$this->nativesession->set_flash_session('url_requested', $oldsess);
			if(empty($oldsess)){
				$this->nativesession->set('main_url_requested', $this->nativesession->get('main_url_requested'));
			}else{
				$this->nativesession->set('main_url_requested', $oldsess);
			}
		}

		$this->nativesession->set_flash_session('security', TRUE);
		$this->nativesession->set_flash_session('enc', $this->uri->segment(2));
		$this->nativesession->set_flash_session('perkara_id', $this->encrypt->decode(base64_decode($this->uri->segment(2))));
		#varlist_alur_perkara_id=1;var_tahapan_id=10
		#
	}
}