<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @portion code Copyright (c) 2002 osCommerce
  @package osCSS-2 <www http://www.oscss.org>
  @version 2.1.0
  @date  18/11/10, 21:53
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
*/
$order_totals=$page->the_var('order_totals');
?>
<div id="checkoutConfirmation">
  <?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
  <?php echo unhtmlentities($boxe->content) ?>

  <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h2>

  <div class="prod_box_big">
    <div class="top_prod_box_big"></div>
      <div class="center_prod_box_big">
   <table class="invoice invoiceAdress" cellspacing="0" summary="<?php echo HEADING_TITLE; ?>">
    <thead>
        <tr>
	<?php  if($sendto != false):  ?>
         <th class="deliveryAddress"><?php echo HEADING_DELIVERY_ADDRESS . '&nbsp;<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">(' . TEXT_EDIT . ')</a>'; ?></th>
	<?php endif; ?>
         <th class="billingAdress"><?php echo HEADING_BILLING_ADDRESS . '&nbsp;<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">(' . TEXT_EDIT . ')</a>'; ?></th>
        </tr>
    </thead>
    <tbody>
      <tr>
      <?php  if($sendto != false):  ?>
	<td class="deliveryAddress"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />') ; ?></td>
      <?php endif; ?>
      <td class="billingAdress"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'); ?></td>
    </tr>
    </tbody>
   </table>
    </div>
    <div class="bottom_prod_box_big"></div>
  </div>

  <div class="prod_box_big">
     <div class="shop_top_prod_box_big"></div>
      <div class="center_prod_box_big">

    <table class="invoice invoiceDetails" cellspacing="0" summary="<?php echo HEADING_TITLE; ?>">
    <thead>
        <tr>
	  <th class="invoiceProducts "><?php echo HEADING_PRODUCTS; ?></th>
	  <th class="invoiceQty "><?php echo HEADING_PRODUCTS_QTY; ?></th>
	  <th class="invoiceTaxes taxe"><?php echo HEADING_TAX; ?></th>
	  <th class="invoicePrice pu"><?php echo HEADING_PRODUCTS_PRICE_U; ?></th>
	  <th class="invoicePrice tright totht "><?php echo HEADING_PRODUCTS_TOT_HT; ?></th>
	  <th class="invoicePrice tright totttc"><?php echo HEADING_PRODUCTS_TOT_TTC; ?></th>
        </tr>
    </thead>
    <tbody>
    <?php reset($order->products); foreach($order->products as $prdct) { ?>
      <tr>
	<td class="invoiceProducts tleft">  <?php echo $prdct['name'] ;
		if ( (isset($prdct['attributes'])) && (sizeof($prdct['attributes']) > 0) )
		  foreach($prdct['attributes'] as $attrib) echo '<br /><span class="invoiceAttributes">&nbsp; - ' . $attrib['option'] . ': ' . $attrib['value'] .'</span>' ;
	?> </td>
	<td class="invoiceQty tcenter"><?php echo $prdct['qty'] ;?></td>
	<td class="invoiceTaxes tcenter taxe"><?php echo tep_display_tax_value($prdct['tax']) . '%' ; ?></td>
	<td class="invoicePrice tright pu"><?php echo $currencies->format($prdct['final_price'] , true, $order->info['currency'], $order->info['currency_value']) ; ?></td>
	<td class="invoicePrice tright totht"><?php echo $currencies->format($prdct['total_line'], true, $order->info['currency'], $order->info['currency_value']) ; ?></td>
	<td class="invoicePrice tright totttc"><?php  echo $currencies->format($prdct['total_line_ttc'], true, $order->info['currency'], $order->info['currency_value']) ;  ?></td>
      </tr>
    <?php } ?>
    </tbody>
   </table>

    <table class="invoice invoiceTotal" cellspacing="0">
      <tbody>
      <?php  print $order_total_modules->output("<tr>%s</tr>", '<td class="otTtitle">%s</td><td class="otText tright totht">%s</td><td class="otText tright totttc">%s</td>'); ?>
      </tbody>
   </table>

<?php
  if (is_array($payment_modules->modules)) {
    if ($confirmation = $payment_modules->confirmation()) {
?>
     <div class="contenBox paymentInformation">
        <h3><?php echo HEADING_PAYMENT_INFORMATION; ?></h3>
        <p><?php echo $confirmation['title']; ?></p>

<?php if (isset($confirmation['fields']))
      for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) { ?>
           <p>
           <label><?php echo $confirmation['fields'][$i]['title']; ?></label>
           <?php echo $confirmation['fields'][$i]['field'] . "\n"; ?>
           </p>
    <?php } ?>
     </div>
<?php
  }
 } ?>

  <?php if (tep_not_null($order->info['comments'])) { ?>
    <div class="contentBox comment">
    <h3><?php echo  HEADING_ORDER_COMMENTS . '&nbsp;<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">(' . TEXT_EDIT . ')</a>'; ?></h3>
      <blockquote>
      <p><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?></p>
      </blockquote>
    </div>
  <?php } ?>

  <?php  echo tep_draw_form('checkout_confirmation',(isset($$payment->form_action_url) ?$$payment->form_action_url : tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') ), 'post'); ?>

    <?php if (is_array($payment_modules->modules)) echo $payment_modules->process_button(); ?>
    <p class="formBt">
      <?php echo (isset($$payment->form_submit) ? $$payment->form_submit : '<input type="submit" class="submitBt" value="'.IMAGE_BUTTON_CONFIRM_ORDER.'"  />') ; ?>
    </p>

  </form>

    </div>
    <div class="bottom_prod_box_big"></div>
  </div>

</div>