
<script type="text/javascript" src="../css/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<script language="javascript" type="text/javascript" >
<!--
function confirmRefresh() {
var okToRefresh = confirm("Do you really want to cancel this entry?");
var url='showAllProducts.php?cat=Tiles and Accessories&productSelect=All&colorSelect=All'
if (okToRefresh)
	{
			window.location=url;
	}
}
// -->
</script>
<script language="JavaScript">
var needToConfirm = true;
  window.onbeforeunload = confirmExit;
   function confirmExit()
  {
    if (needToConfirm)
      return "You did not finish the wizard./nIf you leave now your data will not be saved.";
  }
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
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]+"'");
}
</script>

<form id="feedbackform" method="get" action="orderWiz6.php" >
      <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
          <tr>
            <td width="525" ><table width="575" align="center" id="tableResume" >
              <tr>
    <td width="119" align="left" valign="top"><span class="wizard">Order for:</span></td>
    <td width="180" align="left" valign="top"><strong><span class="wizard">
      <label class="std"><?php echo $_SESSION['CustomerName'] ?></label>
    </span></strong></td>
    <td width="109" align="left" valign="top">&nbsp;</td>
    <td width="164" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">Deliver to:</td>
    <td align="left" valign="top"><?php echo $_SESSION['DeliverTo']?></td>
    <td align="left" valign="top">Cell:</td>
    <td align="left" valign="top"><?php echo $_SESSION['CellText'] ?></td>
  </tr>
  <tr>
    <td align="left" valign="top"><span class="wizard">Delivery Address:</span></td>
    <td colspan="3" align="left" valign="top"><strong><span class="wizard"><?php echo $_SESSION['AddressText'] ."   ". $_SESSION['PlaceText'] ?></span></strong></td>
  </tr>
  <tr>
    <td align="left" valign="top">Date:</td>
    <td align="left" valign="top"><?php echo  date("d-m-Y", strtotime($_SESSION['OrderDate'] ))?> </td>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">Delivery Date:</td>
    <td colspan="2" align="left" valign="top"><?php if ( $_SESSION['DelDate']=='tba') { echo "tba"; } else { echo  date("d-m-Y", strtotime($_SESSION['DeliveryDate'])) ; }?>  </td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
     </table>
              <br />
              <table width="575" align="center" id="tableResume" cellpadding="3px">
               <?php
			     $AllTotalText='0';
	             $i=0;
	             $l=$_SESSION['line_no'];
	             While ($i < $l ) { ?>
                 <?php if ($_SESSION['QuantityText'.$i]>0) { ?>
                <tr>
                  <td width="114"><?php  echo $_SESSION['QuantityText'.$i] ?></td>
                  <td width="148"><?php echo $_SESSION['ProductText'.$i]; ?></td>
                  <td width="143" align="right"><?php echo number_format($_SESSION['PriceText'.$i]  , 2, '.', ', ')?></td>
                  <td width="60" align="right">&nbsp;</td>
                  <td width="66" align="right"><?php echo number_format($_SESSION['TotalText'.$i]  , 2, '.', ', ')?><?php $AllTotalText = $AllTotalText + $_SESSION['TotalText'.$i]; ?></td>
                </tr>
                 <?php }
	               $i++;
	               } ?>
                 <tr>
                   <td colspan="4" align="right">Total:&nbsp;&nbsp; </td>
                   <td align="right"><?php echo number_format($AllTotalText, 2, '.', ', ')?></td>
                 </tr>
               
                   
              </table>
            <p class="wizard">
              <input name="s" type="hidden" id="s" value="5" />
              <input name="p" type="hidden" id="p" value="5" />
              <label class="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></p>
            </td>
            
          </tr>
          <tr>
            <td>
              <table width="590" height="50" align="center" id="tableButtonBar">
                <tr>
                  <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onclick="needToConfirm = false;MM_goToURL('parent','orderWizbase.php?s=6&amp;p=4');return document.MM_returnValue" /></td>
                  <td width="115">&nbsp;</td>
                  <td width="99"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onclick="javascript:confirmRefresh(); needToConfirm = false;" value="Cancel" /></td>
                  <td width="125"><input type="submit" name="new_button" class="imagebutton" id="new_button" value="New" onclick="needToConfirm = false; " /></td>
                  <td width="110"><input  name="finish_button" type="submit" class="imagebutton" id="finish_button" value="Finish" onclick="needToConfirm = false; "  /></td>
                </tr>
              </table></td>
          </tr>
        </table>
  </table>
 
</form>

