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

class Redirect_popup extends CI_Controller {

	function redir_penetapan_pemeriksaan_pk(){
		$this->setParams();
		redirect('detil_pk/penetapan_pemeriksaan_pk');
	}

	
	function redir_setting_bas(){
		$this->nativesession->set_flash_session('enc', $this->uri->segment(3));
		$this->nativesession->set_flash_session('sidang_id', $this->uri->segment(2));
		if($this->uri->segment(4)==4){
			redirect('setting_bas_agama_c');
		}else{
			redirect('setting_bas_c');
		}	
	}

	function redir_add_arsip(){
		redirect('addArsip_c');
	}

	function redir_tambah_agenda($no_urut=0){
		$this->nativesession->set_flash_session('alur_perkara_id', $this->uri->segment(4));
		$this->nativesession->set_flash_session('enc', $this->uri->segment(5));
		if($this->uri->segment(4)==15 OR $this->uri->segment(4)==16){
			redirect('setting_bas_agama_c/tambah_agenda_bas/'.$no_urut);
		}else{
			redirect('setting_bas_c/tambah_agenda_bas/'.$no_urut);
		}
	}

	function redir_add_pihak_pertama(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 1);
		$this->nativesession->set('forPihakKe', 1);
		redirect('addPihak');
	}

	function redir_add_pihak_anak_blm_12tahun(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 1);
		$this->nativesession->set('forPihakKe', 1);
		redirect('addPihakAnakBlm12Tahun');
	}

	function redir_add_pengacara_pihak_pertama(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 1);

		redirect('addPengacara');
	}

	function redir_add_jaksa(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 1);
		$this->nativesession->set('forPihakKe', 1);
		redirect('addjaksa');
	}

	function redir_add_pengacara_pihak_kedua(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 2);
		redirect('addPengacara');
	}

	function redir_add_pengacara_pihak_ketiga(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 3);
		redirect('addPengacara');
	}

	function redir_add_pengacara_pihak_keempat(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 4);
		redirect('addPengacara');
	}

	function redir_add_pihak_kedua(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 2);
		$this->nativesession->set('forPihakKe', 2);
		redirect('addPihak');
	}

	function redir_add_pihak_ketiga(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 3);
		$this->nativesession->set('forPihakKe', 3);
		redirect('addPihak');
	}

	function redir_add_pihak_keempat(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 4);
		$this->nativesession->set('forPihakKe', 4);
		redirect('addPihak');
	}

	function redir_add_ortuwali(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 2);
		$this->nativesession->set('forPihakKe', 0);
		redirect('addOrtu');
	}

	function redir_add_ortuwalikorban(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 5);
		$this->nativesession->set('forPihakKe', 5);
		redirect('addOrtu');
	}

	function redir_add_anak_korban(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 6);
		$this->nativesession->set('forPihakKe', 6);
		redirect('addPihak');
	}

	function redir_edit_dataumum(){
		$this->setParams();
		redirect('manageDataUmum');
	}
	
	function redir_add_majelis(){
		$this->setParams();
		redirect('addMajelis_c/f_add_majelis');
	}

	#08-10-2015
	function redir_show_pemeriksaan_persiapan(){
		$this->setParams();
		redirect('pemeriksaan_persiapan/show_pemeriksaan');
	}
	
	#13022018
	function redir_show_perbaikan_gugatan(){
		$this->setParams();
		redirect('perbaikan_gugatan/show_perbaikan');
	}

	#08-10-2015
	function redir_add_pemeriksaan_persiapan(){
		$this->setParams();
		redirect('pemeriksaan_persiapan/add_pemeriksaan');
	}

	#08-10-2015
	function redir_edit_pemeriksaan_persiapan(){
		$this->setParams();
		redirect('pemeriksaan_persiapan/edit_pemeriksaan');
	}
	
	#13022018
	function redir_edit_perbaikan_gugatan(){
		$this->setParams();
		redirect('perbaikan_gugatan/edit_perbaikan');
	}


	#09-10-2015
	function redir_edit_pemeriksaan_proses(){
		$this->setParams();
		$this->nativesession->set_flash_session('enc', $this->uri->segment(2));
		$this->nativesession->set_flash_session('IDPersiapanProses', $this->encrypt->decode(base64_decode($this->uri->segment(3))));
		redirect('pemeriksaan_persiapan/edit_pemeriksaan_proses');
	}

	#09-10-2015
	function redir_tunda_pemeriksaan_proses(){
		$this->setParams();
		$this->nativesession->set_flash_session('enc', $this->uri->segment(2));
		$this->nativesession->set_flash_session('IDPersiapanProses', $this->encrypt->decode(base64_decode($this->uri->segment(3))));
		redirect('pemeriksaan_persiapan/tunda_pemeriksaan_proses');
	}

	#10-10-2015
	function redir_hapus_pemeriksaan_proses(){
		$this->setParams();
		$this->nativesession->set_flash_session('IDPersiapanProses', $this->encrypt->decode(base64_decode($this->uri->segment(2))));
		print_r($this->uri->segment(4));
		redirect('pemeriksaan_persiapan/hapusPemeriksaanProses');
	}

	#11-10-2015
	function redir_hapus_pemeriksaan(){
		$this->setParams();
		$this->nativesession->set_flash_session('IDPersiapanProses', $this->encrypt->decode(base64_decode($this->uri->segment(2))));
		print_r($this->uri->segment(4));
		redirect('pemeriksaan_persiapan/hapusPemeriksaan');
	}


	function redir_edit_majelis(){
		$this->setParams();
		redirect('addMajelis_c/f_edit_majelis');
	}

	function redir_delete_majelis(){
		$this->setParams();
		redirect('addMajelis_c/del_penetapan');
	}
	
	function redir_penetapan_kembali_majelis(){
		$this->setParams();
		redirect('addMajelis_c/f_penetapan_kembali');
	}
	
	function redir_add_panitera(){
		$this->setParams();
		redirect('addPanitera_c/f_add_panitera');
	}
	function redir_edit_panitera(){
		$this->setParams();
		redirect('addPanitera_c/f_edit_panitera');
	}

	function redir_delete_panitera(){
		$this->setParams();
		redirect('addPanitera_c/del_penetapan');
	}

	function redir_penunjukan_kembali_panitera(){
		$this->setParams();
		redirect('addPanitera_c/f_penunjukan_kembali');
	}

	function redir_add_juru_sita(){
		$this->setParams();
		redirect('addJuruSita_c/f_add_juru_sita');
	}

	function redir_penunjukan_kembali_jurusita(){
		$this->setParams();
		redirect('addJuruSita_c/f_penunjukan_kembali');
	}

	function redir_delete_jurusita(){
		$this->setParams();
		redirect('addJuruSita_c/del_penetapan');
	}

    function redir_jadwal_sidang_list_detil(){
		$this->setParams();
		redirect('sidang_list_detil');
	}
    function redir_edit_juru_sita(){
		$this->setParams();
		redirect('addJuruSita_c/f_edit_juru_sita');
	}
    function redir_edit_sidang_pertama(){
		$this->setParams();
		redirect('addSidangPertama_c/f_edit_sidang');
	}
	function redir_add_sidang_pertama(){
		$this->setParams();
		redirect('addSidangPertama_c/f_add_sidang');
	}
	#catur begin --------
	function redir_tab_mediasi(){
		$this->setParams();
		redirect('tab_mediasi_c');
	}

	function redir_pop_mediasi() {
		$this->setParams();
		redirect('tab_mediasi_c/pop_mediasi');		
	}
	#catur --- end
	##roby SCC
		function redir_add_Keberatan(){
		$this->setParams();
		redirect('tab_keberatan_c/add_Keberatan');
	}

	function redir_edit_Keberatan(){
		$this->setParams();
		redirect('tab_keberatan_c/edit_keberatan');
	}

	function redir_edit_Keberatan_pen_majelis(){
		$this->setParams();
		redirect('tab_keberatan_c/penetapan_majelis');
	}

	function redir_edit_Keberatan_pen_panitera(){
		$this->setParams();
		redirect('tab_keberatan_c/penetapan_panitera');
	}

	function redir_edit_Keberatan_pen_jurusita(){
		$this->setParams();
		redirect('tab_keberatan_c/penetapan_jurusita');
	}

	function redir_edit_Keberatan_pen_sidang(){
		$this->setParams();
		redirect('tab_keberatan_c/penetapan_sidang');
	}

	function redir_edit_keberatan_putusan(){
		$this->setParams();
		redirect('tab_keberatan_c/keberatan_putusan');
	}
	function redir_edit_keberatan_pemberitahuan(){
		$this->setParams();
		redirect('tab_keberatan_c/keberatan_pemberitahuan');
	}

	function redir_edit_keberatan_memori(){
		$this->setParams();
		redirect('tab_keberatan_c/keberatan_memori');
	}

	function redir_add_pihak_keberatan(){
		$this->setParams();
		redirect('tab_keberatan_c/add_pihak_Keberatan');
	}
	
	###
	function redir_add_penahanan_detail(){
		$this->setParams();
		$this->nativesession->set_flash_session('enc_pihak', $this->uri->segment(3));
		$this->nativesession->set_flash_session('pihak_id', $this->encrypt->decode(base64_decode($this->uri->segment(3))));
		if ($this->uri->segment(4)!='add') {
			$this->nativesession->set_flash_session('penahanan_id', $this->encrypt->decode(base64_decode($this->uri->segment(4))));
		}else{
			$this->nativesession->set_flash_session('penahanan_id', $this->uri->segment(4));
		}
		
		redirect('addPenahanan_c/add_penahanan_detail');
	}

	function redir_add_diversi(){
		$this->setParams();
		redirect('tab_diversi_c/add_diversi');
	}

	function redir_edit_diversi(){
		$this->setParams();
		redirect('tab_diversi_c/edit_diversi');
	}

	// function redir_add_diversi_kpn(){			disabled @ 201707
		// $this->setParams();
		// redirect('tab_diversi_c/edit_diversi_kpn');
	// }

	// function redir_add_diversi_dibuka(){			disabled @ 201707
		// $this->setParams();
		// redirect('tab_diversi_c/dibuka_kembali');
	// }

	function redir_add_verzet(){
		$this->setParams();
		redirect('tab_verzet_c/add_verzet');
	}

	function redir_edit_verzet(){
		$this->setParams();
		redirect('tab_verzet_c/edit_verzet');
	}

	function redir_edit_verzet_pen_majelis(){
		$this->setParams();
		redirect('tab_verzet_c/penetapan_majelis');
	}

	function redir_edit_verzet_pen_panitera(){
		$this->setParams();
		redirect('tab_verzet_c/penetapan_panitera');
	}

	function redir_edit_verzet_pen_jurusita(){
		$this->setParams();
		redirect('tab_verzet_c/penetapan_jurusita');
	}

	function redir_edit_verzet_pen_sidang(){
		$this->setParams();
		redirect('tab_verzet_c/penetapan_sidang');
	}

	function redir_edit_verzet_putusan(){
		$this->setParams();
		redirect('tab_verzet_c/verzet_putusan');
	}

	function redir_edit_verzet_pemberitahuan(){
		$this->setParams();
		redirect('tab_verzet_c/verzet_pemberitahuan');
	}
	
	function redir_add_ikrar_talak(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/addIkrarTalak');
	}

	function redir_edit_ikrar_talak(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/edit_ikrar_talak');
	}

	function redir_edit_ikrar_talak_pen_majelis(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/penetapan_majelis');
	}

	function redir_add_ikrar_pen_kembali_majelis(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/penetapan_kembali_majelis');
	}


	function redir_edit_ikrar_talak_pen_panitera(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/penetapan_panitera');
	}

	function redir_add_ikrar_talak_pen_kembali_panitera(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/penetapan_kembali_panitera');
	}

	function redir_edit_ikrar_talak_pen_jurusita(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/penetapan_jurusita');
	}

	function redir_edit_ikrar_talak_pen_sidang(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/penetapan_sidang');
	}

	function redir_edit_ikrar_talak_penetapan(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/ikrar_talak_penetapan');
	}

	function redir_edit_ikrar_talak_akta_cerai(){
		$this->setParams();
		redirect('tab_ikrar_akta_cerai_c/edit_ikrar_talak_akta_cerai');
	}

	function redir_edit_ikrar_talak_pemberitahuan(){
		$this->setParams();
		redirect('tab_ikrar_talak_c/ikrar_talak_pemberitahuan');
	}
	//endofatria
	function redir_add_putusan_sela(){
		$this->setParams();
		redirect('managePutusanSela');
	}

	function redir_add_putusan_akhir(){
		$this->setParams();
		redirect('managePutusanAkhir');
	}

	function redir_add_putusan_terdakwa(){
		$this->setParams();
		redirect('managePutusanAkhirTerdakwa');
	}

	function redir_penetapan(){
		$this->setParams();
		redirect('penetapan');
	}

	# nita
	function redir_edit_verzet_minutasi(){
		$this->setParams();
		redirect('tab_verzet_c/verzet_minutasi');
	}

	/* ===== adityo ======*/
	/* 201505 */
	function redir_jadwal_sidang(){
		$this->setParams(); 
		redirect('jadwal_sidang_c');
	}
	function redir_edit_jadwal_sidang(){	
		$this->setParams();
		redirect('jadwal_sidang_c/edit');
	}
	function redir_tunda_jadwal_sidang(){	
		$this->setParams();
		redirect('jadwal_sidang_c/tunda');
	}
	/*082015*/
	#didik 25052016
	function redir_edit_jadwal_mediasi_verzet(){	
		$this->setParams();
		redirect('tab_verzet_c/editjadwalmediasi');
	}
	function redir_tunda_jadwal_mediasi_verzet(){	
		$this->setParams();
		redirect('tab_verzet_c/tundajadwalmediasi');
	}
	#end
	function redir_edit_jadwal_mediasi_banding(){	
		$this->setParams();
		redirect('detil_banding/editjadwalmediasi');
	}
	function redir_tunda_jadwal_mediasi_banding(){	
		$this->setParams();
		redirect('detil_banding/tundajadwalmediasi');
	}
	function redir_edit_jadwal_mediasi_kasasi(){	
		$this->setParams();
		redirect('detil_kasasi/editjadwalmediasi');
	}
	function redir_tunda_jadwal_mediasi_kasasi(){	
		$this->setParams();
		redirect('detil_kasasi/tundajadwalmediasi');
	}
	function redir_edit_jadwal_mediasi_pk(){	
		$this->setParams();
		redirect('detil_pk/editjadwalmediasi');
	}
	function redir_tunda_jadwal_mediasi_pk(){	
		$this->setParams();
		redirect('detil_pk/tundajadwalmediasi');
	}
	function redir_penuntutan(){
		$this->setParams(); 
		redirect('penuntutan_c');
	}
	function redir_edit_penuntutan(){	
		$this->setParams();
		redirect('penuntutan_c/edit');
	}
	function redir_add_penuntutan(){	
		$this->setParams();
		redirect('penuntutan_c/tambah');
	}
	function redir_riwayat_perkara(){
		$this->setParams(); 
		redirect('riwayat_perkara_c');
	}	

	// function redir_add_pihak_penyidik(){		disabled @ 201707
		// $this->setParams();
		// $this->nativesession->set_flash_session('pihakke', 7);
		// redirect('addpenyidik');
	// }
	function redir_add_pihak_pemkes(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 8);
		redirect('addpemkes');
	}

	function redir_add_pihak_anak_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 20);
		redirect('addPihakDiversi');
	}

	function redir_add_pihak_penuntut_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 21);
		redirect('addPihakDiversi');
	}

	function redir_add_pihak_penyidik_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 22);
		redirect('addPihakDiversi');
	}	

	function redir_add_pihak_pkbapas_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 26);
		redirect('addPihakDiversi');
	}	

	function redir_add_pihak_korban_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 23);
		redirect('addPihakDiversi');
	}

	function redir_add_ortuwali_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 24);
		$this->nativesession->set('forPihakKe', 0);
		redirect('addOrtuDiversi');
	}

	function redir_add_ortuwalikorban_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 25);
		$this->nativesession->set('forPihakKe', 5);
		redirect('addOrtuDiversi');
	}


	function redir_add_pengacara_pihak_diversi(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 2);
		redirect('addPengacaraDiversi');
	}


	#25-11-2016
	function redir_mediasi_luar(){
		$this->setParams(); 
		redirect('mediasi_diluar');
	}

	// ~sementara
	// function redir_template_pidana(){
		// $this->setParams(); 
		// redirect('c_template_pidana_sementara');
	// }
	// function redir_template_mediasi(){
		// $this->setParams(); 
		// redirect('tab_template_mediasi_sementara');
	// }
	// function redir_template_perdata(){
		// $this->setParams(); 
		// redirect('c_template_perdata_sementara');
	// }
	// function redir_template_militer(){
		// $this->setParams(); 
		// redirect('c_template_militer_sementara');
	// }
	// function redir_template_agama(){
		// $this->setParams(); 
		// redirect('c_template_agama_sementara');
	// }
	// function redir_template_tun(){
		// $this->setParams(); 
		// redirect('c_template_tun_sementara');
	// }
	// ~end of sementara

	/*201508*/
	function redir_edit_jadwal_mediasi(){	
		$this->setParams();
		redirect('jadwal_mediasi_c/edit');
	}
	function redir_tunda_jadwal_mediasi(){	
		$this->setParams();
		redirect('jadwal_mediasi_c/tunda');
	}
	/*201510 */
	function redir_add_pihak_kelima(){
		$this->setParams();
		$this->nativesession->set_flash_session('pihakke', 13);
		$this->nativesession->set_flash_session('popup', $this->uri->segment(4));
		redirect('addPihak');
	}
	function redir_fileupload(){
		$this->setParams();
		redirect('fileupload_c');
	}
	/*201707*/
	function redir_edit_jadwal_diversi(){	
		$this->setParams();
		redirect('jadwal_diversi_c/edit');
	}
	function redir_tunda_jadwal_diversi(){	
		$this->setParams();
		redirect('jadwal_diversi_c/tunda');
	}
	function redir_edit_lanjut_diversi(){
		$this->setParams();
		redirect('tab_diversi_c/edit_lanjut_diversi');
	}
	function redir_edit_hasil_diversi(){
		$this->setParams();
		redirect('tab_diversi_c/edit_hasil_diversi');
	}
	function redir_edit_penetapan_kesepakatan_diversi(){
		$this->setParams();
		redirect('tab_diversi_c/edit_penetapan_kesepakatan_diversi');
	}
	function redir_edit_pelaksanaan_kesepakatan_diversi(){
		$this->setParams();
		redirect('tab_diversi_c/edit_pelaksanaan_kesepakatan_diversi');
	}
	/* ===== end of adityo ======*/

	/*r o b y*/
		function redir_fileupload_putusan(){
		$this->setParams();
		redirect('fileupload_putusan_c');
	}
	/*end r o b y*/
	/*didik*/
	function redir_add_pemberitahuan(){
		$this->setParams();
		redirect('managePutusanAkhir/pemberitahuan');
	}
	
	function redir_intervensi(){
		$this->setParams();
		#$this->nativesession->set_flash_session('open_dataumum', "Yes");
		redirect('manageIntervensi');
	}

	##datapersidangan	
	function redir_data_persidangan(){	
		$this->setParams();
		redirect('data_persidangan_c/menu_persidangan');
	}

	function redir_data_persidangan_diversi(){	
		$this->setParams();
		redirect('data_persidangan_c/menu_persidangan_diversi');
	}

	##datarelaas panggilan
	function redir_data_relaas_panggil(){	
		$this->setParams();
		redirect('data_relaas_c/popup_input_relaas');
	}
	
	##phs kembali
	function redir_penetapan_kembali_sidang_pertama(){
		$this->setParams();
		redirect('addSidangPertama_c/f_penetapan_kembali_sidang_pertama');
	}
	function redir_penetapan_kembali_sidang_pertama_edit(){
		$this->setParams();
		redirect('addSidangPertama_c/f_penetapan_kembali_sidang_pertama_edit');
	}

	function setParams(){
		$segment = $this->uri->segment_array();
		$this->nativesession->set_flash_session('security', TRUE);
		$this->nativesession->set_flash_session('segment', $segment);
		$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))));
		$this->nativesession->set_flash_session('encjadwalsidang', $this->uri->segment(3));
		$this->nativesession->set_flash_session('encmediasi', $this->uri->segment(3));
		$this->nativesession->set_flash_session('fileupfrom', $this->uri->segment(3));
		$this->nativesession->set_flash_session('action', $this->uri->segment(3));
		$this->nativesession->set_flash_session('encdiversi', $this->uri->segment(3));
		$this->nativesession->set_flash_session('encphs', $this->uri->segment(3));
		$this->nativesession->set_flash_session('encjadwalmediasi', $this->uri->segment(4));
		$this->nativesession->set_flash_session('encputsela', $this->uri->segment(4));
		$this->nativesession->set_flash_session('encjadwaldiversi', $this->uri->segment(4));
		$this->nativesession->set_flash_session('actionparams', $this->uri->segment(4));
		$this->nativesession->set_flash_session('encmed', $this->uri->segment(5));
		$this->nativesession->set_flash_session('urutan', $this->uri->segment(5));
		$this->nativesession->set_flash_session('encproc', $this->uri->segment(5));
		if(($this->uri->segment(3)=='edit')||($this->uri->segment(3)=='edit1')||($this->uri->segment(3)=='edit2')||($this->uri->segment(3)=='edit3')||($this->uri->segment(3)=='diversi_edit')){
			$this->nativesession->set_flash_session('enc_pihak', $this->uri->segment(4));
			$this->nativesession->set_flash_session('pihak_id', $this->encrypt->decode(base64_decode($this->uri->segment(4))));
			if($this->uri->
			segment(5)=='urt'){
				$this->nativesession->set_flash_session('urutan', $this->uri->segment(6));
				$this->nativesession->set_flash_session('enc_id', $this->uri->segment(7));
			}
		}
		if(($this->uri->segment(3)=='tambah')||($this->uri->segment(3)=='diversi_add')){
			$this->nativesession->set_flash_session('enc_pihak', $this->uri->segment(4));
			$this->nativesession->set_flash_session('pihak_id', $this->encrypt->decode(base64_decode($this->uri->segment(4))));
		}
	}
}
