<div class="content-wrapper">
    <input type="hidden" id="agt1" name="agt1" class="form-control col-md-7 col-xs-12" value="<?= $countagt[0]->agt ?>">
    <input type="hidden" id="idut" name="idut" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->id ?>">

    <!-- 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">
                <div class="col-12">
                    <div class="card">
                        <h3 class="card-title text-center mt-3" style="color: crimson;">BLOK VII - KETERANGAN SOSIAL EKONOMI ANGGOTA KELUARGA</h3>
                        <div class="card-header p-2">
                            <ul class="nav nav-pills">
                                <?php $no = 1 ?>
                                <?php $te = 1 ?>
                                <?php foreach ($agt as $u) {
                                    $k = $te++
                                ?>
                                    <?php if ($k == 1) : ?>
                                        <li class="nav-item"><a class=" active nav-link" href="#activity<?= $k ?>" data-toggle="tab">Ruta ke <?= $k ?></a></li>
                                    <?php else : ?>
                                        <li class="nav-item"><a class="nav-link" href="#activity<?= $k ?>" data-toggle="tab">Ruta ke <?= $k ?></a></li>
                                    <?php endif ?>
                                    <!-- <li class="nav-item"><a class="nav-link" href="#timeline" data-toggle="tab">Timeline</a></li>
                                <li class="nav-item"><a class="nav-link" href="#settings" data-toggle="tab">Settings</a></li> -->
                                <?php } ?>
                            </ul>
                        </div><!-- /.card-header -->
                        <div class="card-body">
                            <div class="tab-content">

                                <?php $no = 1 ?>
                                <?php $te = 1 ?>
                                <?php foreach ($agt as $u) {
                                    $k = $te++
                                ?>
                                    <?php if ($k == 1) : ?>
                                        <div class=" active tab-pane" id="activity<?= $k ?>">
                                        <?php else : ?>
                                            <div class="tab-pane" id="activity<?= $k ?>">
                                            <?php endif ?>

                                            <!-- left column -->
                                            <div class="col-md-12">
                                                <!-- general form elements -->
                                                <div class="card card-primary">
                                                    <div class="card-header">
                                                        <h3 class="card-title">BLOK VII - KETERANGAN SOSIAL EKONOMI ANGGOTA KELUARGA</h3>
                                                        <h6 class="float-right">Rumah Tangga Ke-<?= $k ?></h6>
                                                    </div>
                                                    <form method="post" action="<?= base_url() ?>tambah_ruta/ubahblok7/<?= $u->id_agt ?>">
                                                        <div class="card-body">
                                                            <div class="row">
                                                                <div class="col-md-3">
                                                                    <label for="nama">701.Nama</label>
                                                                </div>
                                                                <div class="col-md-9">
                                                                    <div class="form-group">
                                                                        <input type="hidden" id="id" name="id" class="form-control col-md-7 col-xs-12" value="<?= $u->id_pm_agt ?>">
                                                                        <input type="hidden" id="nokk" name="nokk" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->nokk ?>">
                                                                        <input type="text" class="form-control" id="nama" name="nama" placeholder="Nama" value="<?= $u->nama ?>">
                                                                        <?= form_error('nama', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3">
                                                                    <label for="nik">702.NIK</label>
                                                                </div>
                                                                <div class="col-md-9">
                                                                    <div class="form-group">
                                                                        <input type="text" min="0" maxlength="16" minlength="16" class="form-control" name="nik" id="nik" placeholder="NIK" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->nik ?>">
                                                                        <?= form_error('nik', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3 ">
                                                                    <label for="suku">703.Suku</label>
                                                                </div>
                                                                <div class="col-md-2 ">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="suku" id="suku" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=58" value="<?= $u->suku ?>">
                                                                        <?= form_error('suku', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2" style="visibility: hidden;"></div>
                                                                <div class="col-md-3 ">
                                                                    <label for="dmsl">704.Domisili</label>
                                                                </div>
                                                                <div class="col-md-2 ">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="dmsl" id="dmsl" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=51" value="<?= $u->dmsl ?>">
                                                                        <?= form_error('dmsl', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3">
                                                                    <label for="hubkel">705.Hubungan dengan Kepala Keluarga</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="hubkel" id="hubkel" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=57" value="<?= $u->hubkel ?>">
                                                                        <?= form_error('hubkel', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2" style="visibility: hidden;">

                                                                </div>
                                                                <div class="col-md-3">
                                                                    <label for="jk">706.Jenis Kelamin</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="jk" id="jk" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->jk ?>">
                                                                        <?= form_error('jk', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3">
                                                                    <label for="kk">707.Tercantum dalam KK di Keluarga ini</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="kk" id="kk" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52" value="<?= $u->kk ?>">
                                                                        <?= form_error('kk', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2" style="visibility: hidden;"></div>
                                                                <div class="col-md-3">
                                                                    <label for="umur">Umur</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="umur" id="umur<?= $k ?>" maxlength="3" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->umur ?>">
                                                                    </div>
                                                                </div>


                                                                <div class="col-md-3">
                                                                    <label for="sts">709.Status Perkawinan</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="sts" id="sts<?= $k ?>" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52" value="<?= $u->sts ?>">
                                                                        <?= form_error('sts', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>


                                                                <div class="col-md-2" style="visibility: hidden;"></div>

                                                                <div class="col-md-3">
                                                                    <label for="ki">710.Kepemilikan Kartu Identitas</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="ki" id="ki" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->ki ?>">
                                                                        <?= form_error('ki', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-12 wnt<?= $k ?> text-center mt-2">
                                                                    <label style="color: red;">UNTUK WANITA 10-49 TAHUN KOL (6) = 2</label>
                                                                </div>
                                                                <div class="col-md-3 wnt<?= $k ?>">
                                                                    <label for="hamil">Status Kehamilan</label>
                                                                </div>
                                                                <div class="col-md-2 wnt<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="hamil" id="hamil" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->hamil ?>">
                                                                        <?= form_error('hamil', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2 wnt<?= $k ?>" style="visibility: hidden;"> </div>
                                                                <div class="col-md-3 wnt<?= $k ?>">
                                                                    <label for="kb">Alat KB</label>
                                                                </div>
                                                                <div class="col-md-2 wnt<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="kb" id="kb" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->kb ?>">
                                                                        <?= form_error('kb', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>

                                                                <div class="col-md-7" style="visibility: hidden;"> </div>
                                                                <div class="col-md-12 5thnn<?= $k ?>  text-center mt-3">
                                                                    <label style="color: red;">UNTUK ANGGOTA KELUARGA 5 TAHUN KE ATAS</label>
                                                                </div>
                                                                <div class="col-md-3 5thnn<?= $k ?>">
                                                                    <label for="sekolah">Partisipasi Sekolah</label>
                                                                </div>
                                                                <div class="col-md-2 5thnn<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="sekolah" id="sekolah<?= $k ?>" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=50" value="<?= $u->sekolah ?>">
                                                                        <?= form_error('sekolah', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-10 5thn<?= $k ?>">
                                                                    <label for="pend">Jenjang dan Jenis Pendidikan tertinggi yang pernah/sedang diduduki</label>
                                                                </div>
                                                                <div class="col-md-2 5thn<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="pend" id="pend" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->pend ?>">
                                                                        <?= form_error('pend', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-10 5thn<?= $k ?>">
                                                                    <label for="kelas">Kelas Tertinggi yang Pernah/sedang diduduki</label>
                                                                </div>
                                                                <div class="col-md-2 5thn<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="kelas" id="kelas" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->kelas ?>">
                                                                        <?= form_error('kelas', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-10 5thn<?= $k ?>">
                                                                    <label for="ijazah">Ijazah tertinggi yang Dimiliki</label>
                                                                </div>
                                                                <div class="col-md-2 5thn<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="ijazah" id="ijazah" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->ijazah ?>">
                                                                        <?= form_error('ijazah', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-12  text-center ">
                                                                    <label style="color: dimgray;">Ketenagakerjaan</label>
                                                                </div>
                                                                <!-- <div class="col-md-3 ">
                                                                    <label for="pensi">Pensiunan</label>
                                                                </div> -->
                                                                <!-- <div class="col-md-2 ">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="pensi" id="pensi" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->pensi ?>">
                                                                        <?= form_error('pensi', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div> -->
                                                                <!-- <div class="col-md-2  " style="visibility: hidden;"> </div> -->
                                                                <div class="col-md-10  ">
                                                                    <label for="kerja">Bekerja / Membantu Bekerja</label>
                                                                </div>
                                                                <div class="col-md-2 ">
                                                                    <div class=" form-group">
                                                                        <input type="text" class="form-control" name="kerja" id="kerja<?= $k ?>" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->kerja ?>">
                                                                        <?= form_error('kerja', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3 krja<?= $k ?>">
                                                                    <label for="lapangan">Lapangan Usaha dari Pekerjaan Utama</label>
                                                                </div>
                                                                <div class="col-md-2 krja<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="lapangan" id="lapangan" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->lapangan ?>">
                                                                        <?= form_error('lapangan', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2 krja<?= $k ?>" style="visibility: hidden;"> </div>
                                                                <div class="col-md-3 krja<?= $k ?>">
                                                                    <label for="statkerja">Status Kedudukan dalam Bekerja</label>
                                                                </div>
                                                                <div class="col-md-2 krja<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="statkerja" id="statkerja<?= $k ?>" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=57" value="<?= $u->statkerja ?>">
                                                                        <?= form_error('statkerja', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <!-- <div class="col-md-3 jp<?= $k ?>">
                                                                    <label for="jumpkerja">Jumlah Pekerja</label>
                                                                </div>
                                                                <div class="col-md-2 jp<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="jumpkerja" id="jumpkerja" maxlength="3" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->jumpkerja ?>">
                                                                        <?= form_error('jumpkerja', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2 jp<?= $k ?>" style="visibility: hidden;"> </div>
                                                                <div class="col-md-3 jp<?= $k ?>">
                                                                    <label for="tmptlokasi">Tempat Lokasi/ Usaha</label>
                                                                </div>
                                                                <div class="col-md-2 jp<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="tmptlokasi" id="tmptlokasi" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->tmptlokasi ?>">
                                                                        <?= form_error('tmptlokasi', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2 k<?= $k ?>" style="visibility: hidden;"> </div>

                                                                <div class="col-md-3 jp<?= $k ?>">
                                                                    <label for="omsetusaha">Omset Usaha Perbulan</label>
                                                                </div>
                                                                <div class="col-md-2 jp<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="omsetusaha" id="omsetusaha" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=52" value="<?= $u->omsetusaha ?>">
                                                                        <?= form_error('omsetusaha', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div> -->
                                                                <div class="col-md-7 " style="visibility: hidden;"> </div>
                                                                <div class="col-md-12  text-center ">
                                                                    <label style="color: orangered;">= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</label>
                                                                </div>
                                                                <!-- <div class="col-md-3 ">
                                                                    <label for="agm">Agama</label>
                                                                </div>
                                                                <div class="col-md-2 ">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="agm" id="agm" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=56" value="<?= $u->agm ?>">
                                                                        <?= form_error('agm', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2 " style="visibility: hidden;"> </div>

                                                                <div class="col-md-2 " style="visibility: hidden;"> </div> -->
                                                                <div class="col-md-10 ">
                                                                    <label for="bansos">Program Bansos</label>
                                                                </div>
                                                                <div class="col-md-2 ">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="bansos" id="bansos" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->bansos ?>">
                                                                        <?= form_error('bansos', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-12  text-center ">
                                                                    <label style="color: orangered;">= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = </label>
                                                                </div>
                                                                <div class="col-md-3">
                                                                    <label for="jc">Apakah mengalami kesulitan/gangguan</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="jc" id="jc" maxlength="2" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->jc ?>">
                                                                        <?= form_error('jc', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2" style="visibility: hidden;"> </div>
                                                                <div class="col-md-3">
                                                                    <label for="kronis">Apakah Mengalami Penyakit Kronis/ Menahun</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="kronis" id="kronis" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->kronis ?>">
                                                                        <?= form_error('kronis', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <!-- <div class="col-md-3">
                                                                    <label for="goldar">Golongan Darah</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="goldar" id="goldar" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->goldar ?>">
                                                                        <?= form_error('goldar', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div> -->
                                                            </div>

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

                                                        <div class="card-footer">
                                                            <button type="submit" class="btn btn-primary">Simpan</button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>

                                            </div>
                                        <?php } ?>

                                        <!-- /.tab-pane -->
                                        </div>
                                        <!-- /.tab-content -->
                                        <div class="col-12 mb-2">
                                            <?php if ($blok1[0]->lhn == 2 || $blok1[0]->lhn == null) : ?>
                                                <a href="<?= base_url() ?>tambah_ruta/blok45/<?= $blok1[0]->id ?>" class="btn bg-navy">Kembali</a>
                                            <?php else : ?>
                                                <a href="<?= base_url() ?>tambah_ruta/blok6/<?= $blok1[0]->id ?>" class="btn bg-navy">Kembali</a>
                                            <?php endif; ?>
                                            <a href="<?= base_url() ?>tambah_ruta/blok8/<?= $blok1[0]->id ?>" class=" float-right btn btn-success">Selanjutnya</a>
                                        </div>
                            </div><!-- /.card-body -->
                        </div>
                        <!-- /.card -->
                    </div>

                </div>

            </div>


    </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>