Example #1
0
	<!-- Latest compiled and minified JavaScript -->
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
	<link rel="icon" type="image/png" href="/Algobreizh/images/AlgoBreizh_Logo_48px.png"/>
</head>
<body style="background-image: url(../images/ChlorophyteVideo_FR-FR7444795778_1366x768.jpg); background-size: cover; background-repeat: no-repeat; background-attachment: fixed;">
	<?php 
include $__ROOT__ . "/includes/navbar.html";
?>
	<div style="background: rgba(500, 500, 500, 0.8); width: 70%; margin-left: 15%; margin-right: 15%; position: absolute; height: 100%; padding-top: 5%">
		<table class="list-panier">
		<?php 
if (count($_SESSION['panier']) <= 0) {
    echo "<p>Vous n'avez pas d'article.</p>";
} else {
    foreach ($_SESSION['panier'] as $value) {
        $info = getItemInfoById($value['item'])[0];
        ?>
			<tr>
				<td>
					<form class="form-item">
						<table>
							<tr>
								<td><img src=<?php 
        echo "/Algobreizh/" . $info["path"];
        ?>
></td>
								<td><p> <?php 
        echo $info['libelleArticle'];
        ?>
<input type="hidden" name="remove_code" value=<?php 
        echo $info['idArticle'];
Example #2
0
function insertDetails($tabProduit, $idCommande)
{
    $db = createConnexion();
    $sql = "INSERT INTO `details`(`codeArticle`, `qteArticle`, `montant`, `idCommande`, `idArticle`) VALUES (:codeArticle,:qte,:montant,:idCommande,:idArticle)";
    $stmt = $db->prepare($sql);
    foreach ($tabProduit as $produit) {
        $info = getItemInfoById($produit["item"])[0];
        $stmt->execute(array("codeArticle" => $info["codeArticle"], "qte" => $produit["qte"], "montant" => getPrixTVA($produit), "idCommande" => $idCommande, "idArticle" => $info["idArticle"]));
    }
}