[guadec-web] Split columns for days in lunch



commit 7716c60b0173516ee6da463edb8606c8d248ae59
Author: Alexandre Franke <alexandre franke gmail com>
Date:   Fri Jul 25 01:40:57 2014 +0200

    Split columns for days in lunch

 guadec/access-register.php |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/guadec/access-register.php b/guadec/access-register.php
index 3e0fe83..3ad092e 100644
--- a/guadec/access-register.php
+++ b/guadec/access-register.php
@@ -180,7 +180,10 @@ function display_accommodation($result){
 function display_lunch($result){
        echo "<div>";
        echo "<table class='regtable'><thead><tr><th>ID</th><th>Name</th>
-                               <th>Lunch days</th>
+                               <th>Saturday</th>
+                               <th>Sunday</th>
+                               <th>Monday</th>
+                               <th>Tuesday</th>
                                <th>Dietary requirements</th>
                                <th>Payment Status</th>
                                </tr></thead>";
@@ -189,13 +192,16 @@ function display_lunch($result){
                echo "<tr>";
                echo "<td>"; echo $results['id']; echo "</td>";
                echo "<td>"; echo $results['name']; echo "</td>";
-               echo "<td>"; echo $results['lunchdays']; echo "</td>";
+               echo "<td>"; if (in_array("lunch_saturday", $results['lunchdays']) { echo "✓";}; echo "</td>";
+               echo "<td>"; if (in_array("lunch_sunday", $results['lunchdays']) { echo "✓";}; echo "</td>";
+               echo "<td>"; if (in_array("lunch_monday", $results['lunchdays']) { echo "✓";}; echo "</td>";
+               echo "<td>"; if (in_array("lunch_tuesday", $results['lunchdays']) { echo "✓";}; echo "</td>";
                echo "<td>FIXME</td>";
                echo "<td>"; echo $results['payment']; echo "</td>";
                echo "</tr>";
        }
        echo"</tbody>";
-       echo "<tfoot><tr><td>Total</td><td colspan='4'>"; echo count($result); echo " people with meals</td>
+       echo "<tfoot><tr><td>Total</td><td colspan='6'>"; echo count($result); echo " people with meals</td>
                                </tr></tfoot>";
        echo "</table></div>";
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]