-
Notifications
You must be signed in to change notification settings - Fork 0
/
listproducts.php
55 lines (38 loc) · 1.15 KB
/
listproducts.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
<?php
include 'inc/connect.inc.php'; //connetion to database
include 'inc/functions.inc.php'; //functions
include 'inc/cookie.php'; //cookie status
include 'controller/product_list.php';
if( ! user_is_admin() ){
header('location: home.php');
exit(); //on bloque l'execution du code qui suit cette ligne
}
//display
include 'inc/header.inc.php'; //html header
?>
<div class="return">
<a href="user.php"><i class="fa-solid fa-arrow-rotate-left"></i></a>
</div>
<div class="listcontainer"> <!-- main.table--->
<h1>List of Products</h1>
<section class="table__body">
<table class="table">
<thead>
<tr>
<th scope="col">Id</th>
<th scope="col">Name</th>
<th scope="col">Category</th>
<th scope="col">Image</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<?php echo $list; ?>
</tbody>
</section>
</table>
</div>
</section>
<?php
include 'inc/footer.inc.php';
?>