<?php   
$date_availability = 'AND (to_days(items_date_available_end) IS NULL OR (to_days(items_date_available_end) IS NOT NULL AND to_days(now()) <= to_days(items_date_available_end)))';
switch ($welche_box) {
case 'cat':

			 $frameGeneralsign = FRAME_ABOVE_CATEGORIES;
			  $corner_left = 'rounded';
			  $corner_right = 'square';
			  $frame_base_name = 'categories'; 
			  $frame_id = $frame_base_name . 'Box'; 
			 
			// css Funktion	
			// Funktion ruft sich selber auf, bis aktuelle Kategorie alle anzuzeigenden Unterkategorien ausgegeben hat
			function go_show_category_css($counter_cat, $befor = '0') {
			    global $foo, $frameContent, $id_cat, $aa;

				  
					$frameContent .= "</center>";
			    for ($a=0; $a<$foo[$counter_cat]['level']; $a++) {  
			    } 
					if ($foo[$counter_cat]['level'] == 0){
						if ($aa == 1){  
			  		$frameContent .= '<img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'pixel_silver.gif" border="0" alt="" width="100%" height="1"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2">';
				  	}else{
				  	$aa=1;
				  	}
					}     
					$a = 1;
					if ($foo[$counter_cat]['level'] > 0){
						for ($i = $foo[$counter_cat]['level']; $i >= $a; $a++) {
						   $c .= "	";  
						}
					}
					if ($foo[$counter_cat]['level'] == 0	) {
						$frameContent .= $c . '<ul>' . "\n";
					}	
				  $frameContent .= $c . '<li>';
					$frameContent .= '<a href="';

			    if ($foo[$counter_cat]['parent'] == 0) {
			      $bigPfad_new = 'bigPfad=' . $counter_cat;
			    } else {
			      $bigPfad_new = 'bigPfad=' . $foo[$counter_cat]['path'];
			    }
			    $frameContent .= go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], $bigPfad_new);
			    $frameContent .= '">';
			    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
			      $frameContent .= '<b>';
			    } 
			    $frameContent .= $foo[$counter_cat]['name'];
			    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
			      $frameContent .= '</b>';
			    }
			    if (go_has_category_subcategories($counter_cat)) {
			      $frameContent .= '&nbsp;';
			    }
			    $frameContent .= '</a>';
			    if (SHOW_COUNTS == 'true') {
			      $items_in_category = go_count_items_in_category($counter_cat);
			      if ($items_in_category > 0) {
			        $frameContent .= '&nbsp;(' . $items_in_category . ')';
			      }
			    }

					if (go_not_null($foo[$counter_cat]['next_id']) AND $foo[$foo[$counter_cat]['next_id']]['level'] > $foo[$counter_cat]['level']){
						$frameContent .= $c . "\n" . '<ul>' . "\n";
					}else{
						if (go_not_null($foo[$counter_cat]['next_id']) AND $foo[$foo[$counter_cat]['next_id']]['level'] < $foo[$counter_cat]['level']){
							$frameContent .= "\n" . '</ul>' . "\n" . $c;
						}
						if (go_not_null($foo[$counter_cat]['next_id']) AND $foo[$foo[$counter_cat]['next_id']]['level'] == '0'){
								$frameContent .= "\n" . '</ul>' . "\n" . $c;
						}
						$frameContent .= '</li>' . "\n";
					}

			    if ($foo[$counter_cat]['next_id']) {
			      go_show_category_css($foo[$counter_cat]['next_id'], '1');
			    }else{
			    	$frameContent .= "\n" . '</ul>' . "\n";
			    }
			  }			  	
			// Tabellen Funktion	
			// Funktion ruft sich selber auf, bis aktuelle Kategorie alle anzuzeigenden Unterkategorien ausgegeben hat
			function go_show_category($counter_cat, $befor = '0') {
			    global $foo, $frameContent, $id_cat, $aa;

				  
					$frameContent .= "</center>";
			    for ($a=0; $a<$foo[$counter_cat]['level']; $a++) {  
			    } 
					if ($foo[$counter_cat]['level'] == 0){
						if ($aa == 1){  
			  		$frameContent .= '<img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'pixel_silver.gif" border="0" alt="" width="100%" height="1"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2">';
				  	}else{
				  	$aa=1;
				  	}
					}     
					$a = 1;
					if ($foo[$counter_cat]['level'] > 0){
						for ($i = $foo[$counter_cat]['level']; $i >= $a; $a++) {
							$c .= "&nbsp;&nbsp;"; 
						}
					}
			    if (go_has_category_subcategories($counter_cat) || $foo[$counter_cat]['level'] == 0) {
			        if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) { 
								// eine offene Kategorie mit Unterkategorien
								$frameContent .= '<table class="categ"><tr><td class="categ">' . $c . go_picture(FOLDER_RELATIV_PIC_CATEGORIES_TEMPLATES . 'arrow_down.gif', '', '', '') . "&nbsp;</td>";
			        } else { 
								// eine geschlossene Kategorie mit Unterkategorien
								$frameContent .= '<table class="categ"><tr><td class="categ">' . $c . go_picture(FOLDER_RELATIV_PIC_CATEGORIES_TEMPLATES . 'arrow_right.gif', '', '', '') . "&nbsp;</td>"; 
			        }
			    } else {
						// Kategorie hat keine Unterkategorie, befindet sich aber selber in einer Kategorie
			    	$frameContent .= '<table class="categ"><tr><td class="categ">&nbsp;&nbsp;' . $c . go_picture(FOLDER_RELATIV_PIC_CATEGORIES_TEMPLATES . 'arrow_bullet.gif', 'nokta', '', '') . "</td>";
			    }
				 	$frameContent .= '<td class="categ" align="left"><a href="';	    
			    
			    if ($foo[$counter_cat]['parent'] == 0) {
			      $bigPfad_new = 'bigPfad=' . $counter_cat;
			    } else {
			      $bigPfad_new = 'bigPfad=' . $foo[$counter_cat]['path'];
			    }
			    $frameContent .= go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], $bigPfad_new);
			    $frameContent .= '">';
			    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
			      $frameContent .= '<b>';
			    } 
			    $frameContent .= $foo[$counter_cat]['name'];
			    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
			      $frameContent .= '</b>';
			    }
			    if (go_has_category_subcategories($counter_cat)) {
			      $frameContent .= '&nbsp;';
			    }
			    $frameContent .= '</a>';
			    if (SHOW_COUNTS == 'true') {
			      $items_in_category = go_count_items_in_category($counter_cat);
			      if ($items_in_category > 0) {
			        $frameContent .= '&nbsp;(' . $items_in_category . ')';
			      }
			    }
				  $frameContent .= '</td></tr></table>';	
			    if ($foo[$counter_cat]['next_id']) {
			      go_show_category($foo[$counter_cat]['next_id'], '1');
			    }
			  }
			  $frameContent = '';

			  $categories_query = go_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . DB_TBL_CATEGORIES . " c, " . DB_TBL_CATEGORIES_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
			  while ($categories = go_db_fetch_array($categories_query))  {
			    $foo[$categories['categories_id']] = array(
			                                        'name' => $categories['categories_name'],
			                                        'parent' => $categories['parent_id'],
			                                        'level' => 0,
			                                        'path' => $categories['categories_id'],
			                                        'next_id' => false
			                                       );
			    if (isset($prev_id)) {
			      $foo[$prev_id]['next_id'] = $categories['categories_id'];
			    }
			    $prev_id = $categories['categories_id'];
			    if (!isset($first_element)) {
			      $first_element = $categories['categories_id'];
			    }
			  } 
			  if ($bigPfad) {
			    $id_cat = preg_split('/_/', $bigPfad);
			    reset($id_cat);
			    while (list($key, $value) = each($id_cat)) {
			      $new_path .= $value;
			      unset($prev_id);
			      unset($first_id); 
			      $categories_query = go_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . DB_TBL_CATEGORIES . " c, " . DB_TBL_CATEGORIES_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
			      $category_check = go_db_num_rows($categories_query);
			      while ($row = go_db_fetch_array($categories_query)) {
			        $foo[$row['categories_id']] = array(
			                                            'name' => $row['categories_name'],
			                                            'parent' => $row['parent_id'],
			                                            'level' => $key+1,
			                                            'path' => $new_path . '_' . $row['categories_id'],
			                                            'next_id' => false
			                                           );
			        if (isset($prev_id)) {
			          $foo[$prev_id]['next_id'] = $row['categories_id'];
			        }
			        $prev_id = $row['categories_id'];
			        if (!isset($first_id)) {
			          $first_id = $row['categories_id'];
			        }
			        $last_id = $row['categories_id'];
			      }
			      if ($category_check != 0) {
			        $foo[$last_id]['next_id'] = $foo[$value]['next_id'];
			        $foo[$value]['next_id'] = $first_id;
			      }
			             $new_path .= '_';
			    }
			  }
				if (STYLE_CSS == '1'){
					go_show_category_css($first_element); 
				}else{
			  	go_show_category($first_element); 
				}
			  
			  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
			      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
			  }
			  else { 
			      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
			  } 

    
    break;
case 'galerie':
			    
				 $frameGeneralsign = FRAME_ABOVE_GALERIE;
				  $corner_left = 'rounded';
				  $corner_right = 'square';
				  $frame_base_name = 'galerie'; 
				  $frame_id = $frame_base_name . 'Box'; 

			// css Funktion	
			// Funktion ruft sich selber auf, bis aktuelle Kategorie alle anzuzeigenden Unterkategorien ausgegeben hat
			function go_show_galerie_cat_css($counter_cat, $befor = '0') {
			    global $foo, $frameContent, $id_cat, $aa;

				  
					$frameContent .= "</center>";
			    for ($a=0; $a<$foo[$counter_cat]['level']; $a++) {  
			    } 
					if ($foo[$counter_cat]['level'] == 0){
						if ($aa == 1){  
			  		$frameContent .= '<img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'pixel_silver.gif" border="0" alt="" width="100%" height="1"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2">';
				  	}else{
				  	$aa=1;
				  	}
					}     
					$a = 1;
					if ($foo[$counter_cat]['level'] > 0){
						for ($i = $foo[$counter_cat]['level']; $i >= $a; $a++) {
						   $c .= "	";  
						}
					}
					if ($foo[$counter_cat]['level'] == 0	) {
						$frameContent .= $c . '<ul>' . "\n";
					}	
				  $frameContent .= $c . '<li>';
					$frameContent .= '<a href="';

			    if ($foo[$counter_cat]['parent'] == 0) {
			      $bigPfad_new = 'bigPfad=' . $counter_cat;
			    } else {
			      $bigPfad_new = 'bigPfad=' . $foo[$counter_cat]['path'];
			    }
			    $frameContent .= go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], $bigPfad_new);
			    $frameContent .= '">';
			    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
			      $frameContent .= '<b>';
			    } 
			    $frameContent .= $foo[$counter_cat]['name'];
			    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
			      $frameContent .= '</b>';
			    }
			    if (go_has_category_subcategories($counter_cat)) {
			      $frameContent .= '&nbsp;';
			    }
			    $frameContent .= '</a>';
			    if (SHOW_COUNTS == 'true') {
			      $items_in_category = go_count_items_in_category($counter_cat);
			      if ($items_in_category > 0) {
			        $frameContent .= '&nbsp;(' . $items_in_category . ')';
			      }
			    }

					if (go_not_null($foo[$counter_cat]['next_id']) AND $foo[$foo[$counter_cat]['next_id']]['level'] > $foo[$counter_cat]['level']){
						$frameContent .= $c . "\n" . '<ul>' . "\n";
					}else{
						if (go_not_null($foo[$counter_cat]['next_id']) AND $foo[$foo[$counter_cat]['next_id']]['level'] < $foo[$counter_cat]['level']){
							$frameContent .= "\n" . '</ul>' . "\n" . $c;
						}
						if (go_not_null($foo[$counter_cat]['next_id']) AND $foo[$foo[$counter_cat]['next_id']]['level'] == '0'){
								$frameContent .= "\n" . '</ul>' . "\n" . $c;
						}
						$frameContent .= '</li>' . "\n";
					}

			    if ($foo[$counter_cat]['next_id']) {
			      go_show_galerie_cat_css($foo[$counter_cat]['next_id'], '1');
			    }else{
			    	$frameContent .= "\n" . '</ul>' . "\n";
			    }
			  }			  	
			// Tabellen Funktion	
			// Funktion ruft sich selber auf, bis aktuelle Kategorie alle anzuzeigenden Unterkategorien ausgegeben hat				  
				  function go_show_galerie_cat($counter_cat) {
				    global $foo, $frameContent, $id_cat, $aa;
				$frameContent .= "</center>";
				    for ($a=0; $a<$foo[$counter_cat]['level']; $a++) {  
				    } 
				   if ($foo[$counter_cat]['level'] == 0)
					{
						if ($aa == 1)
						{  
				  $frameContent .= '<img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'pixel_silver.gif" border="0" alt="" width="100%" height="1"><br><img src="' . FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'tranparentes.gif" border="0" alt="" width="100%" height="2">';
					    }
						else
						{$aa=1;}
					}     
				$a = 1;
				if ($foo[$counter_cat]['level'] > 0){
					for ($i = $foo[$counter_cat]['level']; $i >= $a; $a++) {
					    $c .= "&nbsp;&nbsp;";
					}
				}
				    if (go_has_galerie_cat_subcategories($counter_cat) || $foo[$counter_cat]['level'] == 0) {
				        if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) { 
				       
				        $frameContent .= '<table class="categ"><tr><td class="categ">'.$c . go_picture(FOLDER_RELATIV_PIC_CATEGORIES_TEMPLATES . 'arrow_down.gif', '', '', '') . "&nbsp;</td>";
				        } else { 
				       
				        $frameContent .= '<table class="categ"><tr><td class="categ">'.$c .go_picture(FOLDER_RELATIV_PIC_CATEGORIES_TEMPLATES . 'arrow_right.gif', '', '', '') . "&nbsp;</td>";
				        }
				    } else {
				    
				    $frameContent .= '<table class="categ"><tr><td class="categ">&nbsp;&nbsp;'.$c .go_picture(FOLDER_RELATIV_PIC_CATEGORIES_TEMPLATES . 'arrow_bullet.gif', 'nokta', '', '') . "</td>";
				    }
				    
				    $frameContent .= '<td class="categ" align="left"><a href="';
				    if ($foo[$counter_cat]['parent'] == 0) {
				      $bigPfad_new = 'bigPfad=' . $counter_cat;
				    } else {
				      $bigPfad_new = 'bigPfad=' . $foo[$counter_cat]['path'];
				    }
				    $frameContent .= go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_24'], $bigPfad_new);
				    $frameContent .= '">';
				    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
				      $frameContent .= '<b>';
				    } 
				    $frameContent .= $foo[$counter_cat]['name'];
				    if ( ($id_cat) && (in_array($counter_cat, $id_cat)) ) {
				      $frameContent .= '</b>';
				    }
				    if (go_has_galerie_cat_subcategories($counter_cat)) {
				      $frameContent .= '&nbsp;';
				    }
				    $frameContent .= '</a>';
				    if (SHOW_COUNTS == 'true') {
				      $items_in_category = go_count_galeries_in_category($counter_cat);
				      if ($items_in_category > 0) {
				        $frameContent .= '&nbsp;(' . $items_in_category . ')';
				      }
				    } 
				   $frameContent .= '</td></tr></table>';
				    if ($foo[$counter_cat]['next_id']) {
				      go_show_galerie_cat($foo[$counter_cat]['next_id']);
				    }
				  }     
				  $frameContent = '';
				  $categories_query = go_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . DB_TBL_GALERIE_CAT . " c, " . DB_TBL_GALERIE_CAT_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
				  while ($categories = go_db_fetch_array($categories_query))  {
				    $foo[$categories['categories_id']] = array(
				                                        'name' => $categories['categories_name'],
				                                        'parent' => $categories['parent_id'],
				                                        'level' => 0,
				                                        'path' => $categories['categories_id'],
				                                        'next_id' => false
				                                       );
				    if (isset($prev_id)) {
				      $foo[$prev_id]['next_id'] = $categories['categories_id'];
				    }
				    $prev_id = $categories['categories_id'];
				    if (!isset($first_element2)) {
				      $first_element2 = $categories['categories_id'];
				    }
				  } 
				  if ($bigPfad) {
				    $id_cat = preg_split('/_/', $bigPfad);
				    reset($id_cat);
				    while (list($key, $value) = each($id_cat)) {
				      $new_path .= $value;
				      unset($prev_id);
				      unset($first_id);
				      $categories_query = go_db_query("select  c.categories_picture, c.categories_id, cd.categories_name, c.parent_id from " . DB_TBL_GALERIE_CAT . " c, " . DB_TBL_GALERIE_CAT_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
				      $category_check = go_db_num_rows($categories_query);
				      while ($row = go_db_fetch_array($categories_query)) {
				        $foo[$row['categories_id']] = array(
				                                            'name' => $row['categories_name'],
				                                            'parent' => $row['parent_id'],
				                                            'level' => $key+1,
				                                            'path' => $new_path . '_' . $row['categories_id'],
				                                            'next_id' => false,
				                                            'picture' => $row['categories_picture']
				                                           );
				        if (isset($prev_id)) {
				          $foo[$prev_id]['next_id'] = $row['categories_id'];
				        }
				        $prev_id = $row['categories_id'];
				        if (!isset($first_id)) {
				          $first_id = $row['categories_id'];
				        }
				        $last_id = $row['categories_id'];
				      }
				      if ($category_check != 0) {
				        $foo[$last_id]['next_id'] = $foo[$value]['next_id'];
				        $foo[$value]['next_id'] = $first_id;
				      }
				             $new_path .= '_';
				    }
				  }

				if (STYLE_CSS == '1'){
				  go_show_galerie_cat_css($first_element2); 
				}else{
				  go_show_galerie_cat($first_element2); 
				}
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  }     
			    
    break;
case 'producers':

	
		$producers_query = go_db_query("select producers_id, producers_name from " . DB_TBL_PRODUCERS . " order by producers_name"); 
		  if ($number_of_rows = go_db_num_rows($producers_query)) {
		    $frameGeneralsign = FRAME_ABOVE_PRODUCERS;
		    $corner_left = 'square';
		    $corner_right = 'square';
		    $frame_base_name = 'producers'; 
		    $frame_id = $frame_base_name . 'Box'; 
		    
		    if ($number_of_rows <= MAX_SHOW_PRODUCERS_IN_A_LIST) { 
		      $frameContent = '';
		      while ($producers = go_db_fetch_array($producers_query)) {
		        $producers_name = ((strlen($producers['producers_name']) > MAX_SHOW_PRODUCER_NAME_LEN) ? substr($producers['producers_name'], 0, MAX_SHOW_PRODUCER_NAME_LEN) . '..' : $producers['producers_name']);
		        if (isset($_GET['producers_id']) && ($_GET['producers_id'] == $producers['producers_id'])) $producers_name = '<b>' . $producers_name .'</b>';
		        $frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], 'producers_id=' . $producers['producers_id']) . '">' . $producers_name . '</a><br>';
		      }
		      $frameContent = substr($frameContent, 0, -4);
		    } else { 
		      $producers_array = array();
		      if (MAX_PRODUCERS_LIST < 2) {
		        $producers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
		      }
		      while ($producers = go_db_fetch_array($producers_query)) {
		        $producers_name = ((strlen($producers['producers_name']) > MAX_SHOW_PRODUCER_NAME_LEN) ? substr($producers['producers_name'], 0, MAX_SHOW_PRODUCER_NAME_LEN) . '..' : $producers['producers_name']);
		        $producers_array[] = array('id' => $producers['producers_id'],
		                                       'text' => $producers_name);
		      }
		      $frameContent = go_fetch_form('producers', go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], '', 'NONSSL', false), 'get');
		 $frameContent .= go_fetch_pull_down_menu('producers_id', $producers_array, (isset($_GET['producers_id']) ? (int)$_GET['producers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_PRODUCERS_LIST . '"');
		      $frameContent .= go_hide_session_id();
		          $frameContent .= '</form>';
		    } 
		    if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
		        require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
		    }
		    else { 
		        require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
		    } 
		  }
    break;
case 'order_history':
 	 if (go_session_is_registered('attendee_id')) {
	    if ($guest_member == false){   
			  if (go_session_is_registered('attendee_id')) { 
			    $orders_query = go_db_query("select distinct op.items_id from " . DB_TBL_ORDERS . " o, " . DB_TBL_ORDERS_ITEMS . " op, " . DB_TBL_ITEMS . " p where o.attendees_id = '" . (int)$attendee_id . "' and o.orders_id = op.orders_id and op.items_id = p.items_id and p.items_status = '1' $date_availability group by items_id order by o.date_purchased desc limit " . MAX_SHOW_ITEMS_IN_ORDER_HISTORY_FRAME);
			    if (go_db_num_rows($orders_query)) {
			      $frameGeneralsign = FRAME_ABOVE_ATTENDEE_ORDERS;
			      $corner_left = 'square';
			      $corner_right = 'square';
			      $frame_base_name = 'order_history'; 
			      $frame_id = $frame_base_name . 'Box'; 
			      $item_ids = '';
			      while ($orders = go_db_fetch_array($orders_query)) {
			        $item_ids .= (int)$orders['items_id'] . ',';
			      }
			      $item_ids = substr($item_ids, 0, -1);
			      $frameContent = '<table border="0" style="width:100%" cellspacing="0" cellpadding="1">';
			      $items_query = go_db_query("select items_id, items_name from " . DB_TBL_ITEMS_DESCRIPTION . " where items_id in (" . $item_ids . ") and language_id = '" . (int)$languages_id . "' order by items_name");
			      while ($items = go_db_fetch_array($items_query)) {
			        $frameContent .= '  <tr>' .
			                                   '    <td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $items['items_id']) . '">' . $items['items_name'] . '</a></td>' .
			                                   '    <td class="infoFrameInsides" align="right" valign="top"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('action')) . 'action=cust_order&pid=' . $items['items_id']) . '">' . go_picture(FOLDER_RELATIV_ICONS . 'cart.gif', ICON_CART) . '</a></td>' .
			                                   '  </tr>';
			      }
			      $frameContent .= '</table>'; 
			      if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
			          require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
			      }
			      else { 
			          require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
			      } 
			    }
			  }  
			}  
	  }    
    break;
case 'best_sellers':

if (isset($_GET['items_id'])) {
    if (go_session_is_registered('attendee_id')) {
      $check_query = go_db_query("select count(*) as count from " . DB_TBL_ATTENDEES_INFO . " where attendees_info_id = '" . (int)$attendee_id . "' and global_item_informs = '1'");
      $check = go_db_fetch_array($check_query);
      if ($check['count'] > 0) {  
				  if (isset($current_category_id) && ($current_category_id > 0)) { 
				    $best_sellers_query = go_db_query("select distinct p.items_id, pd.items_name from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_DESCRIPTION . " pd, " . DB_TBL_ITEMS_TO_CATEGORIES . " p2c, " . DB_TBL_CATEGORIES . " c where p.items_status = '1' and c.categories_status = '1' and p.items_ordered > 0 and p.items_id = pd.items_id and pd.language_id = '" . (int)$languages_id . "' and p.items_id = p2c.items_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) $date_availability order by p.items_ordered desc, pd.items_name limit " . MAX_SHOW_BESTSELLERS);
				  } else { 
				    $best_sellers_query = go_db_query("select distinct p.items_id, pd.items_name from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_DESCRIPTION . " pd, " . DB_TBL_CATEGORIES . " c  where p.items_status = '1' and c.categories_status = '1' and p.items_ordered > 0 and p.items_id = pd.items_id and pd.language_id = '" . (int)$languages_id . "' $date_availability order by p.items_ordered desc, pd.items_name limit " . MAX_SHOW_BESTSELLERS);
				  }
				  if (go_db_num_rows($best_sellers_query) >= MIN_SHOW_BESTSELLERS) {
				  $frameGeneralsign = FRAME_ABOVE_BESTSELLERS;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frame_base_name = 'best_sellers'; 
				  $frame_id = $frame_base_name . 'Box'; 
				  $rows = 0;
				  $frameContent = '<table border="0" style="width:100%" cellspacing="0" cellpadding="1">';
				  while ($best_sellers = go_db_fetch_array($best_sellers_query)) {
				    $rows++;
				    $frameContent .= '<tr><td class="infoFrameInsides" valign="top">' . go_row_number_format($rows) . '.</td><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $best_sellers['items_id']) . '">' . $best_sellers['items_name'] . '</a></td></tr>';
				  }
				  $frameContent .= '</table>'; 
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  } 
				  }   
				  
      }
    }
  } else {				  

				  if (isset($current_category_id) && ($current_category_id > 0)) { 
				    $best_sellers_query = go_db_query("select distinct p.items_id, pd.items_name from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_DESCRIPTION . " pd, " . DB_TBL_ITEMS_TO_CATEGORIES . " p2c, " . DB_TBL_CATEGORIES . " c where p.items_status = '1' and c.categories_status = '1' and p.items_ordered > 0 and p.items_id = pd.items_id and pd.language_id = '" . (int)$languages_id . "' and p.items_id = p2c.items_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) $date_availability order by p.items_ordered desc, pd.items_name limit " . MAX_SHOW_BESTSELLERS);
				  } else { 
				    $best_sellers_query = go_db_query("select distinct p.items_id, pd.items_name from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_DESCRIPTION . " pd, " . DB_TBL_CATEGORIES . " c  where p.items_status = '1' and c.categories_status = '1' and p.items_ordered > 0 and p.items_id = pd.items_id and pd.language_id = '" . (int)$languages_id . "' $date_availability order by p.items_ordered desc, pd.items_name limit " . MAX_SHOW_BESTSELLERS);
				  }
				  if (go_db_num_rows($best_sellers_query) >= MIN_SHOW_BESTSELLERS) {
				  $frameGeneralsign = FRAME_ABOVE_BESTSELLERS;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frame_base_name = 'best_sellers'; 
				  $frame_id = $frame_base_name . 'Box'; 
				  $rows = 0;
				  $frameContent = '<table border="0" style="width:100%" cellspacing="0" cellpadding="1">';
				  while ($best_sellers = go_db_fetch_array($best_sellers_query)) {
				    $rows++;
				    $frameContent .= '<tr><td class="infoFrameInsides" valign="top">' . go_row_number_format($rows) . '.</td><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $best_sellers['items_id']) . '">' . $best_sellers['items_name'] . '</a></td></tr>';
				  }
				  $frameContent .= '</table>'; 
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  } 
				  }    
  } 				  
				   
    
    break;
case 'item_informs':

if (isset($_GET['items_id'])) {
    if (go_session_is_registered('attendee_id')) {
      $check_query = go_db_query("select count(*) as count from " . DB_TBL_ATTENDEES_INFO . " where attendees_info_id = '" . (int)$attendee_id . "' and global_item_informs = '1'");
      $check = go_db_fetch_array($check_query);
      if ($check['count'] > 0) {
        
      } else {
        if ($guest_member == false){
    
				  if (isset($_GET['items_id'])) {
				    $frameGeneralsign = FRAME_ABOVE_INFORMS;
				    $corner_left = 'square';
				    $corner_right = 'square';
				    $frameLink = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_45'], '', 'SSL') . '"><img src="' . FOLDER_RELATIV_TEMPLATES . 'infoframe/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
				    $frame_base_name = 'item_informs'; 
				    $frame_id = $frame_base_name . 'Box'; 
				    if (go_session_is_registered('attendee_id')) {
				      $check_query = go_db_query("select count(*) as count from " . DB_TBL_ITEMS_INFORMS . " where items_id = '" . (int)$_GET['items_id'] . "' and attendees_id = '" . (int)$attendee_id . "'");
				      $check = go_db_fetch_array($check_query);
				      $inform_exists = (($check['count'] > 0) ? true : false);
				    } else {
				      $inform_exists = false;
				    }
				    if ($inform_exists == true) {
				      $frameContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('action')) . 'action=notify_remove', $request_type) . '">' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'frame_items_informs_remove.gif', PICTURE_BUTTON_REMOVE_INFORMS) . '</a></td></td></tr><td class="infoFrameInsides"><a href="' . go_href_link(basename($PHP_SELF), go_get_all_get_parameter(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(FRAME_INFORMS_NOTIFY_REMOVE, go_get_items_name((int)$_GET['items_id'])) .'</a></td></tr></table>';
				    } else {
				    	
				   	$wort = sprintf(FRAME_INFORMS_NOTIFY, go_get_items_name((int)$_GET['items_id']));
				    $wort = substr("$wort", 0, 75); 	
				    $frameContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('action')) . 'action=notify', $request_type) . '">' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'frame_items_informs.gif', PICTURE_BUTTON_INFORMS) . '</a></td></td></tr><td class="infoFrameInsides"><a href="' . go_href_link(basename($PHP_SELF), go_get_all_get_parameter(array('action')) . 'action=notify', $request_type) . '">' . $wort .'</a></td></tr></table>';
				    } 
				    if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				        require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				    }
				    else { 
				        require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				    } 
				    $frameLink = '';
				  }    
				}
      }
    } else {
      if ($guest_member == false){


				  if (isset($_GET['items_id'])) {
				    $frameGeneralsign = FRAME_ABOVE_INFORMS;
				    $corner_left = 'square';
				    $corner_right = 'square';
				    $frameLink = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_45'], '', 'SSL') . '"><img src="' . FOLDER_RELATIV_TEMPLATES . 'infoframe/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
				    $frame_base_name = 'item_informs'; 
				    $frame_id = $frame_base_name . 'Box'; 
				    if (go_session_is_registered('attendee_id')) {
				      $check_query = go_db_query("select count(*) as count from " . DB_TBL_ITEMS_INFORMS . " where items_id = '" . (int)$_GET['items_id'] . "' and attendees_id = '" . (int)$attendee_id . "'");
				      $check = go_db_fetch_array($check_query);
				      $inform_exists = (($check['count'] > 0) ? true : false);
				    } else {
				      $inform_exists = false;
				    }
				    if ($inform_exists == true) {
				      $frameContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('action')) . 'action=notify_remove', $request_type) . '">' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'frame_items_informs_remove.gif', PICTURE_BUTTON_REMOVE_INFORMS) . '</a></td></td></tr><td class="infoFrameInsides"><a href="' . go_href_link(basename($PHP_SELF), go_get_all_get_parameter(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(FRAME_INFORMS_NOTIFY_REMOVE, go_get_items_name((int)$_GET['items_id'])) .'</a></td></tr></table>';
				    } else {
				    	
				   $wort = sprintf(FRAME_INFORMS_NOTIFY, go_get_items_name((int)$_GET['items_id']));
				    $wort = substr("$wort", 0, 75); 	
				    $frameContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('action')) . 'action=notify', $request_type) . '">' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'frame_items_informs.gif', PICTURE_BUTTON_INFORMS) . '</a></td></td></tr><td class="infoFrameInsides"><a href="' . go_href_link(basename($PHP_SELF), go_get_all_get_parameter(array('action')) . 'action=notify', $request_type) . '">' . $wort .'</a></td></tr></table>';
				    } 
				    if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				        require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				    }
				    else { 
				        require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				    } 
				    $frameLink = '';
				  } 
				}
    }
  }    
    break;
case 'tell_a_friend':

 	if (isset($_GET['items_id'])) {
    if (basename($PHP_SELF) != $GLOBALS['CONFIG_NAME_FILE']['main_bigware_72']){   
				  $frameGeneralsign = FRAME_ABOVE_TELL_A_FRIEND;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frameContent_characteristics = ' align="center"';
				  $frame_base_name = 'tell_a_friend'; 
				  $frame_id = $frame_base_name . 'Box'; 
				  $frameContent = go_fetch_form('tell_a_friend', go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_72'], '', 'NONSSL', false), 'get');
				  $frameContent .= go_fetch_inputfeld('to_email_address', '', 'size="10"') . '&nbsp;' . go_picture_submit('button_tell_a_friend.gif', FRAME_ABOVE_TELL_A_FRIEND) . go_fetch_hidden_field('items_id', (int)$_GET['items_id']) . go_hide_session_id() . '<br>' . FRAME_TELL_A_FRIEND_TEXT;
				  $frameContent .= '</form>'; 
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  } 
				  $frameContent_characteristics = '';    
		} 
  }
    break;
case 'specials':
 	if (isset($_GET['items_id'])) {
    
  } else {   
				  $attendee_group_query = go_db_query("select attendees_group_id from " . DB_TBL_ATTENDEES . " where attendees_id = '" . $attendee_id . "'");
				  $attendee_group = go_db_fetch_array($attendee_group_query);  
				  if ($random_item = go_random_select("select p.items_id, pd.items_name, p.items_price, p.items_tax_class_id, p.items_picture,  s.specials_new_items_price , p.delivery_time_id from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_DESCRIPTION . " pd, " . DB_TBL_SPECIALS . " s where p.items_status = '1' and p.items_id = s.items_id and pd.items_id = s.items_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.attendees_group_id=".(int)$attendee_group['attendees_group_id']." $date_availability order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {
				    $items_price = '<br />'.$currencies->display_special_pricing($random_item['items_id'], $attendee_id);
				        if (PRICES_LOGGED_IN == 'false') {
				            $item_price_d = $items_price;
				            }
				        if ((PRICES_LOGGED_IN == 'true') && (!go_session_is_registered('attendee_id'))) {
				            $item_price_d = ('<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_40'], '','SSL') . '">'  . PRICES_LOGGED_IN_TEXT . '</a>&nbsp;' );
				              }  else  {
				            $item_price_d = $items_price;
				              } 
				  $frameGeneralsign = FRAME_ABOVE_SPECIALS;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frameContent_characteristics = ' align="center"';
				  $frameLink = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_70']) . '"><img src="' . FOLDER_RELATIV_TEMPLATES . 'infoframe/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
				  $frame_base_name = 'specials'; 
				  $frame_id = $frame_base_name . 'Box';   
				  $frameContent = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $random_item["items_id"]) . '">' . go_picture(FOLDER_RELATIV_PICTURES . $random_item['items_picture'], $random_item['items_name'], SMALL_PICTURE_WIDTH, SMALL_PICTURE_HEIGHT) . '</a><br><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $random_item['items_id']) . '">' . $random_item['items_name'] . '</a><br>' . $item_price_d  . $currencies->shipping_tag($random_item ).'<br>';  
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  } 
				  $frameLink = '';
				  $frameContent_characteristics = '';
				  }    
  }     
    break;
case 'reviews':
    
				  $frameGeneralsign = FRAME_ABOVE_REVIEWS;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frameLink = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_64']) . '"><img src="' . FOLDER_RELATIV_TEMPLATES . 'infoframe/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
				  $frame_base_name = 'reviews'; 
				  $frame_id = $frame_base_name . 'Box'; 
				  $random_select = "select r.reviews_id, r.reviews_rating, p.items_id, p.items_picture, pd.items_name from " . DB_TBL_REVIEWS . " r, " . DB_TBL_REVIERELATIV_DESCRIPTION . " rd, " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_DESCRIPTION . " pd where p.items_status = '1' and p.items_id = r.items_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.items_id = pd.items_id and pd.language_id = '" . (int)$languages_id . "' $date_availability";
				  if (isset($_GET['items_id'])) {
				    $random_select .= " and p.items_id = '" . (int)$_GET['items_id'] . "'";
				  }
				  $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
				  $random_item = go_random_select($random_select);
				  if ($random_item) { 
				    $review_query = go_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . DB_TBL_REVIERELATIV_DESCRIPTION . " where reviews_id = '" . (int)$random_item['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'");
				    $reviews_text = go_db_fetch_array($review_query);
				    $reviews_text = go_break_string(go_output_string_protected($reviews_text['reviews_text']), 15, '-<br>');
				    $frameContent = '<div align="center"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_36'], 'items_id=' . $random_item['items_id'] . '&reviews_id=' . $random_item['reviews_id']) . '">' . go_picture(FOLDER_RELATIV_PICTURES . $random_item['items_picture'], $random_item['items_name'], SMALL_PICTURE_WIDTH, SMALL_PICTURE_HEIGHT) . '</a></div><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_36'], 'items_id=' . $random_item['items_id'] . '&reviews_id=' . $random_item['reviews_id']) . '">' . $reviews_text . ' ..</a><br><div align="center">' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'stars_' . $random_item['reviews_rating'] . '.gif' , sprintf(FRAME_REVIERELATIV_TEXT_OF_5_STARS, $random_item['reviews_rating'])) . '</div>';
				  } elseif (isset($_GET['items_id'])) { 
				    $frameContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_37'], 'items_id=' . (int)$_GET['items_id']) . '">' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'frame_write_review.gif', PICTURE_BUTTON_WRITE_REVIEW) . '</a></td></tr><tr><td class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_37'], 'items_id=' . (int)$_GET['items_id']) . '">' . FRAME_REVIERELATIV_WRITE_REVIEW .'</a></td></tr></table>';
				  } else { 
				    $frameContent = FRAME_REVIERELATIV_NO_REVIEWS;
				  } 
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  } 
				  $frameLink = '';    
    
    break;
case 'languages':

 	if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {    
	  $frameGeneralsign = FRAME_ABOVE_LANGUAGES;
	  $corner_left = 'square';
	  $corner_right = 'square';
	  $frameContent_characteristics = ' align="center"';
	  $frame_base_name = 'languages'; 
	  $frame_id = $frame_base_name . 'Box'; 
	  if (!isset($lng) || (isset($lng) && !is_object($lng))) {
	    include(FOLDER_RELATIV_CLASSES . $GLOBALS[CONFIG_NAME_FILE_CLASSES][classes_bigware_10]);
	    $lng = new language;
	  }
	  $frameContent = '';
	  reset($lng->catalog_languages);
	  while (list($key, $value) = each($lng->catalog_languages)) {
	    $frameContent .= ' <a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . go_picture(FOLDER_RELATIV_TEMPLATES . 'lang_images/' .  $value['directory'] . '/picture/' . $value['picture'], $value['name']) . '</a> ';
	  } 
	  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	  }
	  else { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	  } 
	  $frameContent_characteristics = '';    
  }  
    break;
case 'currencies':
 	if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {    
 	  if (isset($currencies) && is_object($currencies)) {
	    $frameGeneralsign = FRAME_ABOVE_CURRENCIES;
	    $corner_left = 'square';
	    $corner_right = 'square';
	    $frame_base_name = 'currencies'; 
	    $frame_id = $frame_base_name . 'Box'; 
	    $frameContent_characteristics = ' align="center"';
	    reset($currencies->currencies);
	    $currencies_array = array();
	    while (list($key, $value) = each($currencies->currencies)) {
	      $currencies_array[] = array('id' => $key, 'text' => $value['title']);
	    }
	    $hidden_get_variables = '';
	    reset($_GET);
	    while (list($key, $value) = each($_GET)) {
	      if ( ($key != 'currency') && ($key != go_session_name()) && ($key != 'x') && ($key != 'y') ) {
	        $hidden_get_variables .= go_fetch_hidden_field($key, $value);
	      }
	    }
	    $frameContent = go_fetch_form('currencies', go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], '', $request_type, false), 'get');
	 $frameContent .= go_fetch_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();"');
	    $frameContent .= $hidden_get_variables;
	    $frameContent .= go_hide_session_id();
	    $frameContent .= '</form>'; 
	    if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	        require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	    }
	    else { 
	        require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	    } 
	  $frameContent_characteristics = '';
	  }   
  }     
    break;
case 'whos_online':
			    
			  	  $frameGeneralsign = FRAME_ABOVE_WHOS_ONLINE;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frameContent_characteristics = ' align="center"';
				  $frame_base_name = 'whos_online'; 
				  $frame_id = $frame_base_name . 'Box'; 
				$n_members=0;$n_guests=0;$member_list='';
				$whos_online_query = go_db_query("select attendee_id from " . DB_TBL_WHOS_ONLINE);
				while ($whos_online = go_db_fetch_array($whos_online_query)) {
				  if (!$whos_online['attendee_id'] == 0) {
				     $n_members++;
				     $member = go_db_fetch_array(go_db_query("select attendees_firstname from ".DB_TBL_ATTENDEES." where attendees_id = '".$whos_online['attendee_id']."'"));
				     $member_list .= (($n_members > 1)?', ':'') . $member['attendees_firstname'];
				     }
				   if ($whos_online['attendee_id'] == 0) $n_guests++;
				   }
				$user_total = sprintf(go_db_num_rows($whos_online_query));
				$there_is_are = (($user_total == 1)? FRAME_WHOS_ONLINE_THEREIS:FRAME_WHOS_ONLINE_THEREARE);
				$word_guest = '&nbsp;'.(($n_guests == 1)? FRAME_WHOS_ONLINE_GUEST:FRAME_WHOS_ONLINE_GUESTS);
				$word_member = '&nbsp;' .(($n_members == 1)? FRAME_WHOS_ONLINE_MEMBER:FRAME_WHOS_ONLINE_MEMBERS);
				if (($n_guests >= 1) && ($n_members >= 1)) $word_and = '&nbsp;' . FRAME_WHOS_ONLINE_AND . '<br>';
				$textstring = $there_is_are.'<br>';
				if ($n_guests >= 1) $textstring .= '&nbsp;'.$n_guests . $word_guest; 
				$textstring .= $word_and; 
				if ($n_members >= 1) {
				  $textstring .= '&nbsp;'. $n_members . $word_member;
				  if ((WHOS_ONLINE_LIST=='ja') || (WHOS_ONLINE_LIST=='yes')) $textstring .= '<br>('.$member_list.')';
				  }
				$textstring .= '<br>&nbsp;online.'; 
				 $frameContent = $textstring; 
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
				  }
				  else { 
				      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
				  } 
				  $frameContent_characteristics = '';  
			    
    break;
case 'polls':
			    
				  $frameGeneralsign = _POLLS;
				  $corner_left = 'square';
				  $corner_right = 'square';
				  $frameContent_characteristics = ' align="center"';
				  $frame_base_name = 'polls'; 
				  $frame_id = $frame_base_name . 'Box'; 
				  $hide = go_hide_session_id();
				function pollnewest() {
					global $attendee_id;
					if (SHOW_POLL_HOW==3) {
					        $extra_query=" and pollID='" . SHOW_POLL_ID . "'";
					        }
					if (!isset($attendee_id)) {
						$extra_query.=" and poll_type='0' ";
						}
					if (SHOW_POLL_HOW==2) {
						$order = 'voters DESC';
				 		} else {
						$order = 'timestamp DESC';
						}
					$query= go_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query."and catID != 0 order by ".$order);
					$count=go_db_num_rows($query);
				        $result = go_db_fetch_array($query);
					$pollid = false;
				        if ($count>0) {
				           if ($_GET['bigPfad']) $mypath = $_GET['bigPfad'];
				           if ($_GET['items_id'])$mypath = go_get_item_path((int)$_GET['items_id']);
				           if ($mypath) {
				             $sub_cat_ids = preg_split("/[_]/", $mypath);
				             for ($i = 0; $i < count($sub_cat_ids); $i++) { 
				               if ($sub_cat_ids[$i] == $result['catID']) $pollid = $result['pollid'];                              
				             }
				           }
				        }
					$query= go_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query." and catID = 0 order by ".$order);
					$count=go_db_num_rows($query);
				       	if ((!SHOW_POLL_HOW==0 || $count==1) && !$pollid) {
						if ($result=go_db_fetch_array($query)) {
							$pollid = $result['pollid'];
						}
					} elseif (!$pollid) {
						mt_srand((double) microtime() * 1000000);
						$rand = mt_rand(1,$count);
						for($i=0;$i<$rand;$i++) {
							$result=go_db_fetch_array($query);
							$pollid = $result['pollid'];
							}
					}
					return $pollid;
				} 
				$pollid=pollnewest();
				if ($pollid) {
					$poll_query=go_db_query("select voters from phesis_poll_desc where pollid=$pollid and poll_open='0'");
					$poll_details=go_db_fetch_array($poll_query);
				        $title_query = go_db_query("select optionText from phesis_poll_data where pollid=$pollid and voteid='0' and language_id = '" . $languages_id . "'");
				        $title = go_db_fetch_array($title_query);
				  	$url = go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_53'], 'op=results&pollid='.$pollid);
				  	$frameContent = '<form name="poll" method="post" action="'. go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_54']) .'">';
					$frameContent .= "<table border=\"0\"><tr><td colspan=\"2\" class=\"main\">" . $title['optionText'] . "</td></tr>";
				 	$frameContent .=  "<input type=\"hidden\" name=\"pollid\" value=\"".$pollid."\">\n";
				  	$frameContent .=  "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">\n";
					for ($i=1;$i<=8;$i++) {
					      $query=go_db_query("select pollid, optiontext, optioncount, voteid from phesis_poll_data where (pollid=$pollid) and (voteid=$i) and (language_id=$languages_id)");
				      	if ($result=go_db_fetch_array($query)) {
				     	 		if ($result['optiontext']) {
				       		$frameContent.= "<tr class=\"pollOptRow\"><td class=\"pollBoxRow\"><input type=\"radio\" name=\"voteid\" value=\"".$i."\"></td><td class=\"pollBoxRow\">".$result['optiontext']."</td></tr>";
				       		}
				    		}
					}
					$frameContent .= "<tr class=\"pollFooter\"><td colspan=\"2\"><center>" . go_picture_submit('button_send.gif', PICTURE_BUTTON_LOGIN, 'SSL') . "</center>\n</td></tr></form>";
					$query=go_db_query("select sum(optioncount) as sum from phesis_poll_data where pollid=$pollid");
					$query1=go_db_query("select count(pollid) as comments from phesis_comments where pollid=$pollid and language_id=$languages_id");
				        $result1 = go_db_fetch_array($query1);
				        $pollscomments = $result1['comments'];
					if ($result=go_db_fetch_array($query)) {
						$sum=$result['sum'];
					}
				        $frameContent .= "<tr class=\"pollFooter\"><td colspan=\"2\" class=\"pollBoxText\"><center>[ <a href=\"" . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_53'], 'op=results&pollid=' .$pollid, 'NONSSL')."\">"._RESULTS."</a> | <a href=\"" .go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_53'], 'op=list')."\">"._POLLS."</a> ]</td></tr>";
				        $frameContent .= "<tr class=\"pollFooter\"><td colspan=\"2\" class=\"pollBoxText\"><center>" . $sum . " "._VOTES."</center>\n</td></tr><tr class=\"pollFooter\"><td colspan=\"2\" class=\"pollBoxText\"><center>" . $pollscomments . " "._COMMENTS."</center>\n</td></tr></table>";
					
				} elseif (SHOW_NOPOLL==1) {
					
				$frameGeneralsign = _NOPOLLS;
				$frameContent = _NOPOLLSCONTENT;
				}  
				  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
				  	if (SHOW_NOPOLL!=0) {	
						require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
					}
				  }
				  else { 
					if (SHOW_NOPOLL!=0) {
				      		require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
					}
				} 
				  $frameContent_characteristics = '';    
			    
    break;
case 'producer_info':
 if (isset($_GET['items_id'])){   
	  if (isset($_GET['items_id'])) {
	    $producer_query = go_db_query("select m.producers_id, m.producers_name, m.producers_picture, mi.producers_url from ((" . DB_TBL_PRODUCERS . " m) left join " . DB_TBL_PRODUCERS_INFO . " mi on (m.producers_id = mi.producers_id and mi.languages_id = '" . (int)$languages_id . "'), " . DB_TBL_ITEMS . " p)  where p.items_id = '" . (int)$_GET['items_id'] . "' and p.producers_id = m.producers_id $date_availability");
	    if (go_db_num_rows($producer_query)) {
	      $producer = go_db_fetch_array($producer_query);
	      $frameGeneralsign = FRAME_ABOVE_PRODUCER_INFO;
	      $corner_left = 'square';
	      $corner_right = 'square';
	      $frame_base_name = 'producer_info'; 
	      $frame_id = $frame_base_name . 'Box'; 
	      $frameContent = '<table border="0" style="width:100%" cellspacing="0" cellpadding="0">';
	      if (go_not_null($producer['producers_picture'])) $frameContent .= '<tr><td align="center" class="infoFrameInsides" colspan="2">' . go_picture(FOLDER_RELATIV_PICTURES . $producer['producers_picture'], $producer['producers_name'], SMALL_PICTURE_WIDTH, SMALL_PICTURE_HEIGHT) . '</td></tr>';
	      if (go_not_null($producer['producers_url'])) $frameContent .= '<tr><td valign="top" class="infoFrameInsides">-&nbsp;</td><td valign="top" class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_63'], 'action=producer&producers_id=' . $producer['producers_id']) . '" target="_blank">' . sprintf(FRAME_PRODUCER_INFO_HOMEPAGE, $producer['producers_name']) . '</a></td></tr>';
	      $frameContent .= '<tr><td valign="top" class="infoFrameInsides">-&nbsp;</td><td valign="top" class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], 'producers_id=' . $producer['producers_id']) . '">' . FRAME_PRODUCER_INFO_OTHER_ITEMS . '</a></td></tr>' .
	                                   '</table>'; 
	      if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	         require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	      }
	      else { 
	          require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	      } 
	    }
	  }    
 }   
    break;
case 'shop_basket':
    
 	  $frameGeneralsign = FRAME_ABOVE_SHOP_BASKET;
	  $corner_left = 'square';
	  $corner_right = 'rounded';
	  $frameLink = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_69']) . '"><img src="' . FOLDER_RELATIV_TEMPLATES . 'infoframe/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
	  $frame_base_name = 'shop_basket'; 
	  $frame_id = $frame_base_name . 'Box'; 
	  $frameContent = '';
	  if ($cart->count_contents() > 0) {
	    $frameContent = '<script language="javascript" type="text/javascript">
	    <!-- 
	    function couponpopupWindow(url) {  
	    	window.open(url,\'popupWindow\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=600,height=500,screenX=100,screenY=100,top=100,left=100\')
	}
	//-->
	</script>
	<table border="0" style="width:100%" cellspacing="0" cellpadding="0">
	';
	    $items = $cart->get_items();
	    for ($i=0, $n=sizeof($items); $i<$n; $i++) {
	      $frameContent .= '<tr><td align="right" valign="top" class="infoFrameInsides">';
	      if ((go_session_is_registered('new_items_id_in_cart')) && ($new_items_id_in_cart == $items[$i]['id'])) {
	        $frameContent .= '<span class="newItemInCart">';
	      } else {
	        $frameContent .= '<span class="infoFrameInsides">';
	      }
	      $frameContent .= $items[$i]['quantity'] . '&nbsp;x&nbsp;</span></td><td valign="top" class="infoFrameInsides"><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $items[$i]['id']) . '">';
	      if ((go_session_is_registered('new_items_id_in_cart')) && ($new_items_id_in_cart == $items[$i]['id'])) {
	        $frameContent .= '<span class="newItemInCart">';
	      } else {
	        $frameContent .= '<span class="infoFrameInsides">';
	      }
	      $frameContent .= $items[$i]['name'] . '</span></a></td></tr>';
	      if ((go_session_is_registered('new_items_id_in_cart')) && ($new_items_id_in_cart == $items[$i]['id'])) {
	        go_session_unregister('new_items_id_in_cart');
	      }
	    }
	    $frameContent .= '</table>';
	  } else {
	    $frameContent .= FRAME_SHOP_BASKET_EMPTY;
	  }
	  if ($cart->count_contents() > 0) {
	    $frameContent .= go_fetch_dividing_up();
	    $frameContent .= '<div align="right">' . $currencies->format($cart->show_total()) . '<br> <a class="shipping" href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_67']). '" target="_blank">' . TEXT_SHIPPING_INFO .'</a></div>';
	  }
	  if (go_session_is_registered('attendee_id')) {
	    $gv_query = go_db_query("select amount from " . DB_TBL_COUPON_GV_ATTENDEE . " where attendee_id = '" . $attendee_id . "'");
	    $gv_result = go_db_fetch_array($gv_query);
	    if ($gv_result['amount'] > 0 ) {
	      $frameContent .= go_fetch_dividing_up();
	      $frameContent .= '<table cellpadding="0" style="width:100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_BALANCE . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($gv_result['amount']) . '</td></tr></table>';
	      $frameContent .= '<table cellpadding="0" style="width:100%" cellspacing="0" border="0"><tr><td class="smalltext"><a href="'. go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_28']) . '">' . FRAME_SEND_TO_FRIEND . '</a></td></tr></table>';
	    }
	  }
	  if (go_session_is_registered('gv_id')) {
	    $gv_query = go_db_query("select coupon_amount from " . DB_TBL_COUPONS . " where coupon_id = '" . $gv_id . "'");
	    $coupon = go_db_fetch_array($gv_query);
	    $frameContent .= go_fetch_dividing_up();
	    $frameContent .= '<table cellpadding="0" style="width:100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</td></tr></table>';
	  }
	  if (go_session_is_registered('cc_id') && $cc_id) {
	    $frameContent .= go_fetch_dividing_up();
	    $frameContent .= '<table cellpadding="0" style="width:100%" cellspacing="0" border="0"><tr><td class="smalltext" valign="top">' . CART_COUPON . '</td><td class="smalltext" align="right" valign="top">' . '<a href="javascript:couponpopupWindow(\'' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_56'], 'bigID=' . $cc_id) . '\')">' . CART_COUPON_INFO . '</a>' . '</td></tr></table>';
	  } 
	  $frameContent .= '<table cellpadding="0" style="width:100%" cellspacing="0" border="0"><tr><td class="infoFrameInsides"><br><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_66']) . '">' . HEADER_TITLE_CHECKOUT . '</a></td></tr></table>';
	  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php'); 
	  }
	  else { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	  } 
	  $frameLink = '';   
    
    break;
case 'login':
    
	$frameContent = '';
	  $frameGeneralsign = FRAME_ABOVE_LOGIN;
	  $corner_left = 'square';
	  $corner_right = 'square';
	  $frameContent_characteristics = ' align="center"';
	  $frame_base_name = 'Login'; 
	  $frame_id = $frame_base_name . 'Box'; 
	  
	if ( (!strstr($_SERVER['PHP_SELF'], $GLOBALS['CONFIG_NAME_FILE']['main_bigware_40'])) and (!strstr($_SERVER['PHP_SELF'], $GLOBALS['CONFIG_NAME_FILE']['main_bigware_10'])) )  {
	?>
	<!-- LOGIN //-->
	<?php
	    if (!go_session_is_registered('attendee_id')) {
	?>
	<?php
	    $frameContent = '
	            <table border="0" style="width:100%" cellspacing="0" cellpadding="0">
	            <form name="login" method="post" action="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_40'], 'action=process', 'SSL') . '">
	              <tr>
	                <td align="left" class="main">
	                  ' . FRAME_LOGIN_EMAIL . '
	                </td>
	              </tr>
	              <tr>
	                <td align="left" class="main">
	                  <input type="text" name="email_address" maxlength="96" size="20" value="">
	                </td>
	              </tr>
	              <tr>
	                <td align="left" class="main">
	                  ' . FRAME_LOGIN_PASSWORD . '
	                </td>
	              </tr>
	              <tr>
	                <td align="left" class="main">
	                  <input type="password" name="password" maxlength="40" size="20" value="">
	                </td>
	              </tr>
				  <tr>
	                <td class="main" align="center">
	                  ' . go_picture_submit('button_login.gif', PICTURE_BUTTON_LOGIN, 'SSL') . '
	                </td>
	              </tr>
				  <tr>
					<td align="left" class="main">
	                  ' . FRAME_LOGIN_FORGOT_PASSWORD . '
	                </td>
	              </tr>
	            </form>
	              <tr>
	                <td align="left" class="main">
	                  ' . FRAME_LOGIN_NEW . '
	                </td>
	              </tr>
	            </table>
	              ';
	  } else {
	    $frameContent = '
	             <table border="0" style="width:100%" cellspacing="0" cellpadding="0">
	              <tr>
	                <td align="left" class="main">
	                  <font color="#FF0000">' . FRAME_LOGIN_IN . '</font></td>
	              </tr>
	              <tr>
	                <td align="left" class="main">
	                  <a href="' . $GLOBALS['CONFIG_NAME_FILE']['main_bigware_41'] . '">>' . FRAME_LOGIN_LOGOFF . '<</a></td>
	              </tr>
	              </table>
	              ';
	  $frameGeneralsign = FRAME_ABOVE_LOGIN_TWO;
	  }
	?>
	<!-- LOGIN_eof //-->
	<?php
	}
	else {
	  if (go_session_is_registered('attendee_id')) {
	    $frameContent = '
	            <table border="0" style="width:100%" cellspacing="0" cellpadding="0">
	              <tr>
	                <td align="left" class="main">
	                  <font color="#FF0000">' . FRAME_LOGIN_IN . '</font></td>
	              </tr>
	              <tr>
	                <td align="left" class="main">
	                  <a href="' . $GLOBALS['CONFIG_NAME_FILE']['main_bigware_41'] . '">>' . FRAME_LOGIN_LOGOFF . '<</a></td>
	              </tr>
	              </table>
	              ';
	  $frameGeneralsign = FRAME_ABOVE_LOGIN_TWO;             
	              
	  }
	}
	if ($frameContent != ""){ 
	  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	  }
	  else { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	  } 
	  $frameContent_characteristics = '';
	}    
    
    break;
case 'information': 
    
	  $frameGeneralsign = FRAME_ABOVE_INFORMATION; 
	  $corner_left = 'square';
	  $corner_right = 'square';
	  $frame_base_name = 'information'; 
	  $frame_id = $frame_base_name . 'Box'; 
	  $frameContent = '';
	  $all_disable = '1';
	  
	  if (SHIP_INFO_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_67'], '', 'NONSSL') . '"> ' . FRAME_INFORMATION_SHIPPING . '</a><br>' . "\n";
	  	$all_disable = '0'; 
		}

	  if (PRIVACY_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_61'], '', 'NONSSL') . '"> ' . FRAME_INFORMATION_PRIVACY . '</a><br>' . "\n";
	  	$all_disable = '0';
		}
	  if (CONDITION_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_6'], '', 'NONSSL') . '"> ' . FRAME_INFORMATION_CONDITIONS . '</a><br>' . "\n";
	  	$all_disable = '0';
		}
	  if (VOUCHER_INFO_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_26'], '', 'NONSSL') . '">' . FRAME_INFORMATION_GV . '</a><br>' . "\n";
	  	$all_disable = '0';
		}
	 if (ROR_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link('right_of_return.php' , '', 'NONSSL') . '">' . FRAME_INFORMATION_ROR . '</a><br />' . "\n"; 
	  	$all_disable = '0';
	}
	  if (CONTACT_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_8'], '', 'NONSSL') . '">' . FRAME_INFORMATION_CONTACT . '</a><br>' . "\n"; 
	  	$all_disable = '0';
		}
	 if (IMPRESSUM_LINK_AVAILABLE == 'True') {
	  	$frameContent .= '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_30'], 'pages_id=6',  'NONSSL') . '">' . FRAME_INFORMATION_IMPRESSUM . '</a>' . "\n"; 
	  	$all_disable = '0';
		}
		
		
		if ($all_disable == '0') {
		  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
		      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
		  }
		  else { 
		      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
		  }  
		}

    break;
case 'search':
    
	  $frameGeneralsign = FRAME_ABOVE_SEARCH;
	  $corner_left = 'square';
	  $corner_right = 'square';
	  $frameContent_characteristics = ' align="center"';
	  $frame_base_name = 'search'; 
	  $frame_id = $frame_base_name . 'Box'; 
	  $frameContent = go_fetch_form('quick_find', go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_3'], '', 'NONSSL', false), 'get');
	  $frameContent .= go_fetch_hidden_field('search_in_description','1') . go_fetch_inputfeld('keywords', '', 'size="20" maxlength="30" ') . '&nbsp;' . go_hide_session_id() . go_picture_submit('button_quick_find.gif', FRAME_ABOVE_SEARCH) . '<br>' . FRAME_SEARCH_TEXT . '<br><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_2']) . '"><b>' . FRAME_SEARCH_ADVANCED_SEARCH . '</b></a>';
	  $frameContent .= '</form>'; 
	  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	  }
	  else { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	  } 
	  $frameContent_characteristics = '';    
    
    break;
case 'whats_new':

    if (SHOW_ONLY_ITEMS_WITH_PICTURE == 'true'){

    	$select_random_items = "select distinct p.items_id, p.items_picture, p.items_tax_class_id, p.items_price, p.items_model , p.delivery_time_id from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_TO_CATEGORIES . " p2c, " . DB_TBL_CATEGORIES . " c where p.items_status=1 and p.items_id = p2c.items_id and c.categories_id = p2c.categories_id and c.categories_status=1 AND (p.items_picture != 'alle/nopic.gif' AND p.items_picture != '') $date_availability order by p.items_date_added desc limit " . MAX_RANDOM_SELECT_NEW;
  	}
  	else{
  		$select_random_items = "select distinct p.items_id, p.items_picture, p.items_tax_class_id, p.items_price, p.items_model  , p.delivery_time_id from " . DB_TBL_ITEMS . " p, " . DB_TBL_ITEMS_TO_CATEGORIES . " p2c, " . DB_TBL_CATEGORIES . " c where p.items_status=1 and p.items_id = p2c.items_id and c.categories_id = p2c.categories_id and c.categories_status=1 $date_availability order by p.items_date_added desc limit " . MAX_RANDOM_SELECT_NEW;
  	}
	   if ($random_item = go_random_select($select_random_items)) {
	    $frameGeneralsign = FRAME_ABOVE_WHATS_NEW;
	    $corner_left = 'square';
	    $corner_right = 'square';
	    $frameContent_characteristics = ' align="center"';
	    $frameLink = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_38']) . '"><img src="' . FOLDER_RELATIV_TEMPLATES . 'infoframe/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
	    $frame_base_name = 'whats_new'; 
	    $frame_id = $frame_base_name . 'Box'; 
	    $random_item['items_name'] = go_get_items_name($random_item['items_id']);
	    $random_item['items_name2'] = go_get_items_name2($random_item['items_id']); 
	    if ($random_item['items_name2'] != ""){$random_item['items_name2'] = $random_item['items_name2'] . '';}
			if ($random_item['items_price'] != "123456.7890"){
				$items_price = '<br />'.$currencies->display_special_pricing($random_item['items_id'], $attendee_id);
				if (PRICES_LOGGED_IN == 'false') {
					$item_price_d = $items_price;
				}
				if ((PRICES_LOGGED_IN == 'true') && (!go_session_is_registered('attendee_id'))) {
					$item_price_d = ('<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_40'], '','SSL') . '">'  . PRICES_LOGGED_IN_TEXT . '</a>&nbsp;' );
				} else {
					$item_price_d = $items_price;
				}
			} else {
				$preistext = QUERYTEXT1 . $random_item['items_name'] . QUERYTEXT2 . $random_item['items_model'] . QUERYTEXT3 ;
				$preistext = urlencode($preistext);
				$items_price = PRICE_ON_DEMAND_TEXT2;
			} 
	    $frameContent = '<a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $random_item['items_id']) . '">' . go_picture(FOLDER_RELATIV_PICTURES . $random_item['items_picture'], $random_item['items_name'], SMALL_PICTURE_WIDTH, SMALL_PICTURE_HEIGHT) . '</a><br><a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_34'], 'items_id=' . $random_item['items_id']) . '">' . $random_item['items_name'] . '<br>' . $random_item['items_name2'] . '</a><br>' . $item_price_d . $currencies->shipping_tag( $random_item );  
	    if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	        require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	    }
	    else { 
	        require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	    } 
	    $frameLink = '';
	    $frameContent_characteristics = '';
	  }    
    
    break;
case 'info_pages':
    $language_code_query = go_db_query("select code from languages where languages_id = ".(int)$languages_id);
    $language_code = go_db_fetch_array($language_code_query);
    $info_pages_language = !empty($language_code['code']) ? $language_code['code'] : 'de'; 
    $page_query = go_db_query("select pages_id, pages_title, pages_html_text, sort_order, status from " . DB_TBL_PAGES . " where status = 1 and sort_order >0 and language_id=" . (int)$languages_id ." order by sort_order, pages_title");

    $frameGeneralsign = FRAME_ABOVE_PAGES;
    $corner_left = 'square';
    $corner_right = 'square';
    $frame_base_name = 'info_pages';
    $frame_id = $frame_base_name . 'Box'; 

    $rows = 0;
    $page_list = '';
    while ($page = go_db_fetch_array($page_query)) {
	    $rows++;
	    if($page['pages_title'] != 'Contact Us'){
		    $link = $GLOBALS['CONFIG_NAME_FILE']['main_bigware_30'];
	    }else{
		    $link = $GLOBALS['CONFIG_NAME_FILE']['main_bigware_8'];
	    }
	    if (substr(go_href_link($link),-3,3)=='php') {$separator="?";}
	    else {$separator="&";}
	    $page_list .= '<a href="' . go_href_link($link) . $separator. 'pages_id='.$page['pages_id']. '&language='.$info_pages_language. '">' . $page['pages_title'] . '</a><br>';
    }
    $page_list .= '';
    $frameContent = $page_list; 
    if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	    require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
    }
    else { 
	    require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
    }     

    break;
case 'quickie':
    
	  $frameGeneralsign = FRAME_ABOVE_ADD_ITEM_ID;
	  $corner_left = 'square';
	  $corner_right = 'square';
	  $frameContent_characteristics = ' align="center"';
	  $frame_base_name = 'add_a_quickie'; 
	  
	  $frame_id = $frame_base_name . 'Box'; 
	  
	  $frameContent = '<form name="quick_add" method="post" action="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('action')) . 'action=add_a_quickie', 'NONSSL') . '">';
	  $frameContent .= '<div align="center"><input type="text" name="quickie" size="10">&nbsp;' . go_picture_submit('button_add_quick.gif', FRAME_ABOVE_ADD_ITEM_ID) . '</div>' . FRAME_ADD_ITEM_ID_TEXT;
	  $frameContent .= '</form>'; 
	  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	  }
	  else { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	  }      
    
    break;
case 'languages_oben':
    
	  $frameGeneralsign = FRAME_ABOVE_LANGUAGES;
	  $corner_left = 'square';
	  $corner_right = 'square';
	  $frameContent_characteristics = ' align="center"';
	  $frame_base_name = 'languages'; 
	  $frame_id = $frame_base_name . 'Box'; 
	  if (!isset($lng) || (isset($lng) && !is_object($lng))) {
	    include(FOLDER_RELATIV_CLASSES . $GLOBALS[CONFIG_NAME_FILE_CLASSES][classes_bigware_10]);
	    $lng = new language;
	  }
	  $frameContent = '';
	  reset($lng->catalog_languages);
	  while (list($key, $value) = each($lng->catalog_languages)) {
	    $frameContent .= ' <a href="' . go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_29'], go_get_all_get_parameter(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . go_picture(FOLDER_RELATIV_TEMPLATES . 'lang_images/' .  $value['directory'] . '/picture/' . $value['picture'], $value['name']) . '</a> ';
	  } 
	  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
	  }
	  else { 
	      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
	  } 
	  $frameContent_characteristics = '';    
    
    break;
case 'downloads':
  $frameGeneralsign = FRAME_ABOVE_DOWNLOAD;
  $corner_left = 'square';
  $corner_right = 'square';
  $frame_base_name = 'downloads';
	$frame_id = $frame_base_name . 'Box'; 


	$my_file = '4';
  include(FOLDER_RELATIV_MODULES . 'mods_bigware_6.php');


		if ($frameContent != ''){
		  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
		      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
		  }
		  else { 
		      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
		  }
		}      
    break;
case 'searchselect':


  $frameGeneralsign = FRAME_ABOVE_SEARCHSELECT;
  $corner_left = 'square';
  $corner_right = 'square';
  $frameContent_characteristics = ' align="center"';
  $frame_base_name = 'searchselect'; // for easy unique box template setup (added BTSv1.2)

  
 $frame_id = $frame_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)

  $frameContent = go_fetch_form('quick_find', go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_3'], '', 'NONSSL', false), 'get');
  $frameContent .= go_fetch_hidden_field('selectsearch','1') . go_fetch_hidden_field('search_in_description','1'). go_hide_session_id(). '<table cellpadding="0" cellspacing="0" border=0><tr><td>';
	
//	$auswahlsearch_box_query = go_db_query("select * from " . DB_TBL_SEARCHSELECTBOX);
	$auswahlsearch_box_query = go_db_query("select * from " . DB_TBL_SEARCHSELECTBOX." s left join ".DB_TBL_LANGUAGES." l on s.language_id = l.languages_id where l.code='".$language."' order by s.position_id ");
	$j = 0;
	while ($auswahlsearch_box = go_db_fetch_array($auswahlsearch_box_query)) {
		$selectOptions = array();
		$selectOptions[] = array("id"=>'',"text"=>$auswahlsearch_box['selectboxtext'] . ':'  );
		foreach ( explode("\n", $auswahlsearch_box['optionText']) as $k=>$v){
			$selectOptions[] = array("id"=>$auswahlsearch_box['selectboxtext'], "text"=>$auswahlsearch_box['selectboxtext'].":".$v);
			//$searchtext_array[$j][] = array('id'=>$searchtext[$k][$j],'text'=>$searchselectbox_id[$k][name] . ':'.$searchtext[$k][$j]);	
		} 
		//$frameContent .= go_fetch_pull_down_menu('keywords['.$k.']',$searchtext_array[$k],'',' style="width:130px" class="searchselect"')."<br>";	       
		$frameContent .= go_fetch_pull_down_menu('keywords['.$j.']',$selectOptions,'',' style="width:130px" class="searchselect"')."<br>";	       

		$searchselectbox_id[] = array('id'=>$auswahlsearch_box['searchselectbox_id'],'name'=>$auswahlsearch_box['selectboxtext']);
	$j++;
	}
/*	
if ($j > 0){
	foreach($searchselectbox_id as $k => $v) {
	//    echo $searchselectbox_id[$k][id] . ' - ' . $searchselectbox_id[$k][name] . ' - ' . $k . '<br>';
	    
		      	$find_select_query = go_db_query("select count(*) as total from " . DB_TBL_SEARCHSELECT . " where selectbox = '" . $searchselectbox_id[$k][id] . "'");
		      	$select_num = go_db_fetch_array($find_select_query);
		      	if($select_num['total'] > 0){
				
				$searchtext_array[$k][] = array('id'=>'','text'=>$searchselectbox_id[$k][name] . ':');
				$j = 0;
			    	$auswahlsearch_box_query = go_db_query("select * from " . DB_TBL_SEARCHSELECT . " where selectbox = '" . $searchselectbox_id[$k][id] . "'");
			    	while ($auswahlsearch_box = go_db_fetch_array($auswahlsearch_box_query)) {
			    		
			  		$searchtext[$k][$j] = $auswahlsearch_box['searchtext'];
					$searchtext_array[$k][] = array('id'=>$searchtext[$k][$j],'text'=>$searchselectbox_id[$k][name] . ':'.$searchtext[$k][$j]);	
						    	
			    		$j++; 
			    	}
	
	
			//$frameContent .= go_fetch_pull_down_menu('keywords['.$k.']',$searchtext_array[$k],'',' style="width:130px" class="searchselect"')."<br>";	       
		       	}
	}
  
  $frameContent .= '</td><td>'.go_picture_submit('button_quick_find.gif', FRAME_ABOVE_SEARCH).'</form></td></tr></table>';	
	
}
else{
  $frameContent .= '</td><td>N/A</form></td></tr></table>';
}	
 */ 
  $frameContent .= '</td><td>'.go_picture_submit('button_quick_find.gif', FRAME_ABOVE_SEARCH).'</form></td></tr></table>';	

// bof BTSv1.2
  if((file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php'))&&($header==1)) {
  // if exists, load unique box template for this box from templates/boxes/
      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
  }
  else {
  // load default box template: templates/boxes/box.tpl.php
      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
  }
// eof BTSv1.2
  $frameContent_characteristics = '';
    
    break;
 
case 'searchproductcode': 
 




  $frameGeneralsign = FRAME_ABOVE_QUICK_SEARCH_MORE;

  $corner_left = 'square';

  $corner_right = 'square';

  $frameContent_characteristics = ' align="center"';

  $frame_base_name = 'search'; // for easy unique box template setup (added BTSv1.2)



  $frame_id = $frame_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)
	
	$frameContent = "";
	$frameContent .= go_fetch_form('quick_find', go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_3'], '', 'NONSSL', false), 'get');
	$frameContent .= go_fetch_hidden_field('search_in_description','1').BOX_SEARCH1.'<br />'.go_fetch_inputfeld('keywords', '', 'size="20" maxlength="30" ') . '&nbsp;' . go_hide_session_id() . go_picture_submit('button_quick_find.gif', FRAME_ABOVE_SEARCH);
	$frameContent .= '<br /><br />'.BOX_SEARCH2.'<br />'.go_fetch_inputfeld('productcode', '', 'size="20" maxlength="30" ') . '&nbsp;' . go_hide_session_id() . go_picture_submit('button_quick_find.gif', FRAME_ABOVE_SEARCH);
	$frameContent .= '</form>';


// bof BTSv1.2

  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) {

  // if exists, load unique box template for this box from templates/boxes/

      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');

  }

  else {

  // load default box template: templates/boxes/box.tpl.php

      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);

  }

// eof BTSv1.2

  $frameContent_characteristics = '';
 
     
    break;
 case 'shop_basket_last_basket': 
 
if (file_exists('modules/last_basket/modules_load_this_bigware_4.php')) {
  require('modules/last_basket/modules_load_this_bigware_4.php');
}
    break;
        
default:
						  $frameGeneralsign = $werte_set_it_up_name_titel;
						  $corner_left = 'square';
						  $corner_right = 'square';
						  $frameContent_characteristics = ' align="center"';
						  $frame_base_name = 'sonstige'; 
						  
						  $frame_id = $frame_base_name . 'Box'; 
						  
						  $frameContent = $werte_set_it_up_name_inhalt;
					 
						  if(file_exists(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php')) { 
						      require(FOLDER_RELATIV_FRAME_TEMPLATES . $frame_base_name . '.tpl.php');
						  }
						  else { 
						      require(FOLDER_RELATIV_FRAME_TEMPLATES . TEMPLATENAME_FRAME);
						  }  	    
    
}
?>
