<?php
ini_set('display_errors',1);
session_start();
include('script/condb.php');

if(isset($_POST['bcksend'])){
	
	$blocktype =$_POST['blocktype'];
	$width =$_POST['width'];
	$length =$_POST['length'];
	$height =$_POST['height'];
	$mortar =$_POST['mortar'];
	$price =$_POST['price'];
	$downlabour= $_POST['downlabour'];
	$uplabour =$_POST['uplabour'];
	$hoac =$_POST['hoac'];
	
	$blocktype2 =$_POST['blocktype2'];
	$width2 =$_POST['width2'];
	$length2 =$_POST['length2'];
	$height2 =$_POST['height2'];
	$mortar2 =$_POST['mortar2'];
	$price2 =$_POST['price2'];
	$downlabour2= $_POST['downlabour2'];
	$uplabour2 =$_POST['uplabour2'];
	$hoac2 =$_POST['hoac2'];
	
	$blocktype3 =$_POST['blocktype3'];
	$width3 =$_POST['width3'];
	$length3 =$_POST['length3'];
	$height3 =$_POST['height3'];
	$mortar3 =$_POST['mortar3'];
	$price3 =$_POST['price3'];
	$downlabour3= $_POST['downlabour3'];
	$uplabour3 =$_POST['uplabour3'];
	$hoac3 =$_POST['hoac3'];
	
	$blocktype4 =$_POST['blocktype4'];
	$width4 =$_POST['width4'];
	$length4 =$_POST['length4'];
	$height4 =$_POST['height4'];
	$mortar4 =$_POST['mortar4'];
	$price4 =$_POST['price4'];
	$downlabour4= $_POST['downlabour4'];
	$uplabour4 =$_POST['uplabour4'];
	$hoac4 =$_POST['hoac4'];
	
	$blocktype5 =$_POST['blocktype5'];
	$width5 =$_POST['width5'];
	$length5 =$_POST['length5'];
	$height5 =$_POST['height5'];
	$mortar5 =$_POST['mortar5'];
	$price5 =$_POST['price5'];
	$downlabour5= $_POST['downlabour5'];
	$uplabour5 =$_POST['uplabour5'];
	$hoac5 =$_POST['hoac5'];
	
	$firstfloor =$_POST['firstfloor'];
	$secondfloor =$_POST['secondfloor'];
	$Trdfloor =$_POST['3rdfloor'];
	
	
	$uptd =" UPDATE upline_app_blocksettings SET Block_width='$width', Block_length='$length', Block_length='$length', Block_height='$height', Block_mortars='$mortar', Block_prices='$price', Down_Labours='$downlabour', Up_Labours='$uplabour', course='$hoac' WHERE Block_name ='$blocktype' ";
	$toto =mysqli_query($con,$uptd);
	
	$uptd2 =" UPDATE upline_app_blocksettings SET Block_width='$width2', Block_length='$length2', Block_length='$length2', Block_height='$height2', Block_mortars='$mortar2', Block_prices='$price2', Down_Labours='$downlabour2', Up_Labours='$uplabour2', course='$hoac2' WHERE Block_name ='$blocktype2' ";
	$toto2 =mysqli_query($con,$uptd2);
	
	$uptd3 =" UPDATE upline_app_blocksettings SET Block_width='$width3', Block_length='$length3', Block_length='$length3', Block_height='$height3', Block_mortars='$mortar3', Block_prices='$price3', Down_Labours='$downlabour3', Up_Labours='$uplabour3', course='$hoac3' WHERE Block_name ='$blocktype3' ";
	$toto3 =mysqli_query($con,$uptd3);
	
	$uptd4 =" UPDATE upline_app_blocksettings SET Block_width='$width4', Block_length='$length4', Block_length='$length4', Block_height='$height4', Block_mortars='$mortar4', Block_prices='$price4', Down_Labours='$downlabour4', Up_Labours='$uplabour4', course='$hoac4' WHERE Block_name ='$blocktype4' ";
	$toto5 =mysqli_query($con,$uptd4);
	
	$uptd5 =" UPDATE upline_app_blocksettings SET Block_width='$width5', Block_length='$length5', Block_length='$length5', Block_height='$height5', Block_mortars='$mortar5', Block_prices='$price5', Down_Labours='$downlabour5', Up_Labours='$uplabour5', course='$hoac5' WHERE Block_name ='$blocktype5' ";
	$toto5 =mysqli_query($con,$uptd5);
	
	$uptd6 ="UPDATE upline_app_blocksettings SET carry_1st_floor='$firstfloor', carry_2nd_floor='$secondfloor', carry_3rd_floor='$Trdfloor' "; 
	$toto6 =mysqli_query($con,$uptd6);
	if ($toto){
	
	echo '<script language ="javascript" type= "text/javascript"> alert("update is sucessfull '.$blocktype.' online"); location.href="materials.php";</script>';
	
	}
}


?>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>