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(' zVZNb9s4EL0b8H+YGkYlHxJ3r9t1gjRRNwKSuLWV 7MEIBEaibbYy6..

Decoded Output download

?><?php
session_start();

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

// Check the user's role
if ($_SESSION['user_role'] !== 'admin') {
    header("Location: ../signinAR.php"); // Redirect to signinAR page for non-admin users
    exit();
}


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


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


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

// Handle form submission for updating titles
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $newTitles = $_POST['titles'];

    // Delete existing titles from the table
    $deleteSql = "DELETE FROM page_titles";
    $connection->query($deleteSql);

    // Insert new titles into the table
    foreach ($newTitles as $newTitle) {
        $insertSql = "INSERT INTO page_titles (title) VALUES ('$newTitle')";
        $connection->query($insertSql);
    }

    // Redirect or show success message
}

// Handle form submission for adding new title
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['newTitle'])) {
    $newTitle = $_POST['newTitle'];

    // Insert the new title into the table
    $insertSql = "INSERT INTO page_titles (title) VALUES ('$newTitle')";
    $connection->query($insertSql);

    // Redirect or show success message
}


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

// 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('
zVZNb9s4EL0b8H+YGkYlHxJ3r9t1gjRRNwKSuLWV
7MEIBEaibbYy6ZJUvWmR/75DUqLkREUTIId1ADsQ
hzNv3psPHR/9dbxdb/s9RZVigqdKE6nD0ft+r98b
j+F0TbOvwJag1xRKRSUwBYVYrWgOjPd7eBK+YUpR
HQ7TeTSfx9OrRWAMU5YHt6MR/Oz3AD9rSnIqw8GF
yIjGQH/C4eFYsRVn/GR2iBAGJqaxpP8yB+BhD0MN
IFAgRUFd6McxzUlwC28mEwhIvmE8eBEAwGgzmjNJ
Mw1aQH0MW7KisBQSuOAH1rHForoQIzKeFWVOwwFG
KNjdWNPNtlS5wGulGn9R40z5n09rocX1NieaSk+D
+QP3QUQfqc7W7fx3pCiohjtSEJ4hLik29hidkDui
kJuhsYxzmECXKhhhqL4VeDqYRxfRaVJ5TGuPH2fT
S5cg/HMezSJgxlVQeQ0GxoGkqiy0iZAJzpEw5PTg
6FtJ5X1ovLs8rEjO9OCIlxtUaKfgCN55XYb4xHip
jZYm25QoJbKwLomhw/ehgjexlxbBPmqb1wPQQlHv
+/G9d41I5tx9I8V/I52+wuOzhtKqLZ7BqC1VJ5Wt
Fs10QdXLpbD3nALGT+r8WMrdv7NnEV8Zo9ni1tZ1
zJlmpGA/KBAOWJH6HoiU5N4WuhaygVzJ1g73C/F2
a4Zgw1rD/Rt7SvorVhdnuLj1UtoHlg5z/tA0/znh
eWF7bwOqvNswq4ft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