Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<? eval(gzinflate(base64_decode(' zVZtc9pGEP7ODP9ho2EiMamN3abpm8HjOHJMi40j wGnLeDSHdKBrx..

Decoded Output download

?>
<?php
session_start();

// Check if the user is logged in
if (!isset($_SESSION['user_id'])) {
    header("Location: ../signin.php");
    exit();
}

// Check the user's role
if ($_SESSION['user_role'] !== 'admin') {
    header("Location: ../signin.php"); // Redirect to signin page for non-admin users
    exit();
}

include("../lib/tempusdominus/js/css/js/css/PhotoUpdater.php");


// Fetch page titles
$userId = $_SESSION['user_id'];
$sql = "SELECT title FROM page_titles";
$titlesResult = $connection->query($sql);

$titles = []; // Initialize an empty array to store titles

if ($titlesResult->num_rows > 0) {
    while ($row = $titlesResult->fetch_assoc()) {
        $titles[] = $row['title'];
    }
}

// Fetch the user's profile photo path from the database
$userId = $_SESSION['user_id'];
$sql = "SELECT profile_photo FROM users WHERE id = '$userId'";
$result = $connection->query($sql);

if ($result->num_rows > 0) {
    $row = $result->fetch_assoc();
    $_SESSION['profile_photo'] = $row['profile_photo']; // Update the session variable
}

// Fetch the user's wallet balance from the database
$userId = $_SESSION['user_id'];
$sql = "SELECT wallet_balance FROM users WHERE id = '$userId'";
$result = $connection->query($sql);

if ($result->num_rows > 0) {
    $row = $result->fetch_assoc();
    $walletBalance = $row['wallet_balance'];
} else {
    $walletBalance = 0;
}

// Generate a random referral code (you can modify this as needed)
function generateReferralCode($length = 6)
{
    $characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    $code = '';
    for ($i = 0; $i < $length; $i++) {
        $code .= $characters[rand(0, strlen($characters) - 1)];
    }
    return $code;
}

// Check if the form is submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Generate a new referral code and display it to the admin
    $newReferralCode = generateReferralCode();

    // Insert the new referral code into the database
    $sql = "INSERT INTO referral_codes (code) VALUES ('$newReferralCode')";
    if ($connection->query($sql) === TRUE) {
        
    } else {
    }
}

// Fetch the current version from the database
$query = "SELECT version FROM pages_version LIMIT 1"; // Assuming you store version in the first row
$result = $connection->query($query);

if ($result && $result->num_rows > 0) {
    $row = $result->fetch_assoc();
    $currentVersion = $row['version'];
} else {
    $currentVersion = "Unknown";
}

?><?

Did this file decode correctly?

Original Code

<? eval(gzinflate(base64_decode('
zVZtc9pGEP7ODP9ho2EiMamN3abpm8HjOHJMi40j
wGnLeDSHdKBrxB25O4W4Hf/37p1OvJm0zUw+lC8C
3e4+zz77cpx26rWT00W2qNcUVYoJHitNpA6aP9Vr
9VqrBecZTd4Bm4LOKBSKSmAKcjGb0RQYr9fwJHjC
lKI6aMSDcDDo9q/HvjGMWerfNZvwV70G+MkoSakM
vJ5IiEagH+HwsKXYjDN+iAQ8g2js6EdWwj9sMajg
fQVS5LQE3kU0J/4dPGm3wSfpnHH/M+ABsSKaMkkT
DVpAeQgLMqMwFRK44Ac2qOWh9rFlPMmLlAYexs7Z
pKXpfFGoVKBToVp/qFaiVo+bTGgxWqREU7kSwKV8
QXWSlcia6ZwiWMOAdlNowz6Z0bWh3ud46g3CXng+
LP3gIupf2ThxGcczhuXXiKoi1yZeIjjHnFGUg877
gsr7wMQq6ThjNBvfWYW6nGlGcvYnBcIB89P3QKQk
91YyLeSasqvRJtxBhxdzLNNSQQeOVsVZZgzJBg08
MIS2PaZGjJgoJZJg3U7m4wzHd8YJfce+fWHlMOcP
6yYqFd1oooUUUwO6MGVAiXQGUynm1gRrQiZE0c9X
3UWNy6hWfdss8PYyjEJgJpLvgvq2GPI/lcEKKf9J
wko7uU81p8dGDltE/bWAO+9tycsmtcq4JQEfiGRk
YsbwkwIvSZ5TDROSE57QLyFuGTGuIv7v1C35vXT0
KkW3Wdu8HoDmiq5i7/odbSy/15RTadQnIAnHTQKS
TinOWw6JSHFm7kUBCU7iXKRsikOY4XomCjilKU2b
9dq04DZrmLlIkfM/R/egkVM+w9Zvwwu0rQglGZEk
0UZZFPTs5fmr8OL1ZffnX3pX1/2bN9FgOLp9++tv
vx8df/3N829ffPf9D36lgSWFTtULsziDBrNZAT5P
wEGaX8+ebY+zdT5sbxIYm6yDo69wtUh0DDaOmnAA
x82NWTcPSXUheRnq0R3ibjHkNDe3mComc6Y1TdeX
SXQbRmMvCt+MwsEwvgqHl/1XHk4HNuFNfzD0Vny3
S8PpcqcuyBpSphY5LkZmrxODbK8PpxT6bJYCFdpb
obJDHWSXY29rG+oxJOMOZT1hFsgNUfca0xtC93rY
XznGxlFBYB5NuD3rYdoQ+Lvc/KbnVLY6fWKUUKU2
DKNRuFVUV52tjt+7l5NCSso1fMDSmn7dtzAs2sZG
qGxX15yKq1e97lV3CMee3WBnShWo/AzMtJSXVGWH
17ntCSaVxn8Wy39bGvbxaG3A06fwBTaI0+DWcatW
iOO6b3c88vBG/B0XS+5V3X/aOTn9Gw==
'))); ?>

Function Calls

gzinflate 1
base64_decode 1

Variables

None

Stats

MD5 d4825549391a948acf8f8b09d13c8530
Eval Count 1
Decode Time 56 ms