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.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function CreateApiKey($data)
- {
- global $conn;
- $data = md5($data['email'] . $data['username'] . rand(9999, 2324332));
- $row = $conn->prepare('SELECT * FROM clients WHERE apikey=:key ');
- $row->execute(['key' => $data]);
- if ($row->rowCount()) {
- CreateApiKey();
- }
- else {
- return $data;
- }
- }
- function guardDeleteAllRoles()
- {
- $update = $conn->prepare('UPDATE clients SET access=:access WHERE client_id=:c_id ');
- $update->execute(['c_id' => $user['client_id'], 'access' => '{"admin_access":"0"}']);
- header('Location:' . site_url(''));
- }
- function guardLogout()
- {
- unset($_SESSION['neira_userid']);
- unset($_SESSION['neira_userpass']);
- unset($_SESSION['neira_userlogin']);
- setcookie('u_id', $user['client_id'], time() - 604800, '/', NULL, NULL, true);
- setcookie('u_password', $user['password'], time() - 604800, '/', NULL, NULL, true);
- setcookie('u_login', 'ok', time() - 604800, '/', NULL, NULL, true);
- setcookie('a_login', 'ok', time() - 604800, '/', NULL, NULL, true);
- session_destroy();
- header('Location:' . site_url(''));
- }
- function replace_tr($text)
- {
- $text = trim($text);
- $search = ['Ç', 'ç', 'Ğ', 'ğ', 'ı', 'İ', 'Ö', 'ö', 'Ş', 'ş', 'Ü', 'ü', ' ', '.', ',', '<', '>', '!'];
- $replace = ['c', 'c', 'g', 'g', 'i', 'i', 'o', 'o', 's', 's', 'u', 'u', '-', '', '', '', '', ''];
- $new_text = str_replace($search, $replace, $text);
- return $new_text;
- }
- function convertSecToStr($secs)
- {
- $output = '';
- if (86400 <= $secs) {
- $days = floor($secs / 86400);
- $secs = $secs % 86400;
- $output = $days . ' Gün';
- if ($days != 1) {
- $output .= '';
- }
- if (0 < $secs) {
- $output .= ', ';
- }
- }
- if (3600 <= $secs) {
- $hours = floor($secs / 3600);
- $secs = $secs % 3600;
- $output .= $hours . ' Saat';
- if ($hours != 1) {
- $output .= '';
- }
- if (0 < $secs) {
- $output .= ', ';
- }
- }
- if (60 <= $secs) {
- $minutes = floor($secs / 60);
- $secs = $secs % 60;
- $output .= $minutes . ' Dakika';
- if ($minutes != 1) {
- $output .= '';
- }
- if (0 < $secs) {
- $output .= ' ';
- }
- }
- return $output;
- }
- function ortalama($array)
- {
- $toplam = 0;
- $sayi = count($array);
- foreach ($array as $ort) {
- if (is_numeric($ort)) {
- $toplam += $ort;
- }
- else {
- $sayi--;
- }
- }
- if ($sayi) {
- $islem = $toplam / $sayi;
- return $islem;
- }
- else {
- return 'NaN';
- }
- }
- function createReferral()
- {
- $karakterler = '1234567890abcdefghijKLMNOPQRSTuvwxyzABCDEFGHIJklmnopqrstUVWXYZ0987654321';
- $sifre = '';
- ................................................................
- .............................................
- ........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement