Advertisement
Guest User

Untitled

a guest
Dec 31st, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.93 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.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function go($url)
  15. {
  16. header('Location: ' . $url);
  17. exit();
  18. }
  19.  
  20. function goMeta($url, $wait = 0)
  21. {
  22. return '<meta http-equiv="refresh" content="' . $wait . ';URL=' . $url . '">';
  23. }
  24.  
  25. function alertSuccess($text, $padding = true)
  26. {
  27. if (!$padding) {
  28. return '<div class="alert alert-success mb-0 d-flex align-items-center"><i class="fa fa-check-circle"></i>' . $text . '</div>';
  29. }
  30. else {
  31. return '<div class="alert alert-success d-flex align-items-center"><i class="fa fa-check-circle"></i>' . $text . '</div>';
  32. }
  33. }
  34.  
  35. function alertError($text, $padding = true)
  36. {
  37. if (!$padding) {
  38. return '<div class="alert alert-danger mb-0 d-flex align-items-center"><i class="fa fa-times-circle"></i>' . $text . '</div>';
  39. }
  40. else {
  41. return '<div class="alert alert-danger d-flex align-items-center"><i class="fa fa-times-circle"></i>' . $text . '</div>';
  42. }
  43. }
  44.  
  45. function alertWarning($text, $padding = true)
  46. {
  47. if (!$padding) {
  48. return '<div class="alert alert-warning mb-0 d-flex align-items-center"><i class="fa fa-bell"></i> ' . $text . '</div>';
  49. }
  50. else {
  51. return '<div class="alert alert-warning d-flex align-items-center"><i class="fa fa-bell"></i> ' . $text . '</div>';
  52. }
  53. }
  54.  
  55. function showRECAPTCHA($recaptchaPublicKey)
  56. {
  57. return '<div class="form-group d-flex justify-content-center"><div class="g-recaptcha" data-sitekey="' . $recaptchaPublicKey . '"></div></div>';
  58. }
  59.  
  60. function showEmoji($text)
  61. {
  62. $emojiPath = '/apps/main/public/assets/img/emojis';
  63. $emojiText = [':D', ';)', ':)', '<3', ':(', ':O', ':o', ':P', ':\')', ':8', '-_-', '(y)'];
  64. $emojiImage = ['<img src="' . $emojiPath . '/1.png" width="18px" />', '<img src="' . $emojiPath . '/2.png" width="18px" />', '<img src="' . $emojiPath . '/3.png" width="18px" />', '<img src="' . $emojiPath . '/4.png" width="18px" />', '<img src="' . $emojiPath . '/5.png" width="18px" />', '<img src="' . $emojiPath . '/6.png" width="18px" />', '<img src="' . $emojiPath . '/6.png" width="18px" />', '<img src="' . $emojiPath . '/7.png" width="18px" />', '<img src="' . $emojiPath . '/8.png" width="18px" />', '<img src="' . $emojiPath . '/9.png" width="18px" />', '<img src="' . $emojiPath . '/10.png" width="18px" />', '<img src="' . $emojiPath . '/11.png" width="18px" />'];
  65. return str_ireplace($emojiText, $emojiImage, $text);
  66. }
  67.  
  68. function post($parameter)
  69. {
  70. if (isset($_POST[$parameter])) {
  71. return htmlspecialchars(trim(strip_tags($_POST[$parameter])));
  72. }
  73. else {
  74. return false;
  75. }
  76. }
  77.  
  78. function get($parameter)
  79. {
  80. if (isset($_GET[$parameter])) {
  81. return strip_tags(trim(addslashes($_GET[$parameter])));
  82. }
  83. else {
  84. return false;
  85. }
  86. }
  87.  
  88. function filteredContent($content)
  89. {
  90. $contentBadHTMLTags = ['<script>', '</script>'];
  91. return str_replace($contentBadHTMLTags, '', $content);
  92. }
  93.  
  94. function limitedContent($content, $limit = 0)
  95. {
  96. $newsContentLength = strlen($content);
  97.  
  98. if ($limit < $newsContentLength) {
  99. return mb_substr($content, 0, $limit, 'utf-8') . '...';
  100. }
  101. else {
  102. return $content;
  103. }
  104. }
  105.  
  106. function verifiedCircle($permission)
  107. {
  108. if ($permission == 1) {
  109. return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Yönetici"></i>';
  110. }
  111.  
  112. if ($permission == 2) {
  113. return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Moderatör"></i>';
  114. }
  115.  
  116. if ($permission == 3) {
  117. return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Görevli" ></i>';
  118. }
  119.  
  120. if ($permission == 4) {
  121. return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Yazar" ></i>';
  122. }
  123.  
  124. if ($permission == 5) {
  125. return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Destek" ></i>';
  126. }
  127.  
  128. if ($permission == 6) {
  129. return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="YouTuber" ></i>';
  130. }
  131. }
  132.  
  133. function permissionTag($permission)
  134. {
  135. if ($permission == 0) {
  136. return '<span class="badge badge-pill badge-secondary">Üye</span>';
  137. }
  138. else if ($permission == 1) {
  139. return '<span class="badge badge-pill badge-danger">Yönetici</span>';
  140. }
  141. else if ($permission == 2) {
  142. return '<span class="badge badge-pill badge-warning">Moderatör</span>';
  143. }
  144. else if ($permission == 3) {
  145. return '<span class="badge badge-pill badge-info">Görevli</span>';
  146. }
  147. else if ($permission == 4) {
  148. return '<span class="badge badge-pill badge-success">Yazar</span>';
  149. }
  150. else if ($permission == 5) {
  151. return '<span class="badge badge-pill badge-primary">Destek</span>';
  152. }
  153. else if ($permission == 6) {
  154. return '<span class="badge badge-pill badge-secondary">YouTuber</span>';
  155. }
  156. else {
  157. return '<span class="badge badge-pill badge-danger">HATA!</span>';
  158. }
  159. }
  160.  
  161. function generateSalt($length)
  162. {
  163. $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  164. $randomString = '';
  165.  
  166. for ($i = 0; $i < $length; $i++) {
  167. $randomString .= $characters[rand(0, strlen($characters) - 1)];
  168. }
  169.  
  170. return $randomString;
  171. }
  172.  
  173. function createSHA256($password)
  174. {
  175. $salt = generatesalt(16);
  176. $hash = '$SHA$' . $salt . '$' . hash('sha256', hash('sha256', $password) . $salt);
  177. return $hash;
  178. }
  179.  
  180. function checkSHA256($password, $realPassword)
  181. {
  182. $parts = explode('$', $realPassword);
  183. $salt = $parts[2];
  184. $hash = hash('sha256', hash('sha256', $password) . $salt);
  185. $hash = '$SHA$' . $salt . '$' . $hash;
  186. return $hash == $realPassword ? true : false;
  187. ................................................................................
  188. ..............................................
  189. ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement