Changeset:
        6d630965e7fa
        
https://sourceforge.net/p/mrbs/hg-code/ci/6d630965e7fa15c2a4665d6d0ed2d1f78999c33a
Author:
        Campbell Morrison <[email protected]>
Date:
        Tue Mar 28 11:05:48 2017 +0100
Log message:

Added day and month capability

diffstat:

 web/index.php |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 57f215cabb52 -r 6d630965e7fa web/index.php
--- a/web/index.php     Tue Mar 28 10:46:24 2017 +0100
+++ b/web/index.php     Tue Mar 28 11:05:48 2017 +0100
@@ -14,6 +14,11 @@
   
   switch ($view)
   {
+    case 'day':
+      $result['start'] = get_start_first_slot($month, $day, $year);
+      $result['end'] = get_end_last_slot($month, $day, $year);
+      break;
+      
     case 'week':
       $day_of_week = date('w', mktime(12, 0, 0, $month, $day, $year));
       $days_after_start_of_week = ($day_of_week + DAYS_PER_WEEK - $weekstarts) 
% 7;
@@ -21,6 +26,11 @@
       $result['end'] = get_end_last_slot($month, $day + (DAYS_PER_WEEK - 1) - 
$days_after_start_of_week, $year);
       break;
       
+    case 'month':
+      $result['start'] = get_start_first_slot($month, 1, $year);
+      $result['end'] = get_end_last_slot($month + 1, 0, $year);
+      break;
+      
     default:
       trigger_error("Unsupported view: '$view'", E_USER_NOTICE);
       break;
@@ -260,7 +270,7 @@
   exit;
 }
 
-$view = 'week';
+$view = 'day';
 $interval = get_interval($view, $month, $day, $year);
 $entries = get_entries_by_area($area, $interval['start'], $interval['end']);
 $map = get_map($area, $entries, $interval);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to