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(' pVdbUxs3GH1nxv/hy44nu3RiO+1jKGZSWBpPoRDb pA8exiN2ZVtlr..
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");
// 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";
}
// 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'];
}
}
// 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;
}
// Retrieve the user's keys from the database
$sql = "SELECT * FROM get_key WHERE user_id = '$userId'";
$result = $connection->query($sql);
// Fetch all keys into an array
$keys = [];
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$keys[] = $row;
}
}
// Fetch all keys for the logged-in user
$userId = $_SESSION['user_id'];
$fetchKeysQuery = "SELECT * FROM get_key WHERE user_id = $userId";
$keysResult = mysqli_query($connection, $fetchKeysQuery);
include("../lib/tempusdominus/js/css/js/css/PhotoUpdater2.php");
$userId = $_SESSION['user_id'];
$currentUsername = "";
// Retrieve user's current username
$sql = "SELECT username FROM users WHERE id = ?";
$stmt = $conn->prepare($sql);
if ($stmt) {
$stmt->bind_param("i", $userId);
$stmt->execute();
$stmt->bind_result($currentUsername);
$stmt->fetch();
$stmt->close();
} else {
$errorMessage = "Database error. Please try again later.";
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$newUsername = $_POST['newUsername'];
// Update the username in the database
$sql = "UPDATE users SET username = ? WHERE id = ?";
$stmt = $conn->prepare($sql);
if ($stmt) {
$stmt->bind_param("si", $newUsername, $userId);
if ($stmt->execute()) {
$successMessage = "Username updated successfully.";
$currentUsername = $newUsername; // Update the displayed username
} else {
$errorMessage = "Failed to update username. Error: " . $stmt->error;
}
$stmt->close();
} else {
$errorMessage = "Database error. Please try again later.";
}
}
$conn->close();
// Close the database connection
$connection->close();
?><?
Did this file decode correctly?
Original Code
<? eval(gzinflate(base64_decode('
pVdbUxs3GH1nxv/hy44nu3RiO+1jKGZSWBpPoRDb
pA8exiN2ZVtlrXUkbRy3w3/vp8tqL4ZCEl6wpe9y
dM7RxSfDX082q03nQFIpWc7nUhGhosOjzkHnYDCA
0xVN7oEtQK0oFJIKYBKyfLmkKTDeOcCZ6BWTkqqo
O5/Ek8no6s9ZqAPnLA1vDw/h384B4N+KkpSKKLjI
E6Kw0Tvo9weSLTnjfQQQ6I46jn5ltv1DA0HZPpQg
8ozaxu2Oeia8hVfHxxCSdM14+A3tAXuNacoETRSo
HOwkbMiSwiIXwHPeM0UNDrmPlvEkK1IaBVg5Y3cD
RdebQqY5phRy8LccJNL/u17lKr/ZpERR4ZfvFnxO
VbIyC04KIShX8AX7IWZYiHxtJjCP3BGJNHQ/F1Ts
4BiCSXwRn0597Pn46tKAl/Ny6GJ0OZrCz4FZ6nsp
C0S2hF1egFS5oD4Vl6ibLJiQCtneYhdBZZEpbNNN
cs6RIYzrDU3vyEKwCzCquODXr8F97A15sUZ1thKG
8NZr0sURXbIMWuiFz4mUeRKVdug6Dj45bMcmaxY6
rOGt5h5o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