<?php
	
	
	include "koneksi.php";
	$id=mysqli_real_escape_string($conn,$_GET["id"]);
    echo "ini".$id;	
    $tanggal_disetujui = date('d / m / yy');
	
	echo "yes";
	 
	 //1. Ambil Data yang Dikirim dari Form
    $nama_file1 = $_FILES['TampakDepanProd-001-01']['name'];
    $ukuran_file1 = $_FILES['TampakDepanProd-001-01']['size'];
    $tipe_file1 = $_FILES['TampakDepanProd-001-01']['type'];
    $tmp_file1 = $_FILES['TampakDepanProd-001-01']['tmp_name'];
	
	//2. Ambil Data yang Dikirim dari Form
    $nama_file2 = $_FILES['TampakSampingKanan-001-01']['name'];
    $ukuran_file2 = $_FILES['TampakSampingKanan-001-01']['size'];
    $tipe_file2 = $_FILES['TampakSampingKanan-001-01']['type'];
    $tmp_file2 = $_FILES['TampakSampingKanan-001-01']['tmp_name'];
	
	//3. Ambil Data yang Dikirim dari Form
    $nama_file3 = $_FILES['TampakSampingKiri-001-01']['name'];
    $ukuran_file3 = $_FILES['TampakSampingKiri-001-01']['size'];
    $tipe_file3 = $_FILES['TampakSampingKiri-001-01']['type'];
    $tmp_file3 = $_FILES['TampakSampingKiri-001-01']['tmp_name'];
	
	//4. Ambil Data yang Dikirim dari Form
    $nama_file4 = $_FILES['TampakAtas-001-01']['name'];
    $ukuran_file4 = $_FILES['TampakAtas-001-01']['size'];
    $tipe_file4 = $_FILES['TampakAtas-001-01']['type'];
    $tmp_file4 = $_FILES['TampakAtas-001-01']['tmp_name'];
	
	//5. Ambil Data yang Dikirim dari Form
    $nama_file5 = $_FILES['BagianYangRusak-001-01']['name'];
    $ukuran_file5 = $_FILES['BagianYangRusak-001-01']['size'];
    $tipe_file5 = $_FILES['BagianYangRusak-001-01']['type'];
    $tmp_file5 = $_FILES['BagianYangRusak-001-01']['tmp_name'];
	
	//6. Ambil Data yang Dikirim dari Form
    $nama_file6 = $_FILES['BagianYangHilang-001-01']['name'];
    $ukuran_file6 = $_FILES['BagianYangHilang-001-01']['size'];
    $tipe_file6 = $_FILES['BagianYangHilang-001-01']['type'];
    $tmp_file6 = $_FILES['BagianYangHilang-001-01']['tmp_name'];
	
	//7. Ambil Data yang Dikirim dari Form
    $nama_file7 = $_FILES['BagianLain-001-01']['name'];
    $ukuran_file7 = $_FILES['BagianLain-001-01']['size'];
    $tipe_file7 = $_FILES['BagianLain-001-01']['type'];
    $tmp_file7 = $_FILES['BagianLain-001-01']['tmp_name'];

    //8. Ambil Data yang Dikirim dari Form
    $nama_file8 = $_FILES['rod-001-01']['name'];
    $ukuran_file8 = $_FILES['rod-001-01']['size'];
    $tipe_file8 = $_FILES['rod-001-01']['type'];
    $tmp_file8 = $_FILES['rod-001-01']['tmp_name'];
	
	//9. Ambil Data yang Dikirim dari Form
    $nama_file9 = $_FILES['tub-001-01']['name'];
    $ukuran_file9 = $_FILES['tub-001-01']['size'];
    $tipe_file9 = $_FILES['tub-001-01']['type'];
    $tmp_file9 = $_FILES['tub-001-01']['tmp_name'];
	
	//10. Ambil Data yang Dikirim dari Form
    $nama_file10 = $_FILES['glan-001-01']['name'];
    $ukuran_file10 = $_FILES['glan-001-01']['size'];
    $tipe_file10 = $_FILES['glan-001-01']['type'];
    $tmp_file10 = $_FILES['glan-001-01']['tmp_name'];
	
	//11. Ambil Data yang Dikirim dari Form
    $nama_file11 = $_FILES['piston-001-01']['name'];
    $ukuran_file11 = $_FILES['piston-001-01']['size'];
    $tipe_file11 = $_FILES['piston-001-01']['type'];
    $tmp_file11 = $_FILES['piston-001-01']['tmp_name'];
	
	//12. Ambil Data yang Dikirim dari Form
    $nama_file12 = $_FILES['nut-001-01']['name'];
    $ukuran_file12 = $_FILES['nut-001-01']['size'];
    $tipe_file12 = $_FILES['nut-001-01']['type'];
    $tmp_file12 = $_FILES['nut-001-01']['tmp_name'];
	
	//13. Ambil Data yang Dikirim dari Form
    $nama_file13 = $_FILES['lainnya-001-01']['name'];
    $ukuran_file13 = $_FILES['lainnya-001-01']['size'];
    $tipe_file13 = $_FILES['lainnya-001-01']['type'];
    $tmp_file13 = $_FILES['lainnya-001-01']['tmp_name'];
	
	//14. Ambil Data yang Dikirim dari Form
    $nama_file14 = $_FILES['valvePic-001-01']['name'];
    $ukuran_file14 = $_FILES['valvePic-001-01']['size'];
    $tipe_file14 = $_FILES['valvePic-001-01']['type'];
    $tmp_file14 = $_FILES['valvePic-001-01']['tmp_name'];	
	
	//15. Ambil Data yang Dikirim dari Form
    $nama_file15 = $_FILES['kondisiSealPic-001-01']['name'];
    $ukuran_file15 = $_FILES['kondisiSealPic-001-01']['size'];
    $tipe_file15 = $_FILES['kondisiSealPic-001-01']['type'];
    $tmp_file15 = $_FILES['kondisiSealPic-001-01']['tmp_name'];	
	
	// Set path folder tempat menyimpan gambarnya
	$path1 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file1;
	$path2 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file2;
	$path3 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file3;
	$path4 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file4;
	$path5 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file5;
	$path6 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file6;
	$path7 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file7;
	$path8 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file8;
	$path9 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file9;
	$path10 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file10;
	$path11 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file11;
	$path12 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file12;
	$path13 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file13;
	$path14 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file14;
	$path15 = "fotoFormMHB-FR-PRO-D001-01/".$nama_file15;
	
	//1
	$roadVisualCondition=$_POST["roadVisualCondition"];
	$roadQty=$_POST["roadQty"];
	$roadLoss=$_POST["roadLoss"];
	$nama_file1 = $_FILES['roadFoto']['name'];
    $ukuran_file1 = $_FILES['roadFoto']['size'];
    $tipe_file1 = $_FILES['roadFoto']['type'];
    $tmp_file1 = $_FILES['roadFoto']['tmp_name'];
	
	//2
	$barrelVisualCondition=$_POST["barrelVisualCondition"];
	$barrelQty=$_POST["barrelQty"];
	$barrelLoss=$_POST["barrelLoss"];
	$nama_file2 = $_FILES['barelFoto']['name'];
    $ukuran_file2 = $_FILES['barelFoto']['size'];
    $tipe_file2 = $_FILES['barelFoto']['type'];
    $tmp_file2 = $_FILES['barelFoto']['tmp_name'];
	
	//3
	$glandVisualCondition=$_POST["glandVisualCondition"];
	$glandQty=$_POST["glandQty"];
	$glandLoss=$_POST["glandLoss"];
	$nama_file3 = $_FILES['glanFoto']['name'];
    $ukuran_file3 = $_FILES['glanFoto']['size'];
    $tipe_file3 = $_FILES['glanFoto']['type'];
    $tmp_file3 = $_FILES['glanFoto']['tmp_name'];
	
	//4
	$pistonVisualCondition=$_POST["pistonVisualCondition"];
	$pistondQty=$_POST["pistondQty"];
	$pistonLoss=$_POST["pistonLoss"];
	$nama_file4 = $_FILES['pistonFoto']['name'];
    $ukuran_file4 = $_FILES['pistonFoto']['size'];
    $tipe_file4 = $_FILES['pistonFoto']['type'];
    $tmp_file4 = $_FILES['pistonFoto']['tmp_name'];
	
	//5
	$collarVisualCondition=$_POST["collarVisualCondition"];
	$collardQty=$_POST["collardQty"];
	$collarLoss=$_POST["collarLoss"];
	$nama_file5 = $_FILES['collarFoto']['name'];
    $ukuran_file5 = $_FILES['collarFoto']['size'];
    $tipe_file5 = $_FILES['collarFoto']['type'];
    $tmp_file5 = $_FILES['collarFoto']['tmp_name'];
	
	//6
	$retainerVisualCondition=$_POST["retainerVisualCondition"];
	$retainerQty=$_POST["retainerQty"];
	$retainerLoss=$_POST["retainerLoss"];
	$nama_file6 = $_FILES['roadFoto']['name'];
    $ukuran_file6 = $_FILES['roadFoto']['size'];
    $tipe_file6 = $_FILES['roadFoto']['type'];
    $tmp_file6 = $_FILES['roadFoto']['tmp_name'];
	
	//7
	$rodEyeVisualCondition=$_POST["rodEyeVisualCondition"];
	$rodEyeQty=$_POST["rodEyeQty"];
	$rodEyeLoss=$_POST["rodEyeLoss"];
	$nama_file7 = $_FILES['rodEyeFoto']['name'];
    $ukuran_file7 = $_FILES['rodEyeFoto']['size'];
    $tipe_file7 = $_FILES['rodEyeFoto']['type'];
    $tmp_file7 = $_FILES['rodEyeFoto']['tmp_name'];
	
	//8
	$barrelEyeVisualCondition=$_POST["barrelEyeVisualCondition"];
	$barrelEyeQty=$_POST["barrelEyeQty"];
	$barrelEyeLoss=$_POST["barrelEyeLoss"];
	$nama_file8 = $_FILES['barelEyeFoto']['name'];
    $ukuran_file8 = $_FILES['barelEyeFoto']['size'];
    $tipe_file8 = $_FILES['barelEyeFoto']['type'];
    $tmp_file8 = $_FILES['barelEyeFoto']['tmp_name'];
	
	//9
	$bushingRodEyeVisualCondition=$_POST["bushingRodEyeVisualCondition"];
	$bushingRodEyeQty=$_POST["bushingRodEyeQty"];
	$bushingRodEyesLoss=$_POST["bushingRodEyesLoss"];
	$nama_file9 = $_FILES['bushingRodEyeFoto']['name'];
    $ukuran_file9 = $_FILES['bushingRodEyeFoto']['size'];
    $tipe_file9 = $_FILES['bushingRodEyeFoto']['type'];
    $tmp_file9 = $_FILES['bushingRodEyeFoto']['tmp_name'];
	//10
	$bushingBarrelEyeVisualCondition=$_POST["bushingBarrelEyeVisualCondition"];
	$bushingBarrelEyeQty=$_POST["bushingBarrelEyeQty"];
	$bushingBarrelEyeLoss=$_POST["bushingBarrelEyeLoss"];
	$nama_file10 = $_FILES['bushingBarrelEyeFoto']['name'];
    $ukuran_file10 = $_FILES['bushingBarrelEyeFoto']['size'];
    $tipe_file10 = $_FILES['bushingBarrelEyeFoto']['type'];
    $tmp_file10 = $_FILES['bushingBarrelEyeFoto']['tmp_name'];
	
	//11
	$fittingGreaseVisualCondition=$_POST["fittingGreaseVisualCondition"];
	$fittingGreaseQty=$_POST["fittingGreaseQty"];
	$fittingGreaseLoss=$_POST["fittingGreaseLoss"];
	$nama_file11 = $_FILES['fitingGreaseFoto']['name'];
    $ukuran_file11 = $_FILES['fitingGreaseFoto']['size'];
    $tipe_file11 = $_FILES['fitingGreaseFoto']['type'];
    $tmp_file11 = $_FILES['fitingGreaseFoto']['tmp_name'];
	
	//12
	$airBleederVisualCondition=$_POST["airBleederVisualCondition"];
	$airBleederQty=$_POST["airBleederQty"];
	$airLoss=$_POST["airLoss"];
	$nama_file12 = $_FILES['airBleederFoto']['name'];
    $ukuran_file12 = $_FILES['airBleederFoto']['size'];
    $tipe_file12 = $_FILES['airBleederFoto']['type'];
    $tmp_file12 = $_FILES['airBleederFoto']['tmp_name'];
	
	//13
	$valveVisualCondition=$_POST["valveVisualCondition"];
	$valveQty=$_POST["valveQty"];
	$valveLoss=$_POST["valveLoss"];
	$nama_file13 = $_FILES['valveFoto']['name'];
    $ukuran_file13 = $_FILES['valveFoto']['size'];
    $tipe_file13 = $_FILES['valveFoto']['type'];
    $tmp_file13 = $_FILES['valveFoto']['tmp_name'];
	
	//14
	$pipingCondition=$_POST["pipingCondition"];
	$pipingQty=$_POST["pipingQty"];
	$pipingLoss=$_POST["pipingLoss"];
	$nama_file14 = $_FILES['pipingFoto']['name'];
    $ukuran_file14 = $_FILES['pipingFoto']['size'];
    $tipe_file14 = $_FILES['pipingFoto']['type'];
    $tmp_file14 = $_FILES['pipingFoto']['tmp_name'];
	
	//15
	$hoseVisualCondition=$_POST["hoseVisualCondition"];
	$hoseQty=$_POST["hoseQty"];
	$hoseLoss=$_POST["hoseLoss"];
	$nama_file15 = $_FILES['hoseFoto']['name'];
    $ukuran_file15 = $_FILES['hoseFoto']['size'];
    $tipe_file15 = $_FILES['hoseFoto']['type'];
    $tmp_file15 = $_FILES['hoseFoto']['tmp_name'];
	
	//16
	$boltGlandVisualCondition=$_POST["boltGlandVisualCondition"];
	$boltGlandQty=$_POST["boltGlandQty"];
	$boltGlandLoss=$_POST["boltGlandLoss"];
	$nama_file16 = $_FILES['boltGlandFoto']['name'];
    $ukuran_file16 = $_FILES['boltGlandFoto']['size'];
    $tipe_file16 = $_FILES['boltGlandFoto']['type'];
    $tmp_file16 = $_FILES['boltGlandFoto']['tmp_name'];
	
	//17
	$washerVisualCondition=$_POST["washerVisualCondition"];
	$washerQty=$_POST["washerQty"];
	$washerLoss=$_POST["washerLoss"];
	$nama_file17 = $_FILES['WasherFoto']['name'];
    $ukuran_file17 = $_FILES['WasherFoto']['size'];
    $tipe_file17 = $_FILES['WasherFoto']['type'];
    $tmp_file17 = $_FILES['WasherFoto']['tmp_name'];
	
	//18
	$nutPistonVisualCondition=$_POST["nutPistonVisualCondition"];
	$nutPistonQty=$_POST["nutPistonQty"];
	$nutPistonLoss=$_POST["nutPistonLoss"];
	$nama_file18 = $_FILES['nutPistonFoto']['name'];
    $ukuran_file18 = $_FILES['nutPistonFoto']['size'];
    $tipe_file18 = $_FILES['nutPistonFoto']['type'];
    $tmp_file18 = $_FILES['nutPistonFoto']['tmp_name'];
	
	//19
	$ballBearingVisualCondition=$_POST["ballBearingVisualCondition"];
	$ballBearingQty=$_POST["ballBearingQty"];
	$ballBearingLoss=$_POST["ballBearingLoss"];
	$nama_file19 = $_FILES['ballBearingFoto']['name'];
    $ukuran_file19 = $_FILES['ballBearingFoto']['size'];
    $tipe_file19 = $_FILES['ballBearingFoto']['type'];
    $tmp_file19 = $_FILES['ballBearingFoto']['tmp_name'];
	
	//20
	$plungerVisualCondition=$_POST["plungerVisualCondition"];
	$plungerQty=$_POST["plungerQty"];
	$plungerLoss=$_POST["plungerLoss"];
	$nama_file20 = $_FILES['plungerFoto']['name'];
    $ukuran_file20 = $_FILES['plungerFoto']['size'];
    $tipe_file20 = $_FILES['plungerFoto']['type'];
    $tmp_file20 = $_FILES['plungerFoto']['tmp_name'];
	
	//21
	$lockScrewVisualCondition=$_POST["lockScrewVisualCondition"];
	$lockScrewQty=$_POST["lockScrewQty"];
	$lockScrewLoss=$_POST["lockScrewLoss"];
	$nama_file21 = $_FILES['lockScrewFoto']['name'];
    $ukuran_file21 = $_FILES['lockScrewFoto']['size'];
    $tipe_file21 = $_FILES['lockScrewFoto']['type'];
    $tmp_file21 = $_FILES['lockScrewFoto']['tmp_name'];
	
	//22
	$stoperVisualCondition=$_POST["stoperVisualCondition"];
	$stoperQty=$_POST["stoperQty"];
	$stoperLoss=$_POST["stoperLoss"];
	$nama_file22 = $_FILES['stopperFoto']['name'];
    $ukuran_file22 = $_FILES['stopperFoto']['size'];
    $tipe_file22 = $_FILES['stopperFoto']['type'];
    $tmp_file22 = $_FILES['stopperFoto']['tmp_name'];
	
	//23
	$cushionVisualCondition=$_POST["cushionVisualCondition"];
	$cushionQty=$_POST["cushionQty"];
	$cushionLoss=$_POST["cushionLoss"];
	$nama_file23 = $_FILES['cushionFoto']['name'];
    $ukuran_file23 = $_FILES['cushionFoto']['size'];
    $tipe_file23 = $_FILES['cushionFoto']['type'];
    $tmp_file23 = $_FILES['cushionFoto']['tmp_name'];
	
	//24
	$duBushingVisualCondition=$_POST["duBushingVisualCondition"];
	$duBushingQty=$_POST["duBushingQty"];
	$duBushingLoss=$_POST["duBushingLoss"];
	$nama_file24 = $_FILES['duBushingFoto']['name'];
    $ukuran_file24 = $_FILES['duBushingFoto']['size'];
    $tipe_file24 = $_FILES['duBushingFoto']['type'];
    $tmp_file24 = $_FILES['duBushingFoto']['tmp_name'];
	
	//25
	$ringPistonVisualCondition=$_POST["ringPistonVisualCondition"];
	$ringPistonQty=$_POST["ringPistonQty"];
	$ringistonLoss=$_POST["ringistonLoss"];
	$nama_file25 = $_FILES['ringPistonFoto']['name'];
    $ukuran_file25 = $_FILES['ringPistonFoto']['size'];
    $tipe_file25 = $_FILES['ringPistonFoto']['type'];
    $tmp_file25 = $_FILES['ringPistonFoto']['tmp_name'];
	
	//26
	$boltSupportVisualCondition=$_POST["boltSupportVisualCondition"];
	$boltSupportQty=$_POST["boltSupportQty"];
	$boltSupportLoss=$_POST["boltSupportLoss"];
	$nama_file26 = $_FILES['boltSupportFoto']['name'];
    $ukuran_file26 = $_FILES['boltSupportFoto']['size'];
    $tipe_file26 = $_FILES['boltSupportFoto']['type'];
    $tmp_file26 = $_FILES['boltSupportFoto']['tmp_name'];
	
	//27
	$snapRIngVisualCondition=$_POST["snapRIngVisualCondition"];
	$snapRingQty=$_POST["snapRingQty"];
	$snapRingLoss=$_POST["snapRingLoss"];
	$nama_file27 = $_FILES['snapRingFoto']['name'];
    $ukuran_file27 = $_FILES['snapRingFoto']['size'];
    $tipe_file27 = $_FILES['snapRingFoto']['type'];
    $tmp_file27 = $_FILES['snapRingFoto']['tmp_name'];
	
	//28
	$sensorVisualCondition=$_POST["sensorVisualCondition"];
	$sensorQty=$_POST["sensorQty"];
	$sensorLoss=$_POST["sensorLoss"];
	$nama_file28 = $_FILES['sensorFoto']['name'];
    $ukuran_file28 = $_FILES['sensorFoto']['size'];
    $tipe_file28 = $_FILES['sensorFoto']['type'];
    $tmp_file28 = $_FILES['sensorFoto']['tmp_name'];
	
	//29
	$sealDustVisualCondition=$_POST["sealDustVisualCondition"];
	$sealDustQty=$_POST["sealDustQty"];
	$sealDustLoss=$_POST["sealDustLoss"];
	$nama_file29 = $_FILES['sealDustFoto']['name'];
    $ukuran_file29 = $_FILES['sealDustFoto']['size'];
    $tipe_file29 = $_FILES['sealDustFoto']['type'];
    $tmp_file29 = $_FILES['sealDustFoto']['tmp_name'];
	
	//30
	$sealVisualCondition=$_POST["sealVisualCondition"];
	$sealQty=$_POST["sealQty"];
	$sealLoss=$_POST["sealLoss"];
	$nama_file30 = $_FILES['sealFoto']['name'];
    $ukuran_file30 = $_FILES['sealFoto']['size'];
    $tipe_file30 = $_FILES['sealFoto']['type'];
    $tmp_file30 = $_FILES['sealFoto']['tmp_name'];
	
	//31
	$shimVisualCondition=$_POST["shimVisualCondition"];
	$shimQty=$_POST["shimQty"];
	$shimLoss=$_POST["shimLoss"];
	$nama_file31 = $_FILES['shimFoto']['name'];
    $ukuran_file31 = $_FILES['shimFoto']['size'];
    $tipe_file31 = $_FILES['shimFoto']['type'];
    $tmp_file31 = $_FILES['shimFoto']['tmp_name'];
	
	//32
	$springVisualCondition=$_POST["springVisualCondition"];
	$springQty=$_POST["springQty"];
	$springLoss=$_POST["springLoss"];
	$nama_file32 = $_FILES['springFoto']['name'];
    $ukuran_file32 = $_FILES['springFoto']['size'];
    $tipe_file32 = $_FILES['springFoto']['type'];
    $tmp_file32= $_FILES['springFoto']['tmp_name'];
	

	
	
	
	
	echo "nomor_mhb_id = ".$nomor_mhb_id."<br>";
	
	 
	if (isset($_POST['cuci'])) {

        $cuci=$_POST['cuci'];
		echo "<br>";
        for ($i=0; $i < count($cuci) ; $i++)
		{
            echo $cuci[$i]."<br>";
			$sudahcuci = $cuci[$i];
			echo "sudah cuci ".$sudahcuci."<br>";
			///////////////////////////////////
			if($tipe_file1 == "image/jpeg" || $tipe_file1 == "image/png"){ // Cek apakah tipe file yang diupload adalah JPG / JPEG / PNG
				  // Jika tipe file yang diupload JPG / JPEG / PNG, lakukan :
				  if($ukuran_file1 <= 1000000){ // Cek apakah ukuran file yang diupload kurang dari sama dengan 1MB
					// Jika ukuran file kurang dari sama dengan 1MB, lakukan :
					// Proses upload
					if(move_uploaded_file($tmp_file1, $path1))
					{ // Cek apakah gambar berhasil diupload atau tidak
					  // Jika gambar berhasil diupload, Lakukan :  
					  // Proses simpan ke Database
					  if(move_uploaded_file($tmp_file2, $path2))
					  {
						  if(move_uploaded_file($tmp_file3, $path3))
						  {
							  if(move_uploaded_file($tmp_file4, $path4))
							  {
								  if(move_uploaded_file($tmp_file5, $path5))
								  {
									  if(move_uploaded_file($tmp_file6, $path6))
									  {
										  if(move_uploaded_file($tmp_file7, $path7))
										  {
											  if(move_uploaded_file($tmp_file8, $path8))
										      {
												  if(move_uploaded_file($tmp_file9, $path9))
										          {
													  if(move_uploaded_file($tmp_file10, $path10))
										              {
														  if(move_uploaded_file($tmp_file11, $path11))
										                  {
															  if(move_uploaded_file($tmp_file12, $path12))
										                      {
																  if(move_uploaded_file($tmp_file13, $path13))
										                          {
																	  if(move_uploaded_file($tmp_file14, $path14))
										                              {
																		  if(move_uploaded_file($tmp_file15, $path15))
										                                  {
					  
																				  $query = "INSERT INTO fom_dissasembly_checklist (id_barang_job, cleaning, 
																				                                                   foto_tampak_depan, foto_tampak_samping_kanan, foto_tampak_samping_kiri, foto_tampak_atas, foto_bagian_yang_rusak , foto_bagian_yang_hilang , foto_bagian_lain
																																   ,foto_rod,foto_tube,foto_glan,foto_piston,foto_nut,foto_lainnya
																																   ,foto_valve
																																   ,foto_dokumentasi_kondisi_posisi_seal)
																							                                VALUE
																												                  ('$id','$sudahcuci',
																																   '$nama_file1','$nama_file2','$nama_file3','$nama_file4','$nama_file5','$nama_file6','$nama_file7'
																																   ,'$nama_file8','$nama_file9','$nama_file10','$nama_file11','$nama_file12'
																																   ,'$nama_file13','$nama_file14'
																																   ,'$nama_file15')";
																				$sql = mysqli_query($conn, $query); // Eksekusi/ Jalankan query dari variabel $query
																				  
																				//$query1 = "UPDATE barang_job SET status = '4' WHERE no_mhb_id='$id'"; //seudah sampai print inspection report
																				//$result = mysqli_query($conn, $query1);
																				  
																				  if($sql)
																				  { // Cek jika proses simpan ke database sukses atau tidak
																					// Jika Sukses, Lakukan :
																					//header("location:cleaningAndDat2-2.php?p=1");
																					echo "1:";
																				  }
																				  else
																				  {
																					// Jika Gagal, Lakukan :
																				 
																					//header("location:cleaningAndDat2-2.php?p=2");
																					echo "2"."<br>";
																					echo $query;
																					echo "ono = ".$id;
																				  }
																		  }
																	  }
																  }
															  }
														  }
													  }
												  }
											  }
										  }
									  }
								  }
							  }
						  }
					   }
					}
					
					
					
					
					else{
					  // Jika gambar gagal diupload, Lakukan :
				  
					  //header("location:cleaningAndDat2-2.php?p=3");
					  echo "3";
					}
				  }else{
					// Jika ukuran file lebih dari 1MB, lakukan :
				   
					//header("location:cleaningAndDat2-2.php?p=4");
					echo "4";
				  }
				}else{
				  // Jika tipe file yang diupload bukan JPG / JPEG / PNG, lakukan :

				  //header("location:cleaningAndDat2-2.php?p=5");
				  echo "5";
				}
        }
    }
?>