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(' pVdbU9tGGH1nhv/wReOJRCe20z6GYoYG0XgKhdgm ffAwmkVa21vkl..
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 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('
pVdbU9tGGH1nhv/wReOJRCe20z6GYoYG0XgKhdgm
ffAwmkVa21vklbO7iuN2+O/99qKVLJtCEnjA7H6X
s+ecvfh08OvparE6PJBUSlbwRCoiVHR0fHhweNDv
w/sFTR+AzUAtKJSSCmAS8mI+pxkwfniAM9ErJiVV
UScZx+Px8PrPaagDE5aFd0dH8O/hAeDPgpKMiii4
LFKisNE76PX6ks0542ejHkIIdE8dSb8yC+BxC0MF
IJQgipza1u2eeia8g1cnJxCSbMl4+E0AALuNaMYE
TRWoAqppWJE5hVkhgBe8awobLHIfYsbTvMxoFGD9
nN33FV2uSpkVmFTK/t+yn0r/52ZRqOJ2lRFFhSfB
LPqCqnRhFp2WQlCu4Av2Q9wwE8XSTGAWuScSqeh8
LqnYwAkE4/gyfj/xsRej6ysDXibV0OXwajiBnwOz
2DMpS8Q1h01RglSFoD4Vl6ibzJiQChlfYxdBZZkr
bNNJC86RI4zrDkzvyEKw8I0yLvj1a3AfuwNeLlGh
tYQBvPW6dHBEl6yCZnrhCZGySKPKEh3HwSeH7cRk
TUOHNbzT3APNJfVVdzKCW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