Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!empty($upload_data1)) {
- $filePath1 = $upload_data1['file_name']; // Cek Nama Image Profil
- $foto1 = "'rtlh_foto' => ".$filePath1.",";
- } else {
- $foto1 = "";
- }
- if (!empty($upload_data2)) {
- $filePath2 = $upload_data2['file_name']; // Cek Nama Image Rumah
- $foto2 = "'rtlh_foto_rmh1' => ".$filePath2.",";
- } else {
- $foto2 = "";
- }
- // Input ke RTLH
- $data = array(
- 'rtlh_kode_wilayah' => trim($this->input->post('kd_wilayah', 'true')),
- 'rtlh_no_urut' => trim($no_RTLH),
- 'penduduk_nik' => trim($this->input->post('no_ktp', 'true')),
- 'no_kec' => $this->input->post('no_kec', 'true'),
- 'no_kel' => $this->input->post('no_kel', 'true'),
- 'penghasilan_id' => $this->input->post('lstPenghasilan', 'true'),
- 'pengeluaran_id' => $this->input->post('lstPengeluaran', 'true'),
- 'status_tanah_id' => $this->input->post('lstPemilikTanah', 'true'),
- 'bukti_tanah_id' => $this->input->post('lstBuktiTanah', 'true'),
- 'pemilik_rumah_id' => $this->input->post('lstPemilikRumah', 'true'),
- 'rtlh_rumah_lain' => $this->input->post('lstAsetRumah', 'true'),
- 'rtlh_tanah_lain' => $this->input->post('lstAsetTanah', 'true'),
- 'rtlh_imb' => $this->input->post('lstIMB', 'true'),
- 'bantuan_id' => $this->input->post('lstBantuan', 'true'),
- 'rtlh_pondasi' => $this->input->post('lstPondasi', 'true'),
- 'rtlh_kondisi_balok' => $this->input->post('lstKondisiBalok', 'true'),
- 'rtlh_kondisi_atap' => $this->input->post('lstKondisiKonstruksiAtap', 'true'),
- 'rtlh_jendela' => $this->input->post('lstJendela', 'true'),
- 'ventilasi_id' => $this->input->post('lstVentilasi', 'true'),
- 'rtlh_sanitasi' => $this->input->post('lstSanitasi', 'true'),
- 'rtlh_kondisi_sanitasi' => $this->input->post('lstKondisiSanitasi', 'true'),
- 'sanitasi_id' => $this->input->post('lstJenisSanitasi', 'true'),
- 'rtlh_septitank' => $this->input->post('lstSeptitank', 'true'),
- 'rtlh_kondisi_septitank'=> $this->input->post('lstKondisiSeptitank', 'true'),
- 'air_minum_id' => $this->input->post('lstAirMinum', 'true'),
- 'listrik_id' => $this->input->post('lstListrik', 'true'),
- 'rtlh_luas' => $this->input->post('luas', 'true'),
- 'rtlh_jml_orang' => $this->input->post('jml_orang', 'true'),
- 'rtlh_no_kk_lain' => $this->input->post('no_kk_lain', 'true'),
- 'rtlh_jml_kk' => $this->input->post('jml_kk', 'true'),
- 'tinggi_id' => $this->input->post('lstTinggi', 'true'),
- 'rtlh_ruang_keluarga' => $this->input->post('lstKamarTidur', 'true'),
- 'material_atap_id' => $this->input->post('lstMaterialAtap', 'true'),
- 'kondisi_atap_id' => $this->input->post('lstKondisiAtap', 'true'),
- 'material_dinding_id' => $this->input->post('lstMaterialDinding', 'true'),
- 'kondisi_dinding_id' => $this->input->post('lstKondisiDinding', 'true'),
- 'material_lantai_id' => $this->input->post('lstMaterialLantai', 'true'),
- 'luas_lantai_id' => $this->input->post('lstLuasLantai', 'true'),
- 'rtlh_lat' => $this->input->post('lat', 'true'),
- 'rtlh_long' => $this->input->post('long', 'true'),
- 'rtlh_status' => 'Baru',
- 'rtlh_prioritas' => $StatusPrioritas,
- $foto1.$foto2.
- 'user_username' => $this->session->userdata('username'),
- 'rtlh_post' => date('Y-m-d H:i:s'),
- 'rtlh_update' => date('Y-m-d H:i:s')
- );
- $this->db->insert('rtlh_rtlh', $data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement