<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<?php
include('../include/session.php');

$quote_no = $_GET['quote_no'];

$table_name2 = $_SESSION['db_prefix']."_quotations";
$quote_query = "SELECT * FROM $table_name2 WHERE quote_no ='".$quote_no."' ";
$quote_result = mySQL_query($quote_query);
$quote_num = mysql_num_rows($quote_result);
$cust_id  = mysql_result($quote_result, 0, "cust_id");
$quotation_date  = mysql_result($quote_result, 0, "quotation_date");
$job_card_no  = mysql_result($quote_result, 0, "job_card_no");
$valid_days   = mysql_result($quote_result, 0, "valid_days");
$delivery_days   = mysql_result($quote_result, 0, "delivery_days");
$terms   = mysql_result($quote_result, 0, "terms");
$vat   = mysql_result($quote_result, 0, "vat_text");
$re_title   = mysql_result($quote_result, 0, "re_title");


$table_name = $_SESSION['db_prefix']."_quotation_lines";


$line_query = "SELECT quote_item_price  FROM $table_name WHERE quote_number = '".$quote_no."' AND quote_option = '2' ";
$line_result = mySQL_query($line_query);
$result2 = mysql_result($line_result, 0, "quote_item_price");
if ($result2!=0) {
$option2 = $result2;
}
else {
$option2 = '----';
}


$line_query = "SELECT quote_item_text, quote_item_price  FROM $table_name WHERE quote_number = '".$quote_no."' AND quote_option = '7' ";
$line_result = mySQL_query($line_query);
$result7 = mysql_result($line_result, 0, "quote_item_price");
$result_text7 = mysql_result($line_result, 0, "quote_item_text");
if ($result7!=0) {
$option_text7 = $result_text7;	
$option7 = $result7;
}
else {
$option_text7 = '----';	
$option7 = '----';
}



$line_query = "SELECT quote_item_text, quote_item_price  FROM $table_name WHERE quote_number = '".$quote_no."' AND quote_option = '8' ";
$line_result = mySQL_query($line_query);
$result8 = mysql_result($line_result, 0, "quote_item_price");
$result_text8 = mysql_result($line_result, 0, "quote_item_text");
if ($result8!=0) {
$option_text8 = $result_text8;		
$option8 = $result8;
}
else {
$option_text8 = '----';	
$option8 = '----';
}



$line_query = "SELECT quote_item_text,  quote_item_price  FROM $table_name WHERE quote_number = '".$quote_no."' AND quote_option = '9' ";
$line_result = mySQL_query($line_query);
$result9 = mysql_result($line_result, 0, "quote_item_price");
$result_text9 = mysql_result($line_result, 0, "quote_item_text");
if ($result9!=0) {
$option_text9 = $result_text9;	
$option9 = $result9;
}
else {
$option_text9 = '----';		
$option9 = '----';
}




$table_name3 = $_SESSION['db_prefix']."_customer";
$customer_query = "SELECT account_type, comp_name, name_2, title, bag_box, box_no, postal_place, phone, contact_1, email_1, cell_1, status FROM $table_name3 WHERE cust_id = '".$cust_id."' ";
$customer_result = mySQL_query($customer_query);
$c0 = mysql_result($customer_result, 0, "account_type");
if ($c0=="corporate") { $c1 = mysql_result($customer_result, 0, "comp_name"); } else { $c1 = mysql_result($customer_result, 0, "title")." ".mysql_result($customer_result, 0, "name_2")." ".mysql_result($customer_result, 0, "comp_name"); }

$c2 = mysql_result($customer_result, 0, "bag_box");
$c3 = mysql_result($customer_result, 0, "box_no");
$c4 = mysql_result($customer_result, 0, "postal_place");
$c5 = mysql_result($customer_result, 0, "phone");
$c6 = mysql_result($customer_result, 0, "contact_1");
$c7 = mysql_result($customer_result, 0, "email_1");
$c8 = mysql_result($customer_result, 0, "status");
$c9 = mysql_result($customer_result, 0, "cell_1");

?>

<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/print.css" />

<title>Quotation <?php echo $quote_no ?> for <?php echo $c1 ?></title>
<style>
body {
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
}
</style>
</head>
<body  onload="window.print(); window.close();" >
<!--<body  onload="window.print();" >-->

<div style="width:800px;">
<?php include('../include/print_header.php'); ?>
<div style="width:650px; margin-left:50px; font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:12px;"><br>
<?php 
echo $c1.'<br>';
if ($c3!='') { echo $c2.' '.$c3.'<br>'; }
if ($c4!='') { echo $c4; }
if ($c7!='') { echo '<br>email: '.$c7; }
?>
<br><br>
Date: <?php echo date("d-m-Y", strtotime($quotation_date)); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ref: <?php echo 'Q'.$quote_no?>
<br><br>

<b>Re: <?php echo $re_title ?></b>
<br><br>
<p>Dear Sir / Madam</p>
<p>Thank you for considering Manase.  Please find our Palisade Fencing option.</p>
<br>
<div  id="option2" style="position: relative;">
  <img src="../images/option2.png" width="240" height="300";>
  <div style="position: absolute; top: 30px; left: 0px; height: 1px;">
       <table width="640" border="0" cellpadding="0px">
  <tr>
    <td width="241" height="1" valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td width="388" rowspan="12"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="259"><b>Product</b></td>
        <td width="240" valign="top">40x40x3    Devil's Fork</td>
      </tr>
      <tr>
        <td width="259"><b>Height (A): </b></td>
        <td width="240" valign="top">1.2m    (also 1.5m, 1.8m, 2.1m, 2.4m)</td>
      </tr>
      <tr>
        <td width="259"><b>Ground Clearance    (F)</b></td>
        <td width="240" valign="top">100mm</td>
      </tr>
      <tr>
        <td width="259"><b>Style:</b></td>
        <td width="240" valign="top">Straight</td>
      </tr>
      <tr>
        <td width="259"><b>Pale Top :</b></td>
        <td width="240" valign="top">Devil's    Fork (7 points)</td>
      </tr>
      <tr>
        <td width="259"><b>Pale    Profile: </b></td>
        <td width="240" valign="top">40x40x3mm</td>
      </tr>
      <tr>
        <td width="259"><b>Rail    Profile: </b></td>
        <td width="240" valign="top">76x76x1.6    square tube</td>
      </tr>
      <tr>
        <td width="259"><b>Concrete    base at posts (E): </b></td>
        <td width="240" valign="top">600x600x300mm</td>
      </tr>
      <tr>
        <td width="259"><b>Opening    between pales (C): </b></td>
        <td width="240" valign="top">165m    centres</td>
      </tr>
      <tr>
        <td width="259"><b>Post    Centres (D): </b></td>
        <td width="240" valign="top">3m</td>
      </tr>
      <tr>
        <td width="259"><b>Fixing: </b></td>
        <td width="240" valign="top">Welded    system</td>
      </tr>
      <tr>
        <td width="259"><b>Cleaning: </b></td>
        <td width="240" valign="top">Treated    and Dipped<b></b></td>
      </tr>
      <tr>
        <td width="259"><b>Finish: </b></td>
        <td width="240" valign="top">Red    Oxidised</td>
      </tr>
      <tr>
        <td width="259"><b>Price:</b></td>
        <td width="240" valign="top">P</td>
      </tr>
      <tr>
        <td width="259"><b>Warranty:</b></td>
        <td width="240" valign="top">:    One (1) year</td>
      </tr>
    </table>
  <tr>
    <td height="1" valign="middle">&nbsp;</td>
    <tr>
    <td height="4" valign="middle">&nbsp;</td>
  <tr>
    <td height="10" valign="middle">&nbsp;</td>
  <tr>
    <td height="10" valign="middle">&nbsp;</td>
  <tr>
    <td height="10" valign="middle">&nbsp;</td>
  <tr>
    <td height="10" valign="middle">&nbsp;</td>
  <tr>
    <td height="10" valign="middle">&nbsp;</td>
    <tr>
    <td height="10" valign="middle">&nbsp;</td>
  <tr>
    <td height="22" valign="middle">&nbsp;</td>
  <tr>
    <td valign="top"><br><br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color='white' size="+2"><b><?php echo $option2 ?></b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  <tr>
    <td height="22" valign="middle">&nbsp;</td>
       </table>
</div>

<div style="page-break-after:always;">
  <img src="../images/palisade_banner.png" width="630" height="40"> </div>    
</div>

<div id="option3" style="position: relative;"><br>
<br>
<br>
</div>
<table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="168"><b>Product: </b></td>
            <td colspan="2" valign="top">Silhouette    steel palisade</td>
            <td width="197" rowspan="18" valign="top"><b>TERMS AND CONDITIONS</b><b> </b><br>
              - Prices <?php echo $vat ?> 12% VAT<br>
              - Payment 60% deposit with order <br>
              - Balance on completion<br>
              - Prices valid 30 days<br>
              - Delivery 7 days<br>
            <br><br>
<br>
<br>
<br>
<br>

            
            
            <div align="right"><img src="../images/electric_fence_2.png" width="150" height="228"></div></td>
          </tr>
          <tr>
            <td width="168"><b>Height: (A) </b></td>
            <td colspan="2" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td width="168"><b>Ground    clearance:</b> <b>(F) </b></td>
            <td colspan="2" valign="top">100mm</td>
          </tr>
          <tr>
            <td width="168"><b>Pale    profile:(E)</b></td>
            <td colspan="2" valign="top">40x25x2mm</td>
          </tr>
          <tr>
            <td width="168"><b>Rail    profile:</b> <b>(G)</b> </td>
            <td colspan="2" valign="top">50x40x2mm</td>
          </tr>
          <tr>
            <td width="168"><b>Post    profile:</b> <b>(H) </b></td>
            <td colspan="2" valign="top">80x40x2mm</td>
          </tr>
          <tr>
            <td width="168"><b>Concrete    base at posts:</b> <b>(B)</b></td>
            <td colspan="2" valign="top">300x300x600mm</td>
          </tr>
          <tr>
            <td width="168"><b>Opening    between pales:</b></td>
            <td colspan="2" valign="top">122mm</td>
          </tr>
          <tr>
            <td width="168"><b>Section    width:</b> <b>(D)</b></td>
            <td colspan="2" valign="top">2425mm</td>
          </tr>
          <tr>
            <td width="168"><b>Fixing</b>: </td>
            <td colspan="2" valign="top">No welding / 8mm one-way anti-vandal screws to tie plate</td>
          </tr>
          <tr>
            <td width="168"><b>Cleaning    Stage:</b></td>
            <td colspan="2" valign="top">Degreasing and priming</td>
          </tr>
          <tr>
            <td width="168"><b>Finish:</b></td>
            <td colspan="2" valign="top">Factory dipped red oxide primer with QD enamel sprayed on before shipping</td>
          </tr>
          <tr>
            <td width="168"><b>Price per    metre:</b></td>
            <td colspan="2" valign="top">P</td>
          </tr>
          <tr>
            <td width="168"><b>Touch up</b>:</td>
            <td colspan="2" valign="top">To be supplied for final touch up</td>
          </tr>
          <tr>
            <td width="168"><b>Colour</b>:</td>
            <td colspan="2" valign="top">To Be Finalised</td>
          </tr>
          <tr>
            <td width="168"><b>Warranty</b> :</td>
            <td colspan="2" valign="top">One (1) years</td>
          </tr>
          <tr>
            <td><br>
            <br></td>
            <td colspan="2" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td ><font color="#209949" pointsize="24px"><b>Gates</b></font></td>
            <td colspan="2" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td>Option 1:</td>
            <td width="170" valign="top">Option 2:</td>
            <td width="246" valign="top">Option 3:</td>
            <td width="197" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top"><?php echo $option_text7 ?><br>
            <br></td>
            <td valign="top"><?php echo $option_text8 ?></td>
            <td valign="top"><?php echo $option_text9 ?></td>
            <td valign="top"><img src="../images/sign.png" width="194" height="74"></td>
          </tr>
        </table>
<div id="option_gate" style="position: relative;">
   <img src="../images/check_block.png" width="350" height="16";>
    <div style="position: absolute; top: 0px; left: 0px; height: 1px;">
      <table width="640" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
    &nbsp;&nbsp;&nbsp;<font color='white' ><b>P <?php echo $option7 ?></b></font>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color='white' ><b>P <?php echo $option8 ?></b></font>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color='white' ><b>P <?php echo $option9 ?></b></font>
    </td>
    </tr>
</table>
</div>
<br>
<br>
<br>
<div style="page-break-after:always;">
  <img src="../images/palisade_banner.png" width="630" height="40"> </div>    
</div>

</div>

</div>


</body>
</html>