<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1>FORM TAMBAH DATA RUMAH TANGGA</h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="#">Home</a></li>
                        <li class="breadcrumb-item active">FORM TAMBAH DATA RUMAH TANGGA</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content centered">
        <div class="container-fluid ">
            <div class="row">
                <!-- left column -->
                <div class="col-md-4">
                    <!-- general form elements -->
                    <div class="card card-primary">
                        <div class="card-header">
                            <h3 class="card-title">BLOK I - PENGENALAN TEMPAT</h3>
                        </div>
                        <form method="post" action="<?= base_url() ?>kelola_ruta_kk/blok1/<?= $blok1[0]->id ?>">
                            <div class="card-body">
                                <div class="form-group">
                                    <?php if (isset($blok1)) : ?>
                                        <input type="hidden" id="id" name="id" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->id ?>">
                                    <?php endif; ?>
                                    <label for=" provinsi">Provinsi</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input readonly type="text" class="form-control" name="provinsi" id="provinsi" placeholder="Provinsi" value="<?= $blok1[0]->provinsi ?>">
                                    <?php else : ?>
                                        <input readonly type="text" value="JAWA TENGAH" class="form-control" name="provinsi" id="provinsi" placeholder="Provinsi">
                                    <?php endif; ?>
                                    <?= form_error('provinsi', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                                <div class=" form-group">
                                    <label for="kabupaten">Kabupaten</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input readonly type="text" class="form-control" name="kabupaten" id="kabupaten" placeholder="Kabupaten" value="<?= $blok1[0]->kabupaten ?>">
                                    <?php else : ?>
                                        <input readonly type="text" value="Karanganyar" class="form-control" name="kabupaten" id="kabupaten" placeholder="Kabupaten">
                                    <?php endif; ?>

                                    <?= form_error('kabupaten', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                                <div class="form-group">
                                    <label for="kecamatan">Kecamatan</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input readonly type="text" class="form-control" name="kecamatan" id="kecamatan" placeholder="Kecamatan" value="<?= $blok1[0]->kecamatan ?>">
                                    <?php else : ?>
                                        <input readonly type="text" value="Jaten" class="form-control" name="kecamatan" id="kecamatan" placeholder="Kecamatan">
                                    <?php endif; ?>

                                    <?= form_error('kecamatan', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                                <div class="form-group">
                                    <label for="Desa">Desa</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input readonly type="text" class="form-control" name="desa" id="desa" placeholder="Desa" value="<?= $blok1[0]->desa ?>">
                                    <?php else : ?>
                                        <input readonly value="Sroyo" type="text" class="form-control" name="desa" id="desa" placeholder="Desa">
                                    <?php endif; ?>
                                    <?= form_error('desa', '<small class ="text-danger pl-3">', '</small>'); ?>

                                </div>
                                <div class="form-group">
                                    <label for="alamat">Alamat</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input type="text" class="form-control" name="alamat" id="alamat" placeholder="Alamat" value="<?= $blok1[0]->alamat ?>">
                                    <?php else : ?>
                                        <input type="text" class="form-control" name="alamat" id="alamat" placeholder="Alamat">
                                    <?php endif; ?>

                                    <?= form_error('alamat', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                                <div class="form-group">
                                    <label for="nokk">Nomor Kartu Keluarga</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input type="text" maxlength="16" minlength="16" class="form-control" name="nokk" id="nokk" placeholder="Nomor Kartu Keluarga" maxlength="9" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $blok1[0]->nokk ?>">
                                    <?php else : ?>
                                        <input type="text" maxlength="16" minlength="16" class="form-control" name="nokk" id="nokk" placeholder="Nomor Kartu Keluarga" maxlength="9" onkeypress="return event.charCode >= 48 && event.charCode <=58">
                                    <?php endif; ?>

                                    <?= form_error('nokk', '<small class ="text-danger pl-3">', '</small>'); ?>

                                </div>
                                <div class="form-group">
                                    <label for="namaKK">Nama Kepala Keluarga</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input type="text" class="form-control" name="namaKK" id="namaKK" class="namaKK" placeholder="Nama Kepala Keluarga" value="<?= $blok1[0]->nm_kpl_kg ?>">
                                    <?php else : ?>
                                        <input type="text" class="form-control" name="namaKK" id="namaKK" class="namaKK" placeholder="Nama Kepala Keluarga">
                                    <?php endif; ?>

                                    <?= form_error('namaKK', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                                <div class="form-group">
                                    <label for="jlmanggota">Jumlah Anggota Keluarga</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input type="number" minlength="1" class="form-control" name="jmlagt" id="jmlagt" placeholder="Jumlah Anggota Keluarga" value="<?= $blok1[0]->jml_agt ?>">
                                    <?php else : ?>
                                        <input type="number" minlength="1" class="form-control" name="jmlagt" id="jmlagt" placeholder="Jumlah Anggota Keluarga">
                                    <?php endif; ?>

                                    <?= form_error('jmlagt', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                                <div class="form-group">
                                    <label for="norumah">Nomor Bangunan Rumah</label>
                                    <?php if (isset($blok1)) : ?>
                                        <input type="number" min="0" minlength="1" class="form-control" name="norumah" id="norumah" placeholder="Nomor Bangunan Rumah" value=<?= $blok1[0]->normh ?>>
                                    <?php else : ?>
                                        <input type="number" min="0" minlength="1" class="form-control" name="norumah" id="norumah" placeholder="Nomor Bangunan Rumah">
                                    <?php endif; ?>

                                    <?= form_error('norumah', '<small class ="text-danger pl-3">', '</small>'); ?>
                                </div>
                            </div>
                            <!-- /.card-body -->

                            <div class="card-footer">
                                <button type="submit" class="float-right btn btn-primary">Ubah Data</button>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="col-md-4">
                    <!-- general form elements -->
                    <div class="card card-primary">
                        <div class="card-header">
                            <h3 class="card-title">BLOK II - Keterangan Petugas dan Responden</h3>
                        </div>

                        <?php if (isset($blok1)) : ?>
                            <form method="post" action="<?= base_url() ?>kelola_ruta_kk/blok2/<?= $blok1[0]->id  ?>">
                            <?php else : ?>
                                <form method="post" action="<?= base_url() ?>blok2">
                                <?php endif; ?>
                                <div class="card-body">
                                    <div class="form-group">
                                        <label for="tglcacah">Tanggal Pencacahan</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="hidden" id="id2" name="id" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->id ?>">
                                            <input type="date" class="form-control" name="tglcacah" id="tglcacah" placeholder="Tanggal Pencacahan" value="<?= $blok1[0]->tglcacah ?>">
                                            <?= form_error('norumah', '<small class ="text-danger pl-3">', '</small>'); ?>
                                        <?php else : ?>
                                            <input disabled type="date" class="form-control" id="tglcacah" placeholder="Tanggal Pencacahan">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="namapencacah">Nama Pencacah</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="namapencacah" id="namapencacah" placeholder="Nama Pencacah" value="<?= $blok1[0]->namapencacah ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" id="namapencacah" placeholder="Nama Pencacah">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="tglperiksa">Tanggal Pemeriksaan</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="date" class="form-control" name="tglperiksa" id="tglperiksa" placeholder="Tanggal Pemeriksa" value="<?= $blok1[0]->tglperiksa ?>">
                                        <?php else : ?>
                                            <input disabled type="date" class="form-control" id="tglperiksa" placeholder="Tanggal Pemeriksa">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="namaperiksa">Nama Pemeriksa</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="namaperiksa" id="namaperiksa" placeholder="Nama Pemeriksa" value="<?= $blok1[0]->namaperiksa ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" id="namaperiksa" placeholder="Nama Pemeriksa">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="hasil">Hasil Pencacahan</label>
                                        <?php if (isset($blok1)) : ?>
                                            <select class="form-control mr-2" id="hasil" name="hasil" value="<?= $blok1[0]->hasil ?>">
                                                <option disabled value="0">Silahkan dipilih</option>
                                                <option value="1" <?php if ($blok1[0]->hasil == 1) echo 'selected = "Selected"'; ?>>Selesai Dicacah</option>
                                                <option value="2" <?php if ($blok1[0]->hasil == 2) echo 'selected = "Selected"'; ?>>Tidak Bersedia Dicacah</option>

                                            </select>

                                        <?php else : ?>
                                            <select disabled class="form-control mr-2" id="hasil" name="hasil" ?>>
                                                <option value="1">Selesai Dicacah</option>
                                                <option value="2">Tidak Bersedia Dicacah</option>

                                            </select>
                                        <?php endif; ?>
                                    </div>


                                </div>
                                <!-- /.card-body -->

                                <div class="card-footer">
                                    <?php if (isset($blok1)) : ?>
                                        <button type="submit" class=" float-right btn btn-primary">Ubah Data</button>
                                    <?php else : ?>
                                        <button style="display: none;" type="submit" class=" float-right btn sblok2 btn-primary">Simpan</button>
                                    <?php endif; ?>
                                </div>
                                </form>
                    </div>
                </div>
                <?php if (isset($blok1) && ($blok1[0]->hasil == 1)) : ?>
                    <div class="col-md-4 hslcacah">
                        <!-- general form elements -->
                        <div class="card card-primary">
                            <div class="card-header">
                                <h3 class="card-title">BLOK III - KETERANGAN PERUMAHAN</h3>
                            </div>

                            <form method="post" action="<?= base_url() ?>kelola_ruta_kk/blok3/<?= $blok1[0]->id ?>">
                                         <input type="hidden" id="id3" name="id" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->id ?>">
                                            <input type="hidden" id="buah" name="buah" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->buah ?>">
                                <div class="card-body">
                                    <div class="form-group status3">
                                        <label for="status">1a. Status Penguasaan Bangunan Tempat Tinggal yang Ditempati</label>
                                        <?php if (isset($blok1)) : ?>
                                           
                                            <input type="text" maxlength="1" class="form-control" name="status" placeholder="Status Penguasaan Bangunan" id="status3" onkeypress="return event.charCode >= 49 && event.charCode <=53" value="<?= $blok1[0]->status1 ?>">
                                        <?php else : ?>
                                            <input disabled type=" text" maxlength="1" class="form-control" name="status" placeholder="Status Penguasaan Bangunan" id="status3" onkeypress="return event.charCode >= 49 && event.charCode <=53">
                                        <?php endif; ?>
                                        <?= form_error('status', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group status2">
                                        <label for="status">1b. Status Lahan Tempat Tinggal yang Ditempat</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" id="status2" name="status2" placeholder="Status Lahan" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=52" value="<?= $blok1[0]->status2 ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" id="status2" name="status2" placeholder="Status Lahan" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=52">
                                        <?php endif; ?>
                                        <?= form_error('status2', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="luas">2.Luas Lantai</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" id="luas" name="luas" maxlength="3" placeholder="Luas Lantai" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $blok1[0]->luas ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" id="luas" name="luas" maxlength="3" placeholder="Luas Lantai" onkeypress="return event.charCode >= 48 && event.charCode <=52">
                                        <?php endif; ?>
                                        <?= form_error('luas', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="jenis">3. Jenis Lantai Terluas</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="jenis" id="jenis" placeholder="Jenis Lantai Terluas" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $blok1[0]->jenis ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="jenis" id="jenis" placeholder="Jenis Lantai Terluas" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58 ">
                                        <?php endif; ?>
                                        <?= form_error('jenis', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>

                                    <div class="form-group">
                                        <label for="jenisdinding">4a. Jenis Dinding Terluas</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="jenisdinding" id="jenisdinding" placeholder="Jenis Dinding Terluas" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=54" value="<?= $blok1[0]->jenisdinding ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="jenisdinding" id="jenisdinding" placeholder="Jenis Dinding Terluas" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=54">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group kondisi">
                                        <label for="kondisidinding">4b. Kondisi Dinding</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="kondisidinding" id="kondisidinding" placeholder="Kondisi Dinding" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $blok1[0]->kondisidinding ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" id="kondisidinding" placeholder="Kondisi Dinding" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="jenisatap">5a. Jenis Atap Terluas</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="jenisatap" id="jenisatap" placeholder="Jenis Atap Terluas" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58 && event" value="<?= $blok1[0]->jenisatap ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="jenisatap" id="jenisatap" placeholder="Jenis Atap Terluas" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58 && event">
                                        <?php endif; ?>
                                        <?= form_error('jenisatap', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group kondisi2">
                                        <label for="kondisiatap">5b. Kondisi Atap</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="kondisiatap" id="kondisiatap" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $blok1[0]->kondisiatap ?>">
                                        <?php else : ?>
                                            <input type="text" class="form-control" name="kondisiatap" id="kondisiatap" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="jumkamar">6. Jumlah Kamar Tidur</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="jumkamar" id="jumkamar" placeholder="Jumlah Kamar Tidur" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=58" value="<?= $blok1[0]->jumkamar ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="jumkamar" id="jumkamar" placeholder="Jumlah Kamar Tidur" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=58">
                                        <?php endif; ?>
                                        <?= form_error('jumkamar', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="sumberair">7. Sumber Air Minum</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="sumberair" id="sumberair" placeholder="Sumber Air Minum" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $blok1[0]->sumberair ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="sumberair" id="sumberair" placeholder="Sumber Air Minum" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58 && event">
                                        <?php endif; ?>
                                        <?= form_error('sumberair', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="caraair">8. Cara Memperoleh Air Minum</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="caraair" id="caraair" placeholder="Cara Memperoleh Air Minum" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=51" value="<?= $blok1[0]->caraair ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="caraair" id="caraair" placeholder="Cara Memperoleh Air Minum" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=51">
                                        <?php endif; ?>
                                        <?= form_error('caraair', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="sumberpen">9a. Sumber Penerangan Utama</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="sumberpen" id="sumberpen" placeholder="Sumber Penerangan Utama" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=51" value="<?= $blok1[0]->sumberpen ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="sumberpen" id="sumberpen" placeholder="Sumber Penerangan Utama" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=51">
                                        <?php endif; ?>
                                        <?= form_error('sumberpen', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group dya">
                                        <label for="daya">9b. Daya Terpasang</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="daya" id="daya" placeholder="Daya Terpasang" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=54" value="<?= $blok1[0]->daya ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="daya" id="daya" placeholder="Daya Terpasang" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=54">
                                        <?php endif; ?>
                                        <?= form_error('daya', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="nokk">10. Bahan bakar/energi utama untuk memasak</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="bahan" id="bahan" placeholder=" Bahan bakar/energi utama untuk memasak" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=57" value="<?= $blok1[0]->bahan ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="bahan" id="bahan" placeholder=" Bahan bakar/energi utama untuk memasak" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=57">
                                        <?php endif; ?>
                                        <?= form_error('bahan', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="pengguna">11a. Penggunaan fasilitas tempat buang air besar</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="pengguna" id="pengguna" placeholder="pengguna Terpasang" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52" value="<?= $blok1[0]->pengguna ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="pengguna" id="pengguna" placeholder="pengguna Terpasang" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52">
                                        <?php endif; ?>
                                        <?= form_error('pengguna', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group jnsklst">
                                        <label for="jeniskloset">11b. Jenis Kloset</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="jeniskloset" id="jeniskloset" placeholder="Jenis Kloset" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52" value="<?= $blok1[0]->jeniskloset ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="jeniskloset" id="jeniskloset" placeholder="Jenis Kloset" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52">
                                        <?php endif; ?>
                                        <?= form_error('jeniskloset', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label for="tempatpembuangan">12. Tempat Pembuangan Akhir Tinja</label>
                                        <?php if (isset($blok1)) : ?>
                                            <input type="text" class="form-control" name="tempatpembuangan" id="tempatpembuangan" placeholder="Tempat Pembuangan Akhir Tinja" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=54" value="<?= $blok1[0]->tempatpembuangan ?>">
                                        <?php else : ?>
                                            <input disabled type="text" class="form-control" name="tempatpembuangan" id="tempatpembuangan" placeholder="Tempat Pembuangan Akhir Tinja" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=54">
                                        <?php endif; ?>
                                        <?= form_error('tempatpembuangan', '<small class ="text-danger pl-3">', '</small>'); ?>
                                    </div>

                                </div>
                                <!-- /.card-body -->

                                <div class="card-footer">
                                    <?php if (isset($blok1)) : ?>
                                        <button type="submit" class="float-right btn te11 btn-primary">Ubah Data</button>
                                    <?php else : ?>
                                        <button style="display: none;" type="submit" class=" float-right btn te11 btn-primary">Submit</button>
                                    <?php endif; ?>
                                </div>
                            </form>
                        </div>
                    </div>
                <?php endif; ?>

            </div>



            <!-- <?php if (isset($blok1) && ($blok1[0]->hasil == 1)) : ?> -->

            <div class="row">
                <div class="col-12 mb-2">
                    <a href="<?= base_url() ?>kelola_ruta_kk" class="btn btn-secondary">Kembali</a>
                    <a href="<?= base_url() ?>kelola_ruta_kk/blok45/<?= $blok1[0]->id ?>" class="btn btn-success next float-right">Selanjutnya</a>
                </div>
            </div>
            <!-- <?php endif; ?> -->
        </div><!-- /.container-fluid -->
    </section>
    <?php
    if (isset($_SESSION['informasi'])) {
        echo $_SESSION['informasi'];
        unset($_SESSION['informasi']);
    }
    ?>
    <?php
    if (isset($_SESSION['error'])) {
        echo $_SESSION['error'];
        unset($_SESSION['error']);
    }
    ?>

    <!-- /.content -->
</div>