-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectProduct.php
More file actions
100 lines (94 loc) · 3.24 KB
/
Copy pathselectProduct.php
File metadata and controls
100 lines (94 loc) · 3.24 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
require_once('./reqSelect.php');
$products = new select();
$afficherPro = $products->afficher();
// var_dump($afficherPro);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<title>Document</title>
</head>
<body>
<section class="intro">
<div class="bg-image h-100" style="background-image: url('https://mdbootstrap.com/img/Photos/new-templates/tables/img2.jpg');">
<div class="mask d-flex align-items-center h-100" style="background-color: rgba(0,0,0,.25);">
<div class="container">
<div class="row justify-content-center">
<div class="col-12">
<div class="card bg-dark shadow-2-strong">
<div class="card-body">
<div class="table-responsive">
<a href="./Addproduct.php" class="btn btn-primary " role="button" aria-disabled="true">Add</a>
<table class="table table-dark table-borderless mb-0">
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">image</th>
<th scope="col">name</th>
<th scope="col">prix</th>
<th scope="col">quentite</th>
<th scope="col">actins</th>
</tr>
</thead>
<tbody>
<?php foreach($afficherPro as $elements):?>
<tr>
<th><?php echo $elements['id'] ?></th>
<td><img src="<?php echo $elements['image'] ?>" width="50px"alt=""></td>
<td><?php echo $elements['name'] ?></td>
<td><?php echo $elements['prix'] ?></td>
<td><?php echo $elements['quantite'] ?></td>
<td>
<form action="./deleteLogique.php" method="POST">
<input name="id" type="hidden" value="<?php echo $elements['id'] ?>">
<button type="submit" class="btn btn-danger" name="submit">delete</button>
</form>
<form action="./selectOneProduct.php" method="POST">
<input type="hidden" name="id" value="<?php echo $elements['id'] ?>">
<button type="submit" class="btn btn-danger" name="submit">update</button>
</form>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<style>
html,
body,
.intro {
height: 100%;
}
table td,
table th {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
thead th,
tbody th {
color: #fff;
}
tbody td {
font-weight: 500;
color: rgba(255,255,255,.65);
}
.card {
border-radius: .5rem;
}
</style>
</body>
</html>