<head>
<script type="text/javascript" src="../css/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />

<?php
    $table_name = $_SESSION['db_prefix']."_quotations";
	$quote_query = "SELECT cust_id, seller, company_contact, contact_phone, quote_type, project_no, project_place, project_description  FROM $table_name WHERE  quote_no = '".$_SESSION['quote_no']."' ";
	$quote_result = mySQL_query($quote_query);
	$a1 = mysql_result($quote_result, 0, "cust_id");
	$a2 = mysql_result($quote_result, 0, "seller");
	$a3 = mysql_result($quote_result, 0, "company_contact");
	$a4 = mysql_result($quote_result, 0, "contact_phone");
	$a5 = mysql_result($quote_result, 0, "project_no");
	$a6 = mysql_result($quote_result, 0, "project_place");
	$a7 = mysql_result($quote_result, 0, "project_description");
	$a8 = mysql_result($quote_result, 0, "quote_type");
	$cust_id = $a1;
	$quote_no = $_SESSION['quote_no'];
	$job_no='';

	$table_name = $_SESSION['db_prefix']."_customer";
    $customer_query = "SELECT comp_name, bag_box, box_no, postal_place, phone, contact_1, email_1   FROM $table_name WHERE cust_id = '".$a1."' ";
    $customer_result = mySQL_query($customer_query);
    $b1 = mysql_result($customer_result, 0, "comp_name");
	$b2 = mysql_result($customer_result, 0, "bag_box");
	$b3 = mysql_result($customer_result, 0, "box_no");
	$b4 = mysql_result($customer_result, 0, "postal_place");
	$b5 = mysql_result($customer_result, 0, "phone");
	$b6 = mysql_result($customer_result, 0, "contact_1");
	$b7 = mysql_result($customer_result, 0, "email_1");


$_SESSION['quote_amount'] = $_SESSION['quote_price_1'] + $_SESSION['quote_price_2'] + $_SESSION['quote_price_3'];

$total = $_SESSION['quote_amount'];
?>



<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>

</head>
<?php include('../include/wait.php') ?>
<link href="../css/wait.css" rel="stylesheet" type="text/css">
<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');">
<div class="page_middle_frame">
<form id="feedbackform" method="get" action="quoteWiz6.php" >
  <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
     <tr>
            <td width="525" ><div class="wizard_frame">
              <table width="650" id="table_details_display">
                <tr>
                  <td width="123">Sales person:</td>
                  <td width="205"><?php echo  $_SESSION['seller'] ?></td>
                  <td width="109">Designer:</td>
                  <td width="213"><?php echo $_SESSION['designer'] ?></td>
                </tr>
                <tr>
                  <td>Quotation date:</td>
                  <td><strong><span class="wizard"><?php echo date("d-m-Y", strtotime($_SESSION['quotation_date'])) ?></span></strong></td>
                  <td>Follow up on:</td>
                  <td><?php echo date("d-m-Y", strtotime($_SESSION['check_date'])) ?></td>
                </tr>
              </table>
            </div>
              <div class="wizard_frame" >
              <?php 
				include ('../include/customer_block.php');
				echo '<br>';
				include ('../include/job_block.php')
			?>
              </div>
              <div class="wizard_frame">
              <table width="650" id="table_details_display">
                <tr>
                  <td colspan="4">Project details::</td>
                </tr>
                <tr>
                  <td width="123">Project no:</td>
                  <td width="205"><?php echo $a5 ?></td>
                  <td width="109">Place:</td>
                  <td width="213"><?php echo $a6 ?></td>
                </tr>
                <tr>
                  <td>Project description:</td>
                  <td><?php echo $a7 ?></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
              </table>
            </div>
              <div class="wizard_frame"> Quotation details
                <table width="650" id="table_details_display">
                  <tr>
                    <td>Quotation for:</td>
                    <td><?php echo $a8 ?></td>
                    <td>&nbsp;</td>
                    <td >&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="123">Quotation details:</td>
                    <td width="205"><?php echo $_SESSION['quote_line_1'] ?></td>
                    <td width="109">&nbsp;</td>
                    <td width="213" ><div align="right"><?php if ($_SESSION['quote_price_1']!="") {echo number_format($_SESSION['quote_price_1'], 2, '.', ','); } ?></div></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td><?php echo $_SESSION['quote_line_2'] ?></td>
                    <td>&nbsp;</td>
                    <td ><div align="right"><?php  if ($_SESSION['quote_price_2']!="") {echo number_format($_SESSION['quote_price_2'], 2, '.', ','); } ?></div></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td><?php echo $_SESSION['quote_line_3'] ?></td>
                    <td>&nbsp;</td>
                    <td ><div align="right"><?php if ($_SESSION['quote_price_3']!=""){ echo number_format($_SESSION['quote_price_3'], 2, '.', ',') ; } ?></div></td>
                  </tr>
                  <tr>
                    <td>Quote Total:</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><div align="right"><?php echo number_format($_SESSION['quote_amount'], 2, '.', ',') ?></div></td>
                  </tr>
                </table>
              </div>
              <br />
              <br />
              <br />
              <br />
<br />
<br />

            <div class="wizard_frame">
              <label class="label_std">If you want to make changes use the 'Prev' button to go back. <br />
              Click 'New' to make a new entry or to finish the wizard click 'Finish'.</label>
           </div>
       </td>
           
    </tr>
          <tr>
            <td>
              <table width="675" height="50" align="center" id="table_button_bar">
                <tr>
                  <td width="141" valign="top"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onClick="needToConfirm = false;MM_goToURL('parent','quoteWizbase.php?s=6&amp;p=3');return document.MM_returnValue; MM_showHideLayers('wait','','show');" /></td>
                  <td width="130" valign="top">
                    <input name="s" type="hidden" id="s" value="5" />
                    <input name="p" type="hidden" id="p" value="5" />
                  </td>
                  <td width="137" valign="top"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../sales/sales_main.php'); " value="Cancel" /></td>
                  <td width="131" align="right" valign="top"><input type="submit" name="new_button" class="imagebutton" id="new_button" value="New" onClick="needToConfirm = false; MM_showHideLayers('wait','','show');" /></td>
                  <td width="87" align="right" valign="top"><input  name="finish_button" type="submit" class="imagebutton" id="finish_button" value="Finish" onClick="needToConfirm = false;MM_showHideLayers('wait','','show')" /></td>
                </tr>
              </table></td>
          </tr>
  </table>
  
  
</form>
</div>
</body>
