-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhistorico.php
93 lines (76 loc) · 2.18 KB
/
historico.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
<?php
include_once('./DAO/dao.php');
?>
<!DOCTYPE html>
<html lang="en">
<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="./bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="./bootstrap/css/style.css">
<script src="./bootstrap/js/jQuery.min.js"></script>
<title>Historico</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar navbar-dark bg-primary fixed-top">
<a href="home.php" class="navbar-brand">AngoCar</a>
<div class="collapse navbar-collapse" id="navbarCollapse2">
<div class="navbar-nav">
<a href="home.php" class="nav-item nav-link active">Home</a>
<a href="carros.php" class="nav-item nav-link">Carros</a>
<a href="motos.php" class="nav-item nav-link">Motos</a>
<a href="vender.php" class="nav-item nav-link">Vender</a>
</div>
</div>
</nav>
<table class="table margemTop tableMargin">
<thead class="thead-dark">
<tr>
<th scope="col">Nome</th>
<th scope="col">Sobrenome</th>
<th scope="col">Numero</th>
<th scope="col">Morada</th>
<th scope="col">Marca</th>
<th scope="col">Modelo</th>
<th scope="col">Data</th>
</tr>
</thead>
<tbody>
<?php
foreach (relatorio() as $value)
{
echo "
<tr>
<td>$value->nome</td>
<td>$value->sobrenome</td>
<td>$value->numero</td>
<td>$value->morada</td>
<td>$value->marca</td>
<td>$value->automovel</td>
<td>$value->data</td>
</tr>
";
}
?>
</tbody>
</table>
<footer class="bg-light text-center text-lg-start fixed-bottom">
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2)">
© 2021 Copyright:
<a class="text-dark">Kakidiako Afonso António</a>
</div>
</footer>
</body>
</html>
<?php
if(isset($_POST['salvar']))
{
updateCarro($_POST);
}
if(isset($_POST['Cadastrar']))
{
include_once('./DAO/dao.php');
cadastrarCarro($_POST);
}
?>