<html>

<head>
    <title>Berita Acara</title>
    <link rel="shortcut icon" href="<?= $logo ?>" type="image/x-icon">
</head>

<body onload="window.print();setTimeout(()=>window.close(),500)">
    <div style="background:#fff; ">
        <!-- <table border='0' width='100%'> -->
        <table style="width:100%">
            <tbody>
                <tr>
                    <td rowspan="4" width="120" align="center">
                        <img src="<?= $kementrian ?>" width="80">
                    </td>
                    <td colspan="2" align="center">
                        <font size="+1">
                            <b>BERITA ACARA PELAKSANAAN</b>
                        </font>
                    </td>
                    <td rowspan="7" width="120" align="center"><img src="<?= $logo ?>" width="65"></td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <font size="+1"><b> <?= strtoupper($ba['nama_jenis']) ?></b></font>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <!-- noted -->
                        <font size="+1"><b>TAHUN PELAJARAN <?= $tp ?></b></font>
                    </td>
                </tr>
            </tbody>
        </table>
        <br>
        <table width="95%" border="0" align="center">
            <tbody>
                <tr height="30">
                    <td colspan="4" style="text-align: justify;" height="30">Pada hari ini <b> <?= hariIndo(date('D', $ba['startDateTime'])) ?> </b> tanggal <b><?= date('d', $ba['startDateTime']) ?></b> bulan <b><?= bulanIndo(date('m', $ba['startDateTime'])) ?></b> tahun <b><?= date('Y', $ba['startDateTime']) ?></b>, di <?= options('nama_sekolah') ?> telah diselenggarakan "<?= ucfirst(strtolower($ba['nama_jenis'])) ?>" untuk Mata Pelajaran <b><?= $ba['nama_mapel'] ?></b> dari
                        <?php if ($ba['startDateTime'] == $ba['endDateTime']) : ?>
                            pukul <b><?= date("H:i", $ba['startDateTime']) ?></b> sampai dengan pukul <b><?= date("H:i", $ba['endDateTime']) ?></b>
                        <?php else : ?>
                            <b><?= date("Y-m-d H:i", $ba['startDateTime']) ?></b> sampai dengan <b><?= date("Y-m-d H:i", $ba['endDateTime']) ?></b>
                        <?php endif ?>
                        <?php ?>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="95%" border="0" align="center">
            <tbody>
                <tr height="30">
                    <td width="5%" height="30">1.</td>
                    <td height="30">Sekolah/Madrasah</td>
                    <td style="border-bottom:thin solid #000000" width="60%" height="30"><?= options('nama_sekolah') ?></td>
                </tr>
                <tr height="30">
                    <td width="5%" height="30"></td>
                    <td width="30%" height="30">Ruang</td>
                    <td style="border-bottom:thin solid #000000" width="60%" height="30"><?= $ba['nama_ruang'] ?></td>
                </tr>
                <tr height="30">
                    <td width="10px" height="30"></td>
                    <td height="30">Jumlah Peserta Seharusnya</td>
                    <td style="border-bottom:thin solid #000000" width="60%" height="30"><?= $ba['siswa_hadir'] + $ba['tidak_hadir'] ?></td>
                </tr>
                <tr height="30">
                    <td width="5%" height="30"></td>
                    <td width="30%" height="30">Jumlah Hadir (Ikut Ujian)</td>
                    <td style="border-bottom:thin solid #000000" width="60%" height="30"><?= $ba['siswa_hadir'] ?></td>
                </tr>
                <tr height="30">
                    <td width="10px" height="30"></td>
                    <td height="30">Jumlah Tidak Hadir</td>
                    <td style="border-bottom:thin solid #000000" width="60%" height="30"><?= $ba['tidak_hadir'] ?></td>
                </tr>
                <tr height="30">
                    <td width="10px" height="30"></td>
                    <td height="30">Nomor Peserta</td>
                    <td style="border-bottom:thin solid #000000" width="60%" height="30">
                        <?php foreach ($ba['siswa_tidak_hadir'] as $key => $value) : ?>
                            <?= $value ?>
                            <br>
                        <?php endforeach ?>
                    </td>
                </tr>
                <tr height="30">
                    <td width="10px" height="30"></td>
                </tr>
                <tr height="30">
                    <td width="5%" height="30">2.</td>
                    <td colspan="2" width="30%" height="30">
                        Catatan selama pelaksanaan ujian "<?= ucfirst(strtolower($ba['nama_jenis'])) ?>"
                    </td>
                </tr>
                <tr height="120px">
                    <td width="5%" height="30"></td>
                    <td colspan="2" style="border:solid 1px black"><?= $ba['catatan'] ?></td>
                </tr>
                <tr height="30">
                    <td colspan="2" width="5%" height="30">Yang membuat berita acara: </td>
                </tr>
            </tbody>
        </table>
        <table style="margin-left:50px" width="80%" border="0">
            <tbody>
                <tr>
                    <td colspan="4"></td>
                    <td width="30%" height="30">TTD</td>
                </tr>
                <tr>
                    <td width="10%">1. </td>
                    <td width="20%">Proktor</td>
                    <td style="border-bottom:thin solid #000000" width="30%"><?= $ba['nama_proktor'] ?></td>
                    <td width="5%" height="30"></td>
                    <td width="35%" height="30"></td>
                </tr>
                <tr>
                    <td width="10%"> </td>
                    <td width="20%">NIP. </td>
                    <td style="border-bottom:thin solid #000000" width="30%"><?= $ba['nomor_induk_proktor'] ?></td>
                    <td width="5%" height="30"></td>
                    <td style="border-bottom:thin solid #000000" width="35%" height="30"> 1. </td>
                </tr>
                <tr>
                    <td colspan="4"></td>
                </tr>
                <tr>
                    <td width="10%">2. </td>
                    <td width="20%">Pengawas</td>
                    <td style="border-bottom:thin solid #000000" width="30%"><?= $ba['nama_pengawas'] ?></td>
                    <td width="5%" height="30"></td>
                    <td width="35%" height="30"></td>
                </tr>
                <tr>
                    <td width="10%"> </td>
                    <td width="20%">NIP. </td>
                    <td style="border-bottom:thin solid #000000" width="30%"><?= $ba['nomor_induk_pengawas'] ?></td>
                    <td width="5%" height="30"></td>
                    <td style="border-bottom:thin solid #000000" width="35%" height="30"> 2. </td>
                </tr>
                <tr>
                    <td colspan="4"></td>
                </tr>
                <tr>
                    <td width="10%">3. </td>
                    <td width="20%">Kepala Sekolah</td>
                    <td style="border-bottom:thin solid #000000" width="30%"><?= options('nama_kepala_sekolah') ?></td>
                    <td width="5%" height="30"></td>
                    <td width="35%" height="30"></td>
                </tr>
                <tr>
                    <td width="10%"> </td>
                    <td width="20%">NIP. </td>
                    <td style="border-bottom:thin solid #000000" width="30%"><?= options('nip_kepala_sekolah') ?></td>
                    <td width="5%" height="30"></td>
                    <td style="border-bottom:thin solid #000000" width="35%" height="30"> 3. </td>
                </tr>
            </tbody>
        </table>
        <br><br><br><br><br>
        <table width="100%" height="30">
            <tbody>
                <tr>
                    <td style="border:1px solid black" width="25px"></td>
                    <td width="5px">&nbsp;</td>
                    <td style="border:1px solid black;font-weight:bold;font-size:14px;text-align:center;"><?= strtoupper($ba['nama_jenis']) ?></td>
                    <td width="5px">&nbsp;</td>
                    <td style="border:1px solid black" width="25px"></td>
                </tr>
            </tbody>
        </table>
    </div>
</body>

</html>