forked from niecoola/Perusnia-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgaleri.php
More file actions
44 lines (40 loc) · 1.52 KB
/
Copy pathgaleri.php
File metadata and controls
44 lines (40 loc) · 1.52 KB
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
<?php
session_start();
if ($_SESSION["userdata"]["id_level"] != 1) {
header('Location:404.php');
}
$active = "about_website.php";
require './layout/headerBookCenter.php';
require_once './controller/GaleryController.php';
$galery = new GaleryController();
$data = $galery->tampil();
?>
<h4 class="my-4">Galeri Perusnia</h4>
<a href="galeri_input.php" id="addBook" class="btn btn-success "><i class="fa-solid fa-plus"></i> Add Picture</a>
<div class="table-responsive py-3">
<table class="table table-hover" id="table">
<thead>
<tr>
<th>No</th>
<th>Gambar</th>
<th>Deskripsi</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $no = 1;
foreach ($data as $d) : ?>
<tr>
<td><?= $no++; ?></td>
<td><img src="./assets/images/<?= $d['foto'] ?>" alt="Foto Perusnia" width="200px"></td>
<td><?= $d['deskripsi']; ?> </td>
<td>
<a href="galeri_edit.php?id_galeri=<?= $d['id_galeri']; ?>" class="btn btn-warning"><i class=" fa fa-edit" role="button"></i></a>
<a onclick="confirmationHapusData('deleteGalery.php?id_galeri=<?= $d['id_galeri']; ?>')" class="btn btn-danger" role="button"><i class="fa fa-trash"></i></a>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
<?php require './layout/footerBookCenter.php' ?>