<head>
<?php
	$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 = '".$_SESSION['id']."' ";
	$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");
	
	$table_name = $_SESSION['db_prefix']."_mworks_order_components_temp WHERE user_name = '".$_SESSION['username']."' ";
	$line2_query = "SELECT * FROM $table_name ";
	$line2_result = mySQL_query($line2_query);
	$line2_num = mysql_num_rows($line2_result);
?>



</head>
<?php include('../include/wait.php') ?>
<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');"  onBlur="MM_showHideLayers('wait','','hide');">
<div class="page_middle_frame">
<form id="feedbackform" method="get" action="new_mworks_jobWiz6.php" >
  <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
     <tr>
            <td width="525" >
             Order details:
               <table width="670" id="table_details_display">
                <tr>
                  <td width="123">Sales representative:</td>
                  <td><?php echo $_SESSION['seller'] ?></td>
                </tr>
              </table>
            
            <br />


             Orders for:
            
              <table width="670" id="table_details_display">
                <tr>
                  <td width="123">Name:</td>
                  <td colspan="3"><?php echo  $b1 ?></td>
                </tr>
                <tr>
                  <td>Contact person:</td>
                  <td width="195"><?php echo $_SESSION['comp_contact'] ?></td>
                  <td width="86">Phone/cell:</td>
                  <td width="246"><?php echo $_SESSION['contact_phone'] ?></td>
                </tr><br />


                <tr>
                  <td>Address:</td>
                  <td colspan="3"><?php echo $b2." ".$b3.", ".$b4?></td>
                </tr>
                <tr>
                  <td>Telephone:</td>
                  <td><?php echo $b5 ?></td>
                  <td>e-mail:</td>
                  <td><?php echo $b7 ?></td>
                </tr>
              </table>
            
<br />
               Orders details:
                <table width="670" id="table_details_display">
                  <tr>
                    <td width="116">Order date:</td>
                    <td colspan="2"><strong><span class="wizard"><?php echo date("d-m-Y", strtotime($_SESSION['receive_date'])) ?></span></strong></td>
                    <td align="right">Value:</td>
                    <td colspan="2">P <?php echo number_format($_SESSION['value'], 2, '.', ',') ?>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>Project type:</td>
                    <td colspan="5">M-works</td>
                  </tr>
                  <tr>
                    <td>Project no:</td>
                    <td width="146"><?php echo $_SESSION['project_no'] ?></td>
                    <td width="58" align="right">Area:</td>
                    <td width="114"><?php echo $_SESSION['project_area'] ?></td>
                    <td width="57" align="right">Place:</td>
                    <td width="151"><?php echo $_SESSION['project_place'] ?></td>
                  </tr>
                  <tr>
                    <td>Project description:</td>
                    <td colspan="5"><?php echo $_SESSION['description'] ?></td>
                  </tr>
                </table>
              
<br />

          
           
<table id="table_details_display">
   <thead>
    <tr>
      <td>Order components</td>
      <td align="center">Quantity</td>
      <td align="left">Notes</td>
    </tr>
  </thead>
 <?php
		$i=0;
		while ($i<$line2_num) {
		   $a71 = mysql_result($line2_result, $i, "component");
		   $a72 = mysql_result($line2_result, $i, "quantity");
		   $a73 = mysql_result($line2_result, $i, "notes");
		   //$a74 = mysql_result($line2_result, $i, "order_no");
		?>
 <tr>
    <td width="289"><?php echo $a71 ?></td>
    <td width="64" align="left"><?php echo $a72 ?></td>
    <td width="290" align="left"><?php echo $a73 ?></td>
    <!--<input name="textfield0" type="text" id="textfield0" size="5" value="1"></td>-->
  </tr>
  <?php
		$i++;
		}
		?>
</table>
<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="117" valign="top"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onClick="needToConfirm = false;MM_showHideLayers('wait','','show');MM_goToURL('parent','new_mworks_jobWizbase.php?s=6&amp;p=2');return document.MM_returnValue" /></td>
                  <td width="115" valign="top">
                    <input name="s" type="hidden" id="s" value="5" />
                    <input name="p" type="hidden" id="p" value="5" />
                  </td>
                  <td width="99" valign="top"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../production/production_main.php?date='); " value="Cancel" /></td>
                  <td width="255" align="right" valign="top"><input type="submit" name="new_button" class="imagebutton" id="new_button" value="New" onClick="needToConfirm = false; MM_showHideLayers('wait','','show');" onMouseDown="MM_showHideLayers('wait','','show');"  />
                      <td width="65" align="right" valign="top"><input  name="finish_button" type="submit" class="imagebutton" id="finish_button" value="Finish" onClick="needToConfirm = false;MM_showHideLayers('wait','','show')"  />                                        
              </table></td>
          </tr>
  </table>
 
  
</form>
</div>
</body>

