-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfos-produit-old.php
95 lines (74 loc) · 3.21 KB
/
infos-produit-old.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once('includes/dbpa.php');
if (isset($_GET['id_product']) && !empty($_GET['id_product'])) {
$product_id = $_GET['id_product'];
$query = $dbh->prepare('SELECT id_product, nom_product, price_product, stock, photo, description, delivery_time, promotion, rating, comments FROM PRODUCT WHERE id_product = ?');
$query->execute([$product_id]);
$product = $query->fetch(PDO::FETCH_ASSOC);
if (!$product) {
header('Location: boutique.php');
exit();
}
} else {
header('Location: boutique.php');
exit();
}
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Amimal</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="STYLE/style_global.css" rel="stylesheet" />
<link href="STYLE/infos-animal.css" rel="stylesheet" />
<link href="STYLE/dark_mode.css" rel="stylesheet" />
<link href="STYLE/newsletter&footer.css" rel="stylesheet" />
<link rel="icon" href="IMAGES/logo-icon.png" type="image/png">
</head>
<body>
<header>
<?php include "includes/main_navbar.php"; ?>
</header>
<main>
<section class="section-1">
<div class="container">
<div class="row">
<div class="col-12 col-lg-6 custom-img">
<div class="image-container">
<img src="backend/<?= htmlspecialchars($product['photo']); ?>" alt="<?= htmlspecialchars($product['nom_product']); ?>" class="img-fluid" width="80%" height="80%" />
</div>
</div>
<div class="col-12 col-lg-5 custom-text info">
<a href="boutique.php" class="lien-back">< Tous nos produits</a>
<p class="espece-p"><?= htmlspecialchars($product['price_product']); ?>€</p>
<h2 class="orange"><?= htmlspecialchars($product['nom_product']); ?></h2>
<p><?= htmlspecialchars($product['description']); ?></p>
<p>Stock : <?= htmlspecialchars($product['stock']); ?></p>
<p>Délai de livraison : <?= htmlspecialchars($product['delivery_time']); ?> jours</p>
<p>Promotion : <?= htmlspecialchars($product['promotion']); ?>%</p>
<p>Évaluation : <?= htmlspecialchars($product['rating']); ?> / 5</p>
<p>Commentaires : <?= htmlspecialchars($product['comments']); ?></p>
<a href="#" class="btn btn-primary savoir-plus-btn btn-orange">Ajouter au panier<img src="IMAGES/right-arrow.png" class="btn-icon"></a>
</div>
</div>
</section>
<section class="section-2">
<div class="container">
<div class="row">
<h2 class="titre vert">Description complète</h2>
<p><?= htmlspecialchars($product['description']); ?></p>
</div>
</section>
<?php include "includes/newsletter_front.php"; ?>
</main>
<footer>
<?php include "includes/footer_front.php"; ?>
</footer>
<?php include "includes/dark_mode.php"; ?>
</body>
</html>