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(' rZZtT9swEMffV+p3OKKKFE207C2soA4CVIKVtYW9 qFBkErf1SOxiO..
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");
// Check if the form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Get the gift amount from the form
if (isset($_POST['gift_amount'])) {
$giftAmount = intval($_POST['gift_amount']);
// Update wallet_balance for all users
$query = "UPDATE users SET wallet_balance = wallet_balance + $giftAmount";
$result = $connection->query($query);
if ($result) {
$message = "Gift of $giftAmount added to the wallet balance of all users.";
} else {
$error = "Error updating balance: " . $connection->error;
}
}
}
// 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;
}
// 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";
}
?><?
Did this file decode correctly?
Original Code
<? eval(gzinflate(base64_decode('
rZZtT9swEMffV+p3OKKKFE207C2soA4CVIKVtYW9
qFBkErf1SOxiO3TdxHff2U5C+sA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