<div id="content" class="main-content">
    <div class="container">
        <div class="container">
            <div class="row layout-top-spacing">
                <div class="col-lg-12 col-12 layout-spacing">
                    <div class="statbox widget box box-shadow">
                        <div class="widget-header">
                            <div class="row">
                                <div class="col-xl-12 col-md-12 col-sm-12 col-12">
                                    <h2>Identitas Anggota</h2>
                                </div>
                            </div>
                        </div>
                        <div class="widget-content widget-content-area simple-pills">
                            <ul class="nav nav-pills mb-3 mt-3" id="pills-tab" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" id="identitas_tabs" data-toggle="pill" href="#tabs_identitas" role="tab" aria-controls="tabs_identitas" aria-selected="true">Identitas</a>
                                </li>
                                <li class="nav-item dropdown">
                                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Aktif (
                                        <?= $jml_produk['jml_produk'] ?> ) <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
                                            <polyline points="6 9 12 15 18 9"></polyline>
                                        </svg></a>
                                    <div class="dropdown-menu">
                                        <a class="dropdown-item" id="ksp_produk_aktif" data-toggle="tab" href="#produk_ksp_aktif" role="tab" aria-controls="produk_ksp_aktif" aria-selected="false">Koperasi ( 0
                                            )</a>
                                        <a class="dropdown-item" id="heboh_arisan_aktif" data-toggle="tab" href="#arisan_heboh_aktif" role="tab" aria-controls="arisan_heboh_aktif" aria-selected="false">Arisan Heboh (
                                            <?= $jml_arisan_heboh['jml_arisanheboh'] ?> )</a>
                                        <a class="dropdown-item" id="motor_arisan_aktif" data-toggle="tab" href="#arisan_motor_aktif" role="tab" aria-controls="arisan_motor_aktif" aria-selected="false">Arisan Motor (
                                            <?= $jml_arisan_motor['jml_arisanmotor'] ?> )</a>
                                    </div>
                                </li>
                                <li class="nav-item dropdown">
                                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Histori (
                                        <?= $jml_produk_pasif['jml_produk'] ?> ) <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
                                            <polyline points="6 9 12 15 18 9"></polyline>
                                        </svg></a>
                                    <div class="dropdown-menu">
                                        <a class="dropdown-item" id="ksp_produk_pasif" data-toggle="tab" href="#produk_ksp_pasif" role="tab" aria-controls="produk_ksp_pasif" aria-selected="false">Koperasi ( 0
                                            )</a>
                                        <a class="dropdown-item" id="heboh_arisan_pasif" data-toggle="tab" href="#arisan_heboh_pasif" role="tab" aria-controls="arisan_heboh_pasif" aria-selected="false">Arisan Heboh (
                                            <?= $jml_arisanheboh_pasif['jml_arisanheboh'] ?> )</a>
                                        <a class="dropdown-item" id="motor_arisan_pasif" data-toggle="tab" href="#arisan_motor_pasif" role="tab" aria-controls="arisan_motor_pasif" aria-selected="false">Arisan Motor (
                                            <?= $jml_arisanmotor_pasif['jml_arisanmotor'] ?> )</a>
                                    </div>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact" role="tab" aria-controls="pills-contact" aria-selected="false">Kontak</a>
                                </li>
                            </ul>
                            <div class="tab-content" id="pills-tabContent">
                                <div class="tab-pane fade show active" id="tabs_identitas" role="tabpanel" aria-labelledby="identitas_tabs">
                                    <p class="mb-4">
                                        <center>
                                            <img src="<?= base_url() ?>assets/foto_ktp/<?= $data_anggota['foto_ktp'] ?>" style="height: 160px;">
                                        </center>
                                    </p>
                                    <div class="modal-body">
                                        <?php echo form_open_multipart('arisan/data/kelompok_heboh/crud'); ?>
                                        <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                                        <div class="form-group">
                                            <label>Nomor Induk Kependudukan ( NIK )</label>
                                            <input type="number" class="form-control" readonly value="<?= $data_anggota['nik'] ?>" id="nik" name="nik" placeholder="Nomor Induk Kependudukan ( NIK )" required>
                                        </div>
                                        <div class="form-group">
                                            <label>Nama Panggilan</label>
                                            <input type="text" class="form-control" value="<?= $data_anggota['nm_anggota'] ?>" id="nm_anggota" name="nm_anggota" placeholder="Nama Anggota Kelompok Arisan" required>
                                        </div>
                                        <div class="form-group">
                                            <label>Jenis Kelamin</label>
                                            <select class="form-control" id="jk" name="jk" required>
                                                <option value="<?= $data_anggota['jk'] ?>">
                                                    <?php if ($data_anggota['jk'] == 1) :
                                                        echo 'LAKI-LAKI';
                                                    else :
                                                        echo 'PEREMPUAN';
                                                    endif;
                                                    # code...
                                                    ?>
                                                </option>
                                                <option value="1">LAKI-LAKI</option>
                                                <option value="2">PEREMPUAN</option>
                                            </select>
                                        </div>
                                        <div class="form-group">
                                            <label>Alamat Lengkap</label>
                                            <textarea class="form-control" name="alamat_lengkap" id="alamat_lengkap" cols="30" rows="2" placeholder="Mis. Jalan, Sekolah, Perumahan, Dst" required><?= $data_anggota['alamat_lengkap'] ?></textarea>
                                        </div>
                                        <div class="form-row mb-4">
                                            <div class="col-6">
                                                <label for="">Kode Pos</label>
                                                <input type="number" value="<?= $data_anggota['kd_pos'] ?>" class="form-control" placeholder="Kode Pos" id="kode_pos" name="kode_pos" required>
                                            </div>
                                            <div class="col">
                                                <label for="">No RT</label>
                                                <select class="form-control" id="nm_rt" name="nm_rt" required>
                                                    <option value="<?= $data_anggota['nm_rt'] ?>">
                                                        <?= $data_anggota['nm_rt'] ?></option>
                                                    <option value="001">001</option>
                                                    <option value="002">002</option>
                                                    <option value="003">003</option>
                                                    <option value="004">004</option>
                                                    <option value="005">005</option>
                                                    <option value="006">006</option>
                                                    <option value="007">007</option>
                                                    <option value="008">008</option>
                                                    <option value="009">009</option>
                                                    <option value="010">010</option>
                                                    <option value="011">011</option>
                                                    <option value="012">012</option>
                                                    <option value="013">013</option>
                                                    <option value="014">014</option>
                                                    <option value="015">015</option>
                                                    <option value="016">016</option>
                                                    <option value="017">017</option>
                                                    <option value="018">018</option>
                                                    <option value="019">019</option>
                                                    <option value="020">020</option>
                                                </select>
                                            </div>
                                            <div class="col">
                                                <label for="">No RW</label>
                                                <select class="form-control" id="nm_rw" name="nm_rw" required>
                                                    <option value="<?= $data_anggota['nm_rw'] ?>">
                                                        <?= $data_anggota['nm_rw'] ?></option>
                                                    <option value="001">001</option>
                                                    <option value="002">002</option>
                                                    <option value="003">003</option>
                                                    <option value="004">004</option>
                                                    <option value="005">005</option>
                                                    <option value="006">006</option>
                                                    <option value="007">007</option>
                                                    <option value="008">008</option>
                                                    <option value="009">009</option>
                                                    <option value="010">010</option>
                                                    <option value="011">011</option>
                                                    <option value="012">012</option>
                                                    <option value="013">013</option>
                                                    <option value="014">014</option>
                                                    <option value="015">015</option>
                                                    <option value="016">016</option>
                                                    <option value="017">017</option>
                                                    <option value="018">018</option>
                                                    <option value="019">019</option>
                                                    <option value="020">020</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label>Tempat Tanggal Lahir</label>
                                            <div class="form-row mb-4">
                                                <div class="col">
                                                    <input type="text" class="form-control" value="<?= $data_anggota['tempat_lahir'] ?>" id="tempat_lahir" name="tempat_lahir" placeholder="Tempat Lahir" required>
                                                </div>
                                                <div class="col">
                                                    <input type="date" value="<?= $data_anggota['tgl_lahir'] ?>" max='<?= date("Y-m-d", strtotime("-18 year")); ?>' class="form-control" id="tgl_lahir" name="tgl_lahir" placeholder="Tanggal Lahir" required>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label>Nomor HP</label>
                                            <input type="number" class="form-control" value="<?= $data_anggota['no_hp'] ?>" id="no_hp" name="no_hp" placeholder="Nomor HP" required>
                                        </div>
                                        <div class="form-group">
                                            <label>Pekerjaan</label>
                                            <input type="text" class="form-control" value="<?= $data_anggota['pekerjaan'] ?>" id="pekerjaan" name="pekerjaan" placeholder="Potongan Admin Setiap Bulan" required>
                                        </div>
                                        <div class="form-group">
                                            <label>Suami / Istri</label>
                                            <input type="text" class="form-control" value="<?= $data_anggota['suami_istri'] ?>" id="suami_istri" name="suami_istri" placeholder="Nama Suami atau Istri" required>
                                            <small>*Jika belum menikah isi Belum Menikah, Duda, Janda</small>
                                        </div>
                                        <div class="form-group">
                                            <label>Foto KTP</label>
                                            <input type="file" class="form-control" value="<?= set_value("foto_ktp") ?>" id="foto_ktp" name="foto_ktp" placeholder="Foto KTP" required>
                                            <input type="text" class="form-control" hidden value="<?= $data_anggota['foto_ktp'] ?>" id="foto_ktp_old" name="foto_ktp_old" placeholder="Nama Suami atau Istri" required>
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="submit" id="updateDataAnggota" name="updateDataAnggota" class="btn btn-primary">Simpan</button>
                                    </div>
                                    <?php echo form_close(); ?>
                                </div>
                                <div class="tab-pane fade" id="produk_ksp_aktif" role="tabpanel" aria-labelledby="ksp_produk_aktif">
                                    <div class="media">
                                        <img class="mr-3" src="assets/img/profile-32.jpg" alt="Generic placeholder image">
                                        <div class="media-body">
                                            Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque
                                            ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus
                                            viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec
                                            lacinia congue felis in faucibus.
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane fade" id="arisan_heboh_aktif" role="tabpanel" aria-labelledby="heboh_arisan_aktif">
                                    <table id="style-3" class="table style-3  table-hover">
                                        <thead>
                                            <tr>
                                                <th class="text-center">No</th>
                                                <th class="text-center">Kelompok</th>
                                                <th class="text-center">Register</th>
                                                <th class="text-center">Tagihan</th>
                                                <th class="text-center">Status</th>
                                                <th class="text-center">Rekomendasi</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php $no = 1; ?>
                                            <?php foreach ($arisanheboh_aktif as $Arisanheboh_aktif) : ?>
                                                <tr>
                                                    <td>
                                                        <center><?= $no ?></center>
                                                    </td>
                                                    <td class="text-left">
                                                        Kelompok : Kelompok <?= $Arisanheboh_aktif->nm_kelompok ?> Arisan
                                                        Heboh <br>
                                                        No Regist : <?= $Arisanheboh_aktif->regist_arisan ?> <br>
                                                        Anggota : <?= $Arisanheboh_aktif->ttl_anggota ?> Anggota <br>
                                                        Tagihan : Rp <?= $Arisanheboh_aktif->tagihan_iuran ?>,-
                                                    </td>
                                                    <td class="text-left">
                                                        No Undian : <?= $Arisanheboh_aktif->no_arisan ?> <br>
                                                        No Resgit : <?= $Arisanheboh_aktif->no_regist ?>
                                                    </td>
                                                    <td>
                                                        NUlll
                                                    </td>
                                                    <td class="text-left">
                                                        <?php
                                                        if ($Arisanheboh_aktif->status == 'PROSES') : ?>
                                                            <span class="shadow-none badge badge-primary"><?= $Arisanheboh_aktif->status_arisan ?></span>
                                                        <?php elseif ($Arisanheboh_aktif->status_arisan == 'AKTIF') : ?>
                                                            <span class="shadow-none badge badge-success"><?= $Arisanheboh_aktif->status_arisan ?></span>
                                                        <?php elseif ($Arisanheboh_aktif->status_arisan == 'SELESAI') : ?>
                                                            <span class="shadow-none badge badge-secondary"><?= $Arisanheboh_aktif->status_arisan ?></span>
                                                        <?php else : ?>
                                                            <span class="shadow-none badge badge-danger"><?= $Arisanheboh_aktif->status_arisan ?></span>
                                                        <?php endif;
                                                        ?>
                                                    </td>
                                                    <td class="text-left">
                                                        <?= $Arisanheboh_aktif->karyawan ?>
                                                    </td>
                                                </tr>
                                                <?php $no++; ?>
                                            <?php endforeach; ?>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="tab-pane fade" id="arisan_motor_aktif" role="tabpanel" aria-labelledby="motor_arisan_aktif">
                                    <p class="">
                                        Duis aute irure dolor in reprehenderit in voluptate velit esse
                                        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
                                        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                                    </p>
                                </div>
                                <div class="tab-pane fade" id="produk_ksp_pasif" role="tabpanel" aria-labelledby="ksp_produk_pasif">
                                    <div class="media">
                                        <img class="mr-3" src="assets/img/profile-32.jpg" alt="Generic placeholder image">
                                        <div class="media-body">
                                            Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque
                                            ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus
                                            viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec
                                            lacinia congue felis in faucibus.
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane fade" id="arisan_heboh_pasif" role="tabpanel" aria-labelledby="heboh_arisan_pasif">
                                    <table id="style-3" class="table style-3  table-hover">
                                        <thead>
                                            <tr>
                                                <th class="text-center">No</th>
                                                <th class="text-center">Kelompok</th>
                                                <th class="text-center">Register</th>
                                                <th class="text-center">Tagihan</th>
                                                <th class="text-center">Status</th>
                                                <th class="text-center">Rekomendasi</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php $no = 1; ?>
                                            <?php foreach ($arisanheboh_pasif as $Arisanheboh_pasif) : ?>
                                                <tr>
                                                    <td>
                                                        <center><?= $no ?></center>
                                                    </td>
                                                    <td class="text-left">
                                                        Kelompok : Kelompok <?= $Arisanheboh_pasif->nm_kelompok ?> Arisan
                                                        Heboh <br>
                                                        No Regist : <?= $Arisanheboh_pasif->regist_arisan ?> <br>
                                                        Anggota : <?= $Arisanheboh_pasif->ttl_anggota ?> Anggota <br>
                                                        Tagihan : Rp <?= $Arisanheboh_pasif->tagihan_iuran ?>,-
                                                    </td>
                                                    <td class="text-left">
                                                        No Undian : <?= $Arisanheboh_pasif->no_arisan ?> <br>
                                                        No Resgit : <?= $Arisanheboh_pasif->no_regist ?>
                                                    </td>
                                                    <td>
                                                        NUlll
                                                    </td>
                                                    <td class="text-left">
                                                        <?php
                                                        if ($Arisanheboh_pasif->status == 'PROSES') : ?>
                                                            <span class="shadow-none badge badge-primary"><?= $Arisanheboh_pasif->status_arisan ?></span>
                                                        <?php elseif ($Arisanheboh_pasif->status_arisan == 'AKTIF') : ?>
                                                            <span class="shadow-none badge badge-success"><?= $Arisanheboh_pasif->status_arisan ?></span>
                                                        <?php elseif ($Arisanheboh_pasif->status_arisan == 'SELESAI') : ?>
                                                            <span class="shadow-none badge badge-secondary"><?= $Arisanheboh_pasif->status_arisan ?></span>
                                                        <?php else : ?>
                                                            <span class="shadow-none badge badge-danger"><?= $Arisanheboh_pasif->status_arisan ?></span>
                                                        <?php endif;
                                                        ?>
                                                    </td>
                                                    <td class="text-left">
                                                        <?= $Arisanheboh_pasif->karyawan ?>
                                                    </td>
                                                </tr>
                                                <?php $no++; ?>
                                            <?php endforeach; ?>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="tab-pane fade" id="arisan_motor_pasif" role="tabpanel" aria-labelledby="motor_arisan_pasif">
                                    <p class="">
                                        Duis aute irure dolor in reprehenderit in voluptate velit esse
                                        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
                                        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                                    </p>
                                </div>
                                <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">
                                    <p class="dropcap  dc-outline-primary">
                                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                                        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                                        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                                        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
                                        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
                                        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>