BLACKSITE
:
216.73.216.251
:
172.93.223.125 / geeteetravels.com
:
Linux ubuntu 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
:
/
home
/
geeteetravels
/
public_html
/
admin
/
Upload File:
files >> /home/geeteetravels/public_html/admin/dashboard.php
<?php $pageTitle = 'Dashboard'; $currentPage = 'dashboard'; require_once 'includes/header.php'; // Fetch some basic stats $stmt = $pdo->query("SELECT COUNT(*) FROM enquiries WHERE status = 'Pending'"); $pendingEnquiries = $stmt->fetchColumn(); $stmt = $pdo->query("SELECT COUNT(*) FROM fleet"); $totalCars = $stmt->fetchColumn(); // Fetch recent enquiries $stmt = $pdo->query("SELECT * FROM enquiries ORDER BY id DESC LIMIT 5"); $recentEnquiries = $stmt->fetchAll(); ?> <div class="dashboard-stats"> <div class="stat-card"> <div class="stat-icon" style="background: rgba(212, 164, 40, 0.1); color: var(--primary-color);"> <i class="fa fa-clock-o"></i> </div> <div class="stat-info"> <h3><?php echo $pendingEnquiries; ?></h3> <p>Pending Enquiries</p> </div> </div> <div class="stat-card"> <div class="stat-icon" style="background: rgba(16, 185, 129, 0.1); color: var(--success);"> <i class="fa fa-car"></i> </div> <div class="stat-info"> <h3><?php echo $totalCars; ?></h3> <p>Total Cars</p> </div> </div> <div class="stat-card"> <div class="stat-icon" style="background: rgba(59, 130, 246, 0.1); color: #3b82f6;"> <i class="fa fa-users"></i> </div> <div class="stat-info"> <h3>850+</h3> <p>Happy Clients</p> </div> </div> </div> <div class="recent-section"> <div class="section-card"> <div class="section-header"> <h3>Recent Enquiries</h3> <a href="enquiries.php" class="btn-primary" style="font-size: 13px; padding: 8px 15px;">View All Enquiries</a> </div> <div class="table-responsive"> <table class="admin-table"> <thead> <tr> <th>Guest Name</th> <th>Car Type</th> <th>Date</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php if (empty($recentEnquiries)): ?> <tr> <td colspan="5" style="text-align: center;">No enquiries yet.</td> </tr> <?php else: ?> <?php foreach ($recentEnquiries as $enq): ?> <tr> <td><?php echo htmlspecialchars($enq['guest_name']); ?></td> <td><?php echo htmlspecialchars($enq['car_type']); ?></td> <td><?php echo date('d M, Y', strtotime($enq['created_at'])); ?></td> <td> <span class="badge badge-<?php echo strtolower($enq['status']); ?>"> <?php echo $enq['status']; ?> </span> </td> <td> <a href="enquiry_details.php?id=<?php echo $enq['id']; ?>" class="btn-icon"> <i class="fa fa-eye"></i> </a> </td> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> </table> </div> </div> </div> <?php require_once 'includes/footer.php'; ?>