<!-- // 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">
                                            <a><b>Cetak Rapor</b></a>
                                        </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
                                            foreach ($dtWalasGuru as $study) :
                                                if ($study['kdlbg'] == $nmLembaga['id_lembaga']) {
                                                    if ($study['kdtapel'] == $kdTapel) {
                                            ?>

                                                        <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
                                                        //  }
                                                    }
                                                }
                                                ?>
                                            <?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']) {
                                                if ($study['kdtapel'] == $kdTapel) {
                                        ?>

                                                    <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="name">NISN</th>
                                                                        <th data-field="email">Nama Students</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) {
                                                                    ?>
                                                                            <tr class="new-email">
                                                                                <td></td>
                                                                                <td><?= $p['nisn']; ?></td>
                                                                                <td><?= $p['siswa']; ?></td>
                                                                                <td>
                                                                                    <a href="<?= base_url('walas/print_rapor_1_3/' . $p['kdsiswa']); ?>" target="blank">
                                                                                        <div class="label label-success"><i class=" fa fa-print"></i> Cetak halaman depan</div>
                                                                                    </a>
                                                                                    <?php if ($cekCatatan > 0) { ?>
                                                                                        <a href="<?= base_url('walas/print_rapor_4_7/' . $p['kdsiswa']); ?>" target="blank">
                                                                                            <div class="label label-success"><i class=" fa fa-print"></i> Cetak halaman isi</div>
                                                                                        </a>
                                                                                    <?php } else { ?>
                                                                                        <a href="#" target="blank">
                                                                                            <div class="label label-danger"><i class=" fa fa-print"></i> Menunggu proses isi rapor</div>
                                                                                        </a>
                                                                                    <?php } ?>
                                                                                </td>
                                                                            </tr>
                                                                        <?php
                                                                        }
                                                                        $i++; ?>
                                                                    <?php endforeach;  ?>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                        <div><br></div>
                                                    </div>
                                        <?php
                                                }
                                            }
                                        endforeach; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>