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 UxU5cBO8ODa1T..

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/owner.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
UxU5cBO8ODa1Tbdu6r/P1xQS1rwMHhD29Tnn3nM8
nVxOq7IKA4PGcCVXxjJtk+H7MAiDNIWPJeY74Buw
JUJtUAM3INR2iwVwGQZuJznjxqBNBqtFtljMbm++
x1S44kX8MBzCnzAA95TICtRJ9FnlzDqiCxiNUsO3
ksuRExARI9XhL97Qv/QUtPSxAa0ENsT/MtJO/ABn
4zHErNhzGf8HPTiuORZcY27BKmg2oWJbhI3SIJU8
96Beh3mrlstc1AUmkUMWfJ1a3Fe1KZQ7Upv0h0lz
033uSmXVfVUwi7prn94Bgc8KGMOpcbauXKM9GDK7
go1We7/ghO6phqbTunKdLRuIWc+QY6ZeiSehCkfU
SGx4XDJsbWg0Ecstf8LIJcCzuhq2Zga7Y1/YDsHU
Gv0gmeSW/0ZgsoAnJriHpHNcVrWFNTrV6EaJeW25
3Pqtxxr1cyvUi1h4+q+07jRH93dXH5ZZ4wUssmUr
j6z36mL49imbZ8Cpxfi12zjquuvBztHUwrrC/bN5
FHzl6ZNBrqR0cXB5eXdCxrDD8mF8i9fN+nUsXbzW
jCKtDh4KbmwTNZe0Wq6FynfuhtHKAeFkhm9/StTZ
Taro27tJvXzSzwugMHisCfPSuZlpTawkn8Z/ZPYF
RDBqZ4JUdjyTDtfFvwfdwM6kN7sNaXR8p4Uy2IsO
HGDdJTj8nE9yqvU9TCdhcDn9Cw==
'))); ?>

Function Calls

gzinflate 1
base64_decode 1

Variables

None

Stats

MD5 ad6245a054e2b8a6c0132f497e05217d
Eval Count 1
Decode Time 52 ms