<td width="60" align="center" valign="top"> <img' . str_replace("#", "arrow", $image_data) . ' /> </td> <td valign="top" width="41%"> ' . olc_draw_pull_down_menu("optionValueDropDown", $optionValueDrop, $selectedOptionValue) . ' <br/><br/> <input' . str_replace("#", "add_new", $image_data) . ' onclick="javascript:return amAddOptionValue();" title="Fügt der Liste einen neuen Optionswert hinzu" /> <b>Neuen Optionswert definieren</b> <!--<input' . str_replace("#", "delete", $image_data) . ' onclick="javascript:return deleteOptionValue();" title="Löscht den Options-Wert aus der Datenbank" />--> </td> <td width="15%" valign="top"> Preis: ' . drawDropDownPrefix($prefix_0_id) . olc_draw_input_field("newPrice", "", $newPrice_id) . ' </td> <td width="41%" valign="top"> <input' . str_replace("#", "add_up", $image_data) . ' value="Add" onclick="javascript:return amAddAttributeToProduct();" title="Das Attribut dem aktuellen Produkt hinzufügen" border="0" /> <b>Das Attribut dem aktuellen Produkt hinzufügen</b> </td> </tr> </table> </div> <br/> </div> '; require_once DIR_FS_INC . 'olc_ajax_prepare_special_html_chars.inc.php'; $html_text = "#am#" . $html_text; //Signal attributemanager message echo olc_ajax_prepare_special_html_chars($html_text);
/** * executes & returns or displays the template results * * @param string $resource_name * @param string $cache_id * @param string $compile_id * @param boolean $display */ function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false) { $is_top_form = !(strpos($resource_name, INDEX_HTML) === false); $is_ajax_processing_forced = defined('IS_AJAX_PROCESSING_FORCED'); if ($is_top_form) { if (!defined('RM')) { $this->load_filter('output', 'note'); } if (!IS_ADMIN_FUNCTION) { $this->assign('USE_LAYOUT_DEFINITION', USE_LAYOUT_DEFINITION); //Save last context if (strpos(FILENAME_LOGIN . FILENAME_LOGOFF . FILENAME_LOGOUT . FILENAME_AJAX_VALIDATION, CURRENT_SCRIPT) === false) { $navigation = 'navigation'; if (is_object($_SESSION[$navigation])) { $_SESSION[$navigation]->set_snapshot(); } } } //W. Kaiser - AJAX } else { /* if ($tpl_var==MAIN_CONTENT) { $tpl_var=$tpl_var; } */ if (strpos($resource_name, CURRENT_TEMPLATE_BOXES) !== false) { if (USE_LAYOUT_DEFINITION == TRUE_STRING_S) { global $box_relations; $s = basename($resource_name, HTML_EXT); $s = BOX . strtoupper(substr($s, strlen(BOX))); $s = $box_relations[$s]; if ($s) { $s1 = substr($s, strlen(BOX), 1); switch ($s1) { case BOX_NAV_AREA_MIDDLE: $s1 = BOX_NAV_CLASS_MIDDLE; break; case BOX_NAV_AREA_RIGHT: $s1 = BOX_NAV_CLASS_RIGHT; break; default: $s1 = BOX_NAV_CLASS_LEFT; break; } $this->_tpl_vars[BOX_NAV_CLASS] = $s1; } } else { $this->_tpl_vars[BOX_NAV_CLASS] = BOX_NAV_CLASS_LEFT; } } //Unified templates //Check if resource is available in the individual templates' directory //If not, use resource from common template directory $template_path = ADMIN_PATH_PREFIX . TEMPLATE_PATH; $s = 'CHECK_UNIFIED_TEMPLATES'; if (!defined($s)) { define('COMMON_TEMPLATE', 'olc' . SLASH); define('TEMPLATE_PATH', $this->template_dir . SLASH); define('FULL_COMMON_TEMPLATE', TEMPLATE_PATH . COMMON_TEMPLATE); define($s, USE_UNIFIED_TEMPLATES != false && is_dir($template_path . COMMON_TEMPLATE . 'boxes')); } if (CHECK_UNIFIED_TEMPLATES) { $resource_name_short = basename($resource_name); $have_individual_resource = $_SESSION[$resource_name_short]; if (!isset($have_individual_resource)) { $have_individual_resource = is_file($template_path . $resource_name); $_SESSION[$resource_name_short] = $have_individual_resource; } if (!$have_individual_resource) { $resource_name = str_replace(CURRENT_TEMPLATE . SLASH, COMMON_TEMPLATE, $resource_name); } } //Unified templates } if (IS_AJAX_PROCESSING || $is_ajax_processing_forced) { global $use_ajax_short_list; if ($is_top_form) { $force_build_all = defined('AJAX_REBUILD_ALL'); $index = "x"; //Set dummy element. M u s t be retained!!!! $html_text = EMPTY_STRING; // //For outputting debug-info, this has to be stored in "$_SESSION[DEBUG_OUPUT]" // if ($force_build_all) { $screen_areas = array(); while (list($key, $value) = each($this->_tpl_vars)) { $include_area = strpos($key, BOX) !== false; if (!$include_area) { $include_area = !(strpos(AJAX_DATA_ELEMENTS_TO_CHANGE, $key) === false); } if ($include_area) { $screen_areas[] = $key; } } } elseif ($use_ajax_short_list && !defined('FORCE_PRODUCT_INFO_DISPLAY')) { $screen_areas = explode(BLANK, AJAX_SHORT_LIST); } else { $not_slide_show_only = AJAX_DATA_ELEMENTS_TO_CHANGE != EMPTY_STRING; if ($not_slide_show_only) { $screen_areas = explode(BLANK, AJAX_DATA_ELEMENTS_TO_CHANGE); } else { $screen_areas = array(); } global $slideshow_id; $n = sizeof($slideshow_id); if ($n > 0) { $box = BOX . 'SLIDESHOW_'; for ($i = 0; $i < $n; $i++) { if ($slideshow_id[$i]) { $screen_areas[] = $box . $i; } } } } $elements = count($screen_areas); $s = $_SESSION[DEBUG_OUPUT]; $check_debug_output = isset($s) && $s != EMPTY_STRING; $newline = NEW_LINE . HTML_BR; for ($i = 0; $i < $elements; $i++) { $screen_area = $screen_areas[$i]; if ($screen_area) { $text = trim($this->_tpl_vars[$screen_area]); if ($screen_area == MAIN_CONTENT) { if ($check_debug_output) { //Output debugging output in "main_content" $all = '<span class="main">' . $_SESSION[DEBUG_OUPUT] . '</span>'; $text = HTML_HR . HTML_B_START . "Debug-Output" . HTML_B_END . HTML_HR . $all . HTML_HR . $newline . $text; unset($_SESSION[DEBUG_OUPUT]); } if (NOT_IS_ADMIN_FUNCTION) { global $messageStack; if (is_object($messageStack)) { $all = "*"; $m = $messageStack->size($all); if ($m > 0) { //Add messagestackinfo $text = $messageStack->output($all) . HTML_HR . $newline . $text; } } } } if (strlen($text) > 0) { if (AJAX_BUILD_INDEX) { if (strpos($index, $screen_area) === false) { $index .= BLANK . $screen_area; } else { continue; } } $screen_area = HASH . $screen_area . HASH; $html_text .= $screen_area . $text . $screen_area . $newline; } } } if (strlen($html_text)) { if ($not_slide_show_only) { $add_on_areas = array(); $ajax_title = 'AJAX_TITLE'; $add_on_areas[] = array('name' => 'AJAX_TITLE', 'ajax_name' => 'title', 'index' => false); $add_on_areas[] = array('name' => 'PARSE_TIME', 'ajax_name' => EMPTY_STRING, 'index' => true); $add_on_areas[] = array('name' => 'BANNER', 'ajax_name' => EMPTY_STRING, 'index' => true); $info_message = 'INFO_MESSAGE'; $add_on_areas[] = array('name' => $info_message, 'ajax_name' => INFO_MESSAGE, 'index' => false); $smarty_force_display = 'SMARTY_FORCE_DISPLAY'; $add_on_areas[] = array('name' => $smarty_force_display, 'ajax_name' => EMPTY_STRING, 'index' => true); if (CURRENT_SCRIPT != 'ajax_validation.php') { include_once DIR_FS_INC . 'olc_get_parse_time.inc.php'; } for ($i = 0, $n = sizeof($add_on_areas) - 1; $i <= $n; $i++) { $add_on_area = $add_on_areas[$i]; $constant = $add_on_area['name']; if (defined($constant)) { $text = constant($constant); if (strlen($text) > 0) { switch ($constant) { case $ajax_title: $text = str_replace(HTML_BR, BLANK, $text); break; case $info_message: $text = $_SESSION[INFO_MESSAGE]; unset($_SESSION[INFO_MESSAGE]); break; case $smarty_force_display: $constant = $text; $text = $this->_tpl_vars[$text]; break; } $area_name = $add_on_area['ajax_name']; if (!$area_name) { $area_name = $constant; } $area_name = HASH . $area_name . HASH; if ($add_on_area['index']) { $index .= BLANK . $constant; } $html_text = $area_name . $text . $area_name . $newline . $html_text; } } } $const_ajax_script_name0 = "AJAX_SCRIPT_"; $i = 0; while (true) { $i++; $const_ajax_script_name = $const_ajax_script_name0 . $i; if (defined($const_ajax_script_name)) { $ajax_script = constant($const_ajax_script_name); if (strlen($ajax_script) > 0) { $screen_area = HASH . strtolower($const_ajax_script_name) . HASH; $html_text = $screen_area . $ajax_script . $screen_area . $newline . $html_text; } } else { break; } } if (defined('STICKY_CART_VISIBLE')) { $sticky_cart = "sticky_cart"; $sticky_cart_delimiter = HASH . $sticky_cart . HASH; $html_text = $sticky_cart_delimiter . STICKY_CART_VISIBLE . $sticky_cart_delimiter . $newline . $html_text; } $validator_required = ""; switch (CURRENT_SCRIPT) { case FILENAME_CREATE_ACCOUNT: //Signal validation of Vorname and Plz required $validator_required = "vorname_plz"; break; case FILENAME_CHECKOUT_PAYMENT: if ($_SESSION['credit_covers'] != true) { //Signal validation of BLZ and account-number required $validator_required = "blz_konto"; } break; case FILENAME_PRODUCT_INFO: $products_id = $_GET['cart_line']; if (strlen($products_id)) { $products_id .= "|" . $_GET['products_id']; $validator_delimiter = HASH . "product_options" . HASH; $html_text = $validator_delimiter . $products_id . $validator_delimiter . $newline . $html_text; } break; } if ($validator_required != "") { $validator_delimiter = HASH . "validation_" . $validator_required . HASH; $html_text = $validator_delimiter . $validator_required . $validator_delimiter . $newline . $html_text; } } require_once DIR_FS_INC . 'olc_ajax_prepare_special_html_chars.inc.php'; $html_text = olc_ajax_prepare_special_html_chars($html_text); if (AJAX_BUILD_INDEX) { $index_delimiter = HASH . "index" . HASH; $html_text = $index_delimiter . $index . $index_delimiter . $newline . $html_text; } header('Content-Type: text/html; charset=Windows-1252'); echo $html_text; } return; } elseif (!$is_ajax_processing_forced) { //Check if element needs to be rendered at all //Get resource name and strip extension $resource = basename($resource_name); $resource = substr($resource, 0, strrpos($resource, DOT)); $not_force_build_all = !$force_build_all; if (USE_LAYOUT_DEFINITION == TRUE_STRING_S) { $pos = strpos($resource, BOX); if ($pos !== false) { global $box_relations; $s = BOX . strtoupper(substr($resource, $pos + strlen(BOX))); $s = $box_relations[$s]; if ($s) { $resource = $s; } } } if ($use_ajax_short_list) { $ignore_resource = strpos(AJAX_VALID_RESOURCES_SHORT_LIST, $resource) === false; } elseif ($not_force_build_all) { //Resource to render for "box"? if (strpos($resource_name, CURRENT_TEMPLATE_BOXES) !== false) { $ignore_resource = strpos(AJAX_VALID_RESOURCES, $resource) === false; } } else { $ignore_resource = false; } if ($ignore_resource) { //If resource does not need to be rendered --> just exit. return; } } } elseif (USE_AJAX) { //Display Copyright if ($is_top_form) { $s = 'BOTTOM_DIVS'; if (defined($s)) { $this->assign($s, constant($s)); } $s = 'TOP_DIVS'; if (defined($s)) { //Include code for the sticky-cart and IE menu navigation. $this->assign($s, constant($s)); } } } //W. Kaiser - AJAX if ($is_top_form) { include_once DIR_FS_INC . 'olc_get_parse_time.inc.php'; } //Use original Smarty code!! return parent::fetch($resource_name, $cache_id, $compile_id, $display); }