<?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 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>
					
					<?php
						include "part/menu.php";
					?>
			
			
		<div class="alert alert-info" center>
			
			 
			 <?php
				if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="1")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  Testing YES!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Testing NO!
							</div>
						<?php
					}
					else if ($p=="3")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Maaf, Gambar gagal untuk diupload!
							</div>
						<?php
					}
					else if ($p=="4")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Maaf, Ukuran gambar yang diupload tidak boleh lebih dari 1MB!
							</div>
						<?php
					}
					else if ($p=="5")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Maaf, Tipe gambar yang diupload harus JPG / JPEG / PNG!
							</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>";
					// }
				}
				?>
				<?php
				$d = $_GET["d"];
				
				
				$q="SELECT * FROM barang_job WHERE id='$d'";
						$res=mysqli_query($conn,$q);
						$dataUser=mysqli_fetch_assoc($res);
						$status = $dataUser["status"];
						$testing = $dataUser["testing"]; // 1= yes 2=no
						$no_mhb_id = $dataUser["no_mhb_id"];
						
						
                       						
				if ($status == 3 && $testing == 1)// yess
				{
					
				
				?>
				 <h3 align="center">PRINT INSPECTION REPORT 2</h3>
			 <h4 align="center">Testing YES!</h4>
			 <form method="POST" action="simpanPrintInspectionReport2.php?id=<?php echo $no_mhb_id ?>" enctype="multipart/form-data">
				  <div class="form-group" align="center">
				  <h5 align="center" color="rgb(239, 255, 255)" ></h5>
									  
				  
				  
				  <?php
				   echo date('d - m - Y');
				   $tanggal = date('d - m - Y');
				  ?> 
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-01 : </label>
		            <input type="file" name="MHB-FR-QC-001-01">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-02 : </label>
		            <input type="file" name="MHB-FR-QC-001-02">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-03 : </label>
		            <input type="file" name="MHB-FR-QC-001-03">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-04 : </label>
		            <input type="file" name="MHB-FR-QC-001-04">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-05 : </label>
		            <input type="file" name="MHB-FR-QC-001-05">
				     <br></br>
				  <h3 align="center">RECOMENDATION QC</h3>
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-PROD-001-01 : </label>
		            <input type="file" name="MHB-FR-PROD-001-01">
				  <h3 align="center">TESTING REPORT</h3>
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-10 : </label>
		            <input type="file" name="MHB-FR-QC-001-10">
					 <br></br><br></br>
				  <button type="submit" class="btn btn-primary">Lanjut Proses</button> 	
			</form>
			<?php
			}
			?>
			<?php
			if ($status == 3 && $testing == 2)// No
				{
					
				
				?>
			 <h4 align="center">Testing NO!</h4>
			 <form method="POST" action="simpanPrintInspectionReport3.php?id=<?php echo $no_mhb_id ?>" enctype="multipart/form-data">
				  <div class="form-group" align="center">
				  <h5 align="center" color="rgb(239, 255, 255)" ></h5>
				  
				  <?php
				   echo date('d - m - Y');
				   $tanggal = date('d - m - Y');
				  ?> 
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-01 : </label>
		            <input type="file" name="MHB-FR-QC-001-01">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-02 : </label>
		            <input type="file" name="MHB-FR-QC-001-02">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-03 : </label>
		            <input type="file" name="MHB-FR-QC-001-03">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-04 : </label>
		            <input type="file" name="MHB-FR-QC-001-04">
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-QC-001-05 : </label>
		            <input type="file" name="MHB-FR-QC-001-05">
				     <br></br>
				  <h3 align="center">RECOMENDATION QC</h3>
				  <p></p>
				    <label for="exampleInputPassword1">MHB-FR-PROD-001-01 : </label>
		            <input type="file" name="MHB-FR-PROD-001-01">
					 <br></br><br></br>
				  <button type="submit" class="btn btn-primary">Lanjut Proses</button> 	
			</form>
			<?php
			}
			?>
				<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>




