} if (!$erreur){ switch($action){ Case "ajout": ajouterArticle($l,$q,$p); break; Case "suppression": supprimerArticle($l); break; Case "refresh" : for ($i = 0 ; $i < count($QteArticle) ; $i++) { modifierQTeArticle($_SESSION['panier']['libelleProduit'][$i],round($QteArticle[$i])); } break; Default: break; } } echo '<?xml version="1.0" encoding="utf-8"?>';?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> <head> <title>Votre panier</title> </head> <body>
$nombre_resultats = mysql_num_rows($selection_recherche); if ($nombre_resultats == 0) { echo '<h2><strong>Ce jeu n\'est pas Dispo sur Notre Site</h2></strong>'; } elseif ($resultats = mysql_fetch_array($selection_recherche)) { $nomProduit = $resultats['nom']; $prixProduit = $resultats['prix']; $console = $resultats['console']; } creationPanier(); ajouterArticle($nomProduit, $prixProduit, $console); header('Location:index.php?select=produit&prd=InfoGame&d=' . $resultats['id'] . '#n1'); } mysql_close($conx); } else { die("Echec de connexion au serveur de base de données."); } } if (isset($_GET['name']) && isset($_GET['con'])) { $nomProduit = htmlspecialchars($_GET['name']); $console = htmlspecialchars($_GET['con']); supprimerArticle($nomProduit, $console); header('Location:index.php?select=account&prd=commandes'); } if (isset($_POST['name']) && isset($_POST['qt']) && $_POST['qt'] <= 5) { $nomProduit = htmlspecialchars($_POST['name']); modifierQTeArticle($nomProduit, $_POST['qt']); header('Location:index.php?select=account&prd=commandes'); } } else { echo "<h2><strong>Vous Devez Vous connecter Si vous Voulez Achetez Nos produit! Par <a href='index.php?select=account'>ici</a></h2></strong>"; }