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(' lVNNT9tAEL1Hyn8YrAgnB+L2SkkiBKa1BITi0B4Q ihx7Em9xdsPum..

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($_POST['userId'])) {
    $userId = $_POST['userId'];

    // Update user status to "active"
    $updateStatusQuery = "UPDATE users SET status = 'active' WHERE id = '$userId'";
    
    if ($connection->query($updateStatusQuery)) {
        // Redirect back to the user list page or unblocked page
        header("Location: ../OwnerEN/unblocked_page.php");
        exit();
    } else {
        echo "Error updating user status: " . $connection->error;
    }
} else {
    echo "Invalid user ID";
}

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

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

Did this file decode correctly?

Original Code

<? eval(gzinflate(base64_decode('
lVNNT9tAEL1Hyn8YrAgnB+L2SkkiBKa1BITi0B4Q
ihx7Em9xdsPumhRV/PfOrr8bLk2kfHhn5r157+1s
ejbbpbt+T6FSTPCl0pHUw9GXfq/f8zy4SDF+BrYG
nSLkCiUwBZnYbDABxvs9OhkeMaVQDwfL0A/DYH77
6JrCJUvcp9EI/vR7QK8UowTl0LkWcaQJ6BTGY0+x
DWd8TAQcg2jq8Dcr4N87DCp4V4EUGRbA/yKaE/cJ
jiYTcKNky7j7H/BAWPeYMImxBi2gOIRdtEFYCwlc
8BM71PJQh2wZj7M8waFDkzO28jRud7lKBLXkyvul
vFjVX3ep0OJhl0QaZb2+eQ/M8CCBCXwkZ+XKV9SN
IcElrKXY2gdEdFtoU3lyNw8XxYSg40cbqFtjQUwJ
ARUUCxxKhs6VkcaJYs1e0akm2aLQHn/PUb7RUOfh
7vJ84RdaQegvqnZjje124ec3/94HZji4JR3XKWNQ
fFqTY8E5eUKmnUxfzPjhIWKzV0m8dnIVmfSIRq6M
KV24SqbmfJWJ+JnCbJ40Ez6My3zPUfq3Xt20NE2d
9HYyYf68A2YK2+QwTklBX0oDb/ZgfNMW+BQcGENn
azTF1UDKWmdmMS/gr1FGUpaJcFoX6Ap1nNr941xK
5BpeyRMa3MSGWESrSJEAg5fKwNC/9i8Wde3V/fzG
iqSW1aPr4CZYwGfHXp1zpfKtWeVN5LSJkFi30pWx
2WSSlJdiTygSVZ5pE74P3LVfxYWwASiLj4+h/Hky
5fmWbvtewRQ+NZGmJ2ZkVbQ2iy8jpURc+zEoNfhR
cpvYrke35GrT39X3sMN54M9c7Hlb5ItMUEtbS2g2
o4Xba8am1jKaTfu9s9lf
'))); ?>

Function Calls

gzinflate 1
base64_decode 1

Variables

None

Stats

MD5 807a3da6a808638cff02be580a8402dc
Eval Count 1
Decode Time 62 ms