-
Notifications
You must be signed in to change notification settings - Fork 0
/
editora_lista.php
45 lines (44 loc) · 1.42 KB
/
editora_lista.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
<?php
// Importar o arquivo de conexão
require_once 'conexao.php';
// Importar o arquivo responsável pelo modelo de dados da livraria
require_once 'livraria_db.php';
// Buscar todos os editoras
$editoras = filtrar_todas_editoras();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Lista de editoras</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Lista de Editoras</h1>
</div>
<div class="panel panel-default">
<div class="panel-body">
<a href="acervo_lista.php" class="btn btn-primary">Visualizar Acervos</a>
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>NOME</th>
</tr>
</thead>
<tbody>
<?php foreach ( $editoras as $editora ) : ?>
<tr>
<td><?php echo $editora['id']; ?></td>
<td><?php echo $editora['nome']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</body>
</html>