<?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 ">
            <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 >
			 <h3 align="center">PURCHASING REQUEST</h3>
			 
			 <?php
				if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="1")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  PR Berhasil Ditambah!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-danger" role="alert">
								sistem gagal!
							</div>
						<?php
					}
					else if ($p=="3")
					{
						?>
							<div class="alert alert-danger" role="alert">
								gagal, isi dengan berurut!
							</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="new 1.php">
				  <div class="form-group" align="center">
				  <h5 align="center" color="rgb(239, 255, 255)" >"menambahkan data barang yang ingin diajukan"</h5>
				  
				  <?php
				   echo date('d - m - Y');
				   $tanggal = date('d - m - Y');
				  ?>
				  
				  <p>
				  </p>
				  <p>
				  </p>
				  <h3 align="center">DATA USER</h3>
				    <P>
					</P>
		
					<?php
					    $q="SELECT * FROM user WHERE id='". $_SESSION["UserID"] ."'";
						$res=mysqli_query($conn,$q);
						$dataUser=mysqli_fetch_assoc($res);
					
						$nik = $dataUser["nik_data_karyawan"];
						echo "NIK :".$nik;
					?>
					<p>
					<p>
					<?php
					    $d="SELECT * FROM data_karyawan WHERE nik=".$nik;
						$resi=mysqli_query($conn,$d);
						$dataUser1=mysqli_fetch_assoc($resi);				
						$nama = $dataUser1["nama_karyawan"];
						echo "NAMA :".$nama;
						
						$no_pr= "SELECT * FROM nomor_otomatis_pr WHERE id = '1'";
						$resn = mysqli_query ($conn, $no_pr);
						$datan = mysqli_fetch_assoc($resn);
						$pr = $datan["nomor_pr"];
					?>
					<p>
					
					<?php
					   	$departement = $dataUser1["departement"];
						echo "DEPARTEMENT :".$departement;
						
					?>
							 
					
					
					<P>
					</P>
					 <h3 align="center">DATA PR</h3>
					 <label for="exampleInputPassword1">Document No.</label>
					<input readonly type="text/css" class="form-control" name="document_no" placeholder="MHB-FR-PRC-001-01">
					<P>
					</P>
					<label for="exampleInputPassword1">PR No.</label>
					<input readonly type="text/css" class="form-control" name="pr_no" placeholder="<?php echo " ".$pr ?>">
					<P>
					</P>
					<label for="exampleInputPassword1">TYPE OF MATERIAL</label>
					<form method='POST' action=''>
                        <h4><select name="type_of_material">
                        <option value="1">Consumable</option>
                        <option value="2">Non - Consumable</option>
                        </select>
                        </h4>
               
					<label for="exampleInputPassword1">PURCHASE REQUEST TYPE</label>
			
                        <h4><select name="prt">
                        <option value="1">Normal</option>
                        <option value="2">Urgent</option>
						<option value="3">Top Urgent</option>
                        </select>
                        </h4>
                    </form>
					<P>
					</P>
					
					
					<?php
					// No.wo = matr master
					?>
				  <h3 color="yellow" align="center">DATA BARANG</h3>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor1" placeholder="1."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master1" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description1" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no1" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty1" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit1" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification1" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code1" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor2" placeholder="2."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master2" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description2" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no2" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty2" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit2" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification2" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code2" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor3" placeholder="3."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master3" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description3" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no3" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty3" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit3" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification3" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code3" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor4" placeholder="4."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master4" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description4" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no4" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty4" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit4" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification4" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code4" placeholder="Due date">
				  <p>
                  </p>				  
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor5" placeholder="5."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master5" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description5" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no5" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty5" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit5" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification5" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code5" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor6" placeholder="6."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master6" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description6" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no6" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty6" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit6" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification6" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code6" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor7" placeholder="7."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master7" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description7" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no7" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty7" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit7" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification7" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code7" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor8" placeholder="8."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master8" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description8" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no8" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty8" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit8" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification8" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code8" placeholder="Due date">
				  <p>
				  </p>
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor9" placeholder="9."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master9" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description9" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no9" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty9" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit9" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification9" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code9" placeholder="Due date">
				  <p>
                  </p>				  
				  <input style="resize:none;width:20px;height:20px;" readonly type="text/css" class="form-control" name="nomor10" placeholder="10."> 	<input style="resize:none;width:100px;height:20px;" type="text/css" class="form-control" name="matr_master10" placeholder="No.wo">  	<input style="resize:none;width:250px;height:20px;" type="text/css" class="form-control" name="description10" placeholder="Description">  	<input style="resize:none;width:120px;height:20px;" type="text/css" class="form-control" name="part_no10" placeholder="Part No.">  	<input style="resize:none;width:40px;height:20px;" type="text/css" class="form-control" name="qty10" placeholder="Qty">  	<input style="resize:none;width:70px;height:20px;" type="text/css" class="form-control" name="unit10" placeholder="Unit">  	<input style="resize:none;width:200px;height:20px;" type="text/css" class="form-control" name="justification10" placeholder="Justification">  <input style="resize:none;width:150px;height:20px;" type="date" class="form-control" name="acc_code10" placeholder="Due date">
				  <p>
                  </p>				  
				  <input style="resize:none;width:300px;height:100px;" type="text/css" class="form-control" name="note" placeholder="Note:">	
					
					
					
			
				 <br>
				 </br>
					
				 <br>
				 </br>
				  <button type="submit" class="btn btn-primary">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>




