Error!

Unable to determine the page link!


'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER; } elseif ($connection == 'SSL') { if (ENABLE_SSL == 'true') { $link = HTTPS_SERVER ; } else { $link = HTTP_SERVER; } } else { die('

Error!

Unable to determine connection method on a link!

Known methods: NONSSL SSL


'); } if ($use_dir_ws_catalog) $link .= DIR_WS_CATALOG; if (!$static) { if (zen_not_null($parameters)) { $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters); if (USER_FRIENDLY_URLS_REWRITE == 'true') { if (ereg('product_info&cPath', $link)) { $link = ereg_replace('&cPath=([0-9_]{1,})', '', $link); } if (ereg('product_info&products_id', $link)) { $link = str_replace('index.php?main_page=product_info&products_id=', 'products/', $link); $link = ereg_replace('&cPath=([0-9_]{1,})', '', $link); $link = str_replace('&action=notify','notify', $link); $link = str_replace('&action=add_product','add', $link); $link = $link . ".html"; $link = str_replace('&','', $link); } if (ereg('main_page=index&cPath', $link)) { $link = str_replace('index.php?main_page=index&cPath=', 'categories/', $link); $link = str_replace('&sort=', '/sort', $link); $link = str_replace('&page=', '/page', $link); $link = str_replace('&filter_id=', '/filter', $link); $link = $link . ".html"; } if (ereg('disp_order=', $link)) { $link = str_replace('/index.php?main_page=','/', $link); $link = str_replace('&disp_order=','/display', $link); $link = str_replace('&page=','_', $link); $link = $link . ".html"; } if (ereg('buy_now', $link)) { $link = ereg_replace('/([a-z0-9_/]{1,})&action=buy_now&products_id=','/order/', $link); } if (ereg('product_reviews&products_id', $link)) { $link = str_replace('/index.php?main_page=','/', $link); $link = str_replace('&products_id=','/products', $link); $link = $link . ".html"; $link = str_replace('&','', $link); } if (ereg('tell_a_friend&products_id=', $link)) { $link = str_replace('/index.php?main_page=','/', $link); $link = str_replace('&products_id=','/products', $link); $link = $link . ".html"; } if (ereg('manufacturers_id=', $link)) { $link = str_replace('/index.php?main_page=','/', $link); $link = str_replace('index&','', $link); $link = str_replace('redirect&action=manufacturer&','redirect/', $link); $link = str_replace('=','', $link); $link = $link . ".html"; } if (ereg('main_page=redirect&action', $link)) { $link = str_replace('/index.php?main_page=','/', $link); $link = str_replace('&action=url&goto=','_url-', $link); $link = str_replace('%2F','/', $link); } } } else { if (USER_FRIENDLY_URLS_REWRITE == 'true') { if ( ($page == 'login') or ($page == 'advanced_search') or ($page == 'specials') or ($page == 'featured_products') or ($page == 'products_new') or ($page == 'products_all') or ($page == 'index') or ($page == 'shippinginfo') or ($page == 'privacy') or ($page == 'conditions') or ($page == 'contact_us') or ($page == 'gv_faq') or ($page == 'site_map') or ($page == 'logoff') or ($page == 'account') or ($page == 'shopping_cart') or ($page == 'popup_shipping_estimator') or ($page == 'checkout_shipping') ){ $link .= $page . ".html"; } else { $link .= 'index.php?main_page=' . $page; } } else { $link .= 'index.php?main_page=' . $page; } } } else { if (zen_not_null($parameters)) { $link .= $page . "&" . zen_output_string($parameters); } else { $link .= $page; } } $separator = '&'; while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (defined('SID') && zen_not_null(SID)) { $sid = SID; // } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL_ADMIN == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if ($http_domain != $https_domain) { $sid = zen_session_name() . '=' . zen_session_id(); } } } // clean up the link before processing while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('&', '/', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($sid)) { $user_agent = $_SERVER['HTTP_USER_AGENT']; if ((eregi("msie", $user_agent)) or (eregi("gecko", $user_agent)) or (eregi("opera", $user_agent)) or (eregi("icab", $user_agent)) or (eregi("webtv", $user_agent)) or (eregi("konqueror", $user_agent)) or (eregi("netscape", $user_agent)) or (eregi("w3m", $user_agent)) or (eregi("emacs", $user_agent)) or (eregi("libwww", $user_agent)) ){ $link .= $separator . $sid; } } // clean up the link after processing while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = ereg_replace('&', '&', $link); return $link; } //// // The HTML image wrapper function function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '') { global $template_dir; //auto replace with defined missing image if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') { $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE; } if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // if not in current template switch to template_default if (!file_exists($src)) { $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src); } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '' . zen_output_string($alt) . 'get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . $image) . '" alt="' . zen_output_string($alt) . '"'; if (zen_not_null($alt)) $image_submit .= ' title=" ' . zen_output_string($alt) . ' "'; if (zen_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= ' />'; return $image_submit; } //// // Output a function button in the selected language function zen_image_button($image, $alt = '', $parameters = '') { global $template, $current_page_base; return zen_image($template->get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . $image, $alt, '', '', $parameters); } //// // Output a separator either through whitespace, or with an image function zen_draw_separator($image = 'true', $width = '100%', $height = '1') { // set default to use from template - zen_image will translate if not found in current template if ($image == 'true') { $image = DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_BLACK_SEPARATOR; } else { if (!strstr($image, DIR_WS_TEMPLATE_IMAGES)) { $image = DIR_WS_TEMPLATE_IMAGES . $image; } } return zen_image($image, '', $width, $height); } //// // Output a form function zen_draw_form($name, $action, $method = 'post', $parameters = '') { $form = '