Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- if ((!defined("_VALID_CALL")))
- {
- exit("Direct Access is not allowed.");
- }
- class xtLink {
- public $xtLink = null;
- public $params = null;
- public $GET_PARAMS = array();
- public $link_url = null;
- public $secure_link_url = null;
- public function xtLink() {
- global $xtPlugin;
- $this->amp = "&";
- $this->show_session_id = _RMV_SESSION;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:link_top")) ? ('' . $plugin_code) : false;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:link_top")) ? ('' . $plugin_code) : false;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:link_top")) ? ('' . $plugin_code) : false;
- if (isset($plugin_return_value))
- {
- return $plugin_return_value;
- }
- return;
- }
- public function showSessionID($val) {
- $this->show_session_id = $val;
- return;
- }
- public function setLinkURL($url = "") {
- $this->link_url = $url;
- return;
- }
- public function setSecureLinkURL($surl = "") {
- $this->secure_link_url = $surl;
- return;
- }
- public function unsetLinkURL() {
- unset($this->link_url);
- return;
- }
- public function unsetSecureLinkURL() {
- unset($this->secure_link_url);
- return;
- }
- /**
- * generate link
- *
- * @param mixed $data array with link data
- * @param mixed $remove_dir directory which should be removed from link (str_replace)
- * @param mixed $block_session set to true if no session ID should be added to the generated link
- * @return string
- */
- public function _link($data, $remove_dir = "", $block_session = false) {
- global $xtPlugin;
- global $page;
- global $remove_session;
- global $language;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:_link_top")) ? ('' . $plugin_code) : false;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:_link_top")) ? ('' . $plugin_code) : false;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:_link_top")) ? ('' . $plugin_code) : false;
- if (isset($plugin_return_value))
- {
- return $plugin_return_value;
- }
- if (empty($data["default_page"]))
- {
- $default_page = "index.php";
- }
- else
- {
- $default_page = $data["default_page"];
- }
- if ($this->link_url)
- {
- $system_http_link = _SYSTEM_BASE_HTTP;
- }
- else
- {
- $system_http_link = $this->link_url;
- }
- if ($this->secure_link_url)
- {
- $system_https_link = _SYSTEM_BASE_HTTPS;
- }
- else
- {
- $system_https_link = $this->secure_link_url;
- }
- if (!isset($data["conn"]))
- {
- $data["conn"] = "NOSSL";
- }
- if ($data["conn"] == "SSL" && _SYSTEM_SSL == true)
- {
- $link_data = $system_https_link . _SRV_WEB;
- }
- else
- {
- $link_data = $system_http_link . _SRV_WEB;
- }
- $seo_url = $this->_getSeoUrl($data);
- if ($seo_url != false && $data["seo_url"] == "")
- {
- $data["seo_url"] = $seo_url;
- }
- if (stripos($data["params"], "next_page") !== false)
- {
- parse_str($data["params"], $output);
- if ($output["next_page"] == 1)
- {
- $data["params"] = $this->clean_url_qs($data["params"], "next_page");
- if (stripos($data["params"], "cat=") !== false && $data["seo_url"] != "")
- {
- $data["params"] = $this->clean_url_qs($data["params"], "cat");
- }
- }
- }
- if ($remove_dir != "")
- {
- $link_data = str_replace($remove_dir, "", $link_data);
- }
- if (_SYSTEM_MOD_REWRITE == "true" && $data["seo_url"] != "")
- {
- $link_data .= $data["seo_url"];
- if (_SYSTEM_SEO_FILE_TYPE != "")
- {
- $link_data = $link_data . "." . _SYSTEM_SEO_FILE_TYPE;
- }
- if (_RMV_SESSION == "false" && $block_session == false)
- {
- if (!isset($_COOKIE[session_name()]))
- {
- $link_data .= "?" . session_name() . "=" . session_id();
- }
- }
- if (!empty($data["params"]))
- {
- if (!preg_match("/\\?/", $link_data))
- {
- $data["params"] = "?" . $data["params"];
- }
- else
- {
- $data["params"] = $this->amp . $data["params"];
- }
- }
- $link_data .= $data["params"];
- return $link_data;
- }
- if (_SYSTEM_MOD_REWRITE == "true" && _SYSTEM_MOD_REWRITE_DEFAULT == "true" && $data["page"] != "callback")
- {
- if (empty($data["dl_media"]) && empty($data["default_page"]) && _SYSTEM_SEO_URL_LANG_BASED == "true")
- {
- if (trim($data["lang_code"]) != "")
- {
- $link_data .= $data["lang_code"] . "/";
- }
- else
- {
- $link_data .= $language->code . "/";
- }
- }
- if ($data["page"] == "dynamic")
- {
- $link_data .= $page->page_name;
- }
- else
- {
- if (empty($data["page"]) && !empty($default_page))
- {
- $link_data .= $default_page;
- }
- else
- {
- $link_data .= $data["page"];
- }
- }
- if ($data["page"] == "dynamic")
- {
- if (!empty($page["page_action"]))
- {
- $link_data .= "/" . $page->page_action;
- }
- }
- else
- {
- if (!empty($data["paction"]))
- {
- $link_data .= "/" . $data["paction"];
- }
- }
- if (empty($data["default_page"]) && _SYSTEM_SEO_FILE_TYPE != "")
- {
- $link_data .= "." . _SYSTEM_SEO_FILE_TYPE;
- }
- $link_data .= "?";
- }
- else
- {
- if (!empty($data["pos"]))
- {
- $link_data .= $data["pos"];
- }
- if ($data["page"] == "dynamic")
- {
- $link_data .= $default_page . "?page=" . $page->page_name;
- }
- else
- {
- $link_data .= $default_page . "?page=" . $data["page"];
- }
- if ($data["page"] == "dynamic")
- {
- if (!empty($page["page_action"]))
- {
- $link_data .= $this->amp . "page_action=" . $page->page_action;
- }
- }
- else
- {
- if (!empty($data["paction"]))
- {
- $link_data .= $this->amp . "page_action=" . $data["paction"];
- }
- }
- }
- $exclude_array = array();
- $data_exclude = array();
- if (!empty($data["params"]))
- {
- $data["params"] = str_replace($this->amp, "&", $data["params"]);
- $data["params"] = str_replace("&", $this->amp, $data["params"]);
- $data["params"] = $this->amp . $data["params"];
- }
- $link_data .= $data["params"];
- if (!empty($data["name"]) && !empty($data["type"]) && !empty($data["id"]))
- {
- $link_data .= $this->amp . $this->_linkTypes($data["type"], $data["id"], $data["name"]);
- }
- if ($this->show_session_id == "false" && $block_session == false)
- {
- if (!isset($_COOKIE[session_name()]))
- {
- $link_data .= $this->amp . session_name() . "=" . session_id();
- }
- }
- if ($data["conn"] == "SSL" && _SYSTEM_SSL == true)
- {
- if (!strpos($link_data, session_name()))
- {
- preg_match("@^(?:https://)?([^/]+)@i", _SYSTEM_BASE_HTTPS, $treffer);
- $https = $treffer[1];
- preg_match("@^(?:http://)?([^/]+)@i", _SYSTEM_BASE_HTTP, $treffer);
- $http = $treffer[1];
- if ($https != $http)
- {
- $link_data .= $this->amp . session_name() . "=" . session_id();
- }
- }
- }
- if ($data["page"] == "dynamic" && $language->code == _STORE_LANGUAGE && $page->page_name == "index" && _SYSTEM_MOD_REWRITE == "true")
- {
- $link_data = str_replace(_STORE_LANGUAGE . "/index", "", $link_data);
- }
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:_link_bottom")) ? ('' . $plugin_code) : false;
- ($plugin_code = $xtPlugin->PluginCode("class.link.php:_link_bottom")) ? ('' . $plugin_code) : false;
- .............................................................................
- .......................................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment