xxxxxxxxxx
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<meta charset="UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6
<meta http-equiv="x-ua-compatible" content="ie=edge">
7
<title>Material Design for Bootstrap</title>
8
<!-- MDB icon -->
9
<link rel="icon" href="img/mdb-favicon.ico" type="image/x-icon">
10
<!-- Font Awesome -->
11
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css">
12
<!-- Bootstrap core CSS -->
13
<link rel="stylesheet" href="css/bootstrap.min.css">
14
<!-- Material Design Bootstrap -->
15
<link rel="stylesheet" href="css/mdb.min.css">
16
<!-- MDBootstrap Datatables -->
17
<link href="css/addons/datatables.min.css" rel="stylesheet">
18
<style type='text/css'></style>
19
20
</head>
21
<body>
22
23
<?php
24
//Connexion à la base de données 'reception'
25
26
try
27
{
28
$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
29
30
$bdd = new PDO('mysql:host=localhost;dbname=gestmag;charset=utf8', 'root', 'azerty28'); //connexion à la base de données
31
}
32
catch (Exception $e) //Recherche d'erreur
33
{
34
die('Erreur : ' . $e->getMessage());
35
}
36
37
$reponse = $bdd->query('SELECT * FROM reception');
38
?>
39
40
41
<!--Affichage des resultats-->
42
43
<table class="table table-bordered" id="dtBasicExample" cellspacing="0" width="100%">
44
<thead>
45
<tr>
46
<th class="th-sm">date</th>
47
<th class="th-sm">Reference</th>
48
<th class="th-sm">Fournisseur</th>
49
<th class="th-sm">N° BL</th>
50
<th class="th-sm">N° commande</th>
51
<th class="th-sm">Qté cdée</th>
52
<th class="th-sm">Qté reçue</th>
53
<th class="th-sm">Qté acceptée</th>
54
<th class="th-sm">N° OF</th>
55
<th class="th-sm">N° lot</th>
56
<th class="th-sm">Commentaire</th>
57
</tr>
58
</thead>
59
<tbody>
60
<?php
61
while ($donnees = $reponse->fetch()){
62
?>
63
<tr>
64
<td><?php echo 'date'; ?></td>
65
<td><?php echo $donnees['reference']; ?></td>
66
<td><?php echo $donnees['fournisseur']; ?></td>
67
<td><?php echo $donnees['num_bl']; ?></td>
68
<td><?php echo $donnees['num_cde']; ?></td>
69
<td><?php echo $donnees['qte_cde']; ?></td>
70
<td><?php echo $donnees['qte_recept']; ?></td>
71
<td><?php echo $donnees['qte_accept']; ?></td>
72
<td><?php echo $donnees['num_of']; ?></td>
73
<td><?php echo $donnees['num_lot']; ?></td>
74
<td><?php echo $donnees['comments']; ?></td>
75
</tr>
76
</tbody>
77
<?php
78
}
79
?>
80
81
</table>
82
83
<!-- jQuery -->
84
<script type="text/javascript" src="js/jquery.min.js"></script>
85
<!-- Bootstrap tooltips -->
86
<script type="text/javascript" src="js/popper.min.js"></script>
87
<!-- Bootstrap core JavaScript -->
88
<script type="text/javascript" src="js/bootstrap.min.js"></script>
89
<!-- MDB core JavaScript -->
90
<script type="text/javascript" src="js/mdb.min.js"></script>
91
<!-- Your custom scripts (optional) -->
92
<script type="text/javascript"></script>
93
<!-- MDBootstrap Datatables -->
94
<script type="text/javascript" src="js/addons/datatables.min.js"></script>
95
96
97
<script>
98
$(document).ready(function () {
99
$('#dtBasicExample').DataTable();
100
$('.dataTables_length').addClass('bs-select');
101
});
102
</script>
103
104
105
</body>
106
</html>
107
1
1
1
1
Console errors: 0