<?php session_start(); require_once './Business/bestellingService.php'; //aanmaken lijst bestellingen $bestellingservice = new bestellingService(); $bestellingLijst = $bestellingservice->getBestelling($_SESSION['user']); if (!isset($_SESSION['user'])) { header('location: loginController.php'); } if (isset($_GET['verwijder'])) { var_dump($_GET); $bestellingservice = new bestellingService(); $verwijder = $bestellingservice->verwijderBestelling($_GET["verwijder"]); header('location: accountOverzichtController.php'); } if (isset($_GET['action']) && $_GET['action'] == "logout") { unset($_SESSION["user"]); header('location: indexController.php'); } include_once './Presentation/accountOverzicht.php';
<?php if (isset($_GET['verwijder'])) { bestellingService::verwijderBestelling($_GET['verwijder']); } ?> <div class="wrapper clearfix"> <div class="txtC"> <h1>Besteloverzicht</h1> </div> <div class="wrapper clearfix txtC"> <?php $nextdatum = ""; $arrBestellingen = bestellingService::getAllBestellingen(); foreach ($arrBestellingen as $bestelling) { $klantID = $bestelling->KlantID; $klant = klantService::getKlantFromId($klantID); $dbDatum = $bestelling->Besteldatum; $datum = date('d-m-Y', strtotime($dbDatum)); $BestelID = $bestelling->BestelID; $klantnaam = $klant->Naam . " " . $klant->VNaam; if ($nextdatum == "") { print $datum . "<hr/>"; } else { if ($nextdatum != $dbDatum) { print "<hr/>" . $datum . "<hr/>"; } } print "<div class='innercontainer txtL'> "; print "<dl><dt>Bestelling voor " . $klantnaam . " op " . $datum . "</dt>"; $totPrijs = $bestelling->Prijs;