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. --- week.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'week.php') diff --git a/week.php b/week.php index 51a7673..d155235 100644 --- a/week.php +++ b/week.php @@ -9,7 +9,7 @@ $starttime = "0500"; $weekstart = 1; $unix_time = strtotime($getdate); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); -$today_today = date('Ymd', strtotime("now + $second_offset seconds")); +$today_today = date('Ymd', strtotime("now + $second_offset seconds")); $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); $tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); @@ -178,7 +178,10 @@ for ($i=0;$i<7;$i++) { echo "\n"; foreach($master_array[($thisday)]["-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", "", "", @@ -296,7 +299,10 @@ for ($i=0;$i<7;$i++) { $event_length[$thisday][$i]["state"] = "started"; $event_start = $this_time_arr[($event_length[$thisday][$i]["key"])]["start_unixtime"]; $event_start = date ($timeFormat, $event_start); - echo "\n"; + $event_calno = $this_time_arr[($event_length[$thisday][$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"; @@ -305,9 +311,11 @@ for ($i=0;$i<7;$i++) { echo "
$event_start\n"; echo "\n"; echo "\n"; - echo "
"; + echo ''; $event_end = $this_time_arr[($event_length[$thisday][$i]["key"])]["end_unixtime"]; $event_end = date ($timeFormat, $event_end); + // 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", -- cgit v1.2.3