Beispiel #1
0
    public function API_Commande_Lister($id_compte=null,$etat=null, $not_etat=null, $date_debut=null,$date_fin=null,$preparation_termine=null)
    {   
        if(!$this->estAuthentifier())
        {
            throw new ErrorException("Vous devez vous authentifier pour accéder à cette fonctionalitée.");
        }

        if(!$this->estAdmin())
        {   
            $id_compte=$this->compteConnecte()->id_compte;
        }
        return $this->bdd->Commande_Lister($id_compte,$etat,$not_etat,$date_debut,$date_fin,$preparation_termine);
    }
Beispiel #2
0
<?php
require_once('./private/config.php');
require_once('./private/entities.php');
require_once('./private/api.php');
require_once('./private/layout.php');

$bdd = new BDD();
$commandes = $bdd->Commande_Lister();
foreach ($commandes as $commande)
    {
        echo $commande->id_commande;?> </br><?php
      
    }
require_once('./private/config.php');
require_once('./private/bdd.php');
require_once('./private/api.php');
require_once('./private/layout.php');

$id_commande = (int)$_REQUEST['id_commande'];
$valider_commande = (int)$_REQUEST['valider_commande'];

$bdd = new BDD();

$detail = $bdd->Commande_Recupere($id_commande);
$compte = $bdd->Compte_Recuperer($detail->id_compte);
$elements = $bdd->Commande_lister_Elements($id_commande);

$etat='Validé';
$commandes = $bdd->Commande_Lister(null,$etat,null,null);

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <script src="libs/jquery-1.11.3.js"></script>
    <script>
        $(function(){
            $('[data-autosubmit]').change(function(){
                    $(this.form).submit();
            });