	<?php 
	session_start();

	// cek apakah yang mengakses halaman ini sudah login
	if($_SESSION['level']==""){
		header("location:login.php?pesan=gagal");
	}
	?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>HOME</title>

    <!-- Custom fonts for this template -->
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="../css/sb-admin-2.min.css" rel="stylesheet">
    <link href="../css/style.min.css" rel="stylesheet">

    <!-- Custom styles for this page -->
    <link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
	
</head>

<body id="page-top">
	
    <!-- Page Wrapper -->
    <div id="wrapper">

        <!-- Sidebar -->
        <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

            <!-- Sidebar - Brand -->
            <a class="sidebar-brand d-flex align-items-center justify-content-center" href="#">
                <div class="sidebar-brand-icon rotate-n-15">
                    <i class="far fa-handshake"></i>
                </div>
                <div class="sidebar-brand-text mx-3">GEMILANG <sup>corp</sup></div>
            </a>

            <!-- GARIS BATAS MENU -->
            <hr class="sidebar-divider my-0">

            <!-- Nav Item - Beranda -->
            <li class="nav-item">
                <a class="nav-link" href="index.php">
                    <i class="fas fa-fw fa-tachometer-alt"></i>
                    <span>Beranda</span></a>
            </li>








			<!-- GARIS BATAS MENU-->
            <hr class="sidebar-divider">

            <!-- Heading -->
            <div class="sidebar-heading">
                Interface
            </div>

            <!-- Nav Item - Pages Collapse Menu -->
            <li class="nav-item active">
                <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
                    aria-expanded="true" aria-controls="collapseTwo">
                    <i class="fas fa-fw fa-male fa-2x text-gray-300"></i>
                    <span>Karyawan</span>
                </a>
                <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
                    <div class="bg-white py-2 collapse-inner rounded">
                        <h6 class="collapse-header">Karyawan:</h6>
						<a class="collapse-item collapse-header active" href="nav.Personal_Info.php">PERSONAL INFO</a>
						<a class="collapse-item collapse-header" href="nav.Alamat_Kontak.php">ALAMAT & KONTAK PERSONAL</a>
						<a class="collapse-item collapse-header" href="nav.Asuransi.php">INFORMASI ASURANSI</a>
						<a class="collapse-item collapse-header" href="nav.Akun_Bank.php">AKUN BANK</a>
						<a class="collapse-item collapse-header" href="nav.Dokumen_Karyawan.php">DOKUMEN</a>
                    </div>
                </div>
            </li>





            <!-- Nav Item - Waktu & Kehadiran Collapse Menu -->
 			<li class="nav-item">
                <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseKehadiran"
                    aria-expanded="true" aria-controls="collapseKehadiran">
                    <i class="fas fa-fw far fa-clock fa-2x text-gray-300"></i>
                    <span>Waktu & Kehadiran</span>
                </a>
                <div id="collapseKehadiran" class="collapse" aria-labelledby="headingKehadiran"
                    data-parent="#accordionSidebar">
                    <div class="bg-white py-2 collapse-inner rounded">
                        <h6 class="collapse-header">Waktu & Kehadiran:</h6>
                        <a class="collapse-item collapse-header" href="utilities-color.html">Cuti</a>
                        <a class="collapse-item collapse-header" href="utilities-border.html">Ijin</a>
                        <a class="collapse-item collapse-header" href="utilities-animation.html">Sakit</a>
                        <a class="collapse-item collapse-header" href="utilities-other.html">Lembur</a>
                    </div>
                </div>
            </li>





            <!-- Nav Item - Penggajian Menu -->
 			<li class="nav-item">
                <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePenggajian"
                    aria-expanded="true" aria-controls="collapsePenggajian">
					<i class="fas fa-fw fa-dollar-sign fa-2x text-gray-300"></i>
                    <span>Penggajian</span>
                </a>
                <div id="collapsePenggajian" class="collapse" aria-labelledby="headingPenggajian"
                    data-parent="#accordionSidebar">
                    <div class="bg-white py-2 collapse-inner rounded">
                        <h6 class="collapse-header">Penggajian</h6>
                        <a class="collapse-item collapse-header" href="utilities-color.html">Komponen Gaji</a>
                        <a class="collapse-item collapse-header" href="utilities-border.html">Slip Gaji</a>
                        <a class="collapse-item collapse-header" href="404.html">Coming Soon..</a>
                        <a class="collapse-item collapse-header" href="404.html">Coming Soon..</a>
                    </div>
                </div>
            </li>





            <!-- Nav Item - Administrasi Karir -->
 			<li class="nav-item">
                <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseKarir"
                    aria-expanded="true" aria-controls="collapseKarir">
					<i class="fas fa-fw fa-clipboard-list fa-2x text-gray-300"></i>
                    <span>Administrasi Karir</span>
                </a>
                <div id="collapseKarir" class="collapse" aria-labelledby="headingUtilities"
                    data-parent="#accordionSidebar">
                    <div class="bg-white py-2 collapse-inner rounded">
                        <h6 class="collapse-header">Administrasi Karir</h6>
                        <a class="collapse-item collapse-header" href="utilities-color.html">Surat Tugas</a>
                        <a class="collapse-item collapse-header" href="utilities-border.html">Kontrak Kerja</a>
                        <a class="collapse-item collapse-header" href="404.html">Pencatatan Karir</a>
                        <a class="collapse-item collapse-header" href="404.html">Coming Soon..</a>
                    </div>
                </div>
            </li>





			<!-- GARIS BATAS MENU-->
            <hr class="sidebar-divider">

            <!-- Heading -->
            <div class="sidebar-heading">
                Addons
            </div>

            <!-- Nav Item - Pages Collapse Menu -->
             <li class="nav-item">
                <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages"
                    aria-expanded="true" aria-controls="collapsePages">
                    <i class="fas fa-fw fa-wrench fa-2x text-gray-300""></i>
                    <span>Pages</span>
                </a>
                <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
                    <div class="bg-white py-2 collapse-inner rounded">
                        <h6 class="collapse-header">Login Screens:</h6>
                        <a class="collapse-item collapse-header" href="login.html">Login</a>
                        <a class="collapse-item collapse-header" href="register.html">Register User</a>
                        <a class="collapse-item collapse-header" href="forgot-password.html">Ganti Kata Sandi</a>
                        <div class="collapse-divider"></div>
                        <h6 class="collapse-header">Other Pages:</h6>
                        <a class="collapse-item collapse-header" href="404.html">Coming Soon..</a>
                        <a class="collapse-item collapse-header" href="blank.html">Coming Soon..</a>
                    </div>
                </div>
            </li>


			<!-- GARIS BATAS MENU-->
            <hr class="sidebar-divider d-none d-md-block">

            <!-- Sidebar Toggler (Sidebar) -->
            <div class="text-center d-none d-md-inline">
                <button class="rounded-circle border-0" id="sidebarToggle"></button>
            </div>

            <!-- Sidebar Message -->
            <div class="sidebar-card d-none d-lg-flex">
                <img class="sidebar-card-illustration mb-2" src="img/undraw_rocket.svg" alt="...">
                 <p class="text-center mb-2"><strong> bergeraklah sejauh mungkin, </strong>karena tujuan akhir kehidupan adalah "PULANG.!"</p>
			</div>
        </ul>
        <!-- End of Sidebar -->


													<!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

                    <!-- Sidebar Toggle (Topbar) -->
                    <form class="form-inline">
						<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
							<i class="fa fa-bars"></i>
						</button>
                    </form>

                    <!-- Topbar Search -->
<!--                    <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
                        <div class="input-group">
                            <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
                                aria-label="Search" aria-describedby="basic-addon2">
                            <div class="input-group-append">
                                <button class="btn btn-primary" type="button">
                                    <i class="fas fa-search fa-sm"></i>
                                </button>
                            </div>
                        </div>
                    </form>
-->
                    <!-- Topbar Navbar -->
                    <ul class="navbar-nav ml-auto">

                        <!-- Nav Item - Search Dropdown (Visible Only XS) -->
                        <li class="nav-item dropdown no-arrow d-sm-none">
                            <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <i class="fas fa-search fa-fw"></i>
                            </a>
                            <!-- Dropdown - Messages -->
                            <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in"
                                aria-labelledby="searchDropdown">
                                <form class="form-inline mr-auto w-100 navbar-search">
                                    <div class="input-group">
                                        <input type="text" class="form-control bg-light border-0 small"
                                            placeholder="Search for..." aria-label="Search"
                                            aria-describedby="basic-addon2">
                                        <div class="input-group-append">
                                            <button class="btn btn-primary" type="button">
                                                <i class="fas fa-search fa-sm"></i>
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </li>

                        <div class="topbar-divider d-none d-sm-block"></div>

                        <!-- Nav Item - User Information -->
                        <li class="nav-item dropdown no-arrow">
                            <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <span class="mr-2 d-none d-lg-inline text-gray-600 small"><b><?php echo $_SESSION['nama']; ?></b></span>
                                <img class="img-profile rounded-circle"
                                    src="img/undraw_profile.svg">
                            </a>
                            <!-- Dropdown - User Information -->
                            <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
                                aria-labelledby="userDropdown">
<!--                                <a class="dropdown-item" href="#">
                                    <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Profile
                                </a>
                                 <a class="dropdown-item" href="#">
                                    <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Settings
                                </a>
                                <a class="dropdown-item" href="#">
                                    <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Activity Log
                                </a>
--> 
								<div class="dropdown-divider"></div>
								<a class="dropdown-item" href="../logout.php" data-toggle="modal" data-target="#logoutModal">
                                    <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Logout
                                </a>
                            </div>
                        </li>
                    </ul>
                </nav>
                <!-- End of Topbar -->

												<!-- Begin Page Content -->
						<!-- Modal Dialog New Employee -->
<div class="modal fade" id="NewEmp" tabindex="-5" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<!-- Container fluid  -->
			<!-- ============================================================== -->
			<div class="container-fluid">
				<!-- ============================================================== -->
				<!-- Start Page Content -->
				<!-- ============================================================== -->
				<!-- Row -->
				<div class="row">
					<div class="col-lg-12">
						<div class="modal-header">
							<h4 class="modal-title" id="myModalLabel">Karyawan Baru</h4>
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						</div>
						<div class="modal-body">
							<?php
								// menghubungkan dengan koneksi database
								include '../koneksi.php';
								// Cari NIK Akhir
								include 'urutan.nik.php';
							?>
							
							<form method="POST" action="BtnSimpan_Personal.Info.php" class="user">
								<div class="form-group">
									<input type="text" id="nama" name="NIK" class="form-control form-control-user" required="required" value="<?php echo $kodeNIK ?>" >
								</div>

								<div class="form-group">
									<input type="text" id="nama" name="NAMA" class="form-control form-control-user" autocomplete="on" placeholder="NAMA LENGKAP" required="required">
								</div>

									<label class="collapse-item small">MASA KONTRAK :</label>

								<div class="form-group row">
									<div class="col-sm-6 mb-3 mb-sm-0">
										<input type="date" id="tgljoin" name="TGL_AWAL_KONTRAK" class="form-control" autocomplete="off" placeholder="Tanggal Awal Kontrak" required="required">
									</div>
									<div class="col-sm-6">
										<input type="date" id="tglakhir" name="TGL_AKHIR_KONTRAK" class="form-control" autocomplete="off" placeholder="Tanggal Awal Kontrak" required="required">
									</div>
								</div>

								<div class="form-group row">
									<div class="col-sm-6 mb-3 mb-sm-0">
										<input type="text" id="posisikerja" name="POSISI_KERJA" class="form-control form-control-user" autocomplete="on" placeholder="POSISI KERJA" required="required">
									</div>
									<div class="col-sm-6">
										<input type="text" id="perusahaan" name="PERUSAHAAN" class="form-control form-control-user" autocomplete="on" placeholder="PERUSAHAAN" required="required">
									</div>
								</div>

								<div class="form-group row">
									<div class="col-sm-6 mb-3 mb-sm-0">
										<input type="text" id="lokasikerja" name="LOKASI_KERJA" class="form-control form-control-user" autocomplete="on" placeholder="LOKASI KERJA" required="required">
									</div>
									<div class="col-sm-6 mb-3 mb-sm-0">
										<input type="text" id="departement" name="DEPARTEMENT" class="form-control form-control-user" autocomplete="on" placeholder="DEPARTEMENT" required="required">
									</div>
								</div>


								<div class="card-header py-12 d-sm-flex align-items-center justify-content-between mb-4">
									<input type="submit" class="btn btn-primary btn-icon-split" value="SIMPAN">
									<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">BATAL</button>
<!--										<input type="Reset" class="btn btn-danger btn-icon-split"  value="RESET"> -->
								</div>
						</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


                <div class="container-fluid">

													<!-- Page Heading -->
												<!-- NEW EMP &GENERATE REPORT -->
                    <div class="card shadow mb-2">
                        <div class="card-header py-12 d-sm-flex align-items-center justify-content-between mb-4">
							<a href="#" data-toggle="modal" data-target="#NewEmp" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm" aria-expanded="false">
							<i class="fas fa-user-plus" aria-hidden="true"></i></a>
									
							<a href="exp.data.karyawan.php" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm">
							<i class="fas fa-download fa-sm text-white-50"></i> Generate Report</a>
						</div>

												<!-- CONTENT -->
						<div class="card-body">
                            <div class="table-responsive">
								<tbody>
									<?php 
										include "Konten.Personal_Info.php";
									?>
								</tbody>
							</div>
						</div>			
					</div>
					

				</div>
				<!-- /.container-fluid -->
			</div>
			<!-- End of Main Content -->



												<!-- Footer -->
<footer class="sticky-footer bg-white">
	<div class="container my-auto">
		<div class="copyright text-center my-auto">
			<span>Copyright &copy; Gemilang 2022</span>
		</div>
	</div>
</footer>
												<!-- End of Footer -->
        </div>
        <!-- End of Content Wrapper -->
    </div>
    <!-- End of Page Wrapper -->

												<!-- Scroll to Top Button-->
    <a class="scroll-to-top rounded" href="#page-top">
        <i class="fas fa-angle-up"></i>
    </a>


												<!-- Logout Modal-->
    <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
        aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Yakin mau udahan.?</h5>
                    <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">Udah Nyerah.?</div>
                <div class="modal-footer">
                    <button class="btn btn-secondary" type="button" data-dismiss="modal">Batal, masih cemungud</button>
                    <a class="btn btn-primary" href="../login.php">Udahan ahh, capek</a>
                </div>
            </div>
        </div>
    </div>


    <!-- Bootstrap core JavaScript-->
    <script src="../vendor/jquery/jquery.min.js"></script>
    <script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="vendor/jquery-easing/jquery.easing.min.js"></script>

    <!-- Custom scripts for all pages-->
    <script src="js/sb-admin-2.min.js"></script>

    <!-- Page level plugins -->
    <script src="vendor/datatables/jquery.dataTables.min.js"></script>
    <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>
    <script src="vendor/chart.js/Chart.min.js"></script>

    <!-- Page level custom scripts -->
    <script src="js/demo/chart-area-demo.js"></script>
    <script src="js/demo/chart-pie-demo.js"></script>
    <script src="js/demo/datatables-demo.js"></script>

</body>

</html>