MINI
C:
/
SiakApp2.2
/
apps
/
ddn
/
modules
/
CatatanSipilKelahiran
/
actions
/
Upload File:
files >> C:/SiakApp2.2/apps/ddn/modules/CatatanSipilKelahiran/actions/CatatLahirLuarNegeriAction.class.php
<?php /** * CatatanSipil actions. * * @package gpe * @subpackage CatatanSipil * @author Your name here * @version SVN: $Id: CatatLahirLuarNegeriAction.class.php,v 1.6 2011/10/26 12:40:50 nikmatul Exp $ */ class CatatLahirLuarNegeriAction extends sfActions { /** * Executes index action * * @param sfRequest $request A request object */ public function preExecute() { require_once SIAK_ROOT_INCLUDE."siak_session.php"; $this->pageTitle = "Catatan Sipil - Pelaporan Kelahiran Luar Negeri di Dalam Negeri"; $this->pageUrl = "/CatatanSipilKelahiran/CatatLahirLuarNegeri"; } public function executeCatatLahirLuarNegeri(sfWebRequest $request) { $this->cbJenisKelamin = siakWNILoadReference("801"); $this->cbJenisKelahiran = siakWNILoadReference("614"); $this->cbPekerjaan = siakWNILoadReference("201"); $this->cbTempatLahir = siakWNILoadReference("612"); $this->cbPenolong = siakWNILoadReference("613"); $this->cbKewarganegaraan = CapilLoadReference("615", false); $this->cbKeturunan = siakWNILoadReference("616"); $this->cbDomisili = siakWNILoadReference("619"); $this->cbJenisLahir = CapilJenisLahirReference(); if ($this->getRequest()->getMethod() == sfRequest::POST) { $id = (!$this->getRequestParameter("lahir_no")) ? $this->getRequestParameter("admProv").$this->getRequestParameter("admKab").CapilTimeSession() : $this->getRequestParameter("lahir_no"); $bayi_tgl_lahir = $this->getRequestParameter("bayi_lahir_day") . "-" . $this->getRequestParameter("bayi_lahir_month") . "-" . $this->getRequestParameter("bayi_lahir_year"); $ibu_tgl_lahir = $this->getRequestParameter("ibu_lahir_day") . "-" . $this->getRequestParameter("ibu_lahir_month") . "-" . $this->getRequestParameter("ibu_lahir_year"); $ayah_tgl_lahir = $this->getRequestParameter("ayah_lahir_day") . "-" . $this->getRequestParameter("ayah_lahir_month") . "-" . $this->getRequestParameter("ayah_lahir_year"); $info = new CapilLahirLn(); $info->setBayiNo($id); $info->setBayiNamaLgkp($this->getRequestParameter("bayi_nama")); $info->setBayiTmptLahir($this->getRequestParameter("bayi_tempat_lahir")); $info->setBayiTglLahir(CapilSetDate($bayi_tgl_lahir)); $info->setBayiWktLahir(CapilSetTime($this->getRequestParameter("bayi_jam_lahir"), $this->getRequestParameter("bayi_mnt_lahir"))); $info->setBayiJnsKelamin($this->getRequestParameter("bayi_jenis_kelamin")); $info->setBayiJnsKlhr($this->getRequestParameter("bayi_jenis_kelahiran")); $info->setBayiTmptKlhr($this->getRequestParameter("bayi_lahir_tempat")); $info->setBayiAnakKe($this->getRequestParameter("bayi_anak_ke")); $info->setBayiPnlgKlhr($this->getRequestParameter("bayi_penolong")); $info->setBayiOrtuNikah($this->getRequestParameter("bayi_ortu_nikah")); $ibu_tgl_kawin = $this->getRequestParameter("ibu_kawin_day") . "-" . $this->getRequestParameter("ibu_kawin_month") . "-" . $this->getRequestParameter("ibu_kawin_year"); if ($this->getRequestParameter("ibu_nik_ada")) $info->setIbuNik($this->getRequestParameter("ibu_nik")); else $info->setIbuNik(""); $info->setIbuNamaLgkp($this->getRequestParameter("ibu_nama")); $info->setIbuTglLahir(CapilSetDate($ibu_tgl_lahir)); $info->setIbuKawinTgl(CapilSetDate($ibu_tgl_kawin)); $info->setIbuWrgNgr($this->getRequestParameter("ibu_wrg_ngr")); $info->setIbuPekerjaan($this->getRequestParameter("ibu_pekerjaan")); $info->setIbuKebangsaan($this->getRequestParameter("ibu_bangsa")); $info->setIbuAlamat($this->getRequestParameter("ibu_alamat")); $info->setIbuNoRt($this->getRequestParameter("ibu_no_rt")); $info->setIbuNoRw($this->getRequestParameter("ibu_no_rw")); $info->setIbuNoProv($this->getRequestParameter("ibu_no_prov")); $info->setIbuNoKab($this->getRequestParameter("ibu_no_kab")); $info->setIbuNoKec($this->getRequestParameter("ibu_no_kec")); $info->setIbuNoKel($this->getRequestParameter("ibu_no_kel")); if ($this->getRequestParameter("ayah_nik_ada")) $info->setAyahNik($this->getRequestParameter("ayah_nik")); else $info->setAyahNik(""); $info->setAyahNamaLgkp($this->getRequestParameter("ayah_nama")); $info->setAyahTglLahir(CapilSetDate($ayah_tgl_lahir)); $info->setAyahWrgNgr($this->getRequestParameter("ayah_wrg_ngr")); $info->setAyahPekerjaan($this->getRequestParameter("ayah_pekerjaan")); $info->setAyahKebangsaan($this->getRequestParameter("ayah_bangsa")); $info->setAyahAlamat($this->getRequestParameter("ayah_alamat")); $info->setAyahNoRt($this->getRequestParameter("ayah_no_rt")); $info->setAyahNoRw($this->getRequestParameter("ayah_no_rw")); $info->setAyahNoProv($this->getRequestParameter("ayah_no_prov")); $info->setAyahNoKab($this->getRequestParameter("ayah_no_kab")); $info->setAyahNoKec($this->getRequestParameter("ayah_no_kec")); $info->setAyahNoKel($this->getRequestParameter("ayah_no_kel")); $plpr_tgl_lapor = $this->getRequestParameter("pelapor_lapor_day") . "-" . $this->getRequestParameter("pelapor_lapor_month") . "-" . $this->getRequestParameter("pelapor_lapor_year"); if ($this->getRequestParameter("pelapor_nik_ada")) $info->setPlprNik($this->getRequestParameter("pelapor_nik")); else $info->setPlprNik(""); $info->setPlprNamaLgkp($this->getRequestParameter("pelapor_nama")); $info->setPlprUmur($this->getRequestParameter("pelapor_umur")); $info->setPlprTglLapor(CapilSetDate($plpr_tgl_lapor)); $info->setPlprKelamin($this->getRequestParameter("pelapor_kelamin")); $info->setPlprPekerjaan($this->getRequestParameter("pelapor_pekerjaan")); $info->setPlprAlamat($this->getRequestParameter("pelapor_alamat")); $info->setPlprNoRt($this->getRequestParameter("pelapor_no_rt")); $info->setPlprNoRw($this->getRequestParameter("pelapor_no_rw")); $info->setPlprNoProv($this->getRequestParameter("pelapor_no_prov")); $info->setPlprNoKab($this->getRequestParameter("pelapor_no_kab")); $info->setPlprNoKec($this->getRequestParameter("pelapor_no_kec")); $info->setPlprNoKel($this->getRequestParameter("pelapor_no_kel")); $info->setPlprHubKel($this->getRequestParameter("pelapor_hub_kel")); $info->setAdmNoProv($this->getRequestParameter("admProv")); $info->setAdmNoKab($this->getRequestParameter("admKab")); $info->setAdmNoKec($this->getRequestParameter("admKec")); $info->setAdmNoKel($this->getRequestParameter("admKel")); $noAkta = CapilGeneratorTandaBuktiLaporKelahiran($this->getRequestParameter("admProv"), $this->getRequestParameter("admKab"), $this->getRequestParameter("admKec"), $this->getRequestParameter("bayi_lahir_day"), $this->getRequestParameter("bayi_lahir_month"), $this->getRequestParameter("bayi_lahir_year")); $info->setAdmLahirNo($noAkta); $info->setAdmKodeForm("F-2.04"); $admBuktiCttTgl = $this->getRequestParameter("adm_bukti_catat_day") . "-" . $this->getRequestParameter("adm_bukti_catat_month") . "-" . $this->getRequestParameter("adm_bukti_catat_year"); $info->setAdmBuktiCttNo($this->getRequestParameter("adm_bukti_catat_no")); $info->setAdmBuktiCttTgl(CapilSetDate($admBuktiCttTgl)); $info->setAdmBuktiCttTerbit($this->getRequestParameter("adm_bukti_catat_terbit")); $info->setAdmAgendaNo($this->getRequestParameter("adm_agenda_no")); $info->setAdmRegsNama($this->getRequestParameter("adm_regs_nama")); $info->setAdmRegsNip($this->getRequestParameter("adm_regs_nip")); $info->setAdmTglUpdate(CapilSetDate(date("d-m-Y"))); if ($this->getRequestParameter("lahir_no")) { $info->setNew(false); $info->setFlagUpdate($this->getRequestParameter("num_update") + 1); } else { $info->setAdmTglEntry(CapilSetDate(date("d-m-Y"))); $info->setFlagUpdate(0); } $info->setUserId($this->ses_siak_user); siakAppLoggersTextUser("InputKelahiranDiluarNegeri",$id."#".$this->ses_siak_level_name,$this->ses_siak_user); $info->save(); $this->redirect ($this->pageUrl . '?id=' . $id . "&success=true"); } else if ($this->getRequest()->getMethod() == sfRequest::GET) { if ($this->getRequestParameter("id")) { $info = new Criteria(); $info->add(CapilLahirLnPeer::BAYI_NO, $this->getRequestParameter("id")); $me = CapilLahirLnPeer::doSelect($info); $rows = $me[0]; if ($this->getRequestParameter("success")) $this->success = $this->getRequestParameter("success"); $this->lahirIndex = $this->getRequestParameter("id"); $this->cbProvinsi = siakGetProvinsi(); $this->cbKabupaten = siakGetSelectKabupatenByParam($rows->getAdmNoProv()); $this->cbKecamatan = siakGetSelectKecamatanByParam($rows->getAdmNoProv(), $rows->getAdmNoKab()); $this->cbKelurahan = siakGetSelectKelurahanByParam($rows->getAdmNoProv(), $rows->getAdmNoKab(), $rows->getAdmNoKec()); $this->admNoProv = $rows->getAdmNoProv(); $this->admNoKab = $rows->getAdmNoKab(); $this->admNoKec = $rows->getAdmNoKec(); $this->admNoKel = $rows->getAdmNoKel(); $this->bayiNama = $rows->getBayiNamaLgkp(); $this->bayiTempatLahir = $rows->getBayiTmptLahir(); $this->bayiTglLahir = CapilGetDate($rows->getBayiTglLahir()); $waktuLahir = explode(":", $rows->getBayiWktLahir()); $this->bayiJamLahir = $waktuLahir[0]; $this->bayiMntLahir = $waktuLahir[1]; $this->bayiJenisKelamin = $rows->getBayiJnsKelamin(); $this->bayiLahirTempat = $rows->getBayiTmptKlhr(); $this->bayiJenisLahir = $rows->getBayiJnsKlhr(); $this->bayiAnakKe = $rows->getBayiAnakKe(); $this->bayiPenolong = $rows->getBayiPnlgKlhr(); $this->bayiOrtuNikah = $rows->getBayiOrtuNikah(); $this->ibuNik = $rows->getIbuNik(); $this->ibuNikExists = CapilNikAvailable($this->ibuNik); $this->ibuNama = $rows->getIbuNamaLgkp(); $this->ibuTglLahir = CapilGetDate($rows->getIbuTglLahir()); $this->ibuTglKawin = CapilGetDate($rows->getIbuKawinTgl()); $this->ibuWrgNgr = $rows->getIbuWrgNgr(); $this->ibuPekerjaan = $rows->getIbuPekerjaan(); $this->ibuBangsa = $rows->getIbuKebangsaan(); $this->ibuAlamat = $rows->getIbuAlamat(); $this->ibuNoRt = $rows->getIbuNoRt(); $this->ibuNoRw = $rows->getIbuNoRw(); $this->ibuNoProv = $rows->getIbuNoProv(); $this->ibuNoKab = $rows->getIbuNoKab(); $this->ibuNoKec = $rows->getIbuNoKec(); $this->ibuNoKel = $rows->getIbuNoKel(); $this->cbIbuKabupaten = siakGetSelectKabupatenByParam($rows->getIbuNoProv()); $this->cbIbuKecamatan = siakGetSelectKecamatanByParam($rows->getIbuNoProv(), $rows->getIbuNoKab()); $this->cbIbuKelurahan = siakGetSelectKelurahanByParam($rows->getIbuNoProv(), $rows->getIbuNoKab(), $rows->getIbuNoKec()); $this->ayahNik = $rows->getAyahNik(); $this->ayahNikExists = CapilNikAvailable($this->ayahNik); $this->ayahNama = $rows->getAyahNamaLgkp(); $this->ayahTglLahir = CapilGetDate($rows->getAyahTglLahir()); $this->ayahWrgNgr = $rows->getAyahWrgNgr(); $this->ayahPekerjaan = $rows->getAyahPekerjaan(); $this->ayahBangsa = $rows->getAyahKebangsaan(); $this->ayahAlamat = $rows->getAyahAlamat(); $this->ayahNoRt = $rows->getAyahNoRt(); $this->ayahNoRw = $rows->getAyahNoRw(); $this->ayahNoProv = $rows->getAyahNoProv(); $this->ayahNoKab = $rows->getAyahNoKab(); $this->ayahNoKec = $rows->getAyahNoKec(); $this->ayahNoKel = $rows->getAyahNoKel(); $this->cbAyahKabupaten = siakGetSelectKabupatenByParam($rows->getAyahNoProv()); $this->cbAyahKecamatan = siakGetSelectKecamatanByParam($rows->getAyahNoProv(), $rows->getAyahNoKab()); $this->cbAyahKelurahan = siakGetSelectKelurahanByParam($rows->getAyahNoProv(), $rows->getAyahNoKab(), $rows->getAyahNoKec()); $this->pelaporNik = $rows->getPlprNik(); $this->pelaporNikExists = CapilNikAvailable($this->pelaporNik); $this->pelaporNama = $rows->getPlprNamaLgkp(); $this->pelaporUmur = $rows->getPlprUmur(); $this->pelaporTglLapor = CapilGetDate($rows->getPlprTglLapor()); $this->pelaporKelamin = $rows->getPlprKelamin(); $this->pelaporPekerjaan = $rows->getPlprPekerjaan(); $this->pelaporAlamat = $rows->getPlprAlamat(); $this->pelaporNoRt = $rows->getPlprNoRt(); $this->pelaporNoRw = $rows->getPlprNoRw(); $this->pelaporNoProv = $rows->getPlprNoProv(); $this->pelaporNoKab = $rows->getPlprNoKab(); $this->pelaporNoKec = $rows->getPlprNoKec(); $this->pelaporNoKel = $rows->getPlprNoKel(); $this->pelaporHubKel = $rows->getPlprHubKel(); $this->cbPelaporKabupaten = siakGetSelectKabupatenByParam($rows->getPlprNoProv()); $this->cbPelaporKecamatan = siakGetSelectKecamatanByParam($rows->getPlprNoProv(), $rows->getPlprNoKab()); $this->cbPelaporKelurahan = siakGetSelectKelurahanByParam($rows->getPlprNoProv(), $rows->getPlprNoKab(), $rows->getPlprNoKec()); $this->admLahirNo = $rows->getAdmLahirNo(); $this->admBuktiCatatNo = $rows->getAdmBuktiCttNo(); $this->admBuktiCatatTgl = CapilGetDate($rows->getAdmBuktiCttTgl()); $this->admBuktiCatatTerbit = $rows->getAdmBuktiCttTerbit(); $this->admAgendaNo = $rows->getAdmAgendaNo(); $this->admRegsNama = $rows->getAdmRegsNama(); $this->admRegsNip = $rows->getAdmRegsNip(); $this->numUpdate = $rows->getFlagUpdate(); $this->admTglEntry = CapilGetDate($rows->getAdmTglEntry()); $this->admTglUpdate = $rows->getAdmTglUpdate(); } else $this->cbProvinsi = siakGetProvinsi(); switch($this->ses_siak_level_code) { case "8": $this->admNoProv = $this->ses_siak_prop; $this->admNoKab = $this->ses_siak_kab; $this->admNoKec = $this->ses_siak_kec; $this->namaProv = CapilGetRegional($this->ses_siak_prop); $this->namaKab = CapilGetRegional($this->ses_siak_prop, $this->ses_siak_kab); break; case "7": $this->admNoProv = $this->ses_siak_prop; $this->admNoKab = $this->ses_siak_kab; $this->namaProv = CapilGetRegional($this->ses_siak_prop); $this->namaKab = CapilGetRegional($this->ses_siak_prop, $this->ses_siak_kab); if ($this->ses_siak_kec) { $this->admNoKec = $this->ses_siak_kec; $this->namaKec = CapilGetRegional($this->ses_siak_prop, $this->ses_siak_kab, $this->ses_siak_kec); } break; case "13": $this->admNoProv = $this->ses_siak_prop; $this->admNoKab = $this->ses_siak_kab; $this->namaProv = CapilGetRegional($this->ses_siak_prop); $this->namaKab = CapilGetRegional($this->ses_siak_prop, $this->ses_siak_kab); if ($this->ses_siak_kec) { $this->admNoKec = $this->ses_siak_kec; $this->namaKec = CapilGetRegional($this->ses_siak_prop, $this->ses_siak_kab, $this->ses_siak_kec); } break; } } } }
Copyright ©2021 || Defacer Indonesia