<?php
/*
###################################################################################
  Bigware Shop 2.3
  Release Datum: 23.08.2015
  
  Bigware Shop
  http://www.bigware.de

  Copyright (c) 2015 Bigware LTD
  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
  (c) 2015	Bigware LTD

  Copyrightvermerke duerfen nicht entfernt werden.
  ------------------------------------------------------------------------
  Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
  der GNU General Public License, wie von der Free Software Foundation
  veroeffentlicht, weitergeben und/oder modifizieren, entweder gemaess Version 2 
  der Lizenz oder (nach Ihrer Option) jeder spaeteren Version.
  Die Veroeffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen
  von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die
  implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FUER EINEN
  BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.
  
  Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
  Programm erhalten haben. Falls nicht, schreiben Sie an die Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

  Infos:
  ------------------------------------------------------------------------
  Der Bigware Shop wurde vor vielen Jahren bereits aus dem bekannten Shopsystem osCommerce
  weiter- und neuentwickelt.
  Der Bigware Shop legt im hohen Masse Wert auf Bedienerfreundlichkeit, beinhaltet eine leichte
  Installation, viele neue professionelle Werkzeuge und zeichnet sich aus durch eine grosse 
  Community, die bei Problemen weiterhelfen kann.
  
  Der Bigware Shop ist auf jedem System lauffaehig, welches eine PHP Umgebung
  (ab PHP 4.1.3) und mySQL zur Verfuegung stellt und auf Linux basiert.
 
  Hilfe erhalten Sie im Forum auf www.bigware.de 
  
  -----------------------------------------------------------------------
  
 ##################################################################################




*/
?>
    <table border="0" style="width:100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign"></td>
            <td class="pageGeneralsign" align="right"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main" colspan="2"><b><?php echo sprintf(ABOVE_ORDER_NUMBER, $_GET['order_id']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></b></td>
          </tr>
          <tr>
            <td class="smallText"><?php echo ABOVE_ORDER_DATE . ' ' . go_date_long($order->info['date_purchased']); ?></td>
            <td class="smallText" align="right"><?php echo ABOVE_ORDER_TOTAL . ' ' . $order->info['total']; ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
<?php
  if ($order->delivery != false) {
?>
            <td style="width:30%" valign="top"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><b><?php echo ABOVE_DELIVERY_ADDRESS; ?></b></td>
              </tr>
              <tr>
                <td class="main"><?php echo go_form_of_address($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>
              </tr>
<?php
    if (go_not_null($order->info['shipping_method'])) {
?>
              <tr>
                <td class="main"><b><?php echo ABOVE_SHIPPING_METHOD; ?></b></td>
              </tr>
              <tr>
                <td class="main"><?php echo $order->info['shipping_method']; ?></td>
              </tr>
<?php
    }
?>
            </table></td>
<?php
  }
?>
            <td style="width:<?php echo (($order->delivery != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
              <tr>
                <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
<?php
  if (sizeof($order->info['tax_groups']) > 1) {
?>
                  <tr>
                    <td class="main" colspan="2"><b><?php echo ABOVE_ITEMS; ?></b></td>
                    <td class="smallText" align="right"><b><?php echo ABOVE_TAX; ?></b></td>
                    <td class="smallText" align="right"><b><?php echo ABOVE_TOTAL; ?></b></td>
                  </tr>
<?php
  } else {
?>
                  <tr>
                    <td class="main" colspan="3"><b><?php echo ABOVE_ITEMS; ?></b></td>
                  </tr>
<?php
  }
  for ($i=0, $n=sizeof($order->items); $i<$n; $i++) {
    echo '          <tr>' . "\n" .
         '            <td class="main" align="right" valign="top" style="width:30px">' . $order->items[$i]['qty'] . '&nbsp;x</td>' . "\n" .
         '            <td class="main" valign="top">' . $order->items[$i]['name'];
    if ( (isset($order->items[$i]['characteristics'])) && (sizeof($order->items[$i]['characteristics']) > 0) ) {
      for ($j=0, $n2=sizeof($order->items[$i]['characteristics']); $j<$n2; $j++) {
        echo '<br><nobr><small>&nbsp;<i> - ' . $order->items[$i]['characteristics'][$j]['option'] . ': ' . $order->items[$i]['characteristics'][$j]['value'] . '</i></small></nobr>';
      }
    }
    echo '</td>' . "\n";
    if (sizeof($order->info['tax_groups']) > 1) {
      echo '            <td class="main" valign="top" align="right">' . go_display_tax_value($order->items[$i]['tax']) . '%</td>' . "\n";
    }
    echo '            <td class="main" align="right" valign="top" nowrap>' . $currencies->format(go_add_tax($order->items[$i]['final_price'], $order->items[$i]['tax']) * $order->items[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .
         '          </tr>' . "\n";
  }
?>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td class="main"><b><?php echo ABOVE_BILLING_INFORMATION; ?></b></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td style="width:30%" valign="top"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><b><?php echo ABOVE_BILLING_ADDRESS; ?></b></td>
              </tr>
              <tr>
                <td class="main"><?php echo go_form_of_address($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>
              </tr>
              <tr>
                <td class="main"><b><?php echo ABOVE_PAYMENT_METHOD; ?></b></td>
              </tr>
              <tr>
                <td class="main"><?php echo $order->info['payment_method']; ?></td>
              </tr>
            </table></td>
            <td style="width:70%" valign="top"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
<?php
  for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {
    echo '              <tr>' . "\n" .
         '                <td class="main" align="right" style="width:100%">' . $order->totals[$i]['title'] . '</td>' . "\n" .
         '                <td class="main" align="right" nowrap>' . $order->totals[$i]['text'] . '</td>' . "\n" .
         '              </tr>' . "\n";
  }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td class="main"><b><?php echo ABOVE_ORDER_HISTORY; ?></b></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td valign="top"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
<?php
  $statuses_query = go_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . DB_TBL_ORDERS_STATUS . " os, " . DB_TBL_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$_GET['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");
  while ($statuses = go_db_fetch_array($statuses_query)) {
    echo '              <tr>' . "\n" .
         '                <td class="main" valign="top" style="width:70">' . go_date_short($statuses['date_added']) . '</td>' . "\n" .
         '                <td class="main" valign="top" style="width:70">' . $statuses['orders_status_name'] . '</td>' . "\n" .
         '                <td class="main" valign="top">' . (empty($statuses['comments']) ? '&nbsp;' : nl2br(go_output_string_protected($statuses['comments']))) . '</td>' . "\n" .
         '              </tr>' . "\n";
  }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>
<?php
	$my_file = '45';
	$frameContent = '';
  include(FOLDER_RELATIV_MODULES . 'mods_bigware_6.php');
  echo $frameContent;
?>
				</td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
              <tr>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td><?php echo '<a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_44], go_get_all_get_parameter(array('order_id')), 'SSL') . '">' . go_picture_button('button_back.gif', PICTURE_BUTTON_BACK) . '</a>'; ?></td>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
