<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title><?php echo $title_pdf;?></title>
    </head>
    <body>
        <div style="text-align:center">
            <h3>Curriculum Vitae</h3>
            <h3>Pegawai Yayasan Nurul Islam</h3>
        </div>
        <table style="border-collapse: collapse;">
			<tr>
				<td style="max-width: 5%;">&nbsp;</td>
				<td style="max-width: 35%;">&nbsp;</td>
				<td style="max-width: 15%;">&nbsp;</td>
				<td style="max-width: 15%;">&nbsp;</td>
				<td style="max-width: 15%;">&nbsp;</td>
				<td style="max-width: 15%;">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Informasi Personal</strong></td>
			</tr>
			<tr >
				<td colspan="2">Nama</td>
				<td colspan="4">: <?php echo ($pegawai->gelar_depan != NULL ? $pegawai->gelar_depan." " : "").$pegawai->nama.($pegawai->gelar_belakang != NULL ? " ".$pegawai->gelar_belakang : "");?></td>
			</tr>
			<tr>
				<td colspan="2">Alamat</td>
				<td colspan="4">: <?php echo ($pegawai->alamat != NULL ? $pegawai->alamat : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Nomor Telepon / HP</td>
				<td colspan="4">: <?php echo ($pegawai->nohp != NULL ? $pegawai->nohp : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Email</td>
				<td colspan="4">: <?php echo ($pegawai->email != NULL ? $pegawai->email : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Tempat, Tanggal Lahir</td>
				<td colspan="4">: <?php echo ($pegawai->tempat_lahir != NULL ? $pegawai->tempat_lahir : "<i>(belum diisi)</i>").", ".($pegawai->tanggal_lahir != NULL ? $pegawai->tanggal_lahir : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Jenis Kelamin</td>
				<td colspan="4">: <?php echo ($pegawai->jenkel != NULL ? ($pegawai->jenkel == "L" ? "Laki-Laki" : "Perempuan") : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Golongan Darah</td>
				<td colspan="4">: <?php echo ($pegawai->gol_darah != NULL ? $pegawai->gol_darah : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Kepegawaian</strong></td>
			</tr>
			<tr>
				<td colspan="2">NIP / NPP</td>
				<td colspan="4">: <?php echo ($pegawai->no_pegawai != NULL ? $pegawai->no_pegawai : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Unit Kerja</td>
				<td colspan="4">: <?php echo ($kepegawaian != NULL ? $kepegawaian->unit_kerja : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Status Kepegawaian</td>
				<td colspan="4">: <?php echo ($kepegawaian != NULL ? $kepegawaian->status_kepegawaian : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Tahun Masuk</td>
				<td colspan="4">: <?php echo ($kepegawaian != NULL ? $kepegawaian->tahun_masuk : "<i>(belum diisi)</i>");?></td>
			</tr>
			<?php /**
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Keluarga</strong></td>
			</tr>
			<tr>
				<td colspan="2">Nomor Kontak Keluarga</td>
				<td colspan="4">: <?php echo ($keluarga != NULL ? $keluarga->no_keluarga : "<i>(belum diisi)</i>");?></td>
			</tr>
			<tr>
				<td colspan="2">Pekerjaan Suami / Istri</td>
				<td colspan="4">: <?php echo ($keluarga != NULL ? $keluarga->pekerjaan_suami_istri : "<i>(belum diisi)</i>");?></td>
			</tr>
			**/ ?>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Riwayat Jabatan</strong></td>
			</tr>
			<tr  style="border: 1px solid #000; background-color: #b1b3b5;">
				<td style="border: 1px solid #000;">Nomor</td>
				<td colspan="2" style="border: 1px solid #000;">Unit</td>
				<td colspan="2" style="border: 1px solid #000;">Jabatan</td>
				<td style="border: 1px solid #000;">Tahun</td>
			</tr>
			<?php
				$h = 0;
				if($jabatan == NULL)
				{
					?>
					<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;" colspan="6">Tidak ada riwayat jabatan.</td>
					</tr>
					<?php
				}
				else
				{
					foreach($jabatan as $jb)
					{
						$h++;
						?>
						<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;"><?php echo $h;?></td>
							<td colspan="2" style="border: 1px solid #000;"><?php echo $jb['unit_kerja'];?></td>
							<td colspan="2" style="border: 1px solid #000;"><?php echo $jb['jabatan'];?></td>
							<td style="border: 1px solid #000;"><?php echo $jb['tahun'];?></td>
						</tr>
						<?php
					}
				}
			?>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Riwayat Pendidikan</strong></td>
			</tr>
			<tr  style="border: 1px solid #000; background-color: #b1b3b5;">
				<td style="border: 1px solid #000;">Nomor</td>
				<td colspan="3" style="border: 1px solid #000;">Nama Satuan Pendidikan</td>
				<td style="border: 1px solid #000;">Tahun Masuk</td>
				<td style="border: 1px solid #000;">Tahun Lulus</td>
			</tr>
			<?php
				$i = 0;
				if($pendidikan == NULL)
				{
					?>
					<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;" colspan="6">Tidak ada data pendidikan</td>
					</tr>
					<?php
				}
				else
				{
					foreach($pendidikan as $pd)
					{
						$i++;
						?>
						<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;"><?php echo $i;?></td>
							<td colspan="3" style="border: 1px solid #000;"><?php echo $pd['instansi'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pd['tahun_masuk'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pd['tahun_lulus'];?></td>
						</tr>
						<?php
					}
				}
			?>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Riwayat Pelatihan</strong></td>
			</tr>
			<tr style="border: 1px solid #000; background-color: #b1b3b5;">
				<td style="border: 1px solid #000;">Nomor</td>
				<td colspan="2" style="border: 1px solid #000;">Nama Pelatihan</td>
				<td style="border: 1px solid #000">Tahun</td>
				<td colspan="2" style="border: 1px solid #000;">Ada Sertifikat?</td>
			</tr>
			<?php
				$j = 0;
				if($pelatihan == NULL)
				{
					?>
					<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;" colspan="6">Tidak ada data pelatihan</td>
					</tr>
					<?php
				}
				else
				{
					foreach($pelatihan as $pl)
					{
						$j++;
						?>
						<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;"><?php echo $j;?></td>
							<td colspan="2" style="border: 1px solid #000;"><?php echo $pl['nama_pelatihan'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pl['tahun'];?></td>
							<td colspan="2" style="border: 1px solid #000;"><?php echo $pl['sertifikat'];?></td>
						</tr>
						<?php
					}
				}
			?>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Riwayat Prestasi</strong></td>
			</tr>
			<tr style="border: 1px solid #000; background-color: #b1b3b5;">
				<td style="border: 1px solid #000;">Nomor</td>
				<td colspan="2" style="border: 1px solid #000;">Nama Kegiatan / Lomba</td>
				<td style="border: 1px solid #000;">Prestasi</td>
				<td style="border: 1px solid #000;">Tingkat</td>
				<td style="border: 1px solid #000;">Tahun</td>
			</tr>
			<?php
				$k = 0;
				if($prestasi == NULL)
				{
					?>
					<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;" colspan="6">Tidak ada data prestasi</td>
					</tr>
					<?php
				}
				else
				{
					foreach($prestasi as $pt)
					{
						$k++;
						?>
						<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;"><?php echo $k;?></td>
							<td colspan="2" style="border: 1px solid #000;"><?php echo $pt['kegiatan'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pt['prestasi'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pt['tingkat'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pt['tahun'];?></td>
						</tr>
						<?php
					}
				}
			?>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6"><strong>Riwayat Kesehatan</strong></td>
			</tr>
			<tr style="border: 1px solid #000; background-color: #b1b3b5;">
				<td style="border: 1px solid #000;">Nomor</td>
				<td style="border: 1px solid #000;">Nama Penyakit Yang Pernah / Sedang Diderita</td>
				<td style="border: 1px solid #000;">Tahun</td>
				<td style="border: 1px solid #000;">Tingkat Penyakit</td>
				<td style="border: 1px solid #000;">Apakah Menular?</td>
				<td style="border: 1px solid #000;">Sudah Sembuh?</td>
			</tr>
			<?php
				$l = 0;
				if($penyakit == NULL)
				{
					?>
					<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;" colspan="6">Tidak ada data kesehatan</td>
					</tr>
					<?php
				}
				else
				{
					foreach($penyakit as $pk)
					{
						$l++;
						?>
						<tr style="border: 1px solid #000;">
							<td style="border: 1px solid #000;"><?php echo $l;?></td>
							<td style="border: 1px solid #000;"><?php echo $pk['penyakit'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pk['tahun'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pk['tingkat'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pk['menular'];?></td>
							<td style="border: 1px solid #000;"><?php echo $pk['sembuh'];?></td>
						</tr>
						<?php
					}
				}
			?>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="3">&nbsp;</td>
				<td colspan="3">.................. , .........................</td>
			</tr>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="6">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="3">&nbsp;</td>
				<td colspan="3"><?php echo $pegawai->nama;?></td>
			</tr>
        </table>
    </body>
</html>