-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathadmin.autorzy.lista.php
47 lines (39 loc) · 1.25 KB
/
admin.autorzy.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
46
47
<?php
require_once 'vendor/autoload.php';
use Ibd\Autorzy;
$autorzy = new Autorzy();
$select = $autorzy->pobierzSelect();
$lista = $autorzy->pobierzWszystko($select);
include 'admin.header.php';
?>
<h2>
Autorzy
<small><a href="admin.autorzy.dodaj.php">dodaj</a></small>
</h2>
<?php if (isset($_GET['msg']) && $_GET['msg'] == 1): ?>
<p class="alert alert-success">Autor został dodany.</p>
<?php endif; ?>
<table id="autorzy" class="table table-striped">
<thead>
<tr>
<th>Id</th>
<th>Imię</th>
<th>Nazwisko</th>
<th> </th>
</tr>
</thead>
<tbody>
<?php foreach ($lista as $a): ?>
<tr>
<td><?= $a['id'] ?></td>
<td><?= $a['imie'] ?></td>
<td><?= $a['nazwisko'] ?></td>
<td>
<a href="admin.autorzy.edycja.php?id=<?= $a['id'] ?>" title="edycja" class="aEdytujAutora"><em class="fas fa-pencil-alt"></em></a>
<a href="admin.autorzy.usun.php?id=<?= $a['id'] ?>" title="usuń" class="aUsunAutora"><em class="fas fa-trash"></em></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php include 'admin.footer.php'; ?>