-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathliste_paragraphe.php
52 lines (40 loc) · 1.43 KB
/
liste_paragraphe.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
<?php
include("entete.php");
// Selectionne le paragraphe
$verif_parag = "SELECT * FROM `paragraphe` WHERE id_histoire =?";
$prep_parag = $BDD -> prepare($verif_parag);
$prep_parag-> execute(array($_GET['id']));
$tab = $prep_parag->fetchAll();
if($_SESSION["connected"] && $_SESSION['admin']==1){
?>
<div class="container d-flex justify-content-center">
<table class="table" >
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Nom du paragraphe</th>
<th scope="col">Contenu</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<?php
foreach ($tab as $key => $ligne) {
?>
<tr class="tableParag align-middle">
<td> <?=$ligne["parag_numero"]?> </td>
<td> <?=$ligne["parag_nom"]?> </td>
<td> <?=$ligne["parag_contenu"]?> </td>
<td>
<form role="form" method="post" action="paragraphe_modif.php?numParag=<?=$ligne["parag_numero"]?>&numHist=<?=$_GET['id']?>">
<button class="btn btn-outline-light" type="submit">Modifier ce paragraphe</button> </form>
</td>
</tr>
<?php
} ?>
</tbody>
</table>
</div>
<?php }
?>
<?php include("footer.php") ?>