function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls; if (!is_object($seo_urls)) { if (!class_exists('SEO_URL')) { include_once DIR_WS_CLASSES . 'seo.class.php'; } global $languages_id; $seo_urls = new SEO_URL($languages_id); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); }
function __construct($languages_id = '') { global $session_started; if ($languages_id == '') { $languages_id = $_SESSION['languages_id']; } $this->languages_id = (int) $languages_id; $this->data = array(); $this->base_url = HTTP_SERVER; $this->base_url_ssl = HTTPS_SERVER; $this->cache = array(); $this->reg_anchors = array('products_id' => '-p-', 'cPath' => '-c-', 'manufacturers_id' => '-m-', 'pID' => '-pi-', 'products_id_review' => '-pr-', 'products_id_review_info' => '-pri-', 'id' => '-ezp-'); if (null === self::$unicodeEnabled) { self::$unicodeEnabled = @preg_match('/\\pL/u', 'a') ? true : false; } $this->filter_pcre = defined('SEO_URLS_FILTER_PCRE') ? $this->expand(SEO_URLS_FILTER_PCRE, true) : 'false'; $this->filter_char = defined('SEO_URLS_FILTER_CHARS') ? $this->expand(SEO_URLS_FILTER_PCRE) : 'false'; if (defined('SEO_USE_CACHE_GLOBAL') && SEO_USE_CACHE_GLOBAL == 'true') { $this->cache_file = 'seo_urls_v2_'; $this->cache_gc(); // Cleanup Cache // Generate enabled caches if (SEO_USE_CACHE_PRODUCTS == 'true') { $this->generate_products_cache(); } if (SEO_USE_CACHE_CATEGORIES == 'true') { $this->generate_categories_cache(); } if (SEO_USE_CACHE_MANUFACTURERS == 'true') { $this->generate_manufacturers_cache(); } if (SEO_USE_CACHE_EZ_PAGES == 'true') { $this->generate_ezpages_cache(); } } $this->check_canonical(); if (defined('SEO_USE_REDIRECT') && SEO_USE_REDIRECT == 'true') { $this->check_redirect(); } }