diff --git a/account.php b/account.php index e783206..7310020 100644 --- a/account.php +++ b/account.php @@ -234,6 +234,9 @@ include 'header.php'; Angebot hinzufügen + + Shop hinzufügen + Benutzerverwaltung diff --git a/offerAdder.php b/offerAdder.php index 5e6d002..092cd7f 100644 --- a/offerAdder.php +++ b/offerAdder.php @@ -81,14 +81,23 @@ if ($shopsResult) { } } -// Get existing offers to manage -$offersResult = $conn->query(" +$filterProductID = isset($_GET['filter_product_id']) ? (int)$_GET['filter_product_id'] : 0; + +$offersQuery = " SELECT o.offerID, p.model AS productName, s.name AS shopName, o.price FROM offers o JOIN products p ON o.productID = p.productID JOIN shops s ON o.shopID = s.shopID - ORDER BY o.offerID DESC -"); +"; + +if ($filterProductID > 0) { + $offersQuery .= " WHERE o.productID = " . $filterProductID; +} + +$offersQuery .= " ORDER BY o.offerID DESC"; + +// Get existing offers to manage +$offersResult = $conn->query($offersQuery); $existingOffers = []; if ($offersResult) { while ($row = $offersResult->fetch_assoc()) { @@ -170,6 +179,23 @@ include 'header.php';

Bestehende Angebote verwalten

+
+
+ + +
+ 0): ?> + Filter zurücksetzen + +
+ 0): ?>
@@ -188,7 +214,7 @@ include 'header.php';
-
+ + +
+ + +
+
+

Bestehende Shops verwalten

+
+ + 0): ?> +
+ + + + + + + + + + + + + + + + + + + + + +
LogoNameWebsiteAngeboteAktion
+ + Logo + + Kein Logo + + + + Link ↗ + + + + + + + 0): ?> + + +
+ + + +
+ +
+
+ +

Keine Shops vorhanden.

+ +
+ + +