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(' rZbfT9swEMffK/V/OKKKFE207BVWEIMAlWBlbWEP FYpM4rYeiV1sh..
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");
// 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('
rZbfT9swEMffK/V/OKKKFE207BVWEIMAlWBlbWEP
FYpM4rYeiV1sh66b+N93tpOQlrANaX1p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006bdf7c3 |
Eval Count | 1 |
Decode Time | 51 ms |