".$_SESSION['nomPanier'];
if($_SESSION['deadLine'])
echo "(Dead Line passée)";
echo "
";
echo "Dead Line : ".date('d/m/y H:i', $timestampDeadLine)."
";
?>
Ma commande ()
ref
Description
Prix
Quantité
Prix totale
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)
{
?>
€
€
Sous total HTVA :
Sous total TTC (21%) :
Commande de groupe
ref
Description
Prix
Quantité
Prix totale
J'en veux
Etudiant qui a commander
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'])
{
?>