-
Notifications
You must be signed in to change notification settings - Fork 0
/
displaydados.php
105 lines (73 loc) · 3.19 KB
/
displaydados.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
96
97
98
99
100
101
102
103
104
105
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Loja | MMDesign</title>
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="imagens/icon-separador.png">
</head>
<body>
<div class="contentor">
<header class="grid-header">
<?php include('header.php'); ?>
<div class="row">
<div class="col-12 img-video carousel">
<img src="imagens/slideshow1.jpg" alt="Projeto 2017">
</div>
</div>
</header>
<main class="grid-main dados">
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<?php
unset($_SESSION['articles']);
include('php/readfile.php');
$encomedas = lerFicheiro('php/data.txt');
?>
<h4>Nome:</h4>
<?php echo '<div>' . ' ' . $encomedas[$_GET['idEncomenda']]['nome'] . ' ' . '</div>'; ?>
<h4>Email:</h4>
<?php echo '<div>' . ' ' . $encomedas[$_GET['idEncomenda']]['email'] . ' ' . '</div>'; ?>
<h4>Número de Telemóvel:</h4>
<?php echo '<div>' . ' ' . $encomedas[$_GET['idEncomenda']]['tlmvl'] . ' ' . '</div>'; ?>
<h4>Morada:</h4>
<?php echo '<div>' . ' ' . $encomedas[$_GET['idEncomenda']]['morada'] . ' ' . '</div>'; ?>
<h4>Número do Cartão:</h4>
<?php echo '<div>' . ' ' . $encomedas[$_GET['idEncomenda']]['nCartao'] . ' ' . '</div>'; ?>
<h4>Artigo(s):</h4>
<?php
for($i=0; $i<count($encomedas[$_GET['idEncomenda']]['items']); $i++){
echo '<div style="display: inline-block; margin-right: 50px; float: left">';
echo '<div class="img-descricao-article" style="max-width: 250px"></div>';
echo '<div><h5>Preço:</h5>' . ' ';
echo '<span class="idDisplay">' . $encomedas[$_GET['idEncomenda']]['items'][$i]['id'] . '</span>';
echo '€' . '</div>';
echo '<div><h5>' . 'Quantidade: </h5>' . $encomedas[$_GET['idEncomenda']]['items'][$i]['quantity'] . ' ' . '</div>';
echo '</div>';
}
?>
</div>
<div class="col-2"></div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4">
<form method="post" action="php/sendmail.php">
<input type="hidden" name="idEncomenda" value="<?php echo $_GET['idEncomenda']; ?>">
<input class="botao" type="submit" value="Confirmar">
</form>
</div>
</div>
</main>
</div>
<footer class="grid-footer">
<?php include('footer.html'); ?>
</footer>
<script src="javascript/javascript.js"></script>
<script src="javascript/slideshow.js"></script>
<script src="javascript/displaydadosarticle.js"></script>
</body>