Ejemplo n.º 1
0
 /**
  * Summary of API_commande_lister_elements
  * @param int $id_commande 
  * @throws ErrorException 
  * @return ProduitCommande[]
  */
 public function API_commande_lister_elements($id_commande)
 {   
     $id_commande=(int)$id_commande;
     
     if(!$this->peutVoirCommande($id_commande))
         throw new ErrorException('vous ne pouvez pas voir la commande');
     
     return $this->bdd->Commande_lister_Elements($id_commande);
 }
Ejemplo n.º 2
0
<?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();
            });