<?php
session_start();
include("script/condb.php");
$PID = $_GET['project_ref'] ?? $_POST['pid'] ?? $_SESSION['pid'] ?? '';

if (!empty($PID)) {
    $_SESSION['pid'] = $PID;
}
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>TQ Labourer</title>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
</head>

<body>
<div class="dashboardpagewrap">
<div class="left-frame">
<a href="project_detail.php?project_ref=<?php echo $PID; ?>"><div class="navigations-main"><div><img src="images/home.png" width="128" height="128" alt=""/></div>Project Details</div></a>
<a href="dashboard.php?project_ref=<?php echo $PID; ?>">    <div class="navigations-main">        <div><img src="images/home.png" width="48" height="48" alt=""/></div>        Dashboard    </div></a>
<a href="settings.php?project_ref=<?php echo $PID; ?>">   <div class="navigations-main"><div><img src="images/settings-ico.png" width="48" height="48" alt=""/></div>        Settings    </div></a>

<!--<a href="project-informations.php"><div class="navigations-main"><div><img src="images/information.png" width="128" height="128" alt=""/></div>Project Information</div></a>-->
<a href="stagesofproject.php?project_ref=<?php echo $PID; ?>"><div class="navigations-main"><div><img src="images/steps.png" width="128" height="128" alt=""/></div>Stages of Project</div></a>
<a href="projectControl.php?project_ref=<?php echo $PID; ?>">
    <div class="navigations-main"> <div><img src="images/control.png" width="48" alt=""/></div>  Project Control</div></a>
<a href="constructionEquipment.php?project_ref=<?php echo $PID; ?>">
    <div class="navigations-main"><div><img src="images/construction.png" width="48" alt=""/></div>Equipment </div></a>
<a href="materials.php?project_ref=<?php echo $PID; ?>">
    <div class="navigations-main"><div><img src="images/materials.png" width="48" alt=""/></div>Materials </div></a>
<a href="labourer.php?project_ref=<?php echo $PID; ?>">
    <div class="navigations-main"><div><img src="images/labourers.png" width="48" alt=""/></div>Labourers </div></a>
<!--<div class="navigations-main"><div><img src="images/logout.png" width="128" height="128" alt=""/></div>Logout</div>-->
<div class="logo-main"><img src="images/logo.png" width="286" height="152" alt=""/></div>
</div>	
	
<div class="right-frame">
<div class="page-tag"><img src="images/settings-ico2.png" width="128" height="128" alt=""/>LABOURER</div>
<div class="flex justify-end mb-4">
      <a href="javascript:history.back()" class="bg-blue-600 text-white px-3 py-2 rounded hover:bg-blue-700">
    ← Go Back
</a>
  </div>
<div class="accordion-wrapper">
<div class="worko-tabs">
  
    <input class="state" type="radio" title="tab-one" name="tabs-state" id="tab-one" checked />

    <div class="tabs flex-tabs">
        <label for="tab-one" id="tab-one-label" class="tab"></label>


        <div id="tab-one-panel" class="panel active">
			<form class="left-form2" method="POST" action="labaour_settings_update.php"  id="labourForm1">
<!--<form id="1"  name="1"  >-->
	<div class="inputidentifier">Major Control</div>	
			  <div class="tagchecked"><input type="checkbox" name="update_major" id="updateMajor" onchange="if(this.checked){document.getElementById('labourForm1').submit();}"
 >Update</div>
			  
			 <div class="formwrapper">
			<?php
						$prod= "SELECT * FROM upline_app_laboursettings where labour_name='Partition of Excavation' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){				
		}			
			?>
				 <div class="tagchecked3">Partition of Excavation </div>	<input type="text" class="text-input-box-float2" placeholder="price" name="poe" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Partition of Excavation' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?> ">
			
			  <input type="text" class="text-input-box-float" placeholder="Length" id="length" name="length" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Partition of Excavation' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['SomeLabourers_1C']; }?>">
			  <input type="text" class="text-input-box-float" placeholder="Course" id="course" name="course" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Partition of Excavation' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['SomeLabourers_1B']; }?>">
			  <input type="text" class="text-input-box-float" placeholder="Height" id="height" name="height" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Partition of Excavation' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['SomeLabourers_1D']; }?>">
			 <div class="formwrapper"> <div class="tagchecked3">Basket Excavation </div>
			  <input type="text" class="text-input-box-float2" placeholder="price" name="be" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Basket Excavation' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>"></div>		  
			  
			  <div class="formwrapper"> <div class="tagchecked3">Excavation Maintainner per person </div>
			  <input type="text" class="text-input-box-float2" placeholder="price" name="empp" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Excavation maintener per person' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>"></div>	
				<div class="formwrapper"> <div class="tagchecked3">A bag of Concrete</div>
			  <input type="text" class="text-input-box-float2" placeholder="Price" name="aboc" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Bag of Concrete' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>"></div>
				 <div class="formwrapper"> <div class="tagchecked3">A Mason per day</div>
			  <input type="text" class="text-input-box-float2" placeholder="Price" name="ampd" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Mason per day' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>"></div>	
				  
			  
</form>
		 <div class="partition_left">
			<form id="blockwork" name="blockwork" action="labaour_settings_update.php"
  method="post">
			<div class="inputidentifier">Block Work</div>	
			  <div class="tagchecked"><input type="checkbox" id="block_work" name="block_work" onchange="if(this.checked){document.getElementById('blockwork').submit();}">Update Block work</div>
			  <input type="text" class="text-input-box-float3" placeholder="Block Name" name="" id="" readonly>
			  <input type="text" class="text-input-box-float3" placeholder="Down Labour Cost" name="" id="" readonly>
			  <input type="text" class="text-input-box-float3" placeholder="Up Labour Cost" name="" id="" readonly>	
				
				<input type="text" class="text-input-box-float3" placeholder="9 inches Hollow Block" name="somelabourer_1B" id="somelabourer_1B" value="9 inches Hollow Block" readonly>
			  <input type="text" class="text-input-box-float3" placeholder="Width" name="somelabourer_1C" id="somelabourer_1C" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='9 inches Hollow Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Down_Labours']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Depth" name="somelabourer_1D" id="somelabourer_1D" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='9 inches Hollow Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Up_Labours']; }?>	">
				
				<input type="text" class="text-input-box-float3" placeholder="Length" name="somelabourer_1B" id="somelabourer_1B" value="6 inches Hollow Block" readonly >
			  <input type="text" class="text-input-box-float3" placeholder="Width" name="somelabourer_1C" id="somelabourer_1C" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='6 inches Hollow Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Down_Labours']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Depth" name="somelabourer_1D" id="somelabourer_1D" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='6 inches Hollow Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Up_Labours']; }?>	">	
				
				<input type="text" class="text-input-box-float3" placeholder="Length" name="somelabourer_1B" id="somelabourer_1B" value="6 inches Solid Block" readonly>
			  <input type="text" class="text-input-box-float3" placeholder="Width" name="somelabourer_1C" id="somelabourer_1C" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='6 inches Solid Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Down_Labours']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Depth" name="somelabourer_1D" id="somelabourer_1D" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='6 inches Solid Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Up_Labours']; }?>">	
				
				<input type="text" class="text-input-box-float3" placeholder="Length" name="somelabourer_1B" id="somelabourer_1B" value="5 inches Solid Block" readonly>
			  <input type="text" class="text-input-box-float3" placeholder="Width" name="somelabourer_1C" id="somelabourer_1C" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='5 inches Solid Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Down_Labours']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Depth" name="somelabourer_1D" id="somelabourer_1D" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='5 inches Solid Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Up_Labours']; }?>">	
				
				<input type="text" class="text-input-box-float3" placeholder="Length" name="somelabourer_1B" id="somelabourer_1B" value="4 inches Hollow Block" readonly>
			  <input type="text" class="text-input-box-float3" placeholder="Width" name="somelabourer_1C" id="somelabourer_1C" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='4 inches Hollow Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Down_Labours']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Depth" name="somelabourer_1D" id="somelabourer_1D" value="<?php $prod= "SELECT * FROM upline_app_blocksettings where Block_name='4 inches Hollow Block' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['Up_Labours']; }?>">	
				</form></div>
			<div class="partition_left">
			<form id="sandfill" name="sandfill" action="labaour_settings_update.php" method="post">
			 <div class="inputidentifier">Sand Filling</div>
			  <div class="tagchecked"><input type="checkbox" id="sand_fill" name="sand_fill" onchange="if(this.checked){document.getElementById('sandfill').submit();}"
>Update Sand filling</div>
			<div class="formwrapper"> <div class="tagchecked3">10 Tyers Truck </div> <input type="text" class="text-input-box-float3" placeholder="Cement" name="A_37" id="A_37" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='10 Tyers Truck' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>"></div>
			<div class="formwrapper"> <div class="tagchecked3">2 -in- 1 Truck </div>  <input type="text" class="text-input-box-float3" placeholder="Sand" name="A_38" id="A_38" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='2 in 1 Truck' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>">	</div>			  
			  </form></div>
			<div class="partition_left">
			  <form name="fplank"  id="fplank" action="labaour_settings_update.php" method="post">
			  <div class="inputidentifier">Plastering Price Control</div>
				  <div class="partition_left">
					  <div class="inputidentifier">Foundation</div>
			 <div class="checkbox-arranger">
			  <div class="tagchecked2"><input type="checkbox" name="foundation_updt" id="foundation_updt" onchange="if(this.checked){document.getElementById('fplank').submit();}">Update Foundation</div>
				 
			</div>
			  <div class="formwrapper"> <div class="tagchecked3">partition of Exterior walls </div>  <input type="text" class="text-input-box-float3" placeholder="Sand" name="A_38" id="A_38" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='foundation partition of Exterior walls' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>">	</div>
			 
			   				
				</form></div>
				<div class="partition_left">
			  <form name="mainbuild"  id="mainbuild" action="labaour_settings_update.php" method="post">
			    <div class="inputidentifier">Main Building</div>
			 <div class="checkbox-arranger">
			 <!--<div class="tagchecked2"><input type="checkbox" checked="checked">Calculate Planks</div>-->
			    <div class="tagchecked2"><input type="checkbox" name="mainbui" id="mainbui" onchange="if(this.checked){document.getElementById('mainbuild').submit();}">Update main building</div>
				 <!--<div class="tagchecked2"><input type="checkbox"  name="check13" id="check13" onChange="$('#fplank').submit();">Planks for Column Bases</div>-->
			</div>
				  <div class="tagchecked3">Partition of Exterior wall</div>  <input type="text" class="text-input-box-float3" placeholder="Prize" name="prize" id="prize" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='main building partition of exterior walls' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Length" name="length" id="length" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='main building partition of exterior walls' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['SomeLabourers_1B']; }?>">
				  <div class="formwrapper">
			  <div class="tagchecked3">Partition of interior wall</div>  <input type="text" class="text-input-box-float3" placeholder="Prize" name="prize" id="prize" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='main building partition of interior walls' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Length" name="length" id="length" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='main building partition of interior walls' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['SomeLabourers_1B']; }?>"></div>
				</form></div>
				<div class="partition_left">
			  <form name="fdeck"  id="fdeck" action="labaour_settings_update.php" method="post">
			    <div class="inputidentifier">Decking</div>
			 <div class="checkbox-arranger">
			
			    <div class="tagchecked2"><input type="checkbox" name="decking" id="decking" onchange="if(this.checked){document.getElementById('fdeck').submit();}">Update Decking</div>
				 	</div>
				  <div class="tagchecked3">(sq m) of Decking</div>  <input type="text" class="text-input-box-float3" placeholder="Prize" name="prize" id="prize" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Decking (sq m)' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_price']; }?>">
			  <input type="text" class="text-input-box-float3" placeholder="Area" name="area" id="area" value="<?php $prod= "SELECT * FROM upline_app_laboursettings where labour_name='Decking (sq m)' ";
		$que1 =mysqli_query($con, $prod);
		while($rec1 =mysqli_fetch_array($que1)){
						
		 echo $rec1['labourer_job_area']; }?>">
			  			
				</form></div>
          </div>
        </div>
    </div>

</div>





</div>
<div class="chat-bubble">   <span tooltip="Live Chat"><img src="images/livechat-ico.png" width="128" height="128" alt=""/></span></div>
</div>
</div>
</body>
</html>

