<?php
include "koneksi.php";
if (!isset($_SESSION["UserID"])) {
    header("location:login.php?p=3");
}
$idKaryawan = $_GET['id'];
//echo "<br>idkaryawan : . $idKaryawan;</br>";
?>
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<html>

<head>
    <title> PT. MULTI HIDRACHROME BALIKPAPAN </title>
	<?php
	include "part/menu2.php";
	?>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php
    include "part/jss.php";
    ?>


</head>

<body>
    <div style="width:1280px; height:220px" class="container" >

			
				<div class="alert alert-info" style='background-color:#F8F8FF' href="#">
				<div style="display: block; margin-left: auto; margin-right: auto; width: 1000px;  height:100px;"><img style="width: 1000px;  height:180px;" src="images/hd.jpg"></div>
				<div>
                <center>
                    <h1>PT. MULTI HYDRACHROM BALIKPAPAN</h1>
                </center>
            </div>
            <div>
                <center>
                    <h4>PROFESIONAL INFORMATION SYSTEM</h4>
                </center>
            </div>
        </div>

        <?php
        

        $q = "SELECT *
            FROM data_karyawan
            WHERE id = $idKaryawan";
        $res = mysqli_query($conn, $q);
        while ($row = mysqli_fetch_assoc($res)) {


        ?>

            <div class="alert alert-info" align='center'>
                <h3>Data Karyawan</h3>
                <table class="table table-hover">
                    <tbody>
                        <tr>
                            <td>NIK  </td>
                            <td><?php echo $row["nik"]; ?></td>
                        </tr>
                        <tr>
                            <td>NAMA  </td>
                            <td><?php echo $row["nama_karyawan"]; ?></td>
                        </tr>

                         <tr>
                            <td>JABATAN  </td>
                            <td><?php echo $row["jabatan"]; ?></td>
                        </tr>

                        <tr>
                            <td>DEPARTEMENT  </td>
                            <td><?php echo $row["departement"]; ?></td>
                        </tr>
						<tr>
                            <td>ASAL PENERIMAAN  </td>
                            <td><?php echo $row["asal_penerimaan"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL MASUK  </td>
                            <td><?php echo $row["tanggal_masuk"]; ?></td>
                        </tr>
                        <tr>
                            <td>LAMA BEKERJA  </td>
                            <td>
							        <?php
									//echo $row["lama_bekerja"];
									$tanggalmasuk = $row["tanggal_masuk"];
									
									date_default_timezone_set('Asia/Jakarta');
                                    $awal = date_create($tanggalmasuk);
                                    $akhir = date_create('');
                                    $diff = date_diff($akhir,$awal);

                                    echo '('.$diff->y . ' tahun-';
                                    echo $diff->m . ' bulan-';
                                    echo $diff->d . ' hari)';
									?>
						    </td>
                        </tr>
                        <tr>
                            <td>DURASI KONTRAK PERBULAN  </td>
                            <td><?php echo $row["durasi_kontrak_bulan"]; ?></td>
                        </tr>
                        <tr>
                            <td>AKHIR KONTRAK  </td>
                            <td><?php echo $row["akhir_kontrak"]; ?></td>
                        </tr>
                        <tr>
                            <td>TEMPAT  </td>
                            <td><?php echo $row["tempat"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL LAHIR  </td>
                            <td><?php echo $row["tanggal_lahir"]; ?></td>
                        </tr>
                        <tr>
                            <td>STATUS PERKAWINAN  </td>
                            <td><?php echo $row["status_perkawinan"]; ?></td>
                        </tr>
                        <tr>
                            <td>AGAMA  </td>
                            <td><?php echo $row["agama"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS KELAMIN  </td>
                            <td><?php echo $row["jenis_kelamin"]; ?></td>
                        </tr>
                        <tr>
                            <td>NIK KTP  </td>
                            <td><?php echo $row["nik_ktp"]; ?></td>
                        </tr>
                        <tr>
                            <td>NPWP  </td>
                            <td><?php echo $row["npwp"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR BPJS TENAGA KERJA </td>
                            <td><?php echo $row["no_bpjs_kesehatan"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR REKENING BNI  </td>
                            <td><?php echo $row["no_rekening_bni"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR REKENING MYBANK  </td>
                            <td><?php echo $row["no_rekening_mybank"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR REKENING UOB  </td>
                            <td><?php echo $row["no_rekening_uob"]; ?></td>
                        </tr>
                        <tr>
                            <td>KODE  </td>
                            <td><?php echo $row["kode"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR TELP / HP  </td>
                            <td><?php echo $row["no_telp_hp"]; ?></td>
                        </tr>
                        <tr>
                            <td>PENDIDIKAN TERAKHIR  </td>
                            <td><?php echo $row["pendidikan_terakhir"]; ?></td>
                        </tr>
                        <tr>
                            <td>STATUS KEPEGAWAIAN  </td>
                            <td><?php echo $row["status_kepegawaian"]; ?></td>
                        </tr>
                        <tr>
                            <td>EMERGENCY CONTACT  </td>
                            <td><?php echo $row["emergency_contact"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR EMERGENCY  </td>
                            <td><?php echo $row["no_emergency"]; ?></td>
                        </tr>
                        <tr>
                            <td>NOMOR KK  </td>
                            <td><?php echo $row["no_kk"]; ?></td>
                        </tr>
                        <tr>
                            <td>UKURAN BAJU  </td>
                            <td><?php echo $row["ukuran_baju"]; ?></td>
                        </tr>
                        <tr>
                            <td>UKURAN CELANA  </td>
                            <td><?php echo $row["ukuran_celana"]; ?></td>
                        </tr>
                        <tr>
                            <td>UKURAN SEPATU  </td>
                            <td><?php echo $row["ukuran_sepatu"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS SIM  </td>
                            <td><?php echo $row["jenis_sim"]; ?></td>
                        </tr>
                        <tr>
                            <td>GOLONGAN DARAH  </td>
                            <td><?php echo $row["golongan_darah"]; ?></td>
                        </tr>
                        <tr>
                            <td>ALAMAT  </td>
                            <td><?php echo $row["alamat"]; ?></td>
                        </tr>
                        <tr>
                            <td>RT  </td>
                            <td><?php echo $row["rt"]; ?></td>
                        </tr>
                        <tr>
                            <td>KELURAHAN  </td>
                            <td><?php echo $row["kelurahan"]; ?></td>
                        </tr>
                        <tr>
                            <td>KECAMATAN  </td>
                            <td><?php echo $row["kecamatan"]; ?></td>
                        </tr>
                        <tr>
                            <td>
                                <h4>Gaji</h4>
                            </td>

                        </tr>
                        <tr>
                            <td>GAJI : </td>
                            <td><?php echo $row["gaji"]; ?></td>
                        </tr>
                        <tr>
                            <td>TUNJANGAN JABATAN : </td>
                            <td><?php echo $row["tunjangan_jabatan"]; ?></td>
                        </tr>
                        <tr>
                            <td>TUNJANGAN OPERASIONAL : </td>
                            <td><?php echo $row["tunjangan_operasional"]; ?></td>
                        </tr>
                        <tr>
                            <td>TUNJANGAN KOMUNIKATIF : </td>
                            <td><?php echo $row["tunjangan_komunikatif"]; ?></td>
                        </tr>
                        <tr>
                            <td>TUNJANGAN MAKAN : </td>
                            <td><?php echo $row["tunjangan_makan"]; ?></td>
                        </tr>
                        <tr>
                            <td>TUNJANGAN TRANSPORT : </td>
                            <td><?php echo $row["tunjangan_transport"]; ?></td>
                        </tr>
                        <tr>
                            <td>TUNJANGAN TOTAL UPAH : </td>
                            <td><?php echo $row["tunjangan_total_upah"]; ?></td>
                        </tr>
                        <tr>
                            <td>
                                <h4>Data Pasangan</h4>
                            </td>

                        </tr>
                        <tr>
                            <td>NAMA : </td>
                            <td><?php echo $row["nama_pasangan"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS KELAMIN : </td>
                            <td><?php echo $row["jenis_kelamin_pasangan"]; ?></td>
                        </tr>
                        <tr>
                            <td>TEMPAT LAHIR : </td>
                            <td><?php echo $row["tempat_lahir_pasangan"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL LAHIR : </td>
                            <td><?php echo $row["tnaggal_lahir"]; ?></td>
                        </tr>
                        <tr>
                            <td>NIK : </td>
                            <td><?php echo $row["nik_pasangan"]; ?></td>
                        </tr>
                        <tr>
                            <td>
                                <h4>Data Anak 1 Karyawan</h4>
                            </td>

                        </tr>
                        <tr>
                            <td>NAMA ANAK : </td>
                            <td><?php echo $row["nama_anak1"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS KELAMIN : </td>
                            <td><?php echo $row["jenis_kelamin_anak1"]; ?></td>
                        </tr>
                        <tr>
                            <td>TEMPAT LAHIR : </td>
                            <td><?php echo $row["tempat_lahir_anak1"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL LAHIR : </td>
                            <td><?php echo $row["tanggal_lahir_anak1"]; ?></td>
                        </tr>
                        <tr>
                            <td>NIK : </td>
                            <td><?php echo $row["nik_anak1"]; ?></td>
                        </tr>
                        <tr>
                            <td>
                                <h4>Data Anak 2 Karyawan</h4>
                            </td>

                        </tr>
                        <tr>
                            <td>NAMA ANAK : </td>
                            <td><?php echo $row["nama_anak2"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS KELAMIN : </td>
                            <td><?php echo $row["jenis_kelamin_anak2"]; ?></td>
                        </tr>
                        <tr>
                            <td>TEMPAT LAHIR : </td>
                            <td><?php echo $row["tempat_lahir_anak2"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL LAHIR : </td>
                            <td><?php echo $row["tanggal_lahir_anak2"]; ?></td>
                        </tr>
                        <tr>
                            <td>NIK : </td>
                            <td><?php echo $row["nik_anak2"]; ?></td>
                        </tr>
                        <tr>
                            <td>
                                <h4>Data Anak 3 Karyawan</h4>
                            </td>

                        </tr>
                        <tr>
                            <td>NAMA ANAK : </td>
                            <td><?php echo $row["nama_anak3"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS KELAMIN : </td>
                            <td><?php echo $row["jenis_kelamin_anak3"]; ?></td>
                        </tr>
                        <tr>
                            <td>TEMPAT LAHIR : </td>
                            <td><?php echo $row["tempat_lahir_anak3"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL LAHIR : </td>
                            <td><?php echo $row["tanggal_lahir_anak3"]; ?></td>
                        </tr>
                        <tr>
                            <td>NIK : </td>
                            <td><?php echo $row["nik_anak3"]; ?></td>
                        </tr>
                        <tr>
                            <td>
                                <h4>Data Anak 4 Karyawan</h4>
                            </td>

                        </tr>
                        <tr>
                            <td>NAMA ANAK : </td>
                            <td><?php echo $row["nama_anak4"]; ?></td>
                        </tr>
                        <tr>
                            <td>JENIS KELAMIN : </td>
                            <td><?php echo $row["jenis_kelamin_anak4"]; ?></td>
                        </tr>
                        <tr>
                            <td>TEMPAT LAHIR : </td>
                            <td><?php echo $row["tempat_lahir_anak4"]; ?></td>
                        </tr>
                        <tr>
                            <td>TANGGAL LAHIR : </td>
                            <td><?php echo $row["tanggal_lahir_anak4"]; ?></td>
                        </tr>
                        <tr>
                            <td>NIK : </td>
                            <td><?php echo $row["nik_anak4"]; ?></td>
                        </tr>
                    </tbody>

                </table>
                <a href="datakaryawan.php" class="btn btn-danger">Kembali</a>
            </div>


        <?php
        }
        ?>
		<center><h5 class="form-signin">Copyright &copy; <a href="#" data-toggle="modal" data-target="#contact">SatrioPringgondani</a></h5></center>  


</body>

</html>