-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproducts.php
More file actions
79 lines (79 loc) · 3.14 KB
/
products.php
File metadata and controls
79 lines (79 loc) · 3.14 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
<div class="row tm-content-row">
<div class="col-sm-12 col-md-12 col-lg-8 col-xl-8 tm-block-col">
<div class="tm-bg-primary-dark tm-block tm-block-products">
<div class="tm-product-table-container">
<table class="table table-hover tm-table-small tm-product-table">
<thead>
<tr>
<th scope="col"> </th>
<th scope="col">PRODUCT NAME</th>
<th scope="col">SOLD</th>
<th scope="col">IN STOCK</th>
<th scope="col">EXPIRE DATE</th>
<th scope="col"> </th>
</tr>
</thead>
<tbody>
<?php
$rec = $db->query("SELECT * FROM produit ")->fetchAll(PDO::FETCH_OBJ);
$productsize = sizeof($rec);
for($j=0; $j<$productsize;$j++){
echo('
<tr>
<th scope="row"><input type="checkbox" /></th>
<td class="tm-product-name">'.$rec[$j]->nom.'</td>
<td>'.$rec[$j]->prix.'</td>
<td>'.$rec[$j]->quantite_stock.'</td>
<td>28 March 2019</td>
<td>
<a href="#" class="tm-product-delete-link">
<i class="far fa-trash-alt tm-product-delete-icon"></i>
</a>
</td>
</tr>
');
}
?>
</tbody>
</table>
</div>
<!-- table container -->
<a
href="./add-product.php"
class="btn btn-primary btn-block text-uppercase mb-3" name="btnsave">Add new product</a>
<button class="btn btn-primary btn-block text-uppercase" name="btndelete">
Delete selected products
</button>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-4 col-xl-4 tm-block-col">
<div class="tm-bg-primary-dark tm-block tm-block-product-categories">
<h2 class="tm-block-title">Product Categories</h2>
<div class="tm-product-table-container">
<table class="table tm-table-small tm-product-table">
<tbody>
<?php
$rec = $db->query("SELECT * FROM categorie ")->fetchAll(PDO::FETCH_OBJ);
$productsize = sizeof($rec);
for($j=0; $j<$productsize;$j++){
echo('
<tr>
<td class="tm-product-name">'.$rec[$j]->nom_categorie.'</td>
<td class="text-center">
<a href="#" class="tm-product-delete-link">
<i class="far fa-trash-alt tm-product-delete-icon"></i>
</a>
</td>
</tr>
');
}
?>
</tbody>
</table>
</div>
<a
href="./add-categorie.php"
class="btn btn-primary btn-block text-uppercase mb-3" name="btnsave2">Add new Categorie</a>
</div>
</div>
</div>