Guest User

Untitled

a guest
Oct 12th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function xAbort($message = '')
  15. {
  16. throw new Exception($message);
  17. }
  18.  
  19. function xSysInfo($message, $type = 0)
  20. {
  21. $_GS['info'][$type][] = $message;
  22.  
  23. if ($type < 2) {
  24. return NULL;
  25. }
  26.  
  27. xAddToLog($message, 'system');
  28.  
  29. if ($type == 2) {
  30. xabort($message);
  31. }
  32.  
  33. xStop($message);
  34. }
  35.  
  36. function xSysWarning($message)
  37. {
  38. xsysinfo($message, 1);
  39. }
  40.  
  41. function xSysError($message)
  42. {
  43. xsysinfo($message, 2);
  44. }
  45.  
  46. function xSysStop($message, $and_refresh = false)
  47. {
  48. if ($and_refresh && !headers_sent()) {
  49. refreshToURL(5);
  50. }
  51.  
  52. xsysinfo($message, 3);
  53. }
  54.  
  55. function xTerminal($is_debug = false)
  56. {
  57. global $_GS;
  58.  
  59. if ($is_debug) {
  60. error_reporting(32767);
  61. }
  62.  
  63. ob_implicit_flush();
  64. header('Content-Type: text/plain; charset="utf-8"');
  65. header('Pragma: no-cache');
  66. $_GS['as_term'] = true;
  67. }
  68.  
  69. function xEcho()
  70. {
  71. global $_GS;
  72.  
  73. foreach (func_num_args() ? func_get_args() : ['- - - - -'] as $message) {
  74. if (is_array($message) || is_object($message)) {
  75. $message = print_r($message, true);
  76. }
  77.  
  78. $message .= HS2_NL;
  79.  
  80. if (!$_GS['as_term']) {
  81. $message = nl2br($message);
  82. }
  83.  
  84. echo $message;
  85. }
  86. }
  87.  
  88. function xStop()
  89. {
  90. foreach (func_get_args() as $message) {
  91. xecho($message);
  92. }
  93.  
  94. exit();
  95. }
  96.  
  97. function xAddToLog($message, $topic = '', $clear_before = false)
  98. {
  99. global $_GS;
  100. $fname = 'logs/log_' . $topic . '.txt';
  101.  
  102. if ($clear_before) {
  103. unlink($fname);
  104. }
  105.  
  106. clearstatcache();
  107. $t = (file_exists($fname) ? @filemtime($fname) : 0);
  108.  
  109. if ($f = fopen($fname, 'a')) {
  110. $d = abs(time() - $t);
  111.  
  112. if (10 <= $d) {
  113. fwrite($f, '- - - - - [' . gmdate('d.m.y H:i:s') . ($d <= 120 ? ' +' . $d : '') . '] - - - - -' . HS2_NL);
  114. }
  115. if (is_array($message) || is_object($message)) {
  116. $message = print_r($message, true);
  117. }
  118.  
  119. fwrite($f, '<' . $_GS['module'] . '> ' . $message . HS2_NL);
  120. fclose($f);
  121. }
  122. }
  123.  
  124. function getRootURL($as_HTTPS = false)
  125. {
  126. global $_GS;
  127. return ($as_HTTPS ? 'https' : 'http') . '://' . $_GS['domain'] . '/' . $_GS['root_dir'];
  128. }
  129.  
  130. function ss1Elem(&$s)
  131. {
  132. if (!is_array($s)) {
  133. $s = stripslashes($s);
  134. }
  135. else {
  136. foreach ($s as $i => $v) {
  137. ss1Elem($s[$i]);
  138. }
  139. }
  140. }
  141.  
  142. function fromGPC($s)
  143. {
  144. if (!is_null($s)) {
  145. if (get_magic_quotes_gpc()) {
  146. ss1elem($s);
  147. }
  148.  
  149. mTrim($s);
  150. }
  151.  
  152. return $s;
  153. }
  154.  
  155. function filterInput($s, $mask = '')
  156. {
  157. if (is_null($s) || !$mask) {
  158. return $s;
  159. }
  160.  
  161. if ($mask == '*') {
  162. return strip_tags($s);
  163. }
  164.  
  165. preg_match('/^' . $mask . '$/', $s, $a);
  166. return $a[0];
  167. }
  168.  
  169. function _arr_val(&$arr, $p)
  170. {
  171. if (!isset($arr)) {
  172. return NULL;
  173. }
  174.  
  175. if (preg_match('/(.+)\\[(.*)\\]/', $p, $a)) {
  176. return _arr_val($arr[$a[1]], $a[2]);
  177. }
  178.  
  179. return @$arr[$p];
  180. }
  181.  
  182. function isset_IN($p = 'btn')
  183. {
  184. global $_IN;
  185. return !is_null(_arr_val($_IN, $p));
  186. }
  187.  
  188. function _IN($p, $mask = '')
  189. {
  190. global $_IN;
  191. return filterinput(_arr_val($_IN, $p), $mask);
  192. }
  193.  
  194. function _COOKIE($p, $mask = '')
  195. {
  196. return isset($_COOKIE[$p]) ? filterinput(fromgpc($_COOKIE[$p]), $mask) : NULL;
  197. }
  198.  
  199. function _GET($p, $mask = '')
  200. {
  201. return isset($_GET[$p]) ? filterinput(fromgpc($_GET[$p]), $mask) : NULL;
  202. }
  203.  
  204. function _POST($p, $mask = '')
  205. {
  206. return isset($_POST[$p]) ? filterinput(fromgpc($_POST[$p]), $mask) : NULL;
  207. .................................................................................
  208. ...........................................
  209. ......................
Add Comment
Please, Sign In to add comment