Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.9.0
- * @ Author : DeZender
- * @ Release on : 08.08.2019
- * @ Official site : http://DeZender.Net
- *
- */
- function go($url)
- {
- header('Location: ' . $url);
- exit();
- }
- function goMeta($url, $wait = 0)
- {
- return '<meta http-equiv="refresh" content="' . $wait . ';URL=' . $url . '">';
- }
- function alertSuccess($text, $padding = true)
- {
- if (!$padding) {
- return '<div class="alert alert-success mb-0 d-flex align-items-center"><i class="fa fa-check-circle"></i>' . $text . '</div>';
- }
- else {
- return '<div class="alert alert-success d-flex align-items-center"><i class="fa fa-check-circle"></i>' . $text . '</div>';
- }
- }
- function alertError($text, $padding = true)
- {
- if (!$padding) {
- return '<div class="alert alert-danger mb-0 d-flex align-items-center"><i class="fa fa-times-circle"></i>' . $text . '</div>';
- }
- else {
- return '<div class="alert alert-danger d-flex align-items-center"><i class="fa fa-times-circle"></i>' . $text . '</div>';
- }
- }
- function alertWarning($text, $padding = true)
- {
- if (!$padding) {
- return '<div class="alert alert-warning mb-0 d-flex align-items-center"><i class="fa fa-bell"></i> ' . $text . '</div>';
- }
- else {
- return '<div class="alert alert-warning d-flex align-items-center"><i class="fa fa-bell"></i> ' . $text . '</div>';
- }
- }
- function showRECAPTCHA($recaptchaPublicKey)
- {
- return '<div class="form-group d-flex justify-content-center"><div class="g-recaptcha" data-sitekey="' . $recaptchaPublicKey . '"></div></div>';
- }
- function showEmoji($text)
- {
- $emojiPath = '/apps/main/public/assets/img/emojis';
- $emojiText = [':D', ';)', ':)', '<3', ':(', ':O', ':o', ':P', ':\')', ':8', '-_-', '(y)'];
- $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" />'];
- return str_ireplace($emojiText, $emojiImage, $text);
- }
- function post($parameter)
- {
- if (isset($_POST[$parameter])) {
- return htmlspecialchars(trim(strip_tags($_POST[$parameter])));
- }
- else {
- return false;
- }
- }
- function get($parameter)
- {
- if (isset($_GET[$parameter])) {
- return strip_tags(trim(addslashes($_GET[$parameter])));
- }
- else {
- return false;
- }
- }
- function filteredContent($content)
- {
- $contentBadHTMLTags = ['<script>', '</script>'];
- return str_replace($contentBadHTMLTags, '', $content);
- }
- function limitedContent($content, $limit = 0)
- {
- $newsContentLength = strlen($content);
- if ($limit < $newsContentLength) {
- return mb_substr($content, 0, $limit, 'utf-8') . '...';
- }
- else {
- return $content;
- }
- }
- function verifiedCircle($permission)
- {
- if ($permission == 1) {
- return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Yönetici"></i>';
- }
- if ($permission == 2) {
- return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Moderatör"></i>';
- }
- if ($permission == 3) {
- return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Görevli" ></i>';
- }
- if ($permission == 4) {
- return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Yazar" ></i>';
- }
- if ($permission == 5) {
- return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="Destek" ></i>';
- }
- if ($permission == 6) {
- return '<i class="fa fa-check-circle theme-color text-primary" data-toggle="tooltip" data-placement="top" title="YouTuber" ></i>';
- }
- }
- function permissionTag($permission)
- {
- if ($permission == 0) {
- return '<span class="badge badge-pill badge-secondary">Üye</span>';
- }
- else if ($permission == 1) {
- return '<span class="badge badge-pill badge-danger">Yönetici</span>';
- }
- else if ($permission == 2) {
- return '<span class="badge badge-pill badge-warning">Moderatör</span>';
- }
- else if ($permission == 3) {
- return '<span class="badge badge-pill badge-info">Görevli</span>';
- }
- else if ($permission == 4) {
- return '<span class="badge badge-pill badge-success">Yazar</span>';
- }
- else if ($permission == 5) {
- return '<span class="badge badge-pill badge-primary">Destek</span>';
- }
- else if ($permission == 6) {
- return '<span class="badge badge-pill badge-secondary">YouTuber</span>';
- }
- else {
- return '<span class="badge badge-pill badge-danger">HATA!</span>';
- }
- }
- function generateSalt($length)
- {
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $randomString = '';
- for ($i = 0; $i < $length; $i++) {
- $randomString .= $characters[rand(0, strlen($characters) - 1)];
- }
- return $randomString;
- }
- function createSHA256($password)
- {
- $salt = generatesalt(16);
- $hash = '$SHA$' . $salt . '$' . hash('sha256', hash('sha256', $password) . $salt);
- return $hash;
- }
- function checkSHA256($password, $realPassword)
- {
- $parts = explode('$', $realPassword);
- $salt = $parts[2];
- $hash = hash('sha256', hash('sha256', $password) . $salt);
- $hash = '$SHA$' . $salt . '$' . $hash;
- return $hash == $realPassword ? true : false;
- ................................................................................
- ..............................................
- ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement