<!-- // created by : KuduSinau_Hendrik_081275532220 (TERIMAKASIH UNTUK MENDAPATKAN KEBERKAHAN, DENGAN TIDAK MERUBAH NAMA HAK CIPTA, PLAGIAT, DAN TIDAK MEMPERJUALBELIKAN APLIKASI INI, SEMOGA KITA SEMUA MENDAPAT MANFAAT DAN KEBERKAHAN DARI APLIKASI INI)
// created by : KuduSinau_Hendrik_081275532220 (UNTUK MASUKAN DAN SARAN SERTA PENGEMBANGAN BISA MENGHUBUNGI NOMOR) -->

<body class="materialdesign" onload="hide_loading();">
    <div class="loading overlay">
        <div class="lds-spinner">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
    <div class="wrapper-pro">
        <div class="content-inner-all">
            <div class="breadcome-area mg-b-30 small-dn">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="breadcome-list map-mg-t-40-gl shadow-reset">
                                <div class="row">
                                    <div class="col-lg-12">
                                        <font size="4">
                                            <i class="fa fa-user"></i> Selamat Datang <?= $nmUser['nm_user'] . ', <b>Anda</b> Sebagai Super Admin'; ?>
                                        </font>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="breadcome-area des-none mg-b-30">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <div class="breadcome-list map-mg-t-40-gl shadow-reset">
                                <div class="row">
                                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                        <font size="1">
                                            <i class="fa fa-user"></i> Selamat Datang <?= $nmUser['nm_user'] . ', <b>Anda</b> Sebagai Super Admin'; ?>
                                        </font>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="income-order-visit-user-area">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-2">
                            <div class="income-dashone-total income-monthly shadow-reset nt-mg-b-30">
                                <div class="income-title">
                                    <div class="main-income-head">
                                        <h2>Students</h2>
                                        <div class="main-income-phara">
                                            <p>Aktif</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="income-dashone-pro">
                                    <div class="income-rate-total">
                                        <div class="price-adminpro-rate">
                                            <h3><b><span class="counter"><?= $jumlahSiswa; ?></span><span> Siswa</span></b></h3>
                                        </div>
                                        <div class="price-graph">
                                        </div>
                                    </div>
                                    <div class="income-range">
                                        <p></p>
                                        <span class="income-percentange"><i class="fa fa-level-up"></i></span>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-2">
                            <div class="income-dashone-total orders-monthly shadow-reset nt-mg-b-30">
                                <div class="income-title">
                                    <div class="main-income-head">
                                        <h2>GTK</h2>
                                        <div class="main-income-phara order-cl">
                                            <p>Aktif</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="income-dashone-pro">
                                    <div class="income-rate-total">
                                        <div class="price-adminpro-rate">
                                            <h3><b><span class="counter"><?= $jumlahGuru; ?></span><span> GTK</span></b></h3>
                                        </div>
                                        <div class="price-graph">
                                        </div>
                                    </div>
                                    <div class="income-range order-cl">
                                        <p></p>
                                        <span class="income-percentange"><i class="fa fa-level-up"></i></span>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-2">
                            <div class="income-dashone-total visitor-monthly shadow-reset nt-mg-b-30">
                                <div class="income-title">
                                    <div class="main-income-head">
                                        <h2>Rombel</h2>
                                        <div class="main-income-phara visitor-cl">
                                            <p>Aktif</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="income-dashone-pro">
                                    <div class="income-rate-total">
                                        <div class="price-adminpro-rate">
                                            <h3><b><span class="counter"><?= $jumlahRombel; ?></span><span> Rombel</span></b></h3>
                                        </div>
                                        <div class="price-graph">
                                        </div>
                                    </div>
                                    <div class="income-range visitor-cl">
                                        <p></p>
                                        <span class="income-percentange"><i class="fa fa-level-up"></i></span>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-2">
                            <div class="income-dashone-total income-monthly shadow-reset nt-mg-b-30">
                                <div class="income-title">
                                    <div class="main-income-head">
                                        <h2>Alumni</h2>
                                        <div class="main-income-phara">
                                            <p>Aktif</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="income-dashone-pro">
                                    <div class="income-rate-total">
                                        <div class="price-adminpro-rate">
                                            <h3><b><span class="counter"><?= $jumlahLulus; ?></span><span> Alumni</span></b></h3>
                                        </div>
                                        <div class="price-graph">
                                        </div>
                                    </div>
                                    <div class="income-range">
                                        <p></p>
                                        <span class="income-percentange"><i class="fa fa-level-up"></i></span>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-2">
                            <div class="income-dashone-total orders-monthly shadow-reset nt-mg-b-30">
                                <div class="income-title">
                                    <div class="main-income-head">
                                        <h2>Users</h2>
                                        <div class="main-income-phara order-cl">
                                            <p>Belum Aktif</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="income-dashone-pro">
                                    <div class="income-rate-total">
                                        <div class="price-adminpro-rate">
                                            <h3><b><span class="counter"><?= $jumlahEskul; ?></span><span> Users</span></b></h3>
                                        </div>
                                        <div class="price-graph">
                                        </div>
                                    </div>
                                    <div class="income-range order-cl">
                                        <p></p>
                                        <span class="income-percentange"><i class="fa fa-level-up"></i></span>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-2">
                            <div class="income-dashone-total visitor-monthly shadow-reset nt-mg-b-30">
                                <div class="income-title">
                                    <div class="main-income-head">
                                        <h2>Users</h2>
                                        <div class="main-income-phara visitor-cl">
                                            <p>Aktif</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="income-dashone-pro">
                                    <div class="income-rate-total">
                                        <div class="price-adminpro-rate">
                                            <h3><b><span class="counter"><?= $jumlahUser; ?></span><span> Users</span></b></h3>
                                        </div>
                                        <div class="price-graph">
                                        </div>
                                    </div>
                                    <div class="income-range visitor-cl">
                                        <p></p>
                                        <span class="income-percentange"><i class="fa fa-level-up"></i></span>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="data-table-area mg-b-15">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="sparkline13-list shadow-reset">
                                <div class="sparkline13-hd">
                                    <div class="main-sparkline13-hd">
                                        <h1><i class="fa fa-users"></i><b> Daftar Users Lembaga</b></h1>
                                        <div class="sparkline13-outline-icon">
                                            <span class="sparkline13-collapse-link"><i class="fa fa-chevron-up"></i></span>
                                            <span><i class="fa fa-wrench"></i></span>
                                            <span class="sparkline13-collapse-close"><i class="fa fa-times"></i></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="sparkline13-graph">
                                    <div id="flashsucces" data-flash="<?= $this->session->flashdata('messageSuccess'); ?>"></div>
                                    <div id="flashwarning" data-flash="<?= $this->session->flashdata('messageWarning'); ?>"></div>
                                    <div id="flashupdate" data-flash="<?= $this->session->flashdata('messageUpdate'); ?>"></div>
                                    <div id="flasherror" data-flash="<?= $this->session->flashdata('messageError'); ?>"></div>
                                    <div id="flashsave" data-flash="<?= $this->session->flashdata('messageSave'); ?>"></div>
                                    <div class=" datatable-dashv1-list custom-datatable-overright">
                                        <div id="toolbar">
                                        </div>
                                        <table id="table" data-toggle="table" data-pagination="true" data-search="true" data-show-columns="false" data-show-pagination-switch="true" data-show-refresh="true" data-key-events="true" data-show-toggle="true" data-resizable="true" data-cookie="true" data-cookie-id-table="saveId" data-show-export="false" data-click-to-select="true" data-toolbar="#toolbar">
                                            <thead>
                                                <tr>
                                                    <th data-field="state" data-checkbox="true"></th>
                                                    <th data-field="Nomor">No.</th>
                                                    <th data-field="NSM">NSM</th>
                                                    <th data-field="NIP">Nama Lembaga</th>
                                                    <th data-field="email">Username</th>
                                                    <th data-field="NUPTK">Status Akun</th>
                                                    <th data-field="Edit">Aksi</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <?php $i = 1;
                                                foreach ($Lembaga as $study) :
                                                ?>
                                                    <tr>
                                                        <td></td>
                                                        <td align="center"><?= $i;
                                                                            $i++; ?></td>
                                                        <td><?= $study['nsm_lembaga']; ?></td>
                                                        <td><?= $study['sgkt_jenjang'] . $study['sgkt_status'] . ' ' . $study['nm_lembaga']; ?></td>
                                                        <td><?= $study['username']; ?></td>
                                                        <td align="center">
                                                            <?php
                                                            if ($study['status_user'] == 0) {
                                                                echo '<div class="label label-danger">Tidak Aktif</div>';
                                                            } else {
                                                                echo '<div class="label label-success">Aktif</div>';
                                                            }
                                                            ?>
                                                        </td>
                                                        <td align="center">
                                                            <?php
                                                            if ($study['status_user'] == 0) { ?>
                                                                <a href='<?= base_url('superadmin/aktifkanDataUser/' . $study['id_user']); ?>'>
                                                                    <div class="label label-info label"><i class=" fa fa-play"></i> Aktifkan</div>
                                                                </a>
                                                            <?php } else { ?>
                                                                <a href='<?= base_url('superadmin/nonaktifkanDataUser/' . $study['id_user']); ?>'>
                                                                    <div class="label label-primary label"><i class=" fa fa-stop"></i> non Aktifkan</div>
                                                                </a>
                                                            <?php }
                                                            ?>
                                                            <a href="#" data-toggle="modal" data-target="#EditGuru<?= $study['id_user']; ?>">
                                                                <div class="label label-warning"><i class=" fa fa-key"></i></div>
                                                            </a>
                                                            <a href='<?= base_url('superadmin/hapusDataUser/' . $study['id_user']); ?>' id='btn-hapus'>
                                                                <div class="label label-danger"><i class=" fa fa-trash"></i> Delete</div>
                                                            </a>
                                                    </tr>
                                                    <?php
                                                    ?>
                                                    <div id="EditGuru<?= $study['id_user']; ?>" class="modal modal-adminpro-general default-popup-PrimaryModal PrimaryModal-bgcolor fade" role="dialog">
                                                        <form action="<?= base_url('superadmin/resetPasswordDataUser'); ?>" method="post">
                                                            <div class="modal-dialog">
                                                                <div class="modal-content">
                                                                    <div class="modal-close-area modal-close-df">
                                                                        <a class="close" data-dismiss="modal" href="#"><i class="fa fa-close"></i></a>
                                                                    </div>
                                                                    <div class="modal-body">
                                                                        <input type="hidden" class="form-control" id="id_user" name="id_user" placeholder="Id Teacher" value='<?= $study['id_user']; ?>' required>
                                                                        <i class="fa fa-question modal-check-pro"></i>
                                                                        <h2>Anda yakin ?</h2>
                                                                        <p>Anda akan me-reset password <?= $study['username']; ?> !</p>
                                                                    </div>
                                                                    <div class="modal-footer">
                                                                        <div class="form-group-inner">
                                                                            <div class="login-btn-inner">
                                                                                <div class="row">
                                                                                    <div class="col-lg-3"></div>
                                                                                    <div class="col-lg-9">
                                                                                        <div class="login-horizental cancel-wp pull-right">
                                                                                            <button type='reset' data-dismiss='modal' class="btn btn-sm btn-white">Cancel</button>
                                                                                            <button class="btn btn-sm btn-primary" type="submit">Reset</button>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                <?php endforeach;
                                                ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>