<?php 
// Artikel wird bearbeitet, neu angelegt oder kommt aus der Vorschau zurück!
// creating_new_variable2

// Bereite das array $fieldname f�r das Objekt $pInfo vor, das später mit den Werten beschrieben wird ($pInfo->fieldname).
// Dazu schreibe alle Feldnamen der Tabellen aus $db_tables in das array $fieldname
$db_tabels= array(DB_TBL_ITEMS, 
		DB_TBL_ITEMS_DESCRIPTION, 
		DB_TBL_ITEMS_DOWNLOADS, 
		DB_TBL_ITEMS_MASSEINHEIT, 
		DB_TBL_ITEMS_DEFAULT_OPTIONS_CONF);
$fieldname = array();
foreach ($db_tabels as $table_name) {
	if (@mysqli_query("SELECT 1 FROM $table_name")){
		// array von table_name vorbereiten
		$fieldname_query = go_db_query("select * FROM " . $table_name . " LIMIT 0"); 
		$count_fields = '';
		// Spalten z�hlen
		$count_fields = mysqli_num_fields( $fieldname_query );
		// Feldnamen der Tabelle ins array ausgeben
		for ( $i = 0; $i < $count_fields; $i++ ){
                        $properties = mysqli_fetch_field_direct($fieldname_query, $i);
			$field_name_table = is_object($properties) ? $properties->name : null;
			$fieldname['' . $field_name_table . ''] = '';
		}
	}
}
// das vorbereitete array wird nun in $pInfo geschrieben, das wiederum später mit den Werten 
// aus der Vorschauseite oder aus der Datenbank beschrieben wird.
$pInfo = new objectInfo($fieldname);

if (isset($_GET['bigID']) && empty($_POST)) { 
	// if = Artikel existiert und wird neu aufgerufen.
	// Die Array Daten der Datenbank des Artikels werden in $pInfo reingeschrieben

	// creating_new_variable3

	$item_query = go_db_query("select * from " . DB_TBL_ITEMS . " where items_id = '" . (int)$_GET['bigID'] . "'"); 
	$item = go_db_fetch_array($item_query);
	// ^ jetzt in dieser Variable vorhanden: $items array mit Werten aus Artikelwerten (DB_TBL_ITEMS).

	$item_description = array();
	if (isset($languages)) {
		for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
			$item_description_query = go_db_query("select * from " . DB_TBL_ITEMS_DESCRIPTION . " where items_id = '" . (int)$_GET['bigID'] . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); 
			$item_description[$languages[$i]['id']] = go_db_fetch_array($item_query);
			// ^ jetzt in dieser Variable vorhanden: $item_description array mit Werten aus der Artikelbeschreibung (DB_TBL_ITEMS_DESCRIPTION).
		}
	}

	if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel')) {
		require(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel/configmain/main_bigware_10_b.php');
	}
	else{
		$item_masseinheit = array();
	}
	if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/download')) {
		require(FOLDER_ABSOLUT_CATALOG . 'modules/download/configmain/main_bigware_10_b.php');
	}
	else{
		$item_downloads = array();
	}

	$item_default_conf_array = array();
	$item_default_conf=array();
	$item_default_conf_query = go_db_query("select * from ".DB_TBL_ITEMS_DEFAULT_OPTIONS_CONF." where items_id = '" . (int)$_GET['bigID'] . "'");
	$num_default = go_db_num_rows($item_default_conf_query);
	if ($num_default!=0){

		for ($d=0; $d<$num_default; $d++){
			$item_default_option_id = go_db_result($item_default_conf_query, $d, 'items_options_conf_id');
			$item_default_option_value_id = go_db_result($item_default_conf_query, $d, 'items_options_conf_values_id');
			$item_default_conf_array[$item_default_option_id] = $item_default_option_value_id; 
		}//for d
		$item_default_conf = array('items_id' => (int)$_GET['bigID'], 'items_mainoption' =>$item_default_conf_array);
	}//if 


	// creating_new_variable3b

	// füge alle arrays zusammen, die seperat aus der Datenbank geholt wurden
	$item = $item+$item_description+$item_default_conf+$item_masseinheit+$item_downloads;

	// ... und schreibe nun das zusammengefügte array in $pInfo um die einzelnen Werte dann 
	// z.B. so "$pInfo->db_feldname" verfügbar zu machen.
	$pInfo->objectInfo($item);  
	if ($pInfo->items_price_option!='') {
		$getPriceOptionQuery = go_db_query("select text from price_option where id=".$pInfo->items_price_option);
		if (go_db_num_rows($getPriceOptionQuery)!=0) { $getPriceOption = mysqli_result($getPriceOptionQuery,0,'text');}
	}

} // if ENDE = Artikel existiert
elseif (go_not_null($_POST)) {
	// elseif = Wenn auf "zurück" der Vorschauseite geklickt wurde
	// alle Post Variablen der Vorschauseite werden in $pInfo reingeschrieben

	// creating_new_variable4

	// erstmal alle Werte aus $_POST der "Vorschauseite" in $pInfo reinschreiben
	$pInfo->objectInfo($_POST);

	// ...dann bestimmte Variablen mit Werten aus $_POST der "Vorschauseite" beschreiben, 
	// wenn überhaupt nötig, weil auch über $pInfo->input_name zu erreichen.
	$items_name = $_POST['items_name'];
	$items_name2 = $_POST['items_name2'];
	$bezeichnung1 = $_POST['bezeichnung1'];
	$inhalt1 = $_POST['inhalt1'];
	$bezeichnung2 = $_POST['bezeichnung2'];
	$inhalt2 = $_POST['inhalt2'];
	$bezeichnung3 = $_POST['bezeichnung3'];
	$inhalt3 = $_POST['inhalt3'];
	$bezeichnung4 = $_POST['bezeichnung4'];
	$inhalt4 = $_POST['inhalt4'];
	$bezeichnung5 = $_POST['bezeichnung5'];
	$inhalt5 = $_POST['inhalt5'];
	$bezeichnung6 = $_POST['bezeichnung6'];
	$inhalt6 = $_POST['inhalt6'];
	$items_description = $_POST['items_description'];
	$items_url = $_POST['items_url'];
	if ($_POST['download_email']){
		$download_email = $_POST['download_email'];
	}
	$extra_item_costumer_input_text_preceded = $_POST['extra_item_costumer_input_text_preceded'];
	$item_costumer_input_width = $_POST['item_costumer_input_width'];
	$item_costumer_input_height = $_POST['item_costumer_input_height'];

} // elseif ENDE = Wenn auf "zurück"


if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/bundle')) {
	require(FOLDER_ABSOLUT_CATALOG . 'modules/bundle/configmain/main_bigware_10_b.php');
}


$producers_array = array(array('id' => '', 'text' => TEXT_NONE));
$producers_query = go_db_query("select producers_id, producers_name from " . DB_TBL_PRODUCERS . " order by producers_name");
while ($producers = go_db_fetch_array($producers_query)) {
	$producers_array[] = array('id' => $producers['producers_id'],
			'text' => $producers['producers_name']);
}
$price_option_array = array(array('id' => '', 'text' => TEXT_NONE));
$price_option_query = go_db_query("select id, text from price_option order by text");
while ($price_option = go_db_fetch_array($price_option_query)) {
	$price_option_array[] = array('id' => $price_option['id'],
			'text' => $price_option['text']);
}
$shipping_range_array = array(array('id' => '0', 'text' => TEXT_NONE));
$shipping_range_query = go_db_query("select id, description from shipping_range_groups order by description");
while ($shipping_range = go_db_fetch_array($shipping_range_query)) {
	$shipping_range_array[] = array('id' => $shipping_range['id'],
			'text' => $shipping_range['description']);
}
$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class_query = go_db_query("select tax_class_id, tax_class_title from " . DB_TBL_TAX_CLASS . " order by tax_class_title");
while ($tax_class = go_db_fetch_array($tax_class_query)) {
	$tax_class_array[] = array('id' => $tax_class['tax_class_id'],
			'text' => $tax_class['tax_class_title']);
}
$languages = go_get_languages();
if (!isset($pInfo->items_status)) $pInfo->items_status = '1';
switch ($pInfo->items_status) {
	case '0': $in_status = false; $out_status = true; break;
        case '1': 
	default: $in_status = true; $out_status = false;
} 

if (!isset($pInfo->domainservice_status)) $pInfo->domainservice_status = '0';
switch ($pInfo->domainservice_status) {
	case '1': $in_domainservice_status = true; $out_domainservice_status = false; break;
	case '0':
	default: $in_domainservice_status = false; $out_domainservice_status = true;
} 
if (!isset($pInfo->domainservice_zahlungsintervall)) $pInfo->domainservice_zahlungsintervall = '0';
switch ($pInfo->domainservice_zahlungsintervall) {
	case '1': $in_zahlungsintervall_0 = false; $in_zahlungsintervall_1 = true; $in_zahlungsintervall_12 = false; break;
	case '12': $in_zahlungsintervall_0 = false; $in_zahlungsintervall_1 = false; $in_zahlungsintervall_12 = true; break;
	default: $in_zahlungsintervall_0 = true; $in_zahlungsintervall_1 = false; $in_zahlungsintervall_12 = false;
}   
// creating_new_variable5

if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel')) {
	require(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel/configmain/main_bigware_10_e.php');
}
if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/download')) {
	require(FOLDER_ABSOLUT_CATALOG . 'modules/download/configmain/main_bigware_10_e.php');
}



if (!isset($pInfo->extra_item_costumer_input)) $pInfo->extra_item_costumer_input = '0';
switch ($pInfo->extra_item_costumer_input) {
	case '1': $in_extra_item_costumer_input = true; $out_extra_item_costumer_input = false; break;
	case '0':
	default: $in_extra_item_costumer_input = false; $out_extra_item_costumer_input = true;
} 		
if (!isset($pInfo->items_percentage)) $pInfo->items_percentage = '1';
switch ($pInfo->items_percentage) {
	case '0': $in_percent = false; $out_percent = true; break;
	case '1':
	default: $in_percent = true; $out_percent = false;
} 

if (preg_match('/^0000-00-00/', $pInfo->items_date_available)) {
	$pInfo->items_date_available = '';
}

if (preg_match('/^0000-00-00/', $pInfo->items_date_available_end)) {
	$pInfo->items_date_available_end = '';
}


?>
<link rel="stylesheet" type="text/css" href="load_this/javascript/spiffyCal/spiffyCal_v2_1.css">
<script language="JavaScript" src="load_this/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
<script language="javascript" src="load_this/javascript/dhtml.js"></script>
<script language="javascript"><!--
  var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_item", "items_date_available","btnDate1","<?php echo substr($pInfo->items_date_available,0,10); ?>",scBTNMODE_CUSTOMBLUE);
  var dateAvailableEnd = new ctlSpiffyCalendarBox("dateAvailableEnd", "new_item", "items_date_available_end","btnDate2","<?php echo substr($pInfo->items_date_available_end,0,10); ?>",scBTNMODE_CUSTOMBLUE);
//--></script>
<script language="javascript">
	<!--
function ow(seite) { 
	w1 = window.open(seite, 'LEAF', 'toolbar=no,status=no,width=700,height=500,directories=no,scrollbars=yes,location=no,resize=yes,menubar=no');
	w1.focus();
}

var tax_rates = new Array();
<?php
for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) {
	if ($tax_class_array[$i]['id'] > 0) {
		echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . go_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n";
	}
}
?>

function doRound(x, places) {
	return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
}

function getTaxRate() {
	var selected_value = document.forms["new_item"].items_tax_class_id.selectedIndex;
	var parameterVal = document.forms["new_item"].items_tax_class_id[selected_value].value;
	if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
		return tax_rates[parameterVal];
	} else {
		return 0;
	}
}

function updateGross() {
	var taxRate = getTaxRate();
	var grossValue = document.forms["new_item"].items_price.value;
	if (taxRate > 0) {
		grossValue = grossValue * ((taxRate / 100) + 1);
	}
	document.forms["new_item"].items_price_gross.value = doRound(grossValue, 4);
}

function updateNet() {
	var taxRate = getTaxRate();
	var netValue = document.forms["new_item"].items_price_gross.value;
	if (taxRate > 0) {
		netValue = netValue / ((taxRate / 100) + 1);
	}
	document.forms["new_item"].items_price.value = doRound(netValue, 4);
}



//-->
</script>



    <?php
         echo go_fetch_form('new_item', NAME_OF_FILE_CATEGORIES, 'bigPfad=' . $bigPfad . (isset($_GET['bigID']) ? '&bigID=' . $_GET['bigID'] : '') . '&action=new_item_preview', 'post', 'enctype="multipart/form-data" id="new_item"');
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign">
	    <?php
	    if (isset($_GET['bigID'])) { 
		    echo sprintf(TEXT_EDIT_ITEM, go_output_generated_category_path($current_category_id));
	    }else{
		    echo sprintf(TEXT_NEW_ITEM, go_output_generated_category_path($current_category_id));
	    }
?>
						</td>            	
          </tr>
          <tr>            
            <td class="main"><?php echo TEXT_GLOBAL_PREVIEW; ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td>
        	
        	
		  <table cellspacing="0" cellpadding="4" border="0" width="100%">
			<tr>    
				<td id="tab1" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_NAME; ?></td>
				<td id="tab2" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_PRICE; ?></td>
				<td id="tab3" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_DESC; ?></td>
				<td id="tab4" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_IMG; ?></td>
				<td id="tab5" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_MERKMALE; ?></td>
				<td id="tab6" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_BEZEICHNUNG; ?></td>

<?php
			if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/bundle')) {           
?>
				<td id="tab7" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_BUNDLE; ?></td>
<?php                          
      }
			if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel')) {           
?>
				<td id="tab8" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_MASSEINHEITENARTIKEL; ?></td>
<?php                          
      }                               
			if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/download')) {           
?>
				<td id="tab9" class="offtab" onclick="dhtml.cycleTab(this.id)"><?php echo TAB_DOWNLOAD; ?></td>
<?php                          
      }
?>					

				<td width="90%" class="tabpadding">&nbsp;</td>
			</tr>
		  </table>

       
			                                   
		<div id="page1" class="pagetext">
			<table border="0" cellspacing="0" cellpadding="5" class="formerform" width="100%">
        <tr>
        	
        <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_PRODUCER; ?>&nbsp;&nbsp; &nbsp;</legend>    
			<br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	       	
        	
            <td class="main">
		       <?php 
						echo TEXT_ITEMS_PRODUCER; 
					?></td>
            <td class="main"><?php 
            	# $producers_array[] = array('id' => '1', 'text' => '1');
            	# $producers_array[] = array('id' => '2', 'text' => '2');
				echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_pull_down_menu('producers_id', $producers_array, $pInfo->producers_id); 
				?></td>
          </tr>
					<?php
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_ITEMS_URL . '<br><small>' . TEXT_ITEMS_URL_WITHOUT_HTTP . '</small>'; ?></td>
            <td class="main"><?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('items_url[' . $languages[$i]['id'] . ']', (isset($items_url[$languages[$i]['id']]) ? $items_url[$languages[$i]['id']] : go_get_items_url($pInfo->items_id, $languages[$i]['id']))); ?></td>
          </tr>
<?php
    }
?>          	

        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				<legend>&nbsp;<b> </b><?php echo TAB_NAME; ?>&nbsp;&nbsp; &nbsp;</legend>
				<br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	 
        
         
          <tr>            	
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_WEIGHT; ?></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_weight', $pInfo->items_weight); ?></td>
          </tr>
				
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
		  <!-- B2B start -->
			<?php
				for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
			?>
          <tr>
            <td class="main"><?php 
					if ($i == 0) echo TEXT_ITEMS_NAME; 
				?></td>
            <td class="main"><?php 
					echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('items_name[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $items_name[$languages[$i]['id']] : go_get_values_from_items_description($pInfo->items_id, $languages[$i]['id'], 'items_name')), 'size="35"'); 
				?></td>
          </tr>
		  <?php 
				} 
		  ?>
			
			<?php
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_ITEMS_NAME2; ?></td>
            <td class="main"><?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('items_name2[' . $languages[$i]['id'] . ']', (isset($items_name2[$languages[$i]['id']]) ? $items_name2[$languages[$i]['id']] : go_get_values_from_items_description($pInfo->items_id, $languages[$i]['id'], 'items_name2'))); ?>(<a href="main_bigware_66.php">siehe auch</a>)</td>
          </tr>
<?php
    }
?>
			
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_MODEL; ?></td>
            <td class="main"><?php 
					echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_model', $pInfo->items_model); 
				?></td>
          </tr>
		  		<!-- field EAN --> 

          <tr>
            <td class="main"><?php echo TEXT_ITEMS_UPC_EAN_ISBN; ?></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('upc_ean_isbn', $pInfo->upc_ean_isbn); ?></td>
          </tr>
				

		  <!-- field EAN --> 
		  <!-- field EAN --> 

          <tr>
            <td class="main"><?php echo TEXT_ITEMS_MPN; ?></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('herstellernummer', $pInfo->herstellernummer); ?></td>
          </tr>
				
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
		  <!-- field EAN --> 
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_QUANTITY; ?></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_quantity', $pInfo->items_quantity); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_STATUS; ?></td>
            <td class="main"><?php 
					   echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_radio_field('items_status', '1', $in_status) . '&nbsp;' . TEXT_ITEM_AVAILABLE . '&nbsp;' . go_fetch_radio_field('items_status', '0', $out_status) . '&nbsp;' . TEXT_ITEM_NOT_AVAILABLE; 
						?></td>
          </tr>
<?php   // Modul Bert Lieferzeit im Artikel bearbeiten    

				  if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/delivery_time_into_artikel')) {
	         require(FOLDER_ABSOLUT_CATALOG . 'modules/delivery_time_into_artikel/configmain/delivery_time_into_artikel.php');
	        }
//Bearbeitung Bert  Ende ?>
         <!-- field mitte --> 
			</table>
     </fieldset>         
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_DATE_AVAILABLE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_DATE_AVAILABLE_BEGIN; ?><br><small>(YYYY-MM-DD)</small></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;'; ?>
            	<script language="javascript">
            		dateAvailable.writeControl(); 
            		dateAvailable.dateFormat="yyyy-MM-dd";
            	</script>
            </td>
			


			<!-- field ende-->          
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_DATE_AVAILABLE_END; ?><br><small>(YYYY-MM-DD)</small></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;'; ?>
            	<script language="javascript">
            		dateAvailableEnd.writeControl(); 
            		dateAvailableEnd.dateFormat="yyyy-MM-dd";
            	</script>
            </td>
			


			<!-- field ende-->          
          </tr>

			</table>
        </fieldset>
			<!-- field ende ende-->		
			          
<?php   // creating_new_variable1    


				if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/domain_reg')) {
	         require(FOLDER_ABSOLUT_CATALOG . 'modules/domain_reg/configmain/main_bigware_12.php');
	       }    
				if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/extra_costumer_input_for_items')) {
	         require(FOLDER_ABSOLUT_CATALOG . 'modules/extra_costumer_input_for_items/configmain/main_bigware_12.php');
	       }   

?>

	   	
					</td>
				
          </tr>
			</table></div>
			
			
			<div id="page2" class="pagetext">
			<table cellpadding="5" cellspacing="0" border="0" class="formerform" width="100%">
			   <tr>
			   	
        <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_GLOBAL_TAX_CLASS; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>   
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	  			   	
			   	
			   	
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_ITEMS_TAX_CLASS; ?></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_pull_down_menu('items_tax_class_id', $tax_class_array, $pInfo->items_tax_class_id, 'onchange="updateGross()"'); ?></td>
          </tr>
          
          
        <!-- field mitte --> 

			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_GLOBAL_PRICES; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
<?php
				if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel')) {
	         echo'<font color="#FF0000">';
	         echo MASSEINHEIT_PRICE_WARNING;
	         echo'</font><br><br>';
	       }   	
?>	   
				   
				   
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	           
       	<?php
	if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/lfdm_qm_qmm_Ulfdm')) {
	?>
		<tr>
			<td class="main"><?php echo TEXT_ITEMS_BASIS_PRICE; ?></td>
			<td class="main">
			<?php
				echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_basis_price', $pInfo->items_basis_price);
				echo '&nbsp;'.TEXT_OPTIONAL;
			?>
			</td>
		</tr>
	<?php
	}
	?>
          <tr>
            <td class="main" valign="top"><?php echo TEXT_ITEMS_PRICE_NET; ?><p></td>
            <td class="main">
	<?php 
	if ($pInfo->items_price == "123456.7890"){
		echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_price', TEXT_PRICE_QUESTION, 'onKeyUp="updateGross()"');
	} else {
		echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_price', $pInfo->items_price, 'onKeyUp="updateGross()"');
		//
		if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/lfdm_qm_qmm_Ulfdm')) {
			require(FOLDER_ABSOLUT_CATALOG . 'modules/lfdm_qm_qmm_Ulfdm/configmain/main_bigware_12.php');
		}   
	}
	if (isset($pInfo->unit_price_option) && isset($pInfo->unit_price_factor)){
	     @ include(FOLDER_ABSOLUT_CATALOG . 'modules/basic_pricing/configmain/main_bigware_12.php');
	}
	?>
          </td>
	<tr>
		<td class="main"><?php echo TEXT_ITEMS_PRICE_GROSS; ?></td>
		<td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_price_gross', $pInfo->items_price, 'OnKeyUp="updateNet()"'); ?></td>
	</tr>	
	<tr>
		<td class="main"><?php echo TEXT_ITEMS_PRICE_UVP; ?></td>
		<td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_price_uvp', $pInfo->items_price_uvp); ?> (<a href="main_bigware_66.php">siehe auch</a>)</td>
	</tr>	
    
         <!-- field mitte --> 

			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_SHIPPING_PRICE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	    
    
 <?php
					if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/shipping_greatship')) {
            require(FOLDER_ABSOLUT_CATALOG . 'modules/shipping_greatship/configmain/main_bigware_12.php');

?>

  	<tr>
			<td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?><br>
				<hr>
				</td>
		</tr>  
<?php

        	}
?>	        
    
		<tr>
            <td class="main"><?php echo TEXT_SHIPPING_ZONE_ONE; ?></td>
            <td class="main">
            
						  <table border="0" cellpadding="0" cellspacing="0" width="100%">
						  <tr>
						    <td class="main" nowrap><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('shipping_zone_1', $pInfo->shipping_zone_1); ?></td>
						    <td class="main" style="padding-left: 8"><?php echo TEXT_SHIPPING_ZONE_ONE_DESC; ?></td>
						  </tr>
						</table>          
            </td>
		</tr>	
		<tr>
            <td class="main"><?php echo TEXT_SHIPPING_ZONE_TWO; ?></td>
            <td class="main">
            
						  <table border="0" cellpadding="0" cellspacing="0" width="100%">
						  <tr>
						    <td class="main" nowrap><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('shipping_zone_2', $pInfo->shipping_zone_2); ?></td>
						    <td class="main" style="padding-left: 8"><?php echo TEXT_SHIPPING_ZONE_TWO_DESC; ?></td>
						  </tr>
						</table>                 
            
            
            </td>
		</tr>
		
  	<tr>
			<td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?><br>
				<hr>
				</td>
		</tr>  		
          <tr>
            <td class="main"><?php echo SHIPPING_RANGE_GROUP; ?></td>
            <td class="main"><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_pull_down_menu('shipping_range_group_id', $shipping_range_array, $pInfo->shipping_range_group_id, ''); ?></td>
		</tr>  		
	
		  	<tr>
			<td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?><br>
				<hr>
				</td>
		
		
	</tr>
	  <tr>
            <td class="main"><?php echo TEXT_IDIV_SHIPPING_PRICE; ?></td>
          
            
            
            
            <td class="main"> 
            
            
 						  <table border="0" cellpadding="0" cellspacing="0" width="100%">
						  <tr>
						    <td class="main" nowrap><?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_ship_price', $pInfo->items_ship_price); ?></td>
						    <td class="main" style="padding-left: 8">(<a href="main_bigware_66.php"><?php echo TEXT_LOOK_TO_TEMPLATE; ?></a>)</td>
						  </tr>
						</table>               
            
             </td>
          </tr>
	  <tr>
	    <td class="main"><?php echo TEXT_IDIV_SHIPPING_PRICE_TWO; ?> <br></td>
	    <td class="main">
	    
 						  <table border="0" cellpadding="0" cellspacing="0" width="100%">
						  <tr>
						    <td class="main" nowrap> <?php echo go_fetch_dividing_up('tranparentes.gif', '24', '15') . '&nbsp;' . go_fetch_inputfeld('items_ship_price_two', $pInfo->items_ship_price_two); ?></td>
						    <td class="main" style="padding-left: 8"><?php echo go_picture(FOLDER_RELATIV_PICTURES . 'icon_info.gif'); ?><a href="javascript:ow('load_this/erlaeuterung_ind_Versandpreis.html');"><?php echo TEXT_EXPLAIN_TO; ?></a></td>
						  </tr>
						</table>       
	    </td>
	  </tr>
	  <tr>
	     <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
	  </tr>
<script language="javascript"><!--
updateGross();
//--></script>
					 

        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_GROUPS; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	 

					 
 <tr><td colspan="2">        
<!--  BOF B2BSUITE  -->  
<table class="main" border="0" cellspacing="0" cellpadding="25">
<tr valign="top">
<?php
$attendees_group_query = go_db_query("select distinct attendees_group_id, attendees_group_name, attendees_group_discount from " . DB_TBL_ATTENDEES_GROUPS . " where attendees_group_id != '" . 0 . "' order by attendees_group_id");
    $header = false;
    while ($attendees_group = go_db_fetch_array($attendees_group_query)) {
    if (!$header) {
      $header = true;
?>
    <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#00ccff">
        <td class="TbInsideData"></td>
        <td class="main"><?php echo go_picture (FOLDER_RELATIV_PICTURES . 'icons/locked.gif') . '&nbsp;' . go_fetch_radio_field('items_percentage', '1', $in_percent) . '&nbsp;' . TEXT_OVERRIDE_ON . '&nbsp;' . go_fetch_radio_field('items_percentage', '0', $out_percent). '&nbsp;' . TEXT_OVERRIDE_OFF; ?></td>
        </table>
        <table border="0" cellpadding="0" cellspacing="0">
      <tr class="tbUPCountData">
      <td class="tbUPDataInside" colspan="3"><?php if (isset($options)) echo $options['items_options_name']; ?></td>
    </tr>
<?php
        }
     if (go_db_num_rows($attendees_group_query) > 0) {
       $characteristics_query = go_db_query("select g.attendees_group_id, g.attendees_group_price, p.items_price from " . DB_TBL_ITEMS_GROUPS . " g, ". DB_TBL_ITEMS ." p where p.items_id = '" . $pInfo->items_id . "' and p.items_id = g.items_id and g.attendees_group_id = '" . $attendees_group['attendees_group_id'] . "' order by g.attendees_group_id");
     } else {
         $characteristics = array('attendees_group_id' => 'new');
       }
?>
    <tr class="tbCountData">            
       <td class="TbInsideData"><?php echo go_picture (FOLDER_RELATIV_PICTURES . 'icons/delete.gif', 'reset price field') . go_fetch_checkbox_field('option[' . $attendees_group['attendees_group_id'] . ']', 'option[' . $attendees_group['attendees_group_id'] . ']', true) . '&nbsp;' . $attendees_group['attendees_group_name']; ?>&nbsp;</td>
       <td class="TbInsideData"><?php 
        if ($characteristics = go_db_fetch_array($characteristics_query)) {       
             echo go_fetch_inputfeld('price[' . $attendees_group['attendees_group_id'] . ']', $characteristics['attendees_group_price'], 'size="7"', '') ." &nbsp;";            
                echo "&nbsp;-&nbsp;"; 
                echo $characteristics['attendees_group_price'];
                echo "&nbsp;"; 
                } else {
       echo go_fetch_inputfeld('price[' . $attendees_group['attendees_group_id'] . ']', '0', 'size="7"');           
    } 
      
     ?></td>
          </tr>
<?php }
      if ($header) {
?>
      </table></td>
<?php 
      }
?>
     </tr>
       </table></td>
     </tr></td>         
<!--  EOF B2BSUITE  -->
	<!-- B2B end -->
		  
	</td>
	

			<!-- field ende-->          
          </tr>
			</table>
        </fieldset>
			</td>
			<!-- field ende ende-->			
	
	</tr>
          

  </tr></table></div>
	
	
  <div id="page3" class="pagetext">
 <table cellpadding="5" cellspacing="0" border="0" class="formerform" width="100%">
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>    
						<td colspan="2" class="main"><b><?php echo TXT_FOR_DESCRIPTION; ?></b></td>
						
          </tr>
          <tr>    
						<td colspan="2" class="smallText"><?php echo TXT_FOR_DESCRIPTION_EXPLAIN; ?></td>
          </tr>
          <tr>    
						<td colspan="2" class="smallText"><?php echo go_picture(FOLDER_RELATIV_PICTURES . 'icon_info.gif'); ?> <a href="javascript:ow('variable_item_template.php');"><?php echo TEXT_VARIABLE_LIST ?></a><br><br></td>
          </tr>
<?php

					if (file_exists(FOLDER_ABSOLUT_CATALOG . 'configmain/translate_button.php')) {
            require(FOLDER_ABSOLUT_CATALOG . 'configmain/translate_button.php');
        	}
        	
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<script language="JavaScript">
<!--
function PageEinfuegen<?php echo $languages[$i]['id']; ?>(Code)
{
	document.new_item.items_description<?php echo $languages[$i]['id']; ?>.value+=Code+"";
	document.new_item.items_description<?php echo $languages[$i]['id']; ?>.focus();
}
//-->
</script>
<script language="Javascript">
<!--
function eingabe<?php echo $languages[$i]['id']; ?>(){
  var Zusatz = 'page_insert()';
  var Eingabe = window.prompt("<?php echo JAVASCRIPT_EXPLAIN_URL; ?>", "http://");
  document.new_item.items_description<?php echo $languages[$i]['id']; ?>.value+=Zusatz+Eingabe;
}
-->
</script>
          <tr>
          	
        <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']); ?>&nbsp;&nbsp; &nbsp;</legend>   
				   <br> 
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	           	
          	
          	
            <td class="main" valign="top"></td>
            <td><table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF">
                
<?php 

 echo '<textarea class="mce" name="items_description' . $languages[$i]['id'].'">'.(isset(${'items_description'.$languages[$i]['id']}) ? stripslashes(${'items_description'.$languages[$i]['id']}) : stripslashes(go_get_items_description($pInfo->items_id, $languages[$i]['id']))).'</textarea></br>'; 

					if (file_exists(FOLDER_ABSOLUT_CATALOG . 'configmain/translate_button.php')) {
            echo translate_button($languages[$i]['id']);
        	}

?>              
              </tr>
            </table>
            </td>
            
 			<!-- field ende-->          
          </tr>
			</table>
        </fieldset>
			</td>
			<!-- field ende ende-->		           
          </tr>
<?php
    }

///////////////////////////////////////////////
?>
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          <tr>    
						<td colspan="2" class="main"><b><?php echo TXT_IN_CATEGORIE_LIST; ?></b></td>
          </tr>
          <tr>    
						<td colspan="2" class="smallText"><?php echo TXT_IN_CATEGORIE_LIST_EXPLAIN; ?></td>
          </tr>
<?php    
        	
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
          	
        <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']); ?>&nbsp;&nbsp; &nbsp;</legend>   
				   <br> 
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	           	
          	
          	
            <td class="main" valign="top"></td>
            <td><table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF">
                
<?php 

echo '<textarea class="mce" name="items_description_in_cat_list['.$languages[$i]['id'].']">'.(isset($pInfo->items_description_in_cat_list[$languages[$i]['id']]) ? stripslashes($pInfo->items_description_in_cat_list[$languages[$i]['id']]) : stripslashes(go_get_items_description_in_cat_list($pInfo->items_id, $languages[$i]['id']))).'</textarea></br>'; 

?>              
              </tr>
            </table>
            </td>
            
 			<!-- field ende-->          
          </tr>
			</table>
        </fieldset>
			</td>
			<!-- field ende ende-->		           
          </tr>
<?php
    }
?>     



          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
		<!-- B2B start -->
		 </table>
	</div>
	
	
	<div id="page4" class="pagetext">
		<table cellpadding="5" cellspacing="0" border="0" class="formerform" width="100%">
 		      <tr>
 		      	
         <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_GLOBAL_EXPLAIN; ?>&nbsp;&nbsp; &nbsp;</legend>    
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	    		      	
            <td class="smallText"><br><?php echo TEXT_EXPLAIN_TO_PICTURES; ?></td>
          </tr>
          
        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_BPICTURE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	          
          
          
        <tr>        
      
            <td class="main">

						<table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF">
<?php
$items_bpicture = $pInfo->items_bpicture;
if ($items_bpicture != "" AND substr_count($items_bpicture, 'http://') < 1){
$items_bpicture = '<IMG src="' . HTTP_SERVER . FOLDER_RELATIV_CATALOG . FOLDER_RELATIV_PICTURES . $items_bpicture . '">';
}
elseif(substr_count($items_bpicture, 'http://') > 0){
$items_bpicture = '<IMG src="' . $items_bpicture . '">';
}
echo '<textarea class="mceimg" name="items_bpicture'.$languages[$i]['id'].'">'.stripslashes($items_bpicture).'</textarea></br>'; 
?>         
              
              </tr>
            </table>   
            </td>
          </tr>
          
        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_PICTURE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	           
          
       <tr>

            <td class="main">
            	

						<table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF">
<?php
$items_picture = $pInfo->items_picture;
if ($items_picture != "" AND substr_count($items_picture, 'http://') < 1){
$items_picture = '<IMG src="' . HTTP_SERVER . FOLDER_RELATIV_CATALOG . FOLDER_RELATIV_PICTURES . $items_picture . '">';
}
elseif(substr_count($items_picture, 'http://') > 0){
$items_picture = '<IMG src="' . $items_picture . '">';
}
echo '<textarea class="mceimg" name="items_picture'.$languages[$i]['id'].'">'.stripslashes($items_picture).'</textarea></br>'; 
?>              
              
              </tr>
            </table>   
            
            </td>
          </tr>
          
        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_3PICTURE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	           
          
            <tr>
        
            <td class="main">

						<table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF"> 
<?php
$items_3picture = $pInfo->items_3picture;
if ($items_3picture != "" AND substr_count($items_3picture, 'http://') < 1){
$items_3picture = '<IMG src="' . HTTP_SERVER . FOLDER_RELATIV_CATALOG . FOLDER_RELATIV_PICTURES . $items_3picture . '">';
}
elseif(substr_count($items_3picture, 'http://') > 0){
$items_3picture = '<IMG src="' . $items_3picture . '">';
}
echo '<textarea class="mceimg" name="items_3picture'.$languages[$i]['id'].'">'.stripslashes($items_3picture).'</textarea></br>'; 
?>              
              
              </tr>
            </table>
            </td>
          </tr>
          
        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_4PICTURE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	           
          
            <tr>
        
            <td class="main">

						<table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF">
<?php
$items_4picture = $pInfo->items_4picture;
if ($items_4picture != "" AND substr_count($items_4picture, 'http://') < 1){
$items_4picture = '<IMG src="' . HTTP_SERVER . FOLDER_RELATIV_CATALOG . FOLDER_RELATIV_PICTURES . $items_4picture . '">';
}
elseif(substr_count($items_4picture, 'http://') > 0){
$items_4picture = '<IMG src="' . $items_4picture . '">';
}
echo '<textarea class="mceimg" name="items_4picture'.$languages[$i]['id'].'">'.stripslashes($items_4picture).'</textarea></br>'; 
?>         
              
              </tr>
            </table>
        </td>

          </tr>
          
        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_ITEMS_5PICTURE; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	           
            <tr>
        
            <td class="main">

						<table border="0" cellpadding="10" cellspacing="10">
              <tr>
                <td class="main" bgcolor="#FFFFFF">
<?php
$items_5picture = $pInfo->items_5picture;
if ($items_5picture != "" AND substr_count($items_5picture, 'http://') < 1){
$items_5picture = '<IMG src="' . HTTP_SERVER . FOLDER_RELATIV_CATALOG . FOLDER_RELATIV_PICTURES . $items_5picture . '">';
}
elseif(substr_count($items_5picture, 'http://') > 0){
$items_5picture = '<IMG src="' . $items_5picture . '">';
}
echo '<textarea class="mceimg" name="items_5picture'.$languages[$i]['id'].'">'.stripslashes($items_5picture).'</textarea></br>'; 
?>              
              
              </tr>
            </table>
            </td>
          </tr>
					<tr>
            <td><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
 
			<!-- field ende-->          
          </tr>
			</table>
        </fieldset>
			</td>
			<!-- field ende ende-->		         
          
          </tr>
				</table>	
</div>
	
	
	<div id="page5" class="pagetext">
<table cellpadding="5" cellspacing="0" border="0" class="formerform" width="100%">

					<tr>
           	
        <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TAB_MERKMALE; ?>&nbsp;&nbsp; &nbsp;</legend>   
				   <br> 
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	   
                 
          <tr>

            <td class="main" valign="top" align="center">
      <?php echo go_picture(FOLDER_RELATIV_PICTURES . 'icon_info.gif'); ?> <a href="javascript:ow('load_this/produktmerkmale_hilfe.html');"><?php echo TEXT_CHARACTERISTICS_DESCRIPTION ?></a><br><br>
            <input type="hidden" name="set_produktmerkmale" value="1">
              <table summary="" border="0" cellpadding="3" cellspacing="0" width="100%">
			          <tr>
							<td colspan="2" class="main" valign="top"><b><?php echo TEXT_CHARACTERISTICS_NAME ?></b></td>
							<td class="main" valign="top"><b><?php echo TEXT_CHARACTERISTICS_VALUE ?></b></td>
								</tr>
<?php
   

// ist artikel da?
if ($_GET['bigID'] != ""){
			
	// schauen ob dem Artikel Produktmerkmale zugeordnet sind
	$check_query = go_db_query("select count(*) as total from " . DB_TBL_ITEMS_CHARACTERISTICS . " WHERE items_id = '" . $_GET['bigID'] . "'");
        $check = go_db_fetch_array($check_query);
        //wenn ja
	if ($check['total'] > '0') {

		$item_characteristics_query = go_db_query("SELECT options_id FROM " . DB_TBL_ITEMS_CHARACTERISTICS . " WHERE items_id = '" . $_GET['bigID'] . "' ORDER BY `options_id` ASC");
		while($item_characteristics=go_db_fetch_array($item_characteristics_query)){
			// alle options_id in ein array
			$alle_option_ids_from_item[]= $item_characteristics['options_id'];
		}  
	//Entfernt doppelte Werte aus dem Array, jedoch kann es passieren das schlüssel fehlen (z.B. $array[0]$array[4]$array[5]$array[7])
	$option_ids_from_item_unsort = array_unique ($alle_option_ids_from_item);
	}
}

//nun so sortieren das die Schlüssel schön aufsteigend sind und bei "0" beginnen (z.B. $array[0]$array[1]$array[2]$array[3] usw.)
if (count($option_ids_from_item_unsort) > '0') {
	foreach ($option_ids_from_item_unsort as $key => $value) {
	    $option_ids_from_item_sort[]= $value;
	}	
}
$how_many = '5';
for($i=0; $i<$how_many;$i++){

		echo "</td></tr>	<tr><td colspan=\"3\"><hr>	</td></tr>";	

	echo "<tr><td valign=\"top\">";	
	//wenn vorher aus Datenbank geholt und kommt nun aus der Vorschau zurück
	if ($_POST['pro_opt_'.$i] != ""){  
		echo '<select style="width:150px" name="pro_opt_' . $i . '">' . "\n";
		echo '<option value="' . $_POST['pro_opt_'.$i] . '">' . $_POST['pro_opt_'.$i] . '</option>' . "\n";
		echo '<option value=0>--löschen--</option>' . "\n";
		echo '</select>' . "\n";
		echo '<input type="hidden" name="pro_opt_delete' . $i. '" value="' . $_POST['pro_opt_'.$i] . '">' . "\n";
		echo '<input type="hidden" name="new_pro_opt_' . $i. '" value="">' . "\n";
	
	}
	//wenn vorher neu angelegt und kommt nun aus der Vorschau zurück
	elseif ($_POST['new_pro_opt_'.$i] != ""){
		echo '<input style="width:150px" type="text" name="new_pro_opt_' . $i . '" value="' . $_POST['new_pro_opt_'.$i] . '">' . "\n";
		echo '<input type="hidden" name="pro_opt_' . $i. '" value="">' . "\n";
	}
	//wenn ein Artikel bearbeitet wird und kommt direkt in den Artikel oder Artikel wird direkt neu angelegt
	elseif ($_POST['pro_opt_'.$i] == "" AND $_POST['new_pro_opt_'.$i] == ""){
		
		// bestehender Artikel wird bearbeitet
		if ($_GET['bigID'] != ""){
			
			// schauen ob dem Artikel Merkmalnamen zugeordnet sind
            		// wenn ja
            		if (count($option_ids_from_item_sort[$i]) > '0') {
            			
            			//nun das schön sortierte array ($option_ids_from_item_sort) von oben abfragen und Wert aus der Datenbank holen
				$option_id_query = go_db_query("SELECT items_options_name FROM " . DB_TBL_ITEMS_OPTIONS . " WHERE language_id='" . $languages_id . "' AND items_options_id='" . $option_ids_from_item_sort[$i] . "'");
				$option_id_query_result=go_db_fetch_array($option_id_query);
            			
		 		echo '<select style="width:150px" name="pro_opt_' . $i . '">' . "\n";
				echo '<option value="' . $option_id_query_result['items_options_name'] . '">' . $option_id_query_result['items_options_name'] . '</option>' . "\n";
				echo '<option value=0>--löschen--</option>' . "\n";
				echo '</select>' . "\n";
				echo '<input type="hidden" name="pro_opt_delete' . $i. '" value="' . $option_id_query_result['items_options_name'] . '">' . "\n";
				echo '<input type="hidden" name="new_pro_opt_' . $i. '" value="">' . "\n";           				
       				
            		}
            		// wenn nein
            		else{
				echo '<input style="width:150px" type="text" name="new_pro_opt_' . $i . '" value="">' . "\n";
				echo '<input type="hidden" name="pro_opt_' . $i. '" value="">' . "\n";            		
            		}
		}
		// Artikel wird neu angelegt
		else{
			echo '<input style="width:150px" type="text" name="new_pro_opt_' . $i . '" value="">' . "\n";
			echo '<input type="hidden" name="pro_opt_' . $i. '" value="">' . "\n";    		
		}
	}
	
	echo "</td><td>";
		echo go_fetch_dividing_up('tranparentes.gif', '15', '1');
		echo "</td><td>";
	    
	?>
<script language="javascript">
	

var box<?php echo $i; ?> = new Array();
box<?php echo $i; ?> = 'textarea_<?php echo $i; ?>';


function show_<?php echo $i; ?>(id) {
	if(document.getElementById(id).style.display=="none") {
		//               for(i=0;i<box<?php echo $i; ?>.length;i++)
		//                {
		document.getElementById(box<?php echo $i; ?>).style.display="none";
		//                }

		document.getElementById(id).style.display="block";
	} else {
		document.getElementById(id).style.display="none";
	}
}


function AddRowsToTable_<?php echo $i; ?>() { 
	var tbl_<?php echo $i; ?> = document.getElementById('dateiupload_<?php echo $i; ?>'); 
	var lastRow_<?php echo $i; ?> = tbl_<?php echo $i; ?>.rows.length; 
	var iteration_<?php echo $i; ?> = lastRow_<?php echo $i; ?>;    
	// if (iteration < 5) {  
	var row_<?php echo $i; ?> = tbl_<?php echo $i; ?>.insertRow(lastRow_<?php echo $i; ?>);

	var cellRight_<?php echo $i; ?> = row_<?php echo $i; ?>.insertCell(0); 
	var el_<?php echo $i; ?> = document.createElement('input'); 
	el_<?php echo $i; ?>.setAttribute('type', 'input'); 
	el_<?php echo $i; ?>.setAttribute('name', 'vorzeichen_pro_<?php echo $i; ?>[]'); 
	el_<?php echo $i; ?>.setAttribute('size', '10'); 
	cellRight_<?php echo $i; ?>.setAttribute('id',iteration_<?php echo $i; ?>) 
		cellRight_<?php echo $i; ?>.appendChild(el_<?php echo $i; ?>); 

	var cellRight1_<?php echo $i; ?> = row_<?php echo $i; ?>.insertCell(0); 
	var el1_<?php echo $i; ?> = document.createElement('input'); 
	el1_<?php echo $i; ?>.setAttribute('type', 'input'); 
	el1_<?php echo $i; ?>.setAttribute('name', 'preis_pro_<?php echo $i; ?>[]');   
	el1_<?php echo $i; ?>.setAttribute('size', '10');
	cellRight1_<?php echo $i; ?>.setAttribute('id',iteration_<?php echo $i; ?>) 
		cellRight1_<?php echo $i; ?>.appendChild(el1_<?php echo $i; ?>); 	   

	var cellRight2_<?php echo $i; ?> = row_<?php echo $i; ?>.insertCell(0); 
	var el2_<?php echo $i; ?> = document.createElement('input'); 
	el2_<?php echo $i; ?>.setAttribute('type', 'input'); 
	el2_<?php echo $i; ?>.setAttribute('name', 'anzahl_pro_<?php echo $i; ?>[]');   
	el2_<?php echo $i; ?>.setAttribute('size', '10');
	cellRight2_<?php echo $i; ?>.setAttribute('id',iteration_<?php echo $i; ?>) 
		cellRight2_<?php echo $i; ?>.appendChild(el2_<?php echo $i; ?>);   

	var cellRight3_<?php echo $i; ?> = row_<?php echo $i; ?>.insertCell(0); 
	var el3_<?php echo $i; ?> = document.createElement('input'); 
	el3_<?php echo $i; ?>.setAttribute('type', 'input'); 
	el3_<?php echo $i; ?>.setAttribute('name', 'merkmalwert_pro_<?php echo $i; ?>[]');   
	el3_<?php echo $i; ?>.setAttribute('size', '10');
	cellRight3_<?php echo $i; ?>.setAttribute('id',iteration_<?php echo $i; ?>) 
		cellRight3_<?php echo $i; ?>.appendChild(el3_<?php echo $i; ?>); 	  

	var cellRight4_<?php echo $i; ?> = row_<?php echo $i; ?>.insertCell(0); 
	var el4_<?php echo $i; ?> = document.createElement('input'); 
	el4_<?php echo $i; ?>.setAttribute('type', 'input'); 
	el4_<?php echo $i; ?>.setAttribute('name', 'attributs_sort_order_pro_<?php echo $i; ?>[]');   
	el4_<?php echo $i; ?>.setAttribute('size', '3');
	cellRight4_<?php echo $i; ?>.setAttribute('id',iteration_<?php echo $i; ?>) 
		cellRight4_<?php echo $i; ?>.appendChild(el4_<?php echo $i; ?>);      

	var aa_<?php echo $i; ?> = document.createElement("a"); 
	aa_<?php echo $i; ?>.setAttribute('href', '#1'); 
	var clickName = new Function("DeleteRow_<?php echo $i; ?>(this)"); 
	aa_<?php echo $i; ?>.onclick = clickName; 
	aa_<?php echo $i; ?>.innerHTML = "&nbsp;<?php echo TEXT_REMOVING_LINE; ?>"; 
	cellRight_<?php echo $i; ?>.appendChild(aa_<?php echo $i; ?>); 

	// } else { 
	//   alert('Maximal 5 Dateien gleichzeitig zugelassen.'); 
	// } 
} 

function DeleteRow_<?php echo $i; ?>(x_<?php echo $i; ?>) { 
	while (x_<?php echo $i; ?>.tagName.toLowerCase() !='tr') 
	{ 
		if(x_<?php echo $i; ?>.parentElement) 
			x_<?php echo $i; ?>=x_<?php echo $i; ?>.parentElement; 
		else if(x_<?php echo $i; ?>.parentNode) 
			x_<?php echo $i; ?>=x_<?php echo $i; ?>.parentNode; 
		else 
			return; 
	} 
	var rowNum_<?php echo $i; ?>=x_<?php echo $i; ?>.rowIndex; 
	while (x_<?php echo $i; ?>.tagName.toLowerCase() !='table') 
	{ 
		if(x_<?php echo $i; ?>.parentElement) 
			x_<?php echo $i; ?>=x_<?php echo $i; ?>.parentElement; 
		else if(x_<?php echo $i; ?>.parentNode) 
			x_<?php echo $i; ?>=x_<?php echo $i; ?>.parentNode; 
		else 
			return; 
	} 
	x_<?php echo $i; ?>.deleteRow(rowNum_<?php echo $i; ?>);  
} 

function RemoveRowFromTable(rowid) { 
	var tbl = document.getElementById(iteration); 
	//var lastRow = tbl.rows.length; 
	//if (lastRow > 1) 
	tbl.deleteRow(rowid); 
} 
	</SCRIPT> 


 
         <table border="0" cellspacing="0" cellpadding="2" width="422" style="border-collapse: collapse" bordercolor="#111111"> 
            <tr class="main">
                   <td width="40" class="smallText">
                   <p align="center"><?php echo TEXT_SORTORDER; ?></td> 
                   <td width="80" class="smallText"><?php echo TEXT_VALUE; ?></td>
                   <td width="80" class="smallText">
                   <p align="center"><?php echo TEXT_MAX_COUNT; ?></td>
                   <td width="80" class="smallText">
                   <p align="center"><?php echo TEXT_PRICE; ?></td>
                   <td width="164" class="smallText"><?php echo TEXT_OMEN; ?></td>
            </tr> 

         </table>
          <table border="0" cellspacing="0" cellpadding="2" id="dateiupload_<?php echo $i; ?>" width="422" style="border-collapse: collapse" bordercolor="#111111"> 
        <?php  

	// kommt nun aus der Vorschau zurück
	if ($_POST['pro_opt_'.$i] != "" OR $_POST['new_pro_opt_'.$i] != ""){  
		if (count ($_POST['merkmalwert_pro_'.$i]) > '0'){  
				foreach ($_POST['merkmalwert_pro_'.$i] as $key => $value) {
		    			?>
				            <tr class="main" id="row_<?php echo $i; ?>">
				                   <td width="30"><input type="input" name="attributs_sort_order_pro_<?php echo $i; ?>[]" size="3" value="<?php echo $_POST['attributs_sort_order_pro_'.$i][$key]; ?>"></td> 
				                   <td width="80"><input type="input" name="merkmalwert_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $value; ?>"></td>
				                   <td width="81"><input type="input" name="anzahl_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $_POST['anzahl_pro_'.$i][$key]; ?>"></td>
				                   <td width="81"><input type="input" name="preis_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $_POST['preis_pro_'.$i][$key]; ?>"></td>
				                   <td id="0" width="164"><input type="input" name="vorzeichen_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $_POST['vorzeichen_pro_'.$i][$key]; ?>"><a onClick="DeleteRow_<?php echo $i; ?>(this);return false;" href="#1">&nbsp;<?php echo TEXT_REMOVING_LINE; ?></a></td>
				            </tr> 	    			
		    			<?php 
				}	
		}
	}
	//wenn ein Artikel bearbeitet wird und kommt direkt in den Artikel oder Artikel wird direkt neu angelegt
	elseif ($_POST['merkmalwert_pro_'.$i] < '0'){
		
		// bestehender Artikel wird bearbeitet
		if ($_GET['bigID'] != ""){
			
			// schauen ob dem Artikel Merkmalnamen zugeordnet sind
            		// wenn ja
            		if (count($option_ids_from_item_sort[$i]) > '0') {
            			
            			//nun das schn sortierte array ($option_ids_from_item_sort) von oben abfragen und Wert aus der Datenbank holen
				$value_id_query = go_db_query("SELECT options_values_id, options_values_price, price_prefix, attributs_sort_order, qty FROM " . DB_TBL_ITEMS_CHARACTERISTICS . " WHERE options_id='" . $option_ids_from_item_sort[$i] . "' AND items_id = '" . $_GET['bigID'] . "' ORDER BY attributs_sort_order ASC");
				while($value_id_query_result=go_db_fetch_array($value_id_query)){
         			
	         			$value_holen_id_query = go_db_query("SELECT items_options_values_name FROM " . DB_TBL_ITEMS_OPTIONS_VALUES . " WHERE language_id='" . $languages_id . "' AND  items_options_values_id='" . $value_id_query_result['options_values_id'] . "'");
					$value_holen_id_result=go_db_fetch_array($value_holen_id_query);
					if ($value_id_query_result['qty'] == '0'){
						$value_id_query_result['qty'] = '';
					}
		    			?>
				            <tr class="main" id="row_<?php echo $i; ?>">
				                   <td width="30"><input type="input" name="attributs_sort_order_pro_<?php echo $i; ?>[]" size="3" value="<?php echo $value_id_query_result['attributs_sort_order']; ?>"></td> 
				                   <td width="80"><input type="input" name="merkmalwert_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $value_holen_id_result['items_options_values_name']; ?>"></td>
				                   <td width="81"><input type="input" name="anzahl_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $value_id_query_result['qty']; ?>"></td>
				                   <td width="81"><input type="input" name="preis_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $value_id_query_result['options_values_price']; ?>"></td>
				                   <td id="0" width="164"><input type="input" name="vorzeichen_pro_<?php echo $i; ?>[]" size="10" value="<?php echo $value_id_query_result['price_prefix']; ?>"><a onClick="DeleteRow_<?php echo $i; ?>(this);return false;" href="#1">&nbsp;<?php echo TEXT_REMOVING_LINE; ?></a></td>
				            </tr> 	
 			
		    			<?php

       				}
            		}
            		// wenn nein
            		else{
       		
            		}
		}
		// Artikel wird neu angelegt
		else{
	
		}
	}
	?>      
				            <tr class="main">
				                   <td colspan="5"></td> 
				                   
				            </tr>    
         </table> 
         
         <table border="0" cellspacing="2" cellpadding="2"> 
            <tr> 
               <td><?php echo go_picture(FOLDER_RELATIV_PICTURES . 'Pfeil-blinkend.gif', '', 10, 10); ?> <a href="#1" onClick="AddRowsToTable_<?php echo $i; ?>();return false;"><?php echo TEXT_PUT_LINE; ?></a><br></td> 
            </tr> 
            <tr> 
               <td class="smallText">
               
 <div id="textarealeiste">
 	<br>
<?php echo TEXT_TEXTFIELD_VALUES; ?> <a href="#1" onclick="show_<?php echo $i; ?>('textarea_<?php echo $i; ?>')"><?php echo TEXT_TEXTFIELD_VALUES_YES; ?></a> / <a href="#1" onclick="show_<?php echo $i; ?>('textarea_<?php echo $i; ?>')"><?php echo TEXT_TEXTFIELD_VALUES_NO; ?></a>
<br><br>
</div>
<div id="textarea_<?php echo $i; ?>" style="display:none;">

<?php echo TEXT_TEXTFIELD_VALUES_EXPLAIN; ?>
<br><br>
<textarea rows="5" name="merkmalwert_textarea[<?php echo $i; ?>]" cols="50"></textarea>
</div>     
           </td> 
            </tr>             
         </table>
         

<?php 

		echo "</td></tr>";

}
?>
              </table>
            <td>
          </tr>
          
        <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo OPTION_ITEMLIST_CONF; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	           
<?php
 ?>
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
    <tr><td colspan="2" style="font-size:13pt"><?php echo OPTION_ITEMLIST_CONF; ?></td></tr>	
		<tr>
		 <td><?php echo SELECT_OPTION_ITEMLIST_CONF; ?></td>
		 <td>
		  <table>
		  <?php  
			$query_select_option_itemlist = go_db_query("select distinct po.items_options_conf_id, po.items_options_conf_name from ".DB_TBL_ITEMS_OPTIONS_CONF." po, ".DB_TBL_ITEMS_CHARACTERISTICS_CONF." pa where pa.options_conf_id = po.items_options_conf_id  AND pa.items_id = '".(int)$_GET['bigID']."' and po.language_id='" . $languages_id . "'");
			$num_options=go_db_num_rows($query_select_option_itemlist);
			if ($num_options!=0) {
			 for ($o=0; $o<$num_options; $o++){
			  $items_options_id[$o] = mysqli_result($query_select_option_itemlist, $o, 'items_options_conf_id');
				$items_options_name[$o] = mysqli_result($query_select_option_itemlist, $o, 'items_options_conf_name');
				echo "<tr><td class='main'>".$items_options_name[$o]."</td>";
				$query_select_option_values_itemlist[$o] = go_db_query("select distinct pocv.items_options_conf_values_name,pac.options_conf_values_id   from ".DB_TBL_ITEMS_OPTIONS_CONF_VALUES." pocv, ".DB_TBL_ITEMS_CHARACTERISTICS_CONF." pac where pac.options_conf_values_id= pocv.items_options_conf_values_id  and pac.options_conf_id ='".$items_options_id[$o]."' and pac.items_id = '".(int)$_GET['bigID']."' and pocv.language_id='" . $languages_id . "'");
				if (go_db_num_rows($query_select_option_values_itemlist[$o])!=0) {
				 echo "<td><select name=\"items_option_itemlist[".$items_options_id[$o]."]\"><option value=\"0\">-------</option>";
				  for ($ov=0; $ov<go_db_num_rows($query_select_option_values_itemlist[$o]);$ov++){
					 $items_options_values_id[$o][$ov] = mysqli_result($query_select_option_values_itemlist[$o], $ov, 'options_conf_values_id');
					 $items_options_values_name[$o][$ov] = mysqli_result($query_select_option_values_itemlist[$o], $ov, 'items_options_conf_values_name');
					  echo "<option value=".$items_options_values_id[$o][$ov];
						
				    if ($items_options_values_id[$o][$ov]==$pInfo->items_mainoption[$items_options_id[$o]]) {echo " selected ";}
				    echo ">".$items_options_values_name[$o][$ov]."</option>";
					}
				 echo "</select></td>"; 
				}//if valueslist
				echo "</tr>";
			 }//for o
			}//if num_option
			
			?>
			</table> 
		 </td>
		</tr>
				  <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          
 			<!-- field ende-->          
          </tr>
			</table>
        </fieldset>
			</td>
			<!-- field ende ende-->	         
          
          </tr>	
					</table>
					</div>
	<div id="page6" class="pagetext">
	<table cellpadding="5" cellspacing="0" border="0" class="formerform" width="100%">
          <tr>
          	
  		      	
         <!-- field anfang -->	
        <td class="main">	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TEXT_GLOBAL_EXPLAIN; ?>&nbsp;&nbsp; &nbsp;</legend>    
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>  
        <!-- field anfang end -->	           	
          	
            <td colspan="2" class="main"><?php echo TEXT_BEZ_INHALT_INFO; ?></td>
          </tr>
          
         <!-- field mitte --> 
			</table>
        </fieldset>
	   	
				<fieldset style="margin:15; padding:15; ">
				  <legend>&nbsp;<b> </b><?php echo TAB_BEZEICHNUNG; ?>&nbsp;&nbsp; &nbsp;</legend> 
				   <br>
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
        <!-- field mitte end -->	         
           <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
          
<?php 
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_BEZ_INHALT1; ?></td>
            <td class="main">
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('bezeichnung1[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $bezeichnung1[$languages[$i]['id']] : go_get_bezeichnung1($pInfo->items_id, $languages[$i]['id']))); ?>
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('inhalt1[' . $languages[$i]['id'] . ']', (isset($inhalt1[$languages[$i]['id']]) ? $inhalt1[$languages[$i]['id']] : go_get_inhalt1($pInfo->items_id, $languages[$i]['id']))); ?>
	   </td>
          </tr>
<?php
}
?>
           <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
<?php 
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_BEZ_INHALT2; ?></td>
            <td class="main">
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('bezeichnung2[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $bezeichnung2[$languages[$i]['id']] : go_get_bezeichnung2($pInfo->items_id, $languages[$i]['id']))); ?>
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('inhalt2[' . $languages[$i]['id'] . ']', (isset($inhalt1[$languages[$i]['id']]) ? $inhalt2[$languages[$i]['id']] : go_get_inhalt2($pInfo->items_id, $languages[$i]['id']))); ?>
	   </td>
          </tr>
<?php
}
?>
           <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
<?php 
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_BEZ_INHALT3; ?></td>
            <td class="main">
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('bezeichnung3[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $bezeichnung3[$languages[$i]['id']] : go_get_bezeichnung3($pInfo->items_id, $languages[$i]['id']))); ?>
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('inhalt3[' . $languages[$i]['id'] . ']', (isset($inhalt1[$languages[$i]['id']]) ? $inhalt3[$languages[$i]['id']] : go_get_inhalt3($pInfo->items_id, $languages[$i]['id']))); ?>
	   </td>
          </tr>
<?php
}
?>
           <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
<?php 
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_BEZ_INHALT4; ?></td>
            <td class="main">
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('bezeichnung4[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $bezeichnung4[$languages[$i]['id']] : go_get_bezeichnung4($pInfo->items_id, $languages[$i]['id']))); ?>
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('inhalt4[' . $languages[$i]['id'] . ']', (isset($inhalt1[$languages[$i]['id']]) ? $inhalt4[$languages[$i]['id']] : go_get_inhalt4($pInfo->items_id, $languages[$i]['id']))); ?>
	   </td>
          </tr>
<?php
}
?>
            <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
<?php 
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_BEZ_INHALT5; ?></td>
            <td class="main">
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('bezeichnung5[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $bezeichnung5[$languages[$i]['id']] : go_get_bezeichnung5($pInfo->items_id, $languages[$i]['id']))); ?>
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('inhalt5[' . $languages[$i]['id'] . ']', (isset($inhalt1[$languages[$i]['id']]) ? $inhalt5[$languages[$i]['id']] : go_get_inhalt5($pInfo->items_id, $languages[$i]['id']))); ?>
	   </td>
          </tr>
<?php
}
?>
           <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '1', '10'); ?></td>
          </tr>
<?php 
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_BEZ_INHALT6; ?></td>
            <td class="main">
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('bezeichnung6[' . $languages[$i]['id'] . ']', (isset($items_name[$languages[$i]['id']]) ? $bezeichnung6[$languages[$i]['id']] : go_get_bezeichnung6($pInfo->items_id, $languages[$i]['id']))); ?>
<?php echo go_picture(FOLDER_RELATIV_LANG_TEMPLATES . $languages[$i]['directory'] . '/picture/' . $languages[$i]['picture'], $languages[$i]['name']) . '&nbsp;' . go_fetch_inputfeld('inhalt6[' . $languages[$i]['id'] . ']', (isset($inhalt1[$languages[$i]['id']]) ? $inhalt6[$languages[$i]['id']] : go_get_inhalt6($pInfo->items_id, $languages[$i]['id']))); ?>
	   </td>
     </tr>
<?php
}
?>
 			<!-- field ende-->          

			</table>
        </fieldset>
			</td>
			<!-- field ende ende-->	  
     </table></div>

<?php  



					if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/bundle')) {
            require(FOLDER_ABSOLUT_CATALOG . 'modules/bundle/configmain/main_bigware_10_a.php');
        	}

					if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel')) {
            require(FOLDER_ABSOLUT_CATALOG . 'modules/masseinheitenartikel/configmain/main_bigware_10_a.php');
        	}
        	
					if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/download')) {
            require(FOLDER_ABSOLUT_CATALOG . 'modules/download/configmain/main_bigware_10_a.php');
        	}
?>


					 <table border="0" cellpadding="0" cellspacing="0" class="formerform_button" width="100%">
					  <tr>
					    <td width="100%" style="padding: 5"><?php echo go_fetch_hidden_field('items_date_added', (go_not_null($pInfo->items_date_added) ? $pInfo->items_date_added : date('Y-m-d'))) . go_picture_submit('button_continue.gif', PICTURE_PREVIEW) . '&nbsp;&nbsp;<a href="' . go_href_link(NAME_OF_FILE_CATEGORIES, 'bigPfad=' . $bigPfad . (isset($_GET['bigID']) ? '&bigID=' . $_GET['bigID'] : '')) . '">' . go_picture_button('button_cancel.gif', PICTURE_CANCEL) . '</a>'; ?></td>
					  </tr>
					</table>        
					
					</form>
					<script language="javascript" type="text/javascript">
					    dhtml.cycleTab('tab1');
					</script>




        </td>
        </td>
      </tr>
    </table>