diff --git a/admin/areas.php b/admin/areas.php index 688a9e1..20a5b14 100644 --- a/admin/areas.php +++ b/admin/areas.php @@ -16,12 +16,13 @@ if (isset($_GET['delete'])) { } // Fetch areas with outlet names -$areas = $pdo->query(" - SELECT areas.*, outlets.name as outlet_name +$query = "SELECT areas.*, outlets.name as outlet_name FROM areas LEFT JOIN outlets ON areas.outlet_id = outlets.id - ORDER BY areas.id DESC -")->fetchAll(); + ORDER BY areas.id DESC"; + +$areas_pagination = paginate_query($pdo, $query); +$areas = $areas_pagination['data']; // Fetch outlets for dropdown $outlets = $pdo->query("SELECT id, name FROM outlets ORDER BY name ASC")->fetchAll(); @@ -38,6 +39,10 @@ include 'includes/header.php';
| Image | -Name | -Category | -Price | -Actions | -
|---|---|---|---|---|
|
- |
-
- = htmlspecialchars($product['name']) ?>
- = htmlspecialchars(substr($product['description'] ?? '', 0, 50)) ?>...
- |
- = htmlspecialchars($product['category_name'] ?? 'Uncategorized') ?> | -= format_currency($product['price']) ?> | -- - | -
| Product | +Category | +Price | +Actions | +
|---|---|---|---|
|
+
+
+
+
+ = htmlspecialchars($product['name']) ?>
+ = htmlspecialchars($product['description'] ?? '') ?>
+ |
+ + = htmlspecialchars($product['category_name'] ?? 'Uncategorized') ?> + | ++ = format_currency($product['price']) ?> + | ++ + | +