<?php 
	//open form
	echo form_open(base_url('peserta'),' class="form-horizontal"'); 
?>

<p>	
	<?php if($this->session->userdata('level')=="Administrator" or ($this->session->userdata('level')=="Operator")) { ?>   
	<!-- <a class="btn btn-primary" href="<?php echo base_url('peserta/export') ?>" onclick="return confirm('Yakin ingin mengexport rekap data keseluruhan pendaftar ?')"><i class="fa fa-file-excel"></i> Export Excel</a> -->
	<?php } ?>
	<a href="<?php echo base_url('nilai') ?>" class="btn btn-info" data-dismiss="modal"><i class="fa fa-table nav-icon"></i> Nilai Tes BTQ</a>	
	<a href="<?php echo base_url('dashboard') ?>" class="btn btn-secondary " data-dismiss="modal"><i class="fa fa-times"></i> Kembali</a>
</p>

<?php
//panggil form tambah
//include('tambah.php');
//closing form
echo form_close();
?>
<table class="table table-bordered table-striped table-sm" id="example5">
	<thead>
		<tr>
			<th width="5%">NO.</th>			
			<th width="8%">NO. PEND</th>			
			<th width="8%">TGL. TRANS</th>			
			<th width="20%">NAMA LENGKAP</th>
			<th width="20%">JENIS KELAMIN</th>
			<th width="10%">NIK</th>
			<th width="15%">TEMPAT/TGL. LAHIR</th>
			<th width="10%">AGAMA</th>
			<th width="10%">KEMEJA</th>
			<th width="10%">CELANA/ROK</th>
			<th width="10%">SEPATU</th>	
			<th width="20%">SEKOLAH ASAL</th>
			<th width="20%">NO. IJAZAH SMP/MTs</th>
			<th width="25%">KOMP. KEAHLIAN DIMINATI</th>					
			<th width="10%">GELOMBANG</th>	
			<th width="10%">NO. HP CASIS</th>
			<th width="10%">NAMA AYAH</th>
			<th width="10%">NO. HP AYAH</th>
			<th width="10%">NAMA IBU</th>
			<th width="10%">NO. HP IBU</th>
			<th width="10%">NAMA WALI</th>
			<th width="10%">NO. HP WALI</th>	
			<th>ALAMAT CASIS</th>
			<th>TGL. INPUT</th>
			<th>ACTION</th>
		</tr>
	</thead>
	<tbody>
		<?php foreach ($peserta as $key => $peserta) { ?>
					
		<tr>
			<td><?php echo $key+1; ?></td>
			<td><b><?php echo $peserta->no_pendaftaran ?></b>
				<!-- <br><small class="hide-on-export"><?php echo date('d-m-Y', strtotime($peserta->tgl_trans)) ?></small> -->
			</td>			
			<td><?php echo date('d-m-Y', strtotime($peserta->tgl_trans)) ?></td>			
			<td><?php echo $peserta->nama_lengkap ?>
				<!-- <br><small class="hide-on-export"><?php echo $peserta->jkelamin ?></small> -->
			</td>
			<td><?php echo $peserta->jkelamin ?></td>
			<td><?php echo $peserta->nik ?></td>
			<td><?php echo $peserta->tempat_lahir ?>, <?php echo date('d-m-Y', strtotime($peserta->tgl_lahir)) ?></td>
			<td><?php echo $peserta->agama ?></td>
			<td><?php echo $peserta->kemeja ?></td>
			<td><?php echo $peserta->celana ?></td>
			<td><?php echo $peserta->sepatu ?></td>
			<td><?php echo $peserta->sekolah_asal ?></td>
			<td><?php echo $peserta->Ijazah_no ?></td>
			<td><?php echo $peserta->kompetensi ?></td>			
			<td><?php echo $peserta->gelombang ?></td>
			<td><?php echo $peserta->no_hp ?></td>
			<td><?php echo $peserta->nama_ayah ?></td>
			<td><?php echo $peserta->tlp_ayah ?></td>
			<td><?php echo $peserta->nama_ibu ?></td>
			<td><?php echo $peserta->tlp_ibu ?></td>
			<td><?php echo $peserta->nama_wali ?></td>
			<td><?php echo $peserta->tlp_wali ?></td>
			<td><?php echo $peserta->alamat_siswa ?></td>
			<td><?php echo date('d-m-Y', strtotime($peserta->tgl_trans)) ?></td>
			<td>
				<div class="btn-group">					
					<a href="<?php echo base_url('peserta/detail/'.$peserta->no_pendaftaran) ?>" class="btn btn-info btn-sm">
						<i class="fa fa-laptop"></i> Detail						
					</a>					
				</div>
			</td>
		</tr>

	<?php } ?>
	</tbody>
</table>