<?php
include('connection.php');
$Ideal=$_GET['Ideal'];

$Ideal_name=$_GET[rawurldecode('Ideal_name')];

$sql="SELECT `Title`,`Terms1`,`Terms2`,`Terns3`,`Transport`,`Watage`,`Profit`,`Increment`,`Installation_header`,`Installation_info`,`Annexure` FROM `quotation_ideal` WHERE `Ideal_quotation`='$Ideal' and `Ideal_quotation_name`='$Ideal_name'";
$result=mysqli_query($GLOBALS["___mysqli_ston"], $sql) or die ("Query Fail:".mysqli_error($GLOBALS["___mysqli_ston"]));
if(mysqli_num_rows($result)>0)
{
while($rw=mysqli_fetch_assoc($result))
{
$Title=$rw['Title'];
$Terms1=$rw['Terms1'];
$Terms2=$rw['Terms2'];
$Terns3=$rw['Terns3'];
$Transport=$rw['Transport'];
$Watage=$rw['Watage'];
$Profit=$rw['Profit'];
$Increment=$rw['Increment'];
$Installation_header=$rw['Installation_header'];
$Installation_info=$rw['Installation_info'];
$Annexure=$rw['Annexure'];
}
}


$sql1="SELECT `Sr_no`, `Title`, `Detail`, `Code` FROM `labour_inst` WHERE `Code`='$Installation_header'";
$result1=mysqli_query($GLOBALS["___mysqli_ston"], $sql1) or die ("Query Fail:".mysqli_error($GLOBALS["___mysqli_ston"]));
if(mysqli_num_rows($result1)>0)
{
while($row=mysqli_fetch_assoc($result1))
{
$Titel=$row['Title'];
$Detail=$row['Detail'];
}
}
else {	$Titel='';  	$Detail='';	}

$Allitems=$Terms1."#".$Terms2."#".$Terns3."#".$Title."#".$Transport."#".$Watage."#".$Profit."#".$Increment."#".$Annexure."#".$Installation_header."#".$Installation_info."#".$Titel."#".$Detail."#";
	
echo $Allitems;

?>