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/backup files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/thelittlebigshow/vendor-reg/backup files/admin_dashboard.php
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Dashboard</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;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        table, th, td {
            border: 1px solid #ddd;
        }
        th, td {
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        .button {
            background-color: #1E90FF;
            color: white;
            padding: 5px 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        .button:hover {
            background-color: #1C86EE;
        }
        .delete-button {
            background-color: #ff4d4d;
        }
        .delete-button:hover {
            background-color: #e60000;
        }
        .export-section {
            margin-bottom: 20px;
        }
        .description-column {
            word-wrap: break-word; /* Allow text to wrap */
            white-space: normal;   /* Allow new lines */
            max-width: 300px;      /* Limit the column width */
        }
        /* Colors for payment status in the payment status column */
        .paid {
            background-color: #28a745; /* Green */
            color: white;
        }
        .unpaid {
            background-color: #dc3545; /* Red */
            color: white;
        }
        .pending {
            background-color: #ffc107; /* Yellow */
            color: black;
        }
        .unknown {
            background-color: #6c757d; /* Gray */
            color: white;
        }
        /* Adjust the width of the payment status column */
        td.payment-status, th.payment-status {
            width: 150px; /* Adjust this value as needed */
        }
    </style>
</head>
<body>

    <div class="main-container">
        <h2>Admin Dashboard</h2>
        
        <!-- Display Tally Information -->
        <p><strong>Total Vendors:</strong> <?php echo $total_vendors; ?></p>
        <p><strong>Total Spots Taken:</strong> <?php echo $spots_taken; ?></p>

        <!-- Export to Excel Button -->
        <div class="export-section">
            <form method="POST" action="admin_dashboard.php">
                <button type="submit" name="export_excel" class="button">Export to Excel</button>
            </form>
        </div>

        <table>
            <tr>
                <th>Name</th>
                <th>Email</th>
                <th>Category</th>
                <th>Spots</th>
                <th class="payment-status">Payment Status</th>
                <th>Description</th>
                <th>Website</th>
                <th>Action</th>
            </tr>
            <?php
            if ($result->num_rows > 0) {
                while ($row = $result->fetch_assoc()) {
                    // Convert payment_status from numeric to readable format and apply corresponding class
                    switch ($row['payment_status']) {
                        case 1:
                            $payment_status = 'Paid';
                            $status_class = 'paid';
                            break;
                        case 0:
                            $payment_status = 'Unpaid';
                            $status_class = 'unpaid';
                            break;
                        case 2:
                            $payment_status = 'Pending';
                            $status_class = 'pending';
                            break;
                        default:
                            $payment_status = 'Unknown';
                            $status_class = 'unknown';
                    }
                    
                    // Check if website exists and is valid
                    $website_link = (!empty($row['website']) && filter_var($row['website'], FILTER_VALIDATE_URL)) ? "<a href='" . htmlspecialchars($row['website']) . "' target='_blank'>" . htmlspecialchars($row['website']) . "</a>" : "No Website";

                    echo "<tr>";
                    echo "<td><a href='vendor_details.php?id=" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</a></td>"; // Link to vendor details page
                    echo "<td>" . htmlspecialchars($row['email']) . "</td>";
                    echo "<td>" . htmlspecialchars($row['category']) . "</td>";
                    echo "<td>" . htmlspecialchars($row['spots']) . "</td>";
                    echo "<td class='payment-status {$status_class}'>" . $payment_status . "</td>"; // Add the class for color and width adjustment
                    echo "<td class='description-column'>" . htmlspecialchars($row['description']) . "</td>"; // Display description with word-wrap
                    echo "<td>" . $website_link . "</td>"; // Display website with a clickable link
                    echo "<td>
                            <a href='edit_vendor.php?id=" . $row['id'] . "' class='button'>Edit</a>
                            <a href='admin_dashboard.php?delete_id=" . $row['id'] . "' class='button delete-button'>Delete</a>
                          </td>";
                    echo "</tr>";
                }
            } else {
                echo "<tr><td colspan='8'>No vendors found.</td></tr>";
            }
            ?>
        </table>
    </div>

</body>
</html>

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

Youez - 2016 - github.com/yon3zu
LinuXploit