<?php
      $id = $_SESSION['userid'];
      $peserta = $this->biodata_model->user2($id);
	  $menu = $this->biodata_model->menu();
	  $menu2 = $this->biodata_model->menu2();
	  

	  function tanggal_indonesia($tanggal){
        $bulan = array (
        1 =>   'Januari',
        'Februari',
        'Maret',
        'April',
        'Mei',
        'Juni',
        'Juli',
        'Agustus',
        'September',
        'Oktober',
        'November',
        'Desember'
        );
        $pecahkan = explode('-', $tanggal);
        return $pecahkan[2] . ' ' . $bulan[ (int)$pecahkan[1] ] . ' ' . $pecahkan[0];
    }
?>

<p class="text-right">
	<?php if($menu->pengaturan_value == 1) { ?>
	    <a href="<?php echo base_url('biodata/edit/'.$peserta->no_pendaftaran) ?>" class="btn btn-success">
		    <i class="fa fa-edit"></i> Edit Data
	    </a>
	<?php } ?>
	    <a href="<?php echo base_url('biodata/cetakpeserta/'.$peserta->no_pendaftaran) ?>" class="btn btn-primary" target="_blank">
		    <i class="fa fa-print"></i> Cetak
	    </a>
		<a href ="<?php echo base_url('dashboard') ?>" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times">
	</i> Kembali</a>
</p>

<table width="100%" border="0" class="table table-striped">	
<div class="card">
<tbody> 
	<tr >
		<td valign="top" width="50%" >
			<table width="100%" border="0" cellpadding="8" rules="rows" >
			<tr bgcolor="#b3b2b2">
				<td height="35" width="150" colspan="3"><b>I. DATA SISWA</b></td>
			</tr>
			<tr>
				<td width="150">No. Pendaftaran</td>
				<td width="5">:</td>
				<td><b><?php echo $peserta->no_pendaftaran ?></b></td>						
			</tr>
            <tr>
				<td width="150">Nama Lengkap</td>
				<td width="5">:</td>
				<td><b><?php echo $peserta->nama_lengkap ?></b></td>						
			</tr>
            <tr>
				<td width="150">Nama Panggilan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->nama_panggilan ?></td>						
			</tr>   
            <tr>
				<td width="150">Jenis Kelamin</td>
				<td width="5">:</td>
				<td><?php echo $peserta->jkelamin ?></td>						
			</tr>
            <tr>
				<td width="150">NIK</td>
				<td width="5">:</td>
				<td><?php echo $peserta->nik ?></td>						
			</tr>
            <tr>
				<td width="150">NISN</td>
				<td width="5">:</td>
				<td><?php echo $peserta->nisn ?></td>						
			</tr>  
            <tr>
                <td width="150">Tempat/Tgl. Lahir</td>
                <td width="5">:</td>
                <td><?php echo $peserta->tempat_lahir ?>,
					<?php echo tanggal_indonesia(date($peserta->tgl_lahir)) ?>
                </td>
            </tr>
            <tr>
				<td width="150">Agama</td>
				<td width="5">:</td>
				<td><?php echo $peserta->agama ?>, Kewarganegaraan : <?php echo $peserta->kewarganegaraan ?></td>						
			</tr>
            <tr>
				<td width="150">Keterangan</td>
				<td width="5">:</td>
				<td>Anak Ke : <?php echo $peserta->anak_ke ?>, Jumlah Saudara : <?php echo $peserta->jml_saudara ?></td>						
			</tr>           
            <tr>
				<td width="150">Jumlah</td>
				<td width="5">:</td>
				<td>Saudara Kandung : <?php echo $peserta->kandung ?>, Saudara Tiri : <?php echo $peserta->tiri ?>, Saudara Angkat : <?php echo $peserta->angkat ?></td>						
			</tr>
            <tr>
				<td width="150">Status Keluarga</td>
				<td width="5">:</td>
				<td><?php echo $peserta->status_keluarga ?>, Bahasa di Rumah : <?php echo $peserta->bhs_dirumah ?></td>						
			</tr>
            <tr>
				<td width="150">Ukuran Pakaian</td>
				<td width="5">:</td>
				<td>Kemeja : <?php echo $peserta->kemeja ?>, Celana/Rok : <?php echo $peserta->celana ?></td>						
			</tr>
            <tr>
				<td height="35" width="150" colspan="3"><b>II. TEMPAT TINGGAL & KONTAK</b></td>
			</tr>
			<tr>
			    <td width="150">Alamat Sekarang</td>
				<td width="5">:</td>
				<td><?php echo $peserta->alamat_siswa ?> No. <?php echo $peserta->no_rmh ?> RT/RW. <?php echo $peserta->rt ?>/<?php echo $peserta->rw ?>
				<?php echo $peserta->kelurahan ?> <?php echo $peserta->kecamatan ?> - <?php echo $peserta->kota ?> Provinsi </td>						
			</tr>
            <tr>
			    <td width="150">Email</td>
				<td width="5">:</td>
				<td><?php echo $peserta->email ?></td>						
			</tr>
            <tr>
			    <td width="150">No. Tlp / HP.</td>
				<td width="5">:</td>
				<td><?php echo $peserta->no_tlp_rmh ?>  /  <?php echo $peserta->no_hp ?></td>						
			</tr>
            <tr>
			    <td width="150">Tinggal Dengan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->tinggal_dengan?></td>						
			</tr>
            <tr>
			    <td width="150">Transportasi Ke Sekolah</td>
				<td width="5">:</td>
				<td><?php echo $peserta->sekolah_dengan ?>, Jarak Rumah Ke Sekolah : <?php echo $peserta->jarak_rmh_kesekolah ?> Km</td>						
			</tr>
			<tr>
				<td height="35" width="150" colspan="3"><b>III. JASMANI & KESEHATAN</b></td>
			</tr>
			<tr>
			    <td width="150">Berat, Tinggi Badan & Gol. Darah</td>
				<td width="5">:</td>
				<td>Berat : <?php echo $peserta->berat_badan ?> Kg, Tinggi : <?php echo $peserta->tinggi_badan ?> Cm, Golongan Darah : <?php echo $peserta->gol_darah ?>  </td>						
			</tr>
			<tr>
			    <td width="150">Penyakit Yg Ada</td>
				<td width="5">:</td>
				<td><?php echo $peserta->penyakit ?></td>						
			</tr>
			<tr>
			    <td width="150">Kelainan Jasmani</td>
				<td width="5">:</td>
				<td><?php echo $peserta->kelainan_jasmani ?></td>						
			</tr>
			<tr>
			    <td width="150">Usia Juli</td>
				<td width="5">:</td>
				<td><?php echo $peserta->usia_tahun ?> Tahun, <?php echo $peserta->usia_bulan ?> Bulan</td>						
			</tr>
			<tr bgcolor="#b3b2b2" >
				<td height="35" width="150" colspan="3"><b>IV. PENDIDIKAN SMP/MTs</b></td>
			</tr>
            <tr>
				<td width="150">Sekolah Asal</td>
				<td width="5">:</td>
				<td><?php echo $peserta->sekolah_asal ?></td>						
			</tr>
			<tr>
				<td width="150">NPSN / NISN</td>
				<td width="5">:</td>
				<td><?php echo $peserta->npsn2 ?> / <?php echo $peserta->nisn2 ?></td>						
			</tr>
			<tr>
				<td width="150">Alamat Sekolah</td>
				<td width="5">:</td>
				<td><?php echo $peserta->sekolah_jln ?> <?php echo $peserta->sekolah_kel ?> <?php echo $peserta->sekolah_kec ?>
				<?php echo $peserta->sekolah_kota ?> Provinsi <?php echo $peserta->sekolah_prov ?></td>						
			</tr>
			<?php if($menu2->pengaturan_value == 1) { ?>
			<tr>
				<td width="150">No. Ijazah/Tanggal</td>
				<td width="5">:</td>
				<td><?php echo $peserta->Ijazah_no ?> / <?php echo tanggal_indonesia(date($peserta->Ijazah_tgl)) ?> </td>						
			</tr>
			<?php } ?>
			<tr bgcolor="#b3b2b2" >
				<td height="35" width="150" colspan="3"><b>V. PILIHAN PROGRAM KEAHLIAN</b></td>
			</tr>
			<tr>
			    <td width="150">Program Keahlian</td>
				<td width="5">:</td>
				<td><?php echo $peserta->kompetensi ?></td>						
			</tr>
			<tr bgcolor="#b3b2b2" >
				<td height="35" width="150" colspan="3"><b>VI. ORANG TUA/WALI</b></td>
			</tr>
			<tr>
				<td width="150" colspan="3"><b>A. AYAH</b></td>
			</tr>
			<tr>
				<td width="150">Nama Ayah</td>
				<td width="5">:</td>
				<td><?php echo $peserta->nama_ayah ?></td>						
			</tr>
			<?php if($menu2->pengaturan_value == 1) { ?>
			<tr>
                <td width="150">Tempat/Tgl. Lahir</td>
                <td width="5">:</td>
                <td><?php echo $peserta->tmpt_lahir_ayah ?>,
					<?php echo tanggal_indonesia(date($peserta->tgl_lahir_ayah)) ?>
                </td>
            </tr>
			<?php } ?>
			<tr>
				<td width="150">Agama</td>
				<td width="5">:</td>
				<td><?php echo $peserta->agama_ayah ?>, Kewarganegaraan : <?php echo $peserta->kewarganegaraan_ayah ?></td>						
			</tr>
			<tr>
				<td width="150">Pendidikan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->pendidikan_ayah ?>,  Pekerjaan : <?php echo $peserta->pekerjaan_ayah ?></td>						
			</tr>
			<tr>
				<td width="150">Penghasilan</td>
				<td width="5">:</td>
				<td>Rp. <?php echo number_format($peserta->penghasilan_ayah) ?></td>
			</tr>
			<tr>
				<td width="150">No. HP</td>
				<td width="5">:</td>
				<td><?php echo $peserta->tlp_ayah ?></td>						
			</tr>
			<tr>
				<td width="150">Alamat Rumah</td>
				<td width="5">:</td>
				<td><?php echo $peserta->alamat_ayah ?></td>						
			</tr>
            </table>
        </td>
		
        <td valign="top" width="50%">
			<table width="100%" border="0"  cellpadding="8" rules="rows" >
			<tr>
				<td width="150" colspan="3"><b>B. IBU</b></td>
			</tr>
			<tr>
				<td width="150">Nama Ibu</td>
				<td width="5">:</td>
				<td><?php echo $peserta->nama_ibu ?></td>						
			</tr>
			<?php if($menu2->pengaturan_value == 1) { ?>
			<tr>
                <td width="150">Tempat/Tgl. Lahir</td>
                <td width="5">:</td>
                <td><?php echo $peserta->tmpt_lahir_ibu ?>,
					  <?php echo tanggal_indonesia(date($peserta->tgl_lahir_ibu)) ?>
                </td>
            </tr>
			<?php } ?>
			<tr>
				<td width="150">Agama</td>
				<td width="5">:</td>
				<td><?php echo $peserta->agama_ibu ?>, Kewarganegaraan : <?php echo $peserta->kewarganegaraan_ibu ?></td>						
			</tr>
			<tr>
				<td width="150">Pendidikan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->pendidikan_ibu ?>,  Pekerjaan : <?php echo $peserta->pekerjaan_ibu ?></td>						
			</tr>
			<tr>
				<td width="150">Penghasilan</td>
				<td width="5">:</td>
				<td>Rp. <?php echo number_format($peserta->penghasilan_ibu) ?></td>						
			</tr>
			<tr>
				<td width="150">No. HP</td>
				<td width="5">:</td>
				<td><?php echo $peserta->tlp_ibu ?></td>						
			</tr>
			<tr>
				<td width="150">Alamat Rumah</td>
				<td width="5">:</td>
				<td><?php echo $peserta->alamat_ibu ?></td>						
			</tr>
			<tr>
				<td width="150" colspan="3"><b>C. WALI</b></td>
			</tr>
			<tr>
				<td width="150">Nama Wali</td>
				<td width="5">:</td>
				<td><?php echo $peserta->nama_wali ?></td>						
			</tr>
			<?php if($menu2->pengaturan_value == 1) { ?>
			<tr>
                <td width="150">Tempat/Tgl. Lahir</td>
                <td width="5">:</td>
                <td><?php echo $peserta->tmpt_lahir_wali ?>,
					<?php echo tanggal_indonesia(date($peserta->tgl_lahir_wali)) ?>
                </td>
            </tr>
			<?php } ?>
			<tr>
				<td width="150">Agama</td>
				<td width="5">:</td>
				<td><?php echo $peserta->agama_wali ?>, Kewarganegaraan : <?php echo $peserta->kewarganegaraan_wali ?></td>						
			</tr>
			<tr>
				<td width="150">Pendidikan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->pendidikan_wali ?>,  Pekerjaan : <?php echo $peserta->pekerjaan_wali ?></td>						
			</tr>
			<tr>
				<td width="150">Penghasilan</td>
				<td width="5">:</td>
				<td>Rp. <?php echo number_format($peserta->penghasilan_wali) ?></td>						
			</tr>
			<tr>
				<td width="150">No. HP</td>
				<td width="5">:</td>
				<td><?php echo $peserta->tlp_wali ?></td>						
			</tr>
			<tr>
				<td width="150">Alamat Rumah</td>
				<td width="5">:</td>
				<td><?php echo $peserta->alamat_wali ?></td>						
			</tr>
			<tr bgcolor="#b3b2b2" >
				<td height="35" width="150" colspan="3"><b>VII. INTELEGENSI, KEPRIBADIAN & PRESTASI</b></td>
			</tr>
			<?php if($menu2->pengaturan_value == 1) { ?>
			<tr>
				<td width="150">Intelegensi (IQ)</td>
				<td width="5">:</td>
				<td><?php echo $peserta->iq ?>, Tgl. Tes : <?php echo tanggal_indonesia(date($peserta->tgl_tes_iq)) ?> </td>						
			</tr>
			<?php } ?>
			<tr>
				<td width="150">Disiplin/Ketertiban</td>
				<td width="5">:</td>
				<td><?php echo $peserta->disiplin ?>, Prakarsa/Kreatifitas : <?php echo $peserta->prakarsa ?>,  Tanggung Jawab : <?php echo $peserta->tanggung_jwb ?></td>						
			</tr>
			<tr>
				<td width="150">Penyesuaian Diri</td>
				<td width="5">:</td>
				<td><?php echo $peserta->penyesuaian_diri ?>, Kemantapan Emosi : <?php echo $peserta->kemantapan_emosi ?>, Kerjasama : <?php echo $peserta->kerjasama ?></td>						
			</tr>
			<tr>
				<td width="150" colspan="3"><b>Prestasi & Tingkat (Diisi Jika Pernah Mendapatkan)</b></td>				
			</tr>
			<tr>
				<td width="150">IPTEK</td>
				<td width="5">:</td>
				<td><?php echo $peserta->iptek ?>, Tingkat : <?php echo $peserta->iptek_tingkat ?></td>						
			</tr>
			<tr>
				<td width="150">Olahraga</td>
				<td width="5">:</td>
				<td><?php echo $peserta->olahraga ?>, Tingkat : <?php echo $peserta->olahraga_tingkat ?></td>						
			</tr>
			<tr>
				<td width="150">Kesenian</td>
				<td width="5">:</td>
				<td><?php echo $peserta->kesenian?>, Tingkat : <?php echo $peserta->kesenian_tingkat ?></td>						
			</tr>
			<tr>
				<td width="150">Keagamaan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->keagamaan ?>, Tingkat : <?php echo $peserta->keagamaan_tingkat ?></td>						
			</tr>
			<tr>
				<td width="150">Keterampilan</td>
				<td width="5">:</td>
				<td><?php echo $peserta->keterampilan ?>, Tingkat : <?php echo $peserta->keterampilan_tingkat ?></td>						
			</tr>
			<tr>
				<td width="150">Bidang Lain</td>
				<td width="5">:</td>
				<td><?php echo $peserta->lainnya ?>, Tingkat : <?php echo $peserta->lainnya_tingkat ?></td>						
			</tr>
			<tr>
				<td width="150" colspan="3"><b>Beasiswa (Diisi Jika Pernah Mendapatkan)</b></td>				
			</tr>
			<tr>
				<td width="150">Pertama Tahun</td>
				<td width="5">:</td>
				<td><?php echo $peserta->beasiswa1_thn ?>, Dari : <?php echo $peserta->beasiswa1_dari ?></td>						
			</tr>
			<tr>
				<td width="150">Kedua Tahun</td>
				<td width="5">:</td>
				<td><?php echo $peserta->beasiswa2_thn ?>, Dari : <?php echo $peserta->beasiswa2_dari ?></td>						
			</tr>
            </table>
		<td>
    </tr>
</tbody> 
</div>
</table>
