<div class="content-wrapper">
    <input type="hidden" id="lahan1" name="lahan1" class="form-control col-md-7 col-xs-12" value="<?= $countlahan[0]->lahan ?>">
    <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>UBAH DATA 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">UBAH 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 VI - SERTIFIKAT TANAH</h3>
                        <div class="card-header p-2">
                            <ul class="nav nav-pills">
                                <?php $no = 1 ?>
                                <?php $te = 1 ?>
                                <?php foreach ($lahan as $u) {
                                    $k = $te++
                                ?>
                                    <?php if ($k == 1) : ?>
                                        <li class="nav-item"><a class=" active nav-link" href="#activity<?= $k ?>" data-toggle="tab">Lahan ke <?= $k ?></a></li>
                                    <?php else : ?>
                                        <li class="nav-item"><a class="nav-link" href="#activity<?= $k ?>" data-toggle="tab">Lahan 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 ($lahan 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 ?>
                                            <div class="col-md-12">
                                                <!-- general form elements -->
                                                <div class="card card-primary">
                                                    <div class="card-header">
                                                        <h3 class="card-title">BLOK VI - SERTIFIKAT TANAH</h3>
                                                        <h6 class="float-right">LAHAN ke-<?= $no++ ?></h6>
                                                    </div>

                                                    <form method="post" action="<?= base_url() ?>kelola_ruta_kk/ubahblok6/<?= $u->id_kk_fgn ?>">
                                                        <div class="card-body">
                                                            <div class="row">
                                                                <div class="col-md-3">
                                                                    <label for="namalhn">Nama Lahan</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_lahan ?>">
                                                                        <input type="hidden" id="nokk" name="nokk" class="form-control col-md-7 col-xs-12" value="<?= $blok1[0]->nokk ?>">
                                                                        <input type="hidden" id="id_kk_fgn" name="id_kk_fgn" class="form-control col-md-7 col-xs-12" value="<?= $u->id_kk_fgn ?>">
                                                                        <input type="text" class="form-control" id="namalhn" name="namalhn" placeholder="Nama Lahan" value="<?= $u->namalhn ?>">
                                                                        <?= form_error('namalhn', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3">
                                                                    <label for="hub">Jenis Lahan</label>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="hub" id="hub" placeholder="Jenis Lahan" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->hub ?>">
                                                                        <?= form_error('hub', '<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="sppt">Keberadaan SPPT</label>
                                                                </div>
                                                                <div class="col-md-2 sppt2">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="sppt" id="sppt<?= $k ?>" placeholder="Keberadaan SPPT" maxlength="1" onkeypress="return event.charCode >= 49 && event.charCode <=50" value="<?= $u->sppt ?>">
                                                                        <?= form_error('sppt', '<small class ="text-danger pl-3">', '</small>'); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3 spt<?= $k ?>">
                                                                    <label for="nopajak">Nomor Objek Pajak</label>
                                                                </div>
                                                                <div class="col-md-4 spt<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="nopajak" id="nopajak<?= $k ?>" placeholder="Nomor Objek Pajak" maxlength="17" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->nopajak ?>">
                                                                        <!-- <?= form_error('nopajak', '<small class ="text-danger pl-3">', '</small>'); ?> -->
                                                                    </div>
                                                                </div>

                                                                <div class="col-md-3 spt<?= $k ?>">
                                                                    <label for="llahan">Luas Lahan</label>
                                                                </div>
                                                                <div class="col-md-2 spt<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="llahan" id="llahan<?= $k ?>" placeholder="Luas Lahan" maxlength="9" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->llhan ?>">
                                                                        <!-- <?= form_error('llahan', '<small class ="text-danger pl-3">', '</small>'); ?> -->
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3 spt<?= $k ?>">
                                                                    <label for="haksertif">Hak Kepemilikan Setifikat</label>
                                                                </div>
                                                                <div class="col-md-2 spt<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="haksertif" id="haksertif<?= $k ?>" placeholder="Hak Kepemilikan Sertifikat" maxlength="1" onkeypress="return event.charCode >= 48 && event.charCode <=58" value="<?= $u->haksertif ?>">
                                                                        <!-- <?= form_error('haksertif', '<small class ="text-danger pl-3">', '</small>'); ?> -->
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2 spt<?= $k ?>" style="visibility: hidden;"> </div>
                                                                <div class="col-md-3 nmshm<?= $k ?>">
                                                                    <label for="nmhak">Nama Hak Milik</label>
                                                                </div>
                                                                <div class="col-md-2  nmshm<?= $k ?>">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" placeholder="Nama Hak Milik" name="nmhak" id="nmhak<?= $k ?>" value="<?= $u->nmhak ?>">
                                                                        <!-- <?= form_error('nmhak', '<small class ="text-danger pl-3">', '</small>'); ?> -->
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <!-- /.card-body -->
                                                        <div class="card-footer">
                                                            <a href="#activity<?= $k ?>"> <button type="submit" class="float-right btn btn-primary">Simpan</button> </a>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                            </div>
                                        <?php } ?>

                                        <!-- /.tab-pane -->
                                        </div>
                                        <!-- /.tab-content -->
                                        <div class="col-12 mb-2">
                                            <a href="<?= base_url() ?>kelola_ruta_kk/blok45/<?= $blok1[0]->id ?>" class="btn bg-navy">Kembali</a>
                                            <a href="<?= base_url() ?>kelola_ruta_kk/blok7/<?= $blok1[0]->id ?>" class=" float-right btn btn-success">Selanjutnya</a>
                                        </div>
                            </div><!-- /.card-body -->
                        </div>
                        <!-- /.card -->
                    </div>

                </div>

            </div>


    </section>

    <!-- /.content -->
    <?php
    if (isset($_SESSION['informasi2'])) {
        echo $_SESSION['informasi2'];
        unset($_SESSION['informasi2']);
    }
    ?>
    <?php
    if (isset($_SESSION['error1'])) {
        echo $_SESSION['error1'];
        unset($_SESSION['error1']);
    }
    ?>
</div>