<?php 
include "koneksi.php";
if (!isset($_SESSION["UserID"]))
{
	header("location:login.php?p=3");
}
$id=mysqli_real_escape_string($conn,$_GET["id"]);
$q="SELECT * FROM data_karyawan WHERE id='$id'";
$res=mysqli_query($conn,$q);
$data=mysqli_fetch_assoc($res);
//$ids=mysqli_real_escape_string($conn,$_GET["ids"]);
?>
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
  <head>
	<title> PT. MULTI HYDRACHROM 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:100px" class="container">
			<div class="alert alert-info" style='color:#FFD700' 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 HIDRACHROM BALIKPAPAN</h1>
                </center>
            </div>
            <div>
                <center>
                    <h4>PROFESIONAL INFORMATION SYSTEM</h4>
                </center>
            </div>
        </div>
					
					<?php
						include "part/menu.php";
					?>
			
			
		<div class="alert alert-info">
			 <h3 align="center">Update Data Anak</h3>
			 
			 <?php
				if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="1")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  Berhasil diubah!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-primary" role="alert">
							Gagal!
							</div>
						<?php
					}
				}
				?>
			 
			 <form method="POST" action="simpanupdatedataanak.php?id=<?php echo $id;?>">
				  <div class="form-group">
					<label for="exampleInputPassword1">NIK</label>
					<input type="text" class="form-control" readonly value="<?php echo $data["nik"];?>" name="nik" placeholder="">
					<label for="exampleInputPassword1">NAMA KARYAWAN</label>
					<input type="text" class="form-control" readonly value="<?php echo $data["nama_karyawan"];?>" name="nama_karyawan" placeholder="">
					
					<h4>Update Data Anak 1</h4>
					<label for="exampleInputPassword1">NAMA ANAK</label>
					<input type="text" class="form-control" value="<?php echo $data["nama_anak1"];?>" name="nama_anak1" placeholder="">
					<label for="exampleInputPassword1">JENIS KELAMIN </label>
					<input type="text" class="form-control" value="<?php echo $data["jenis_kelamin_anak1"];?>" name="no_rekening_mybank1" placeholder="">
					<label for="exampleInputPassword1">TEMPAT LAHIR</label>
					<input type="text" class="form-control" value="<?php echo $data["tempat_lahir_anak1"];?>" name="tempat_lahir_anak1" placeholder="">
					<label for="exampleInputPassword1">TANGGAL LAHIR</label>
					<input type="date" class="form-control" value="<?php echo $data["tanggal_lahir_anak1"];?>" name="tanggal_lahir_anak1" placeholder="">
					<label for="exampleInputPassword1">NIK</label>
					<input type="text" class="form-control" value="<?php echo $data["nik_anak1"];?>" name="nik_anak1" placeholder="">
					
					<h4>Update Data Anak 2</h4>
					<label for="exampleInputPassword1">NAMA ANAK</label>
					<input type="text" class="form-control" value="<?php echo $data["nama_anak2"];?>" name="nama_anak2" placeholder="">
					<label for="exampleInputPassword1">JENIS KELAMIN </label>
					<input type="text" class="form-control" value="<?php echo $data["jenis_kelamin_anak2"];?>" name="jenis_kelamin_anak2" placeholder="">
					<label for="exampleInputPassword1">TEMPAT LAHIR</label>
					<input type="text" class="form-control" value="<?php echo $data["tempat_lahir_anak2"];?>" name="tempat_lahir_anak2" placeholder="">
					<label for="exampleInputPassword1">TANGGAL LAHIR</label>
					<input type="date" class="form-control" value="<?php echo $data["tanggal_lahir_anak2"];?>" name="tanggal_lahir_anak2" placeholder="">
					<label for="exampleInputPassword1">NIK</label>
					<input type="text" class="form-control" value="<?php echo $data["nik_anak2"];?>" name="nik_anak2" placeholder="">
					
					<h4>Update Data Anak 3</h4>
					<label for="exampleInputPassword1">NAMA ANAK</label>
					<input type="text" class="form-control" value="<?php echo $data["nama_anak3"];?>" name="nama_anak3" placeholder="">
					<label for="exampleInputPassword1">JENIS KELAMIN </label>
					<input type="text" class="form-control" value="<?php echo $data["jenis_kelamin_anak3"];?>" name="jenis_kelamin_anak3" placeholder="">
					<label for="exampleInputPassword1">TEMPAT LAHIR</label>
					<input type="text" class="form-control" value="<?php echo $data["tempat_lahir_anak3"];?>" name="tempat_lahir_anak3" placeholder="">
					<label for="exampleInputPassword1">TANGGAL LAHIR</label>
					<input type="date" class="form-control" value="<?php echo $data["tanggal_lahir_anak3"];?>" name="tanggal_lahir_anak3" placeholder="">
					<label for="exampleInputPassword1">NIK</label>
					<input type="text" class="form-control" value="<?php echo $data["nik_anak3"];?>" name="nik_anak3" placeholder="">
					
					<h4>Update Data Anak 4</h4>
					<label for="exampleInputPassword1">NAMA ANAK</label>
					<input type="text" class="form-control" value="<?php echo $data["nama_anak4"];?>" name="nama_anak4" placeholder="">
					<label for="exampleInputPassword1">JENIS KELAMIN </label>
					<input type="text" class="form-control" value="<?php echo $data["jenis_kelamin_anak4"];?>" name="jenis_kelamin_anak4" placeholder="">
					<label for="exampleInputPassword1">TEMPAT LAHIR</label>
					<input type="text" class="form-control" value="<?php echo $data["tempat_lahir_anak4"];?>" name="tempat_lahir_anak4" placeholder="">
					<label for="exampleInputPassword1">TANGGAL LAHIR</label>
					<input type="date" class="form-control" value="<?php echo $data["tanggal_lahir_anak4"];?>" name="tanggal_lahir_anak4" placeholder="">
					<label for="exampleInputPassword1">NIK</label>
					<input type="text" class="form-control" value="<?php echo $data["nik_anak4"];?>" name="nik_anak4" placeholder="">
					
					
					
					
					
					
				  </div>
				  <input type="submit" value="Simpan" class="btn btn-primary"></input>
				  <!-- <button href="" type="submit" class="btn btn-primary">Simpan</button>  -->
				  
				  | <a href="datagajikaryawan.php?id=<?php echo $data["id"];?>"><button type="button" class="btn btn-danger">Kembali</button></a>
				  
				
				</form>
		</div>		
	</div>
	
  
  </body>
</html>




