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(' zVZNb9pAEL0j8R+mFqpBaqDnpklEg1GjJiE1oB4Q sjb2BG9rvO7uO..

Decoded Output download

?><?php
// Start the session
session_start();

// Check if the user is logged in
if (!isset($_SESSION['user_id'])) {
    header("Location: ../signinARAR.php");
    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 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;
}

// Check if the user clicked the delete button
if (isset($_POST['delete_account'])) {
    $userId = $_SESSION['user_id'];

    // Delete user's account from users table
    $deleteUserQuery = "DELETE FROM users WHERE id = '$userId'";
    if ($connection->query($deleteUserQuery) === TRUE) {
        // logoutAR the user and redirect to login page
        session_destroy();
        header("Location: ../signinARAR.php");
        exit();
    } else {
        $deleteErrorMessage = "Failed to delete account. Error: " . $connection->error;
    }
}


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


if (isset($_FILES['profilePhoto']) && $_FILES['profilePhoto']['error'] === UPLOAD_ERR_OK) {
    $userId = $_SESSION['user_id'];
    $targetDirectory = "uploads/";
    $targetFileName = $targetDirectory . basename($_FILES["profilePhoto"]["name"]);

    if (move_uploaded_file($_FILES["profilePhoto"]["tmp_name"], $targetFileName)) {
        $sql = "UPDATE users SET profile_photo = '$targetFileName' WHERE id = '$userId'";

        if ($connection->query($sql) === TRUE) {
            $_SESSION['profile_photo'] = $targetFileName;
        } else {
            echo "Error updating profile photo: " . $connection->error;
        }
    } else {
        echo "";
    }
}

// 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
}

?><?

Did this file decode correctly?

Original Code

<? eval(gzinflate(base64_decode('
zVZNb9pAEL0j8R+mFqpBaqDnpklEg1GjJiE1oB4Q
sjb2BG9rvO7uOmla5b93dtd8mJKPSj2UC8g78+bt
ezNjTo7fnxRp0Wz0ejDWTGrQKYJCpbjIm43qR6TM
Ubtz2GzYyNMU42/Ab2xwqVACV5CJxQIT4JRGJ+1X
XCnU7VY0Dsbjs9HlzDeBEU/8eacDv5oNoE+KLEHZ
9s5FzDQVegfdbk/xRc7zftgPu0TNM1VNLP7gjsKD
YcHzOCsTbHuUkPHrnsZlUapELHleqt5X1YvV+usq
FVpMi4RplGtIe5Eh6jiFgi0QNNcZqmajZWieJXAE
+6hTYkt9z+jUGwfnwenE5cEwHF1YnMjheCbQ/QxR
lZk2eLHIc4zNPQ+Ov5co79sGy5GpgilsNj8EonaW
c81Zxn8isBzodvoemJTsHrQApYXcUHaC18odHOfl
MpLiTsExvF3rfZdyIttu0YEhVM+4MWJETCkRtzcW
mU8VOJubJMqd+faBlcOcP1SmrBVd9YWv4I5lGWq4
ZhnLY4QbKZb2mNxg10zh3yvuEKMVopXehCv48jEI
A+AGyq9QfeuEfJEHVkX5lH4r4eQ+ySoxWo7fh4re
SrE6a3uvB8BM4Rp7N+/t4UbWPycuznj8jebNaomU
iHBdai2q8VtN39VoPJn5LiBicSzKXG9P4LPiuzCi
MHBFKlsrKOenU5/8zLBCdQWn9PyzEdm4NyD3JsFL
7DII1os9Zu0Ad+Do6Agm4TSoNSzRpXUkSt0PN4qx
PAGJCZcEaYaIInhuh3aTuFp4CSotxf3a1L9dVrWF
ZUek5vWWRoGUQl5QWbOESKYhoxFNDL/K1UrpLtjI
d+BBt97GaJ7vTOI/WZD1ThqenQfjmV9IcUMMbQo1
Erx+DY+czXzLzJ9bj6ZX56P+IArCMBp9enn7ufXD
5AL1wDonXDeVRSZYonpePWZI5S/Z0o7dblYXzL7J
6XR9G2+bsTefeebUm3fWfW8EWIpbjFw9TCIT/ni+
XhaRw3izS2lnpVY7bXo16NNUuIEYBxOoEKPCQNrJ
qMP4j47NBvyx4TGbbv/AWEobB2ok/PlGzRWLrTb/
s7Nt88epAM+2LJSms3i+WN0NLOwznVx18/4KDt17
weunVpKGXaf/4hVUN+m/ewM9aaR9G+08t/843ALY
/gMIt0xyt9WtwCf0b/E3
'))); ?>

Function Calls

gzinflate 1
base64_decode 1

Variables

None

Stats

MD5 a0b907a2197f8a8d19aa83d37cfc8daf
Eval Count 1
Decode Time 74 ms