Пример #1
0
 public function beschikNieuwBestel($id)
 {
     $bestellingSERV = new BestellingService();
     $datumsAlBesteld = array();
     $datumsAlBesteld = $bestellingSERV->beschikbaarheidDatum($id);
     $bezetteDatums = array();
     foreach ($datumsAlBesteld as $value) {
         array_push($bezetteDatums, $value["datum"]);
     }
     $diff = array();
     $result = array();
     $diff = array_diff($this->range, $bezetteDatums);
     $this->result = array_values($diff);
     $this->length = count($this->result);
 }
Пример #2
0
<?php

session_start();
require 'business/bestellingSERVICE.php';
$bestellingSERV = new BestellingService();
$bestellingSERV->deleteBestelling($_GET["id_bestelling"]);
header('location: mijnBestel.php');
Пример #3
0
<?php

session_start();
require_once 'business/bestellingSERVICE.php';
require_once 'entities/bestelling.php';
$bestellingSERV = new BestellingService();
if (!isset($_GET["wat"])) {
    unset($_SESSION["message"]);
}
if (isset($_SESSION["id"])) {
    unset($_SESSION["navigatie"]);
    if (isset($_SESSION["id_bestelling"])) {
        $bestelling = $bestellingSERV->getBestelling($_SESSION["id_bestelling"]);
        include 'presentation/bestelling.php';
    } elseif (isset($_GET["id_bestelling"])) {
        $bestelling = $bestellingSERV->getBestelling($_GET["id_bestelling"]);
        $_SESSION["id_bestelling"] = $_GET["id_bestelling"];
        include 'presentation/bestelling.php';
    } elseif (!$bestellingSERV->isBestelMax($_SESSION["id"])) {
        $_SESSION["message"] = "Sorry uw maximum aantal bestellingen is bereikt, probeer morgen opnieuw";
        header('location: index.php?wat=melding');
    } else {
        include 'presentation/bestelling.php';
    }
} else {
    $_SESSION["message"] = "Log in om een bestelling te plaatsen of maak een profiel aan";
    header('location: index.php?wat=melding');
}
//
Пример #4
0
<?php

session_start();
require_once 'business/bestellingSERVICE.php';
unset($_SESSION["message"]);
$bestellingSERV = new BestellingService();
$lijst = array();
if (isset($_GET["annuleer"]) && ($_GET["annuleer"] = "annuleer")) {
    if (isset($_GET["update"]) && ($_GET["update"] = "update")) {
        unset($_SESSION["id_bestelling"]);
        unset($_SESSION["volkoren"]);
        unset($_SESSION["witbrood"]);
        unset($_SESSION["croissant"]);
        unset($_SESSION["boterkoek"]);
        unset($_SESSION["frangi"]);
        unset($_SESSION["eclair"]);
        unset($_SESSION["totaal"]);
        unset($_SESSION["volkorenPRIJS"]);
        unset($_SESSION["witbroodPRIJS"]);
        unset($_SESSION["croissantPRIJS"]);
        unset($_SESSION["boterkoekPRIJS"]);
        unset($_SESSION["frangiPRIJS"]);
        unset($_SESSION["eclairPRIJS"]);
        $_SESSION["message"] = "Uw wijziging is geannuleerd";
        $lijst = $bestellingSERV->getMijnBestellingen($_SESSION["id"]);
        include 'presentation/mijnbestelling.php';
    } else {
        unset($_SESSION["volkoren"]);
        unset($_SESSION["witbrood"]);
        unset($_SESSION["croissant"]);
        unset($_SESSION["boterkoek"]);
Пример #5
0
     $_SESSION["witbrood"] = $_POST["witbrood"];
 }
 if (isset($_POST["croissant"])) {
     $_SESSION["croissant"] = $_POST["croissant"];
 }
 if (isset($_POST["boterkoek"])) {
     $_SESSION["boterkoek"] = $_POST["boterkoek"];
 }
 if (isset($_POST["frangipane"])) {
     $_SESSION["frangi"] = $_POST["frangipane"];
 }
 if (isset($_POST["eclair"])) {
     $_SESSION["eclair"] = $_POST["eclair"];
 }
 if (isset($_SESSION["id_bestelling"])) {
     $bestellingSERV = new BestellingService();
     $bestelling = $bestellingSERV->getBestelling($_SESSION["id_bestelling"]);
     if ($_POST["volkoren"] != $bestelling->getVolkoren() || $_POST["witbrood"] != $bestelling->getWitbrood() || $_POST["croissant"] != $bestelling->getCroissant() || $_POST["boterkoek"] != $bestelling->getBoterkoek() || $_POST["frangipane"] != $bestelling->getFrangipane() || $_POST["eclair"] != $bestelling->getEclair()) {
         //totaal
         $totaal = $_SESSION["volkoren"] * $_SESSION["volkorenPRIJS"] + $_SESSION["witbrood"] * $_SESSION["witbroodPRIJS"] + $_SESSION["croissant"] * $_SESSION["croissantPRIJS"] + $_SESSION["boterkoek"] * $_SESSION["boterkoekPRIJS"] + $_SESSION["frangi"] * $_SESSION["frangiPRIJS"] + $_SESSION["eclair"] * $_SESSION["eclairPRIJS"];
         $_SESSION["totaal"] = $totaal;
         $_SESSION["navigatie"] = true;
         include 'presentation/afrekenen.php';
     } else {
         $_SESSION["message"] = "U heeft niks gewijzigd";
         header('location: bestel.php?wat=melding');
         exit(0);
     }
 } elseif (!empty($_POST["volkoren"]) || !empty($_POST["witbrood"]) || !empty($_POST["croissant"]) || !empty($_POST["boterkoek"]) || !empty($_POST["frangipane"]) || !empty($_POST["eclair"])) {
     //totaal
     $totaal = $_SESSION["volkoren"] * $_SESSION["volkorenPRIJS"] + $_SESSION["witbrood"] * $_SESSION["witbroodPRIJS"] + $_SESSION["croissant"] * $_SESSION["croissantPRIJS"] + $_SESSION["boterkoek"] * $_SESSION["boterkoekPRIJS"] + $_SESSION["frangi"] * $_SESSION["frangiPRIJS"] + $_SESSION["eclair"] * $_SESSION["eclairPRIJS"];