<?php 
	//open form
	echo form_open(base_url('gel2'),' 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('gel2/export') ?>" onclick="return confirm('Yakin ingin mengexport rekap data pendaftar gelombang 2 ?')"><i class="fa fa-file-excel"></i> Export Excel</a> -->
	<?php } ?>
	<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="example4">
<thead>
    <tr>
        <th>No</th>
        <th>No. Pendaftaran <span class="hide-on-export"> / Tgl Trans </span></th>
        <th>Tgl Trans</th> <!-- Kolom tambahan untuk ekspor -->
        <th>Nama Lengkap <span class="hide-on-export">& Jenis Kelamin</span></th>
        <th>Jenis Kelamin </th> <!-- Kolom tambahan untuk ekspor -->
        <th>Tempat, Tgl Lahir</th>
        <th>Agama</th>
        <th>Sekolah Asal</th>
        <th>Program Keahlian</th>
        <th>Gelombang</th>
        <th width="10%">No. HP Casis</th>
		<th width="10%">No. HP Ayah</th>
		<th width="10%">No. HP Ibu</th>
    </tr>
</thead>
<tbody>
    <?php foreach ($gel2 as $key => $gel2) { ?>
    <tr>
        <td><?php echo $key+1; ?></td>
        <td>
            <b><?php echo $gel2->no_pendaftaran ?></b>
            <br><small class="hide-on-export"><?php echo date('d-m-Y', strtotime($gel2->tgl_trans)) ?></small>
        </td>
		<td><?php echo date('d-m-Y', strtotime($gel2->tgl_trans)) ?></td>
        <td>
            <?php echo $gel2->nama_lengkap ?> <br>
            <small class="hide-on-export"> <?php echo $gel2->jkelamin ?></small> <!-- Jenis Kelamin diberi kelas -->
        </td>
        <td><?php echo $gel2->jkelamin ?></td>
        <td><?php echo $gel2->tempat_lahir ?>, <?php echo date('d-m-Y', strtotime($gel2->tgl_lahir)) ?></td>
        <td><?php echo $gel2->agama ?></td>
        <td><?php echo $gel2->sekolah_asal ?></td>
        <td><?php echo $gel2->kompetensi ?></td>
        <td><?php echo $gel2->gelombang ?></td>
        <td><?php echo $gel2->no_hp ?></td>
		<td><?php echo $gel2->tlp_ayah ?></td>
		<td><?php echo $gel2->tlp_ibu ?></td>	
    </tr>
    <?php } ?>
</tbody>
</table>