<?php 
include "koneksi.php";
if (!isset($_SESSION["UserID"]))
{
	header("location:login.php?p=3");
}
?>
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
  <head>
	<title> PT MULTI HYDRACHROM BALIKPAPAN </title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php
		include "part/jss.php";
	?>
	
  </head>
  <body>
	
	<div class="container">
	
		<div class="span12">
			<div class="alert alert-info">
					<b><center><h1>PT MULTI HYDRACHROM BALIKPAPAN</h1></center></b>
			</div>
					
					<?php
						include "part/menu.php";
					?>
			
			
		<div class="alert alert-info">
			 <h3>Tambah Data Karyawan</h3>
			 
			 <?php
				if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="1")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  Jenis Motor Tidak Boleh Kosong!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-primary" role="alert">
								Jenis Motor sudah ada!
							</div>
						<?php
					}
				}
				?>
			 
			 <form method="POST" action="simpanDataAnak.php">
				  <div class="form-group">
				  <h3>Data Karyawan</h3>
					<label for="exampleInputPassword1">Nama Karyawan</label>
					<input type="text/css" class="form-control" name="namaKaryawan" placeholder="">
					<label for="exampleInputPassword1">Jabatan</label>
					<input type="text/css" class="form-control" name="jabatan" placeholder="">
					<label for="exampleInputPassword1">Departemen</label>
					<select class="form-control" name="departemen">
						<?php
							$q="SELECT * FROM departemen";
							$res=mysqli_query($conn,$q);
							while ($row=mysqli_fetch_assoc($res))
							{
								?>	
									<option value="<?php echo $row["id"];?>">
										<?php
											echo $row["nama"];
										?>
									</option>
								<?php
							}
						?>
					</select>
					
					
					<h3>Data Anak</h3>
					<label for="exampleInputPassword1">Jumlah Anak</label>
					<input type="text/css" class="form-control" name="jumlahAnak" placeholder="">
					<label for="exampleInputPassword1">Nama</label>
					<input type="text/css" class="form-control" name="namaAnak" placeholder="">
					<label for="exampleInputPassword1">Jenis Kelamin</label>
					<input type="text/css" class="form-control" name="jenisKelaminAnak" placeholder="">
					<label for="exampleInputPassword1">Tempat Lahir</label>
					<input type="text/css" class="form-control" name="tempatLahir" placeholder="">
					<label for="exampleInputPassword1">Tanggal Lahir</label>
					<input type="text/css" class="form-control" name="tanggalLahir" placeholder="">
					<label for="exampleInputPassword1">NIK Anak</label>
					<input type="text/css" class="form-control" name="nikAnak" placeholder="">
					
					
					
					
					
				  </div>
				  <button type="submit" class="btn btn-primary">Simpan</button> 
				  | <button a href="jenismotor.php"type="button" class="btn btn-info">Kembali</button></a>
				</form>
		</div>		
	</div>
	
  
  </body>
</html>




