urlPath = $urlPath; $this->urlSrch = $urlSrch; } else // Root position SEF Url. { $this->urlPath = ""; $this->urlSrch = $urlPath; } $this->include = $this->getInclude(); //TODO Clean and Check returned URL. list($self,$query) = explode("?",$this->include); $this->incFile = $tp->replaceConstants($self); if(!$query && $_SERVER['QUERY_STRING']) { $e_QUERY = str_replace(array('{', '}', '%7B', '%7b', '%7D', '%7d'), '', rawurldecode($_SERVER['QUERY_STRING'])); $e_QUERY = str_replace('&', '&', $tp->post_toForm($e_QUERY)); $query = $e_QUERY; } define("e_SELF", e_REQUEST_SELF); define("e_QUERY", $query); } function getInclude() { // Check SiteLinks First $lnk = e107::getSitelinks(); $links = $lnk->getlinks(0); if(isset($lnk->sefList[$this->urlSrch])) { return $lnk->sefList[$this->urlSrch]; } // Check Plugins (including News and Pages) $urlConfig = e107::getAddonConfig('e_url'); foreach($urlConfig as $class_name=>$val) { foreach($val as $p=>$t) { if((vartrue($t['path']) == $this->urlPath) && vartrue($t['function'])) { if($ret = e107::callMethod($class_name."_url", $t['function'], $this->urlSrch)) { return $ret; } } } } } function debug() { echo "
REQUEST=".$_SERVER['REQUEST_URI']; echo "
URI Path= ".$this->urlPath; echo "
URI Found= ".$this->urlSrch; echo "
Calculated e_SELF= ".$this->include; echo "
Renewed e_SELF= ".e_SELF; echo "
e_QUERY= ".e_QUERY; echo "
Including: ".$this->incFile; // echo "
e_REQUEST_URL= ".e_REQUEST_URL; // echo "
e_REQUEST_SELF= " . e_REQUEST_SELF; // full URL without the QUERY string // echo "
e_REQUEST_URI= " .e_REQUEST_URI; // absolute http path + query string // echo "
e_REQUEST_HTTP= ". e_REQUEST_HTTP; // SELF URL without the QUERY string and leading domain part // echo "
e_HTTP= ".e_HTTP; // echo "
e_SELF= ".e_SELF; } function create() { } } $url = new eUrl; $url->debug(); if($url->incFile) { require_once($url->incFile); } require_once(FOOTERF); // in case of URL failure. ?>