Frederico Falcao f2a6525224 init
2025-05-30 10:46:17 +01:00

56 lines
2.0 KiB
PHP

<?php
ob_start(); require_once "../_navbar.php"; $navbar_html = ob_get_clean();
// Example customer data — in real life, you'd fetch this from Supabase/Postgres
$customers = [
['name' => 'John Doe', 'email' => 'john@example.com', 'joined' => '2024-12-01', 'status' => 'Active'],
['name' => 'Jane Smith', 'email' => 'jane@example.com', 'joined' => '2025-01-15', 'status' => 'Active'],
['name' => 'Carlos Perez', 'email' => 'carlos@example.com', 'joined' => '2025-03-10', 'status' => 'Inactive'],
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Customers Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light">
<?= $navbar_html ?>
<div class="container mt-4">
<h1 class="mb-4">👥 Customers</h1>
<table class="table table-bordered table-hover">
<thead class="table-light">
<tr>
<th>Name</th>
<th>Email</th>
<th>Joined Date</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php foreach ($customers as $customer): ?>
<tr>
<td><?= htmlspecialchars($customer['name']) ?></td>
<td><?= htmlspecialchars($customer['email']) ?></td>
<td><?= htmlspecialchars($customer['joined']) ?></td>
<td>
<?php if ($customer['status'] === 'Active'): ?>
<span class="badge bg-success">Active</span>
<?php else: ?>
<span class="badge bg-secondary">Inactive</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>