
<?php 
	include "../koneksi.php";
?>

	<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
		<thead>
			<tr>
				<th>NOREG</th>
				<th>NAMA</th>
				<th>POSISI KERJA</th>
				<th>PERUSAHAAN</th>
				<th>LOKASI KERJA</th>
				<th>DEPARTEMENT</th>
			</tr>
		</thead>


<?php 
	$query_mysql = mysqli_query($koneksi,"SELECT * FROM DAFTAR ORDER BY NOREG DESC")or die(mysql_error());
	$nomor = 1;
	while($data = mysqli_fetch_array($query_mysql)){
?>
		<tbody>
			<tr>
				<td><?php echo $nomor++; ?></td>

				<td>
				<a href="pages-profile.php?NOREG=<?=$data['NOREG']?>"> <?php echo $data['NOREG']; ?> </a>

				</td>
				<td><?php echo $data['NAMA']; ?></td>
				<td><?php echo date('d-m-Y', strtotime($data['TGL_AWAL_KONTRAK'])); ?></td>
				<td><?php echo $data['TGL_RESIGN']; ?></td>
				<td><?php echo date('d-m-Y', strtotime($data['TGL_AKHIR_KONTRAK'])); ?></td>
				<td><?php echo $data['POSISI_KERJA']; ?></td>
				<td><?php echo $data['PERUSAHAAN']; ?></td>
				<td><?php echo $data['LOKASI_KERJA']; ?></td>
				<td><?php echo $data['DEPARTEMENT']; ?></td>

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