-
Notifications
You must be signed in to change notification settings - Fork 1
/
details.php
104 lines (80 loc) · 3.74 KB
/
details.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
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
101
102
103
104
<?php
session_start();
require_once "functions/index.function.php";
$listecommandes=getcommandes();
// var_dump($listecommandes);
// echo count($listecommandes);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/squall.css">
<title>Squall Gourmet</title>
</head>
<body>
<div class="jumbotron jumbotron-fluid">
<h3 class="display-4 text-center">
<img width="7%" src="assets/img/squall.ico" alt="">
<span id="squalltitle">
Squall Gourmet
</span>
</h3>
<hr>
<div class="container">
<div class="row">
<div class="col-md-10 offset-md-1">
<h5 class="display-5">Commands list </h5>
<hr>
<!-- ############################# -->
<table class="table table-borderless">
<thead class="thead-light">
<th>Numéro</th>
<th>Date</th>
<th>Nombre de produits</th>
<th>Montant Total</th>
<th>Détails</th>
</thead>
<tbody>
<!-- A afficher si aucun produit n'est selectionné -->
<?php if(count($listecommandes)==0) { ?>
<tr >
<td class="font-italic text-center" colspan="5">
Vous n'avez pas encore enregistré de commandes!
</td>
</tr>
<?php } ?>
<?php foreach ($listecommandes as $c) {
//generer la date
$date= substr($c['numero'], 4,8);
$date = substr($date, 0,2)."-".substr($date, 2,2)."-".substr($date, 4,4);
$nbr = getnbrprod($c['id_commande'])[0];
?>
<tr >
<td> <?=$c['numero']?> </td>
<td> <?=$date?> </td>
<td> <?=$nbr?> </td>
<td> <?=$c['total']?> </td>
<td>
<a href="detailprod.php?idCom=<?=$c['id_commande']?>" class="btn btn-sm btn-warning text-white squall"><i class="fa fa-edit"></i>Détails</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<hr>
<div class="form-group">
<a href="index.php" ><button type="button" class="btn btn-outline-dark ml-2"> Retour</button></a>
</div>
<!-- ############################# -->
</div>
</div>
</div>
</div>
<script src="assets/js/jquery.js"></script>
<!-- <script src="assets/js/myScript.js"></script> -->
</body>
</html>