From 5514c16cb06fbf772ff66c200ea3f930fd31f8c0 Mon Sep 17 00:00:00 2001
From: cortylal <alexcortyl@gmail.com>
Date: Thu, 19 Jun 2014 01:28:35 +0200
Subject: [PATCH] stats

---
 view/stats.php | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/view/stats.php b/view/stats.php
index f4a400e..6b671f6 100644
--- a/view/stats.php
+++ b/view/stats.php
@@ -9,18 +9,26 @@
                 <th>Facture moyenne : </th>
                 <th><?php $tmp = $stats->factureMoy(); $nb_formated = number_format($tmp["value"], 2, ',', ' '); echo $nb_formated; ?></th>
         </thead>
-        <tbody>
-                <tr>
-                    <td>Nombre moyen d'animal par client : </td>
-                    <td><?php $tmp = $stats->nbAnimalMoyClient(); $nb_formated = number_format($tmp["value"], 2, ',', ' '); echo $nb_formated; ?></td>
-                </tr>
-        </tbody>
+        <thead>
+                <th>Nombre moyen d'animal par client : </th>
+                <th><?php $tmp = $stats->nbAnimalMoyClient(); $nb_formated = number_format($tmp["value"], 2, ',', ' '); echo $nb_formated; ?></th>
+        </thead>
       </table>
 
       <table class="table">
-            <caption> <th> Top 3 des plus gros client : </th> </caption>
         <thead>
-                <th><?php print_r($stats->top3Client()); ?></th>
+                <th>Nom </th>
+                <th>Prenom </th> 
+                <th>Total dépensé </th> 
         </thead>
-</table>
+          <tbody>
+          <?php foreach ($stats->top3Client() as $ligne): ?>
+            <tr>
+                <td><?php echo $ligne["nom"]; ?> </td>
+                <td><?php echo $ligne["prenom"]; ?> </td>
+                <td><?php echo $ligne["prix"]; ?> </td> 
+            </tr>
+          <?php endforeach; ?>
+        </tbody>
+      </table>
 	</div>
\ No newline at end of file
-- 
GitLab