$timestampDeadLine)?1:0; if(isset($_SESSION['accesOk']) || $_SERVER['HTTP_HOST'] == $config['IP_LOCAL']) { try { $bdd = new PDO('mysql:host='.$config['host'].';dbname='.$config['dbname'].';charset=utf8', $config['username'], $config['password']); } catch (Exception $e) { die('Erreur : ' . $e->getMessage()); } ?> Titre de la page
BETA

"; echo "

".$_SESSION['nomPanier']; if($_SESSION['deadLine']) echo "(Dead Line passée)"; echo "

"; echo "Dead Line : ".date('d/m/y H:i', $timestampDeadLine)."

"; ?> query('SELECT * FROM panier WHERE idEtudiant='.$_SESSION['idEtudiant'].' AND panierId='.$_SESSION['panierId']); //vas chercher les produit de l'etudiant while ($data = $rep->fetch()) { $rep2 = $bdd->query('SELECT * FROM article WHERE id='.$data['idArticle'].' AND panierId='.$_SESSION['panierId']); $data2 = $rep2->fetch(); if($data['nombre'] > 0) { ?>
Ma commande ()
refDescriptionPrixQuantitéPrix totale
Sous total HTVA :
Sous total TTC (21%) :

query('SELECT * FROM article WHERE panierId='.$_SESSION['panierId']); //va chercher tt les article $ssTotal = 0; while ($data = $rep->fetch()) { $rep2 = $bdd->query('SELECT * FROM panier WHERE idArticle='.$data['id']); //chercher les elem du panier qui appartienne a l'article en cours $nbr = 0; $meNbr = 0; $student = ""; while($data2 = $rep2->fetch()) { //if($data2['idEtudiant'] == $_SESSION['idEtudiant']) //$meNbr = $data2['nombre']; //$nbr = $nbr+$data2['nombre']; if($data2['nombre']>0) { $rep3 = $bdd->query('SELECT * FROM etudiant WHERE id='.$data2['idEtudiant']); //Va voir le nom etudiant qui le commande $data3 = $rep3->fetch(); if($data3['enable']) { if($data2['idEtudiant'] == $_SESSION['idEtudiant']) $meNbr = $data2['nombre']; $nbr = $nbr+$data2['nombre']; $student = $student."".$data3['pseudo']."(".$data2['nombre']."); "; if(isset($sommeParEtudian[$data3['id']]['somme'])) { $sommeParEtudian[$data3['id']]['somme'] += $data['prix']*$data2['nombre']; } else { $sommeParEtudian[$data3['id']]['somme'] = $data['prix']*$data2['nombre']; $sommeParEtudian[$data3['id']]['pseudo'] = $data3['pseudo']; if($data3['id']>$idEtudianMax) $idEtudianMax = $data3['id']; } } else { if(isset($sommeParEtudian[$data3['id']]['somme'])) { $sommeParEtudian[$data3['id']]['somme'] += $data['prix']*$data2['nombre']; } else { $sommeParEtudian[$data3['id']]['somme'] = $data['prix']*$data2['nombre']; $sommeParEtudian[$data3['id']]['pseudo'] = $data3['pseudo'].'(NP)'; if($data3['id']>$idEtudianMax) $idEtudianMax = $data3['id']; } } } }; $ssTotal = $ssTotal + ($data['prix']*$nbr); if($_SESSION['deadLine'] && $nbr > 0 || !$_SESSION['deadLine']) { ?>
Commande de groupe
refDescriptionPrixQuantitéPrix totaleJ'en veuxEtudiant qui a commander
Sous total HTVA :
Sous total TTC (21%) :

"; } } ?>
Récapitulatif de la commande par étudiant
PseudoPrix HTVAPrix TTC
".$sommeParEtudian[$i]['pseudo']."".$sommeParEtudian[$i]['somme']."".round($sommeParEtudian[$i]['somme']*1.21,2)."

BETA

"; ?>
Pseudo* :
Mot de passe (vous pouvez laisser vide)
urlencode($config['recaptcha_private']), 'response'=>urlencode($_POST['g-recaptcha-response'])); $defaults = array( CURLOPT_URL => 'https://www.google.com/recaptcha/api/siteverify', CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => $params, ); curl_setopt_array($ch, $defaults); $data = curl_exec($ch); $result = json_decode($data, true); if($result["success"] && $_POST['pw']== $config['main_pw']) { $_SESSION['accesOk'] = ""; header("Refresh:0"); } else { ?>