-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetalhes.php
More file actions
84 lines (72 loc) · 3.13 KB
/
detalhes.php
File metadata and controls
84 lines (72 loc) · 3.13 KB
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
<?php
include 'dados.php';
$id = $_GET['id'];
?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="images/ICON_AR.ico" type="image/x-icon">
<!-- Icons google -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<!-- Icons FontAwesome -->
<script src="https://kit.fontawesome.com/687b2e222f.js" crossorigin="anonymous"></script>
<!-- Link angular -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<!-- Link jQuery -->
<script src="https://code.jquery.com/jquery-3.6.3.js" integrity="sha256-nQLuAZGRRcILA+6dMBOvcRh5Pe310sBpanc6+QBmyVM=" crossorigin="anonymous"></script>
<title>Detalhes do Produto</title>
</head>
<body>
<?php include 'cabecalho.html'?>
<section class="main-topo">
<a href="index.php"><i class="fa-solid fa-house"></i>Página inicial</a>
<p>Produtos</p>
</section>
<section id="area-detalhes">
<?php foreach ($dados as $dado){ if ($dado['id']==$id) {?>
<div id="produtos">
<div id="img-geral">
<img src="<?php echo $dado['image']; ?>" alt="" >
</div>
<div id="area-dados">
<h2><?php echo $dado['nome']; ?></h2>
<span id="img-linha">
<img src="images/linha-azul.svg" alt="">
</span>
<p id="descricao">
<?php echo mb_strimwidth($dado['descricao'],0,341,'<a href="#descricao-completa"> Ver mais...</a>');?>
</p>
<div id="dados-preco">
<h3>
R$<?php echo number_format(($dado['preco']),2,',','.');?>
<span class="sem-promo">R$<?php echo number_format(($dado['preco']+500),2,',','.');?></span>
</h3>
<p>
até <span class="promo">5x</span> de <span class="promo">R$<?php echo number_format(($dado['preco']/5),2,',','.');?></span> sem juros
</p>
</div>
<div id="btn-compra">
<button>Comprar</button>
</div>
</div>
</div>
<?php if (mb_strlen($dado['descricao']) > 341) {?>
<hr style="width: 80%;">
<div id="descricao-completa">
<h3>Informações do Produto</h3>
<p>
<?php echo ($dado['descricao']);?>
</p>
</div>
<?php }?>
<?php }}?>
</section>
<?php include 'rodape.html'?>
<script src="js/script.js"></script>
</body>
</html>