<?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 jenis_cuti 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>
	<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: 50%; width:100px; height:100px;"><img src="images/mhb.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>Update Batas Cuti</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="tesbatascuti.php?id=<?php //echo $id;?>">
				  <div class="form-group">
				  
				  <label for="exampleInputPassword1">JENIS CUTI</label>
						<select readonly class="form-control" name="jeniscuti">
							<?php

							$b = "SELECT *
							FROM jenis_cuti";

							$res = mysqli_query($conn, $b);
							while ($row = mysqli_fetch_assoc($res)) {
								$selected = "";
								if ($row["id"] == $data["id_departemen"]) {
									$selected = "selected";
								}
								echo "selected : " . $row["id"] . "" . $data["id_departemen"];
							?>
								<option <?php echo $selected; ?> value="<?php echo $row["id"]; ?>">
									<?php
									echo $row["nama"];
									?>
								</option>
							<?php
							}
							?>
						</select>
				  
					<label for="exampleInputPassword1">tanggal masuk</label>
					<input type="date" class="form-control" value="<?php //echo $data["nama"];?>" name="tanggalmasuk" placeholder="">
					
					<label for="exampleInputPassword1">tanggal sekarang</label>
					<input type="text" readonly class="form-control" value="<?php echo date('yy-m-d'); ?>" name="tanggalhariini" placeholder="">
					

					
					
					
					
				  </div>
				  <input type="submit" value="Simpan" class="btn btn-primary"></input>
				  <!-- <button href="" type="submit" class="btn btn-primary">Simpan</button>  -->
				  
				  | <a href="batascuti.php?id=<?php echo $data["id"];?>"><button type="button" class="btn btn-danger">Kembali</button></a>
				  
				
				</form>
		</div>		
	</div>
	
  
  </body>
</html>




