-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduto-consulta.php
75 lines (71 loc) · 2.97 KB
/
produto-consulta.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
<?php
include("produto-c.php");
//pega por post o componente codigo do formulario -F.
@$idProduto = $_POST['idProduto'];
@$nomeProduto = $_POST['nomeProduto'];
@$idModelo = $_POST['idModelo']; //FK
@$serialProduto = $_POST['serialProduto'];
@$dataEntradaProduto = $_POST['dataEntradaProduto'];
$grupo = selectTodosProdutos();
//var_dump($grupo);
?>
<html lang="pt-BR">
<head>
<title>Consultar - Produto</title>
<?php
include("tmpl/head.php");
?>
</head>
<!--includes-->
<?php
include("tmpl/header.php");
include("tmpl/footer.php");
?>
<!--table-->
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="form">
<h3>Consultar - Produto</h3>
<table class="table">
<thead class="thead-dark">
<tr>
<th>ID: </th>
<th>Modelo: </th>
<th>Nome: </th>
<th>Serial: </th>
<th>Data de Entrada: </th>
<th>Status</th>
<th>Editar</th>
<th>Excluir</th>
</tr>
</thead>
<tbody>
<?php foreach ($grupo as $Produtos) { ?>
<tr>
<td><?=$Produtos["idProduto"]?></td>
<td><?=$Produtos["idModelo"]?></td>
<td><?=$Produtos["nomeProduto"]?></td>
<td><?=$Produtos["serialProduto"]?></td>
<td><?=$Produtos["dataEntradaProduto"]?></td>
<td><?=$Produtos["statusProduto"]?></td>
<td>
<form nome="alterar" action="produto-a.php" method="POST">
<input type="hidden" name="idProduto" value=<?=$Produtos["idProduto"]?> />
<input type="submit" name="Editar" value="Editar" />
</form>
</td>
<td>
<form name="excluir" action="produto-c.php" method="POST">
<input type="hidden" name="idProduto" value=<?=$Produtos["idProduto"]?> />
<input type="submit" name="acao" value="Excluir" onclick="alert('Cadastro excluído com sucesso.');"/>
</form>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>