<?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 
  
  -----------------------------------------------------------------------
  
 ##################################################################################




*/
?>
<?php 
  require('load_this/load_bigware_11.php'); 
  require(FOLDER_RELATIV_CLASSES . 'class_bigware_1.php'); 
  $currencies = new currencies(); 
  $oID = go_db_producing_input($_GET['oID']); 
  $orders_query = go_db_query("select orders_id from " . DB_TBL_ORDERS . " where orders_id = '" . (int)$oID . "'"); 
  include(FOLDER_RELATIV_CLASSES . 'class_bigware_9.php'); 
  $order = new order($oID); 
$the_extra_query= go_db_query("select * from " . DB_TBL_ORDERS . " where orders_id = '" . go_db_input($oID) . "'"); 
$the_extra= go_db_fetch_array($the_extra_query); 
$the_attendees_id= $the_extra['attendees_id']; 
$the_extra_query= go_db_query("select * from " . DB_TBL_ATTENDEES . " where attendees_id = '" . $the_attendees_id . "'"); 
$the_extra= go_db_fetch_array($the_extra_query); 
$the_attendees_fax= $the_extra['attendees_fax'];
if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/sichtfenster_rechnung')) {
   require(FOLDER_ABSOLUT_CATALOG . 'modules/sichtfenster_rechnung/configmain/main_bigware_92.php');
}else{  
	?> 
	<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
	<html <?php echo HTML_PARAMS; ?>> 
	<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
	<title><?php echo TITLE; ?></title> 
	<style>
	<!--
	 @import url("menu.css");
	a:link { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; font-weight: normal; text-decoration: none; }
	a:visited { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; font-weight: normal; text-decoration: none; }
	a:active { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; font-weight: normal; text-decoration: none; }
	a:hover { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; font-weight: normal; text-decoration: underline; }
	a:link.upLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }
	a:visited.upLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }
	a:active.upLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }
	a:hover.upLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: underline; }
	a:link.cartCaseUpLink { font-size: 10px; color: #616060; font-weight: bold; text-decoration: none; }
	a:visited.cartCaseUpLink { font-size: 10px; color: #616060; font-weight: bold; text-decoration: none; }
	a:active.cartCaseUpLink { font-size: 10px; color: #616060; font-weight: bold; text-decoration: none; }
	a:hover.cartCaseUpLink { font-size: 10px; color: #616060; font-weight: bold; text-decoration: none; }
	a:link.cartCaseInsideLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #616060; font-weight: normal; text-decoration: none; }
	a:visited.cartCaseInsideLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #616060; font-weight: normal; text-decoration: none; }
	a:active.cartCaseInsideLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #616060; font-weight: normal; text-decoration: none; }
	a:hover.cartCaseInsideLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #616060; font-weight: normal; text-decoration: underline; }
	a:link.sharePageLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: none; }
	a:visited.sharePageLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: none; }
	a:active.sharePageLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: none; }
	a:hover.sharePageLink { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: underline; background-color: #FFFF33; }
	 .cartCaseUp { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #616060; background-color: #ffffff; }
	.cartCaseInside { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #616060; }
	 .upMeetingPoint { background-color: #6699FF; }
	.upMeetingPointInside { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; padding: 0px; }
	.left_frames { background-color: #F0F1F1; border-color: #999999; border-width: 1px; border-style: solid; padding: 2px; }
	.pageGeneralsign { font-family: Verdana, Arial, sans-serif; font-size: 18px; color: #0000A0; font-weight: bold; }
	  .tbUPCountData { background-color: #6699FF; }
	.tbUPDataInside { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; }
	.tbCountData { background-color: #F2F2F2; }
	.tbCountDataSelected { background-color: #F2F2F2; }
	.tbCountDataOver { background-color: #FFFFFF; cursor: pointer; cursor: hand; }
	.TbInsideData { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }
	 .infoFrameUp { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; background-color: #6699FF; }
	.infoFrameInside { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; background-color: #E4E4E4; filter:DropShadow(color=#C0C0C0, offx=3, offy=3)}
	 .frameMessage { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
	.MessageStackWrong, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; }
	.MessageStackYes { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; }
	 CHECKFRAME, INPUT, RADIO, SELECT, TEXTAREA, FILE { font-family: Verdana, Arial, sans-serif; font-size: 11px; }
	FORM { display: inline; }
	 .formArea { background-color: #f1f9fe; border-color: #7b9ebd; border-style: solid; border-width: 1px; }
	.formAreaTitle { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; }
	 .characteristics-odd { background-color: #f4f7fd; }
	.characteristics-even { background-color: #ffffff; }
	 .specialPrice { color: #ff0000; }
	.oldPrice { text-decoration: line-through; }
	.fieldRequired { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }
	.smallText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
	.main { font-family: Verdana, Arial, sans-serif; font-size: 12px; }
	.errorText { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }
	-->
	</style>
	</head> 
	<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> 
	<!-- body_text //--> 
	<table width="645" border="0" align="center" cellpadding="0" cellspacing="0"> 
	  <tr> 
	    <td align="center" class="main"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="5"> 
	        <tr> 
	          <td valign="top" align="left" class="main">
	          </td> 
	        </tr> 
	      </table></td> 
	  </tr> 
	  <tr> 
	   <?php 
	    if (CHANGE_INVOICE_LOGO_ALIGN == 'rechts') { 
	   ?> 
	    <td colspan="2" align="right" valign="top" class="pageGeneralsign"><?php echo go_picture(FOLDER_RELATIV_PICTURES . CHANGE_INVOICE_LOGO); ?></td> 
	   <?php 
	    } else { 
	    if (CHANGE_INVOICE_LOGO_ALIGN == 'links') { 
	   ?> 
	    <td colspan="2" align="left" valign="top" class="pageGeneralsign"><?php echo go_picture(FOLDER_RELATIV_PICTURES . CHANGE_INVOICE_LOGO); ?></td> 
	   <?php 
	    } else { 
	    if (CHANGE_INVOICE_LOGO_ALIGN == 'mitte') { 
	   ?> 
	    <td colspan="2" align="center" valign="top" class="pageGeneralsign"><?php echo go_picture(FOLDER_RELATIV_PICTURES . CHANGE_INVOICE_LOGO); ?></td> 
	   <?php 
	      } 
	     } 
	    } 
	   ?> 
	  </tr> 
	  <tr> 
	    <td width="345" align="right" valign="top" class="pageGeneralsign"> <table width="340" border="0" cellspacing="0" cellpadding="2"> 
	        <tr> 
	          <td colspan="2" class="main" align="right"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td> 
	        </tr> 
	        <tr> 
	          <td class="main"><b><b><?php echo TYPE_IN_SOLD_TO; ?></b><br> 
	            </b><?php echo go_form_of_address($order->billing['format_id'], $order->billing, 1, '', '<br>'); ?></td> 
	        </tr> 
	        <tr> 
	          <td colspan="2" class="titleGeneralsign"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '20'); ?></td> 
	        </tr> 
	        <tr> 
	          <td class="main"><b><?php echo TYPE_IN_SHIP_TO; ?></b></td> 
	        </tr> 
	        <tr> 
	          <td class="main"><?php echo go_form_of_address($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?><br></td> 
	        </tr> 
	      </table></td> 
	    <td width="300" align="right" valign="top" class="main"> <table> 
	        <tr> 
	          <td width="100" align="right" class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td> 
	        </tr> 
	        <tr> 
	          <td class="main" align="right"><?php echo nl2br(SHOP_NAME_ADDRESS); ?></td> 
	        </tr> 
	      </table></td> 
	  </tr> 
	</table> 
	<table width="645" border="0" align="center" cellpadding="2" cellspacing="0"> 
	  <tr> 
	    <td align="left" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> 
	        <tr> 
	          <td colspan="2" class="titleGeneralsign"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '25'); ?></td> 
	        </tr> 
	        <tr> 
	          <?php 
	 
	          
	       $text_query = go_db_query("SELECT * FROM change_invoice where change_invoice_id = '1' and language_id = '1'"); 
	       $text = go_db_fetch_array($text_query); 
				 $text['change_invoice_text'] = preg_replace('/<--VORNAME_NACHNAME-->/', $order->billing['name'], $text['change_invoice_text']); 
				 $gender_query = go_db_query("select attendees_gender  from ".DB_TBL_ATTENDEES." where attendees_id='".$order->attendee['id']."'");
				 if (go_db_num_rows($gender_query)!=0) {$gender = go_db_result($gender_query, 0, 'attendees_gender');}
				 else {$gender='n';}
				 if 			($gender=='m') {$gender_ann = ' Herr ';$geehrt = 'geehrter';}
				 elseif		($gender=='f') {$gender_ann = ' Frau ';$geehrt = 'geehrte';}
				 else										 {$gender_ann = 'Herr/Frau';$geehrt = 'geehrte(r)';}
				 $text['change_invoice_text'] = preg_replace('/<--Herr_Frau-->/', $gender_ann, $text['change_invoice_text']);
				 $text['change_invoice_text'] = preg_replace('/<--geehrt-->/', $geehrt, $text['change_invoice_text']);
	?> 
	          <td colspan="2" class="main"><?php echo $text['change_invoice_text']; ?></td> 
	        </tr> 
	        <tr> 
	          <td colspan="2" class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '25'); ?></td> 
	        </tr> 
	        <tr> 
	          <td width="25%" class="main"><b><?php echo TYPE_IN_INVOICE_DATE_PURCHASED; ?></b></td> 
	   <?php 
	    if (CHANGE_INVOICE_SHOW_DATE == 'Datum und Uhrzeit') { 
	   ?> 
	          <td class="main"><?php echo go_datetime_short($order->info['date_purchased']); ?></td> 
	   <?php 
	    } else { 
	    if (CHANGE_INVOICE_SHOW_DATE == 'nur Datum') { 
	   ?> 
	          <td class="main"><?php echo go_date_short($order->info['date_purchased']); ?></td> 
	   <?php 
	     } 
	   } 
	   ?> 
	        </tr> 
	   <?php 
	    if (CHANGE_INFOICE_SHOW_CNR == 'ja') { 
	   ?> 
	        <tr> 
	          <td width="25%" class="main"><b><?php echo TYPE_IN_INVOICE_COSTUMER_ID; ?></b></td> 
	          <td class="main"><?php echo $the_attendees_id; ?></td> 
	        </tr> 
	   <?php 
	    } 
	   ?> 
	   <?php 
	    if (CHANGE_INFOICE_SHOW_ONR == 'ja') { 
	   ?> 
	        <tr> 
	          <td width="25%" class="main"><b><?php echo TYPE_IN_INVOICE_ORDER_ID; ?></b></td> 
	          <td class="main"><?php echo go_db_input($oID); ?></td> 
	        </tr> 
	   <?php 
	    } 
	   ?> 
	   <?php 
	    if (CHANGE_INFOICE_SHOW_PAYMENT == 'ja') { 
	   ?> 
	        <tr> 
	          <td width="25%" class="main"><b><?php echo TYPE_IN_PAYMENT_METHOD; ?></b></td> 
	          <td class="main"><?php echo $order->info['payment_method']; ?></td> 
	        </tr> 
	   <?php 
	    } 
	   ?> 
	   <?php 
	   define('CHANGE_INFOICE_SHOW_SHIPPING', 'ja');
	    if (CHANGE_INFOICE_SHOW_SHIPPING == 'ja') { 
	   ?> 
	        <tr> 
	          <td width="25%" class="main"><b><FONT face=Arial size=2><?php echo TYPE_IN_SHIPPING_METHOD; ?></font></b></td> 
	          <td class="main"><FONT face=Arial size=2><?php echo $order->info['shipping_method']; ?></font></td> 
	        </tr> 
	   <?php 
	    } 
	   ?>   
	   
	   
	      </table></td> 
	  </tr> 
	</table> 
	<table width="645" align="center" border="0" align="center" cellpadding="0" cellspacing="0"> 
	  <tr> 
	    <td><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td> 
	  </tr> 
	  <tr> 
	    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	      <tr class="tbUPCountData">
	        <td class="tbUPDataInside" colspan="2"><?php echo DB_TBL_ABOVE_ITEMS; ?></td>
	        <td class="tbUPDataInside"><?php echo DB_TBL_ABOVE_ITEMS_MODEL; ?></td>
	      </tr>
	<?php
	    for ($i=0, $n=sizeof($order->items); $i<$n; $i++) {
	      echo '      <tr class="tbCountData">' . "\n" .
	           '        <td class="TbInsideData" valign="top" align="right">' . $order->items[$i]['qty'] . '&nbsp;x</td>' . "\n" .
	           '        <td class="TbInsideData" valign="top">' . $order->items[$i]['name'];
	           
		echo '<br><nobr><small>' . $order->items[$i]['items_display_opt_price'] . '</small></nobr>'; 
	           
	      if (isset($order->items[$i]['characteristics']) && (sizeof($order->items[$i]['characteristics']) > 0)) {
	        for ($j=0, $k=sizeof($order->items[$i]['characteristics']); $j<$k; $j++) {
	       		if ($order->items[$i]['characteristics'][$j]['option'] != '' AND $order->items[$i]['characteristics'][$j]['value'] != ''){
		          echo '<br><nobr><small>&nbsp;<i> - ' . $order->items[$i]['characteristics'][$j]['option'] . ': ' . $order->items[$i]['characteristics'][$j]['value'];
		          echo '</i></small></nobr>';
	        }
	        }
	      }
	      echo '        </td>' . "\n" .
	           '        <td class="TbInsideData" valign="top">' . $order->items[$i]['model'] . '</td>' . "\n" .
	           '      </tr>' . "\n";
	    }
	?>
	    </table>
	</td> 
	      </tr> 
	    </table> 
	    </td> 
	  </tr> 
	  <tr> 
	  <td><table width="645" align="center" cellpadding=1 cellspacing=2> 
	  <tr> 
	    <td colspan="4"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '25'); ?></td> 
	  </tr> 
	   <tr> 
	<?php 
	       $text_query = go_db_query("SELECT * FROM change_invoice where change_invoice_id = '2' and language_id = '1'"); 
	       $text = go_db_fetch_array($text_query); 
	?> 
	    <td colspan="4" class="main"><?php echo $text['change_invoice_text']; ?></td> 
	  </tr> 
	  <tr> 
	    <td colspan="4"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '25'); ?></td> 
	  </tr> 
	  <?php 
	    if (SHOW_BANK_DATA == 'ja') { 
	  ?> 
	<tr> 
	<td class=main valign=top> 
	<?php echo '<small><b>' . SHOP_ADDRESS . '</b><br>' .nl2br(SHOP_NAME_ADDRESS) . '</small>'; ?></td> 
	<td class=main valign=top> 
	<?php echo '<small><b>' . TEXT_TAX_NUMBER . '</b><br>' . OWNER_BANK_FA . '<br>' . OWNER_BANK_TAX_NUMBER . '<br>' . OWNER_BANK_UST_NUMBER . '</small>'; ?></td> 
	<td class=main valign=top> 
	<?php echo '<small><b>' . TEXT_BANK . '</b><br>' . OWNER_BANK_NAME . '<br>' . OWNER_BANK_MEMBER . '<br>' . TEXT_BANK_BLZ . '&nbsp;' . SHOP_OWNER_BLZ . '<br>' . TEXT_BANK_KTO . '&nbsp;' . OWNER_BANK . '</small>'; ?></td> 
	<td class=main valign=top> 
	<?php echo '<small><b>' . TEXT_BIC_SWIFT . '</b><br>' . OWNER_BANK_SWIFT . '<br>' . OWNER_BANK_IBAN . '</small>'; ?></td> 
	</tr> 
	<?php 
	} else { 
	?> 
	<tr> 
	<td></td> 
	<td></td> 
	<td></td> 
	<td></td> 
	</tr> 
	<?php 
	} 
	?> 
	</table></td> 
	  </tr> 
	</table> 
	</table> 
	<?php ?>
	<?php ?>
	<!-- body_text_eof //--> 
	</body> 
	</html> 
	<?php
}
 require(FOLDER_RELATIV_INCLUDES . 'load_bigware_6.php'); 
?>