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(' zVdtb9s2EP5uwP+BM4zKHlInbYe1aOakbuKuxrIk s5PtgxEItETbR..

Decoded Output download

?><?php
session_start();

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

// Database Configuration
$dbHost = 'localhost';
$dbUsername = 'u608374782_Velo_Aledany';
$dbPassword = 'Aa123123123@@';
$dbName = 'u608374782_Velo_Aledany';

// Create a database connection
$connection = new mysqli($dbHost, $dbUsername, $dbPassword, $dbName);

// Check if the connection is successful
if ($connection->connect_error) {
    die("Connection failed: " . $connection->connect_error);
}

$userId = $_SESSION['user_id'];

// Fetch user data from the database including the "status" column
$sql = "SELECT id, username, email, wallet_balance, status FROM users WHERE id = '$userId'";
$result = $connection->query($sql);

if ($result->num_rows === 1) {
    $row = $result->fetch_assoc();
    $status = $row['status'];

    if ($status === 'blocked') {
        // Redirect the blocked user to a blocked page or display a message
        header("Location: blocked_page.php");
        exit();
    }

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

if (isset($_GET['keyId'])) {
    $keyId = $_GET['keyId'];

    if (isset($_POST['confirm'])) {
        // Perform the reset action for the key with the given keyId
        // Update the UDID column to NULL
        $updateQuery = "UPDATE get_key SET UDID = NULL WHERE ID = $keyId";
        $updateResult = mysqli_query($connection, $updateQuery);

        if ($updateResult) {
            // Update successful, redirect back to my_keys.php
            header("Location: ../ResellerAR/my_keys.php");
            exit();
        } else {
            $error = "An error occurred while resetting the key.";
        }
    }

    // Fetch key details from the database based on keyId
    $fetchQuery = "SELECT * FROM get_key WHERE ID = $keyId";
    $fetchResult = mysqli_query($connection, $fetchQuery);

    if ($fetchResult && mysqli_num_rows($fetchResult) > 0) {
        $keyData = mysqli_fetch_assoc($fetchResult);
    } else {
        $error = "Key not found.";
    }
}

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


} else {
    // User not found, handle accordingly
    header("Location: ../signinAR.php");
    exit();
}


// Close the database connection
$connection->close();
?><?

Did this file decode correctly?

Original Code

<? eval(gzinflate(base64_decode('
zVdtb9s2EP5uwP+BM4zKHlInbYe1aOakbuKuxrIk
s5PtgxEItETbRGTSJal6XpH/vjuSemGcdBm2ATOC
QKTu9XnujtTx0Q/H6+W62dBMay5FrA1VptM9bDaa
jf19crJkyS3hc2KWjOSaKcI1yeRiwVLCRbMBbzrf
cK2Z6bTjyXAyGV2cTyMUjHka3XS75EuzQeC3ZDRl
qtM6kwk14Ogt6fX2NV8ILgbjHoTQQp8oyX7nLoA7
H8MpNXRGNSMnUsz5IlfWQLPRTmcfpTakT6IMrGZL
WESHdv8aAhB0xfBd/v3Bm1evv3v95mX8K8tkPMhY
SsXWS15SrTdSpSg5oC9evnJ/79759+d/bcUBpRg1
jFCSFtEmUgiW+FCrBRgTbENWW/0p4x2fwx6pBW0X
RVx2gUE8TEnNLhCj8yQBHud55pipuX1+5J9jppRU
JS8pZ53WSWVlTjlk9pa0SI98Rb2gp41UjxC9h+gv
Qv7ATLJ05YPwkLmSKxt+CRYXSZanXCzsdguq0OS6
Bell+QrxA7DAR2syPBueXBEOsOQlWmwFMe+RDc0y
ZuIZzahIYNvZIB/GFz9b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