From 743cae611eeb4436d3d8dc865c010b2b3fd0102a Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 30 Jun 2003 22:46:12 +0000 Subject: Multiple Calendar support added. --- day.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'day.php') diff --git a/day.php b/day.php index cb44d8d..8b16898 100644 --- a/day.php +++ b/day.php @@ -15,7 +15,7 @@ if ($minical_view == 'current') $minical_view = 'day'; $starttime = '0500'; $weekstart = 1; $unix_time = strtotime($getdate); -$today_today = date('Ymd', strtotime("now + $second_offset seconds")); +$today_today = date('Ymd', strtotime("now + $second_offset seconds")); $tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time)); $yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time)); $display_date = localizeDate($dateFormat_day, $unix_time); @@ -107,7 +107,10 @@ if (isset($master_array[($getdate)])) { echo ''."\n"; foreach($master_array[($getdate)]['-1'] as $allday) { echo "\n"; - echo '
'; + $event_calno = $allday['calnumber']; + if ($event_calno < 1) $event_calno=1; + if ($event_calno > 7) $event_calno=7; + echo ''; openevent("$calendar_name", "", "", @@ -245,8 +248,11 @@ if (isset($master_array[($getdate)])) { $event_end = strtotime ($this_time_arr[($event_length[$i]['key'])]['event_end']); $event_start = date ($timeFormat, $event_start); $event_end = date ($timeFormat, $event_end); + $event_calno = $this_time_arr[($event_length[$i]['key'])]['calnumber']; + if ($event_calno < 1) $event_calno=1; + if ($event_calno > 7) $event_calno=7; - echo ''."\n"; + echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; @@ -255,8 +261,10 @@ if (isset($master_array[($getdate)])) { echo '
'.$event_start.' - '.$event_end.''."\n"; echo ''."\n"; echo ''."\n"; - echo '
'; - openevent("$calendar_name", + echo ''; + // Todo: keep track of where the event comes from, and indicate that to openevent instead of "all_calenders_combined971" + if ($cal == 'all_calenders_combined971') $calendar_name2=$cal; else $calendar_name2=$calendar_name; + openevent("$calendar_name2", "$event_start", "$event_end", $this_time_arr[($event_length[$i]['key'])], -- cgit v1.2.3