<div id="content" class="main-content">
    <div class="layout-px-spacing">
        <?= $this->session->flashdata('pesan_berhasil'); ?>
        <?= $this->session->flashdata('pesan_gagal'); ?>
        <div class="row layout-top-spacing">
            <div class="col-lg-12">
                <blockquote class="blockquote media-object">
                    <div class="media">
                        <div class="media-body align-self-center">
                            <p class="d-inline">
                                Aktifitas Arisan Heboh
                            </p>
                        </div>
                    </div>
                    <small class="text-left"><cite title="Source Title"><?= $this->mycustom->hariIndo(date('l', strtotime(date('Y-m-d')))) ?>,
                            <?= date('d', strtotime(date('Y-m-d')))  ?>
                            <?= $this->mycustom->bulanIndo(date('m', strtotime(date('Y-m-d'))))  ?>
                            <?= date('Y', strtotime(date('Y-m-d')))  ?></cite></small>
                </blockquote>
            </div>
        </div>
        <div class="row layout-spacing">
            <div class="col-lg-12">
                <div class="statbox widget box box-shadow">
                    <div class="widget-content widget-content-area">
                        <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">Anggota</th>
                                    <th class="text-center">Detail</th>
                                    <th class="text-center">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $no = 1; ?>
                                <?php foreach ($arisan_aktif as $Arisan_aktif) : ?>
                                    <?php if ($Arisan_aktif->produk_id == 21) : ?>
                                        <tr>
                                            <td>
                                                <center><?= $no ?></center>
                                            </td>
                                            <td class="text-left">
                                                Arisan Heboh Kelompok
                                                <?= $Arisan_aktif->nm_kelompok ?><br>
                                                Registrasi : <?= $Arisan_aktif->regist_arisan ?><br>
                                                Iuran/Tempo : Rp <?= $Arisan_aktif->tagihan_iuran ?> ,- /
                                                <?= $Arisan_aktif->tempo ?> Bulan
                                            </td>
                                            <td class="text-left">
                                                Aktif : <?php
                                                        foreach ($anggota_aktif as $Anggota_aktif) :
                                                            if ($Arisan_aktif->regist_arisan == $Anggota_aktif->regist_arisan) :
                                                                $total = $Anggota_aktif->anggota_aktif;
                                                                echo $total . ' Anggota';
                                                            endif;
                                                        endforeach;
                                                        ?> <br>
                                                Menang : <?php
                                                            foreach ($anggota_menang as $Anggota_menang) :
                                                                if ($Arisan_aktif->regist_arisan == $Anggota_menang->regist_arisan) :
                                                                    $total = $Anggota_menang->anggota_menang;
                                                                    echo $total . ' Anggota';
                                                                endif;
                                                            endforeach;
                                                            ?> <br>
                                                Mundur : <?php
                                                            foreach ($anggota_mundur as $Anggota_mundur) :
                                                                if ($Arisan_aktif->regist_arisan == $Anggota_mundur->regist_arisan) :
                                                                    $total = $Anggota_mundur->anggota_mundur;
                                                                    echo $total . ' Anggota';
                                                                endif;
                                                            endforeach;
                                                            ?><br>
                                            </td>
                                            <td class="text-left">
                                                Fee Admin : Rp <?= $Arisan_aktif->admin_arisan ?> ,-<br>
                                                Potongan Awal : Rp <?= $Arisan_aktif->hg_standar ?> ,-<br>
                                                Saldo Anggota : Rp <?= $Arisan_aktif->hg_target ?> ,-<br>
                                            </td>
                                            <td class="text-center">
                                                <div class="btn-group mr-2">
                                                    <button class="btn btn-primary btn-sm dropdown-toggle" style="width: 100px;" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                        Pilih Aksi <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>
                                                    </button>
                                                    <div class="dropdown-menu">
                                                        <a class="dropdown-item" href="<?= base_url('arisan/aktifitas/jadwal/kelompok/' . $this->encrypt->encode($Arisan_aktif->regist_arisan)) ?>">Jadwal</a>
                                                        <a class="dropdown-item" href="<?= base_url('arisan/aktifitas/tagihan/kelompok/' . $this->encrypt->encode($Arisan_aktif->regist_arisan . $Arisan_aktif->jadwal_id)) ?>">Tagihan</a>
                                                        <a class="dropdown-item" href="<?= base_url('arisan/aktifitas/undian/proses/' . $this->encrypt->encode($Arisan_aktif->regist_arisan)) ?>">Undian</a>
                                                        <a class="dropdown-item" href="<?= base_url('arisan/aktifitas/laporan/arisan_heboh/kelompok/' . $this->encrypt->encode($Arisan_aktif->regist_arisan)) ?>">Laporan</a>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <?php $no++; ?>
                                    <?php endif; ?>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>