<?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>
	<link rel="icon" type="image/png" href="images/mhb.jpeg">
						<?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" 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>		
		<div class="alert alert-info">
			 <h3 align="center">TAMBAH HAK AKSES 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">
							  Hak Akses Berhasil Ditambah!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-danger" role="alert">
								gagal!
							</div>
						<?php
					}
				}

				if (isset($_GET['pesan'])) {
					if ($_GET['pesan'] == "berhasilInput") {
						echo "<div class='alert alert-success' role='alert'> Berhasil Input DB. </div>";
					}
					// if ($_GET['pesan'] == "berhasilInput") {
					// 	echo "<div class='alert alert-danger' role='alert'> Berhasil Input DB. </div>";
					// }
				}
				?>
			 
			 <form method="POST" action="simpanTambahHakaksesSystem.php">
				  <div class="form-group" align="center">
				  <h5 align="center" color="rgb(239, 255, 255)" >"menambahkan hak akses karyawan untuk membuka Profesional Information System"</h5>
				  
				  <?php
				   echo date('d - m - Y');
				  ?>
				  
				  <p>
				  </p>
				 
				   <label for="exampleInputPassword1">NAMA</label>
						<select class="form-control" name="nama">
							<?php

							$b = "SELECT *
							FROM data_karyawan
							WHERE hakakses='0'";

							$res = mysqli_query($conn, $b);
							while ($row = mysqli_fetch_assoc($res)) 
							{
								$selected = "";
							?>
								<option <?php echo $selected; ?> value="<?php echo $row["id"]; ?>">
									<?php
									echo $row["nama_karyawan"];
									?>
								</option>
							<?php
							}
							?>
						</select>
				  
					<label for="exampleInputPassword1">PASSWORD</label>
					<input type="text/css" class="form-control" name="password" placeholder="">
					
					
					
					
					<h3 align="center">HAK AKSES</h3>
						
						<form method='POST' action=''>
                        <h4><select name="hakakses">
						<option value="5">DIREKTUR </option>
                        <option value="3">MANAGER FUNGSIONAL </option>
                        <option value="7">MANAGER OPERASIONAL </option>
						<option value="1006">SPV. ACCOUNTING</option>
						<option value="10010">SPV. PURCHASING</option>
						<option value="1008">SPV. QC / ENG</option>
						<option value="1009">SPV. PRODUKSI / PPIC / WAREHOUSE</option>
						<option value="1002">SPV. HSE IT SYSTEM</option>
						<option value="10">PURCHASING</option>
						<option value="6">ACCOUNTING</option>
						<option value="4">ADMIN HC&GA </option>
						<option value="2">HSE IT SYSTEM</option>
						<option value="8">QC / ENG</option>
						<option value="9">PRODUKSI / PPIC / WAREHOUSE</option>
						<option value="99">LAINNYA</option>
                        </select>
                        </h4>
                        </form>
					
					
					
					
				 <br>
				 </br>
				  <button type="submit" class="btn btn-warning">Simpan</button> 
				</form>
				<br>
				 </br>
				 <br>
				 </br>
				 <br>
				 </br>
			
		<center><h5 class="form-signin">Copyright &copy; <a href="#" data-toggle="modal" data-target="#contact">SatrioPringgondani</a></h5></center>  
	</div>	  
  </body>
</html>




