Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.15 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 2.0.0.4
  8. * @ Author : DeZender
  9. * @ Release on : 21.10.2015
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function _ZX_ALERT($_ALERT, $_ALERT_NOTE) {
  15. global $pdo;
  16. $ipAddress = _ZX_TOOL_IP_GET();
  17. $ipAddress = $ipAddress == "" ? "0.0.0.0" : $ipAddress;
  18. try {
  19. $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'");
  20. $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)));
  21. }
  22. catch (PDOException $e) {
  23. _ZX_ERROR($e->getMessage(), $e->getLine(), $e->getFile());
  24. }
  25. }
  26.  
  27. function _ZX_CORE($_LIMITED = false) {
  28. global $settings;
  29. if (defined("ZX_DISPLAY_ERRORS")) {
  30. if (function_exists("ini_set")) {
  31. ini_set("display_errors", ZX_DISPLAY_ERRORS);
  32. }
  33. if (defined("ZX_DISPLAY_ERRORS_DEVEL") && error_reporting("ini_set")) {
  34. if (ZX_DISPLAY_ERRORS_DEVEL == 1) {
  35. error_reporting(1 | 2 | 4 | 8);
  36. }
  37. else {
  38. error_reporting(32767 ^ 8);
  39. }
  40. }
  41. }
  42. $mem_limit = ini_get("memory_limit");
  43. if (!empty($mem_limit)) {
  44. $unit = strtolower(substr($mem_limit, -1, 1));
  45. $mem_limit = (int)$mem_limit;
  46. if ($unit == "k") {
  47. $mem_limit = floor($mem_limit / 1024);
  48. }
  49. else {
  50. if ($unit == "g") {
  51. $mem_limit *= 1024;
  52. }
  53. else {
  54. if (is_numeric($unit)) {
  55. $mem_limit = floor((int)($mem_limit . $unit) / 1048576);
  56. }
  57. }
  58. }
  59. $mem_limit = max(128, $mem_limit) . "M";
  60. }
  61. else {
  62. $mem_limit = "128M";
  63. }
  64. ini_set("memory_limit", $mem_limit);
  65. if (function_exists("date_default_timezone_set")) {
  66. date_default_timezone_set(_nTeN_TIMEZONE);
  67. }
  68. if (function_exists("register_shutdown_function")) {
  69. register_shutdown_function("_ZX_CORE_SHUTDOWN");
  70. }
  71. if ($_LIMITED == false) {
  72. if (!isset($_GET[ZX_SWITCH_VAR])) {
  73. $_GET[ZX_SWITCH_VAR] = null;
  74. }
  75. session_start();
  76. }
  77. header("Content-type: text/html; charset=utf-8");
  78. if (function_exists("mb_internal_encoding")) {
  79. mb_internal_encoding("UTF-8");
  80. }
  81. if ($_LIMITED == false) {
  82. ob_start("ob_gzhandler");
  83. ob_start("_ZX_PREAPRE_PAGE");
  84. $settings["lang"] = ZX_LANG_DEFAULT;
  85. $settings["theme"] = ZX_THEME_DEFAULT;
  86. $settings["come"] = _ZX_TOOL_COOKIE_SETTINGS_GET("come") == "" ? (_ZX_USER_COME_FROM()) : "";
  87. }
  88. }
  89.  
  90. function _ZX_TOOL_MEMORYUNIT($size, $format = 2) {
  91. $unit = (array("b", "kb", "mb", "gb", "tb", "pb"));
  92. return number_format(round($size / pow(1024, $i = floor(log($size, 1024))), $format), $format, ".", "") . " " . $unit[$i];
  93. }
  94.  
  95. function _ZX_TOOL_LINK($_S_1, $_S_2 = "", $_S_Q = "") {
  96. return "/?" . ZX_SWITCH_VAR . "=" . $_S_1 . (!empty($_S_2) ? ("&" . ZX_SWITCH_ACCOUNT_VAR . "=" . $_S_2) : "") . $_S_Q;
  97. }
  98.  
  99. function _ZX_TOOL_LINK_SMARTY($params = array(), $content = null) {
  100. return "/?" . ZX_SWITCH_VAR . "=" . $params["area"] . (!empty($params["section"]) ? ("&" . ZX_SWITCH_ACCOUNT_VAR . "=" . $params["section"]) : "") . $params["query"];
  101. }
  102.  
  103. function _ZX_TOOL_EMOTS($str) {
  104. $re = (array(":)", ":P", ";D", ":cool:", ":eek:", ":o", ":confused:", ";(", ";)", ":D", ":lol:", ":surprised:", ":rolleyes:", ":|", ":(", ":mad:", "]:-(", "]:-)"));
  105. $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>"));
  106. $i = 0;
  107. while ($i < count($re)) {
  108. $i++;
  109. continue;
  110. $str = str_replace($re[$i], $by[$i], $str);
  111. continue;
  112. }
  113. return $str;
  114. }
  115.  
  116. function _ZX_TOOL_BBCODE_FIX($var) {
  117. $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"));
  118. $replace = (array("<br /><br />", "\$2", "\$1", "\$1", "</li>", "", "\$1", "\$2"));
  119. return preg_replace($search, $replace, $var);
  120. }
  121.  
  122. function _ZX_TOOL_BBCODE($_HTML) {
  123. $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"));
  124. $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>"));
  125. return preg_replace($search, $replace, $_HTML);
  126. }
  127.  
  128. function _ZX_TOOL_BROWSER_GET($_USER_AGENT) {
  129. if (preg_match("/MSIE/i", $_USER_AGENT)) {
  130. return "Internet Explorer";
  131. }
  132. else {
  133. if (preg_match("/Firefox/i", $_USER_AGENT)) {
  134. return "Mozilla Firefox";
  135. }
  136. else {
  137. if (preg_match("/Chrome/i", $_USER_AGENT)) {
  138. return "Google Chrome";
  139. }
  140. else {
  141. if (preg_match("/Safari/i", $_USER_AGENT)) {
  142. return "Safari";
  143. }
  144. else {
  145. if (preg_match("/Flock/i", $_USER_AGENT)) {
  146. return "Flock";
  147. }
  148. else {
  149. if (preg_match("/Opera/i", $_USER_AGENT)) {
  150. return "Opera";
  151. }
  152. else {
  153. return "Unknown";
  154. }
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161.  
  162. function _ZX_TOOL_DELAY($seconds) {
  163. $seconds = abs($seconds);
  164. if ($seconds < 1) {
  165. usleep($seconds * 1000000);
  166. }
  167. else {
  168. sleep($seconds);
  169. }
  170. }
  171.  
  172. function _ZX_TOOL_NEWLINES($_STR) {
  173. return nl2br($_STR);
  174. }
  175.  
  176. function _ZX_TOOL_TEXT_HIGHLIGHTWORDS($_TEXT, $_WORDS) {
  177. if (!is_array($_TEXT)) {
  178. $_WORDS = explode(" ", $_WORDS);
  179. }
  180. foreach ($_WORDS as $_WORD) {
  181. $_WORD = preg_quote(trim($_WORD));
  182. if (!empty($_WORD)) {
  183. $_TEXT = preg_replace("/\\b(" . $_WORD . ")\\b/i", "<span>\\1</span>", trim($_TEXT));
  184. }
  185. continue;
  186. }
  187. return $_TEXT;
  188. }
  189.  
  190. function _ZX_TOOL_TEXT_XSS($str) {
  191. if (is_array($str) || is_object($str)) {
  192. foreach ($str as $k => $s) {
  193. $str[$k] = _ZX_TOOL_TEXT_XSS($s);
  194. continue;
  195. }
  196. return $str;
  197. }
  198. $str = str_replace("", "", $str);
  199. $str = str_replace(array("&amp;", "&lt;", "&gt;"), array("&amp;amp;", "&amp;lt;", "&amp;gt;"), $str);
  200. $str = preg_replace("/(&#*\\w+)[\\x00-\\x20]+;/u", "\$1;", $str);
  201. $str = preg_replace("/(&#x*[0-9A-F]+);*/iu", "\$1;", $str);
  202. $str = html_entity_decode($str, ENT_COMPAT, "UTF-8");
  203. $str = preg_replace("#(?:on[a-z]+|xmlns)\\s*=\\s*['\"\\x00-\\x20]?[^'>\"]*['\"\\x00-\\x20]?\\s?#iu", "", $str);
  204. $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);
  205. $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);
  206. $str = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u", "\$1=\$2nomozbinding...", $str);
  207. $str = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#is", "\$1>", $str);
  208. $str = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#is", "\$1>", $str);
  209. $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);
  210. $str = preg_replace("#</*\\w+:\\w[^>]*+>#i", "", $str);
  211. do {
  212. $old = $str;
  213. ...................................................................................................
  214. .................................
  215. .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement