public function API_Commande_Recupere($id_commande) { if(!$this->peutVoirCommande($id_commande)) throw new ErrorException('vous n\'avez pas l\'autorisation'); return $this->bdd->Commande_Recupere($id_commande); }
<?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(); });