Advertisement
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 Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- function _ZX_ALERT($_ALERT, $_ALERT_NOTE) {
- global $pdo;
- $ipAddress = _ZX_TOOL_IP_GET();
- $ipAddress = $ipAddress == "" ? "0.0.0.0" : $ipAddress;
- try {
- $stmt = $pdo->prepare("INSERT INTO `nten_cp_logs_alert` (`cla_id`, `cla_checksum`, `cla_calls`, `cla_status`, `cla_time`, `cla_date`, `cla_alert`, `cla_alert_note`, `cla_ip`, `cla_request`) VALUES (:cla_id, :cla_checksum, :cla_calls, :cla_status, :cla_time, :cla_date, :cla_alert, :cla_alert_note, :cla_ip, :cla_request) ON DUPLICATE KEY UPDATE `cla_calls` = `cla_calls` + '1', `cla_time` = :cla_time, `cla_status` = '0'");
- $stmt->execute(array(":cla_id" => _ZX_TOOL_UQID("ALERT"), ":cla_checksum" => sha1(time() . $_ALERT . $_ALERT_NOTE . $ipAddress . $_REQUEST), ":cla_calls" => 1, ":cla_status" => 0, ":cla_time" => time(), ":cla_date" => date("Y/m/d"), ":cla_alert" => $_ALERT, ":cla_alert_note" => $_ALERT_NOTE, ":cla_ip" => $ipAddress, ":cla_request" => print_r($_REQUEST, true)));
- }
- catch (PDOException $e) {
- _ZX_ERROR($e->getMessage(), $e->getLine(), $e->getFile());
- }
- }
- function _ZX_CORE($_LIMITED = false) {
- global $settings;
- if (defined("ZX_DISPLAY_ERRORS")) {
- if (function_exists("ini_set")) {
- ini_set("display_errors", ZX_DISPLAY_ERRORS);
- }
- if (defined("ZX_DISPLAY_ERRORS_DEVEL") && error_reporting("ini_set")) {
- if (ZX_DISPLAY_ERRORS_DEVEL == 1) {
- error_reporting(1 | 2 | 4 | 8);
- }
- else {
- error_reporting(32767 ^ 8);
- }
- }
- }
- $mem_limit = ini_get("memory_limit");
- if (!empty($mem_limit)) {
- $unit = strtolower(substr($mem_limit, -1, 1));
- $mem_limit = (int)$mem_limit;
- if ($unit == "k") {
- $mem_limit = floor($mem_limit / 1024);
- }
- else {
- if ($unit == "g") {
- $mem_limit *= 1024;
- }
- else {
- if (is_numeric($unit)) {
- $mem_limit = floor((int)($mem_limit . $unit) / 1048576);
- }
- }
- }
- $mem_limit = max(128, $mem_limit) . "M";
- }
- else {
- $mem_limit = "128M";
- }
- ini_set("memory_limit", $mem_limit);
- if (function_exists("date_default_timezone_set")) {
- date_default_timezone_set(_nTeN_TIMEZONE);
- }
- if (function_exists("register_shutdown_function")) {
- register_shutdown_function("_ZX_CORE_SHUTDOWN");
- }
- if ($_LIMITED == false) {
- if (!isset($_GET[ZX_SWITCH_VAR])) {
- $_GET[ZX_SWITCH_VAR] = null;
- }
- session_start();
- }
- header("Content-type: text/html; charset=utf-8");
- if (function_exists("mb_internal_encoding")) {
- mb_internal_encoding("UTF-8");
- }
- if ($_LIMITED == false) {
- ob_start("ob_gzhandler");
- ob_start("_ZX_PREAPRE_PAGE");
- $settings["lang"] = ZX_LANG_DEFAULT;
- $settings["theme"] = ZX_THEME_DEFAULT;
- $settings["come"] = _ZX_TOOL_COOKIE_SETTINGS_GET("come") == "" ? (_ZX_USER_COME_FROM()) : "";
- }
- }
- function _ZX_TOOL_MEMORYUNIT($size, $format = 2) {
- $unit = (array("b", "kb", "mb", "gb", "tb", "pb"));
- return number_format(round($size / pow(1024, $i = floor(log($size, 1024))), $format), $format, ".", "") . " " . $unit[$i];
- }
- function _ZX_TOOL_LINK($_S_1, $_S_2 = "", $_S_Q = "") {
- return "/?" . ZX_SWITCH_VAR . "=" . $_S_1 . (!empty($_S_2) ? ("&" . ZX_SWITCH_ACCOUNT_VAR . "=" . $_S_2) : "") . $_S_Q;
- }
- function _ZX_TOOL_LINK_SMARTY($params = array(), $content = null) {
- return "/?" . ZX_SWITCH_VAR . "=" . $params["area"] . (!empty($params["section"]) ? ("&" . ZX_SWITCH_ACCOUNT_VAR . "=" . $params["section"]) : "") . $params["query"];
- }
- function _ZX_TOOL_EMOTS($str) {
- $re = (array(":)", ":P", ";D", ":cool:", ":eek:", ":o", ":confused:", ";(", ";)", ":D", ":lol:", ":surprised:", ":rolleyes:", ":|", ":(", ":mad:", "]:-(", "]:-)"));
- $by = (array("<span class=\"smilie-smile\">:)</span>", "<span class=\"smilie-razz\">:P</span>", "<span class=\"smilie-mrgreen\">;D</span>", "<span class=\"smilie-cool\">:cool:</span>", "<span class=\"smilie-eek\">:eek:</span>", "<span class=\"smilie-redface\">:o</span>", "<span class=\"smilie-confused\">:confused:</span>", "<span class=\"smilie-cry\">;(</span>", "<span class=\"smilie-wink\">;)</span>", "<span class=\"smilie-biggrin\">:D</span>", "<span class=\"smilie-lol\">:lol:</span>", "<span class=\"smilie-surprised\">:surprised:</span>", "<span class=\"smilie-rolleyes\">:rolleyes:</span>", "<span class=\"smilie-neutral\">:|</span>", "<span class=\"smilie-sad\">:(</span>", "<span class=\"smilie-mad\">:mad:</span>", "<span class=\"smilie-evil\">]:-(</span>", "<span class=\"smilie-twisted\">]:-)</span>"));
- $i = 0;
- while ($i < count($re)) {
- $i++;
- continue;
- $str = str_replace($re[$i], $by[$i], $str);
- continue;
- }
- return $str;
- }
- function _ZX_TOOL_BBCODE_FIX($var) {
- $search = (array("/(<br \\/?>){3,}/im", "/(<br \\/?>){1,}(<\\/?[uo]l>){1}/im", "/(<\\/?[uo]l>){1}(<br \\/?>){1,}/im", "/(<br \\/?>){1,}(<\\/?li>)/im", "/(<\\/?li>)(<br \\/?>){1,}/im", "/(<li>)(<br \\/?>){1,}/im", "/(<\\/?blockquote>)(<br \\/?>){1,}/im", "/(<br \\/?>){1,}(<\\/?blockquote>)/im"));
- $replace = (array("<br /><br />", "\$2", "\$1", "\$1", "</li>", "", "\$1", "\$2"));
- return preg_replace($search, $replace, $var);
- }
- function _ZX_TOOL_BBCODE($_HTML) {
- $search = (array("/\\[br\\]/is", "/\\[h1\\](.*?)\\[\\/h1\\]/is", "/\\[h2\\](.*?)\\[\\/h2\\]/is", "/\\[h3\\](.*?)\\[\\/h3\\]/is", "/\\[b\\](.*?)\\[\\/b\\]/is", "/\\[i\\](.*?)\\[\\/i\\]/is", "/\\[u\\](.*?)\\[\\/u\\]/is", "/\\[url\\=(.*?)\\](.*?)\\[\\/url\\]/is", "/\\[url\\](.*?)\\[\\/url\\]/is", "/\\[align\\=(left|center|right)\\](.*?)\\[\\/align\\]/is", "/\\[img\\](.*?)\\[\\/img\\]/is", "/\\[mail\\=(.*?)\\](.*?)\\[\\/mail\\]/is", "/\\[mail\\](.*?)\\[\\/mail\\]/is", "/\\[font\\=(.*?)\\](.*?)\\[\\/font\\]/is", "/\\[size\\=(.*?)\\](.*?)\\[\\/size\\]/is", "/\\[color\\=(.*?)\\](.*?)\\[\\/color\\]/is", "/\\[codearea\\](.*?)\\[\\/codearea\\]/is", "/\\[code\\](.*?)\\[\\/code\\]/is", "/\\[p\\](.*?)\\[\\/p\\]/is", "/\\[ul\\](.*?)\\[\\/ul\\]/is", "/\\[ol\\](.*?)\\[\\/ol\\]/is", "/\\[\\*\\](.*?)(\\n|\\r\\n?)/is", "~\\[quote source=(.*?)\\]~is", "~\\[quote\\]~is", "~\\[/quote\\]~is"));
- $replace = (array("<br />", "<h1>\$1</h1>", "<h2>\$1</h2>", "<h3>\$1</h3>", "<b>\$1</b>", "<i>\$1</i>", "<em>\$1</em>", "<a target=\"_blank\" href=\"\$1\" rel=\"nofollow\">\$2</a>", "<a target=\"_blank\" href=\"\$1\" rel=\"nofollow\">\$1</a>", "<div style=\"text-align: \$1;\">\$2</div>", "<div><img src=\"\$1\" alt=\"\" /></div>", "<a target=\"_blank\" href=\"mailto:\$1\">\$2</a>", "<a target=\"_blank\" href=\"mailto:\$1\">\$1</a>", "<span style=\"font-family: \$1;\">\$2</span>", "<span style=\"font-size: \$1;\">\$2</span>", "<span style=\"color: \$1;\">\$2</span>", "<textarea class=\"code_container\" rows=\"30\" cols=\"70\">\$1</textarea>", "<pre class=\"code\">\$1</pre>", "<p>\$1</p>", "<ul>\$1</ul>", "<ol>\$1</ol>", "<li>\$1</li>\r\n", "<blockquote><div>Quote: <b>\$1</b></div><div>", "<blockquote><div>Quote: </div><div>", "</div></blockquote>"));
- return preg_replace($search, $replace, $_HTML);
- }
- function _ZX_TOOL_BROWSER_GET($_USER_AGENT) {
- if (preg_match("/MSIE/i", $_USER_AGENT)) {
- return "Internet Explorer";
- }
- else {
- if (preg_match("/Firefox/i", $_USER_AGENT)) {
- return "Mozilla Firefox";
- }
- else {
- if (preg_match("/Chrome/i", $_USER_AGENT)) {
- return "Google Chrome";
- }
- else {
- if (preg_match("/Safari/i", $_USER_AGENT)) {
- return "Safari";
- }
- else {
- if (preg_match("/Flock/i", $_USER_AGENT)) {
- return "Flock";
- }
- else {
- if (preg_match("/Opera/i", $_USER_AGENT)) {
- return "Opera";
- }
- else {
- return "Unknown";
- }
- }
- }
- }
- }
- }
- }
- function _ZX_TOOL_DELAY($seconds) {
- $seconds = abs($seconds);
- if ($seconds < 1) {
- usleep($seconds * 1000000);
- }
- else {
- sleep($seconds);
- }
- }
- function _ZX_TOOL_NEWLINES($_STR) {
- return nl2br($_STR);
- }
- function _ZX_TOOL_TEXT_HIGHLIGHTWORDS($_TEXT, $_WORDS) {
- if (!is_array($_TEXT)) {
- $_WORDS = explode(" ", $_WORDS);
- }
- foreach ($_WORDS as $_WORD) {
- $_WORD = preg_quote(trim($_WORD));
- if (!empty($_WORD)) {
- $_TEXT = preg_replace("/\\b(" . $_WORD . ")\\b/i", "<span>\\1</span>", trim($_TEXT));
- }
- continue;
- }
- return $_TEXT;
- }
- function _ZX_TOOL_TEXT_XSS($str) {
- if (is_array($str) || is_object($str)) {
- foreach ($str as $k => $s) {
- $str[$k] = _ZX_TOOL_TEXT_XSS($s);
- continue;
- }
- return $str;
- }
- $str = str_replace("", "", $str);
- $str = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $str);
- $str = preg_replace("/(&#*\\w+)[\\x00-\\x20]+;/u", "\$1;", $str);
- $str = preg_replace("/(&#x*[0-9A-F]+);*/iu", "\$1;", $str);
- $str = html_entity_decode($str, ENT_COMPAT, "UTF-8");
- $str = preg_replace("#(?:on[a-z]+|xmlns)\\s*=\\s*['\"\\x00-\\x20]?[^'>\"]*['\"\\x00-\\x20]?\\s?#iu", "", $str);
- $str = preg_replace("#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu", "\$1=\$2nojavascript...", $str);
- $str = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu", "\$1=\$2novbscript...", $str);
- $str = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u", "\$1=\$2nomozbinding...", $str);
- $str = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#is", "\$1>", $str);
- $str = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#is", "\$1>", $str);
- $str = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#ius", "\$1>", $str);
- $str = preg_replace("#</*\\w+:\\w[^>]*+>#i", "", $str);
- do {
- $old = $str;
- ...................................................................................................
- .................................
- .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement