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(' tVddb9s2FH03kP/ACQakDI7d7bFeHGyNsgZrltR2 tgcjEBiJtrlQl..

Decoded Output download

?><?php
session_start();

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

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


$userId = $_SESSION['user_id'];

// Fetch user data from the database including the "status" column
$sql = "SELECT id, username, email, wallet_balance, status FROM users WHERE id = '$userId'";
$result = $connection->query($sql);

if ($result->num_rows === 1) {
    $row = $result->fetch_assoc();
    $status = $row['status'];

    if ($status === 'blocked') {
        // Redirect the blocked user to a blocked page or display a message
        header("Location: blocked_page.php");
        exit();
    }

// Get the user ID from the session
$userId = $_SESSION['user_id'];

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

// Retrieve the user's keys from the database
$sql = "SELECT * FROM get_key WHERE user_id = '$userId'";
$result = $connection->query($sql);

// Fetch all keys into an array
$keys = [];
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $keys[] = $row;
    }
}

// Fetch all keys for the logged-in user
$userId = $_SESSION['user_id'];
$fetchKeysQuery = "SELECT * FROM get_key WHERE user_id = $userId";
$keysResult = mysqli_query($connection, $fetchKeysQuery);

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


$userId = $_SESSION['user_id'];
$currentUsername = "";

// Retrieve user's current username
$sql = "SELECT username FROM users WHERE id = ?";
$stmt = $conn->prepare($sql);
if ($stmt) {
    $stmt->bind_param("i", $userId);
    $stmt->execute();
    $stmt->bind_result($currentUsername);
    $stmt->fetch();
    $stmt->close();
} else {
    $errorMessage = "Database error. Please try again later.";
}

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $newUsername = $_POST['newUsername'];

    // Update the username in the database
    $sql = "UPDATE users SET username = ? WHERE id = ?";
    $stmt = $conn->prepare($sql);
    if ($stmt) {
        $stmt->bind_param("si", $newUsername, $userId);
        if ($stmt->execute()) {
            $successMessage = "Username updated successfully.";
            $currentUsername = $newUsername; // Update the displayed username
        } else {
            $errorMessage = "Failed to update username. Error: " . $stmt->error;
        }
        $stmt->close();
    } else {
        $errorMessage = "Database error. Please try again later.";
    }
}
$conn->close();

} else {
    // User not found, handle accordingly
    header("Location: ../signin.php");
    exit();
}

// Close the database connection
$connection->close();
?><?

Did this file decode correctly?

Original Code

<? eval(gzinflate(base64_decode('
tVddb9s2FH03kP/ACQakDI7d7bFeHGyNsgZrltR2
tgcjEBiJtrlQlEtSS73C/32XH6I+HGNOizkPsajL
ew/POeSlLyY/XWzWm5OeJFLSgidSYaGi0/FJ76Q3
GqF3a5I+IbpEak1QKYlAVCJWrFYkQ5Sf9OBN9B2V
kqion8zi2ez69vdFqAMTmoUPp6foy0kPwWdNcEZE
FHwoUqyg0Fs0HI4kXXHKhwAg0BV1HPlMbfmdRkB5
ysqMRAEEM/o4UiTflDIrcspLOfpLjlLp/92tC1Xc
bzKsiPAp9V9fw7nO0Dl6CWK10iui0rVdIqTAaCmK
3KxaPz1iSZAFQ/nKDAfAlCplgNKClTlQ0ZefGNQI
ZvGH+N0c0WxgsnGckwEiOaZsgJ4xY0Qlj5hhnsKw
zYGuprc3JliiP9/H0xgmQ6bQAQ8DwNgXRJZM6UWk
Beck1SSeTT6VRGwjXdquVuvhQs8mvMwTUTxLdH5+
jn7wUvRhTOepwpZ65QmWskijSoa+Q3ZuohehfXRs
6QBTqAqC9OEjK9InkoW+jP4Ar1OSUQFwDWkuyNKs
CoT9yAavCCqAeyo3DG/hTQ6OhME62b6F3ORET265
qOUk/bBzKv9KVG3l68taZef/17nFgFZUMSKPmNgx
iJlnpdd5EpvHaG2/To9S3AVD2OJhrAm/5lRRzOg/
BGEOxtsoYFMI4BQIl6oQNWTnl2a5hmsm6I0X83lN
AWxUWac9o2Wglv4ucPHgjWQGDB1Oll2L0UqbULq9
gtxe2d+Pr2e8vfv+913X5O+oPWfx/eLgVYy1UZt1
7RBhcCB9OTDvzbimdUqUoORv0mT2iWzli3y26fre
MrSC4jDDceTo/UqivM6A2MKgXB8D3DoU8phB4+Vj
aO3YUvy3IXV+b8dDLvTolnAiaY5sxzuj3Kz/GOcZ
CL9Bjo+aguNZdZkNpxqCPwTyLbBIE8doTfIAdWo5
S35l5/zxda2zn5ZCEK7uXafTCw3GXe8537lY3xb3
HFe9OLA1LwwrUuXeZ2eTjSAbLIj3mOtLuaq3nn46
mzxSrhuFwHkU0GBQEd1oeDqKfCZpqUjUGTaTrbui
7pI7oUaM7vyUFdIm7WxdIkQhbmyn00RcVpcN82KI
7hjRTwoshFcY/MfM9SbwFyS9XJBm+kc8XYTT+ON9
PJsnN/H8/e1l+GA7893tbF635T4nzw21+ol+vQgb
o40uDyJaX/jjw0wDHO2Twy7Vanl/d/nzPHbqzeKG
qqDgnpyepMOSNq4bDVkPSCuNto3V7CndStdQvJXZ
Zi/TFKRpyOOJKw0rGXIhy5Kx7TAYdxLsb44msnGH
Xnf1cdcju0GqVG3b+AJd+1zBLRPmw5FqAfpMQxTr
0LcoQEPvdT3SgLzbI7a27csYvsW+9cHrZK+LdXeJ
pknf13ih4EQuOdys15hncPLjNC2EvpKz7bf8zNA/
dHT19n2/PmMdxqqr1Ugv4OfTvw==
'))); ?>

Function Calls

gzinflate 1
base64_decode 1

Variables

None

Stats

MD5 107b380d26f02260e1d2687999852ce6
Eval Count 1
Decode Time 73 ms