<!-- /.content-header -->
<?= $this->extend('backend/layout/template_pdf'); ?>

<?= $this->section('content'); ?>

<!-- Main content -->
<section class="content">
  <div class="container-fluid">
    <div class="container">
      <div>
        <img src="<?= base_url(); ?>/asset/images/kopsurat.jpg" alt="Kop Surat" class="img_center" style="margin-top: -40px; margin-bottom: 30px;">
      </div>
      <div class="main-body">
        <h2 style="text-align: center;">Data Siswa Madrasah Istiqlal Jakarta</h2>
        <br>
        <div>
          <div style="width: 35%; float: left;margin-right:10px;">
            <div class="card-body">
              <div style="text-align: center;">
                <?php
                if (file_exists(FCPATH . "/asset/images/siswa/$siswa[foto]")) {
                ?>
                  <img src="<?= base_url(); ?>/asset/images/siswa/<?= $siswa['foto']; ?>" alt="gambar profil" class="img_center" width="150">
                <?php
                } else {
                ?>
                  <img src="<?= base_url(); ?>/asset/images/siswa/default.png" alt="gambar profil" class="img_center" width="150">

                <?php
                }
                ?>

              </div>

              <div style="text-align: center;">
                <h4><?= $siswa['nama_lengkap']; ?></h4>
                <p class="text-secondary mb-1">NIK: <?= $siswa['nik']; ?></p>
                <p class="text-secondary mb-1">NISN: <?= $siswa['nisn']; ?></p>
                <p class="text-secondary mb-1">Rombel: <?= $siswa['rombel']; ?></p>
                <p class="text-secondary mb-1">Kelas: <?= $siswa['kelas']; ?></p>
                <p class="text-secondary mb-1">Divisi: <?= $siswa['divisi']; ?></p>

                <br>

                <p>Alamat lengkap</p>
                <?php if ($siswa['alamat'] == null) { ?>
                  <p class="text-muted font-size-sm">Alamat belum diisi</p>
                <?php
                } else { ?>
                  <p class="text-muted font-size-sm"><?= $siswa['alamat']; ?></p>
                <?php
                } ?>

              </div>
            </div>
          </div>
          <div style="width: 65%; float: left;margin-left:10px;">
            <div class="card mb-3">
              <div class="card-body">
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Username</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['username']; ?>
                  </div>

                </div>

                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Nama Lengkap</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['nama_lengkap']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Panggilan</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['panggilan']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Jenis Kelamin</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['j_kel']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Tempat lahir</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['tem_lahir']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Tanggal lahir</b>
                  </div>
                  <div class="isi_kanan">
                    : <?php if ($siswa['tgl_lahir'] != 0) {
                        echo tgl_indo($siswa['tgl_lahir']);
                      } else {
                        echo "";
                      } ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Lanjut Sekolah</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['lanjut_sekolah']; ?>
                  </div>

                </div>

                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Tahun Lulus</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['tahun_lulus']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Nama Ayah</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['ayah']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Pekerjaan Ayah</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['pekerjaan_ayah']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Pendapatan Ayah</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['pendapatan_ayah']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Nama Ibu</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['ibu']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Pekerjaan Ibu</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['pekerjaan_ibu']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>Pendapatan Ibu</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['pendapatan_ibu']; ?>
                  </div>

                </div>
                <div class="info_kanan">
                  <div class="label_kanan">
                    <b>No.Hp</b>
                  </div>
                  <div class="isi_kanan">
                    : <?= $siswa['no_hp']; ?>
                  </div>

                </div>
              </div>
            </div>

          </div>
        </div>

      </div>
    </div>




  </div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?= $this->endSection(); ?>