<!-- // 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-6">
                                        <font size="4">
                                            <strong><?= $Lembaga['sgkt_jenjang'] . ' ' . $Lembaga['nm_status'] . ' ' . ucwords(strtolower($Lembaga['nm_lembaga'])); ?></strong>
                                        </font>
                                    </div>
                                    <div class="col-lg-6 text-right">
                                        <?php foreach ($nmTapel as $tp) :
                                            if ($tp['sts_tapel'] == 1) {
                                        ?>
                                                <font size="4">
                                                    <span class="bread-blod">Semester <?= $tp['kd_smstr']; ?> | <?php if ($tp['kd_smstr'] == 'Ganjil') {
                                                                                                                    echo $tp['kd_tahun'] . '/' . ($tp['kd_tahun'] + 1);
                                                                                                                } elseif ($tp['kd_smstr'] == 'Genap') {
                                                                                                                    echo ($tp['kd_tahun'] - 1) . '/' . $tp['kd_tahun'];
                                                                                                                }; ?></span>
                                                </font>
                                        <?php }
                                        endforeach;
                                        ?>
                                    </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">
                                            <strong><?= $Lembaga['sgkt_jenjang'] . ' ' . $Lembaga['nm_status'] . ' ' . ucwords(strtolower($Lembaga['nm_lembaga'])); ?></strong>
                                        </font>
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right">
                                        <?php foreach ($nmTapel as $tp) :
                                            if ($tp['sts_tapel'] == 1) {
                                        ?>
                                                <font size="1">
                                                    <span class="bread-blod">Semester <?= $tp['kd_smstr']; ?> | <?php if ($tp['kd_smstr'] == 'Ganjil') {
                                                                                                                    echo $tp['kd_tahun'] . '/' . ($tp['kd_tahun'] + 1);
                                                                                                                } elseif ($tp['kd_smstr'] == 'Genap') {
                                                                                                                    echo ($tp['kd_tahun'] - 1) . '/' . $tp['kd_tahun'];
                                                                                                                }; ?></span>
                                                </font>
                                        <?php }
                                        endforeach;
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="inbox-mailbox-area mg-b-40">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="row">
                                <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
                                    <div class="inbox-email-menu-list shadow-reset">
                                        <div class="compose-email">
                                            <?php
                                            foreach ($dtWalasGuru as $study) :
                                                if ($study['kdlbg'] == $nmLembaga['id_lembaga'] && $study['kdtapel'] == $kdTapel['id_tapel'] && $study['kdguru'] == $nmUser['kd_teachers']) {
                                                    if ($study['tingkat'] == 'VI' || $study['tingkat'] == 'IX' || $study['tingkat'] == 'XII') {
                                            ?>
                                                        <a><b>Kelulusan</b></a>
                                                    <?php } else { ?>
                                                        <a><b>Kenaikan Kelas</b></a>
                                            <?php }
                                                }
                                            endforeach;
                                            ?>
                                        </div>
                                        <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 id="flashinfo" data-flash="<?= $this->session->flashdata('messageInfo'); ?>"></div>
                                        <div id="flashinfo2" data-flash="<?= $this->session->flashdata('messageInfo2'); ?>"></div>
                                        <ul class="nav nav-tabs">
                                            <li>
                                                <h4 class="Inbox-category-ad"><i class="fa fa-folder-o" aria-hidden="true"></i> Kelas</h4>
                                            </li>
                                            <?php
                                            $i = 1;
                                            foreach ($dtWalasGuru as $study) :
                                                if ($study['kdlbg'] == $nmLembaga['id_lembaga'] && $study['kdtapel'] == $kdTapel['id_tapel'] && $study['kdguru'] == $nmUser['kd_teachers']) {
                                            ?>
                                                    <li><a data-toggle="tab" href='#inbox<?= $study['kdkelas']; ?>'><span class="inbox-icon"><i class="fa fa fa-pencil "></i></span> <?= $study['kelas']; ?></a></li>
                                                <?php }
                                                $i++; ?>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                                <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
                                    <div class="tab-content view-mail-ov-mg-t-30">
                                        <?php
                                        $i = 1;
                                        foreach ($dtWalasGuru as $study) :
                                            if ($study['kdlbg'] == $nmLembaga['id_lembaga'] && $study['kdtapel'] == $kdTapel['id_tapel'] && $study['kdguru'] == $nmUser['kd_teachers']) {
                                        ?>
                                                <div id="inbox<?= $study['kdkelas']; ?>" class="tab-pane fade animated zoomInDown shadow-reset custom-inbox-message">
                                                    <div class="mail-title inbox-bt-mg">
                                                        <h2><?= $study['kelas']; ?></h2>
                                                        <div class="view-mail-action view-mail-ov-d-n">
                                                        </div>
                                                    </div>
                                                    <div class="datatable-dashv1-list custom-datatable-overright">
                                                        <table id="table1" 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="#toolbar1">
                                                            <thead>
                                                                <tr>
                                                                    <th data-field="state" data-checkbox="true"></th>
                                                                    <th data-field="id">No</th>
                                                                    <th data-field="name">NISN</th>
                                                                    <th data-field="email">Nama Students</th>
                                                                    <th data-field="phone">Status</th>
                                                                    <th data-field="phone1">Ke Kelas</th>
                                                                    <th data-field="company">Aksi</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                                <?php $i = 1;
                                                                foreach ($dtWalasSiswa as $p) :
                                                                    if ($p['kdkelas'] == $study['kdkelas'] && $p['kdlbg'] == $nmLembaga['id_lembaga'] && $p['kdtapel'] == $kdTapel['id_tapel']) {
                                                                ?>
                                                                        <tr class="new-email">
                                                                            <td></td>
                                                                            <td><?= $i;
                                                                                $i++; ?></td>
                                                                            <td><?= $p['nisn']; ?></td>
                                                                            <td><?= $p['siswa']; ?></td>
                                                                            <td><?= $p['ketnaik']; ?></td>
                                                                            <td><?= $p['klsnaik']; ?></td>
                                                                            <td>
                                                                                <a href="#" data-toggle="modal" data-target="#EditMapel<?= $p['kdsiswa']; ?>">
                                                                                    <div class="label label-success"><i class=" fa fa-plus"></i></div>
                                                                                </a>
                                                                            </td>
                                                                        </tr>
                                                                    <?php
                                                                    }
                                                                    ?>
                                                                <?php endforeach;  ?>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <div><br></div>
                                                </div>
                                                <?php $i = 1;
                                                foreach ($dtWalasSiswa as $p) :
                                                    if ($p['kdkelas'] == $study['kdkelas'] && $p['kdlbg'] == $nmLembaga['id_lembaga'] && $p['kdtapel'] == $kdTapel['id_tapel']) {
                                                ?>
                                                        <div id="EditMapel<?= $p['kdsiswa']; ?>" class="modal FullColor-popup-AlertModal fade" role="dialog">
                                                            <form action="<?= base_url('walas/inputNilaiNaik'); ?>" method="post" name="autoSumForm">
                                                                <div class="modal-dialog">
                                                                    <div class="modal-content">
                                                                        <div class="modal-header header-color-modal bg-color-5">
                                                                            <?php
                                                                            if ($study['tingkat'] == 'VI' || $study['tingkat'] == 'IX' || $study['tingkat'] == 'XII') {
                                                                            ?>
                                                                                <h4 class="modal-title">Form Input Kelulusan</h4>
                                                                            <?php } else { ?>
                                                                                <h4 class="modal-title">Form Input Kenaikan Kelas</h4>
                                                                            <?php } ?>
                                                                            <div class="modal-close-area modal-close-df">
                                                                                <a class="close" data-dismiss="modal" href="#"><i class="fa fa-close"></i></a>
                                                                            </div>
                                                                        </div>
                                                                        <div class="modal-body">
                                                                            <div class="row">
                                                                                <div class="col-lg-3"></div>
                                                                                <div class="col-lg-9">
                                                                                    <input type="hidden" class="form-control" id="id_naik" name="id_naik" placeholder="Id Catatan" value='<?= $study['kdsiswa']; ?>'>
                                                                                </div>
                                                                            </div>
                                                                            <div class="sparkline11-graph">
                                                                                <div class="row">
                                                                                    <div class="col-lg-12">
                                                                                        <input type="text" class="form-control" id="id_gmapel" name="id_gmapel" placeholder="Id Bidang Study" value='<?= $p['nisn'] . ' / ' . $p['siswa'] . ' / ' . $p['kelas']; ?>' readonly>
                                                                                        <input type="hidden" class="form-control" id="kd_kelas" name="kd_kelas" placeholder="kd_kelas" value='<?= $p['kdkelas']; ?>'>
                                                                                        <input type="hidden" class="form-control" id="kd_students" name="kd_students" placeholder="kd_students" value='<?= $p['kdsiswa']; ?>'>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="sparkline11-graph">
                                                                                <div class="row">
                                                                                    <div class="col-lg-9">
                                                                                        <?php
                                                                                        if ($study['tingkat'] == 'VI' || $study['tingkat'] == 'IX' || $study['tingkat'] == 'XII') {
                                                                                        ?>
                                                                                            <label class="login2 pull-right pull-right-pro"> Status Kelulusan</label>
                                                                                        <?php } else { ?>
                                                                                            <label class="login2 pull-right pull-right-pro"> Status Naik Kelas</label>
                                                                                        <?php } ?>
                                                                                    </div>
                                                                                    <div class="col-lg-3">
                                                                                        <select name="ket_naik" id="ket_naik" class="chosen-select" tabindex="-1">
                                                                                            <?php
                                                                                            foreach ($lulus as $kb) : {
                                                                                                    $new = $kb['nm_lulus'];
                                                                                                    if ($p['ketnaik'] == $new) {
                                                                                                        $select = "selected";
                                                                                                    } else {
                                                                                                        $select = "";
                                                                                                    }
                                                                                                    if ($kb['tipe_lulus'] == $study['tingkat']) {
                                                                                                        echo "<option $select>" . $kb['nm_lulus'] . "</option>";
                                                                                                    }
                                                                                                }
                                                                                            endforeach;
                                                                                            ?>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </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-danger" type="submit">Input</button>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </form>
                                                        </div>
                                                <?php }
                                                endforeach;  ?>
                                        <?php }
                                        endforeach; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>