From b971ff0dab0db4e6b9b0723b531de5fd0e0313a3 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Fri, 19 Sep 2003 21:21:19 +0000 Subject: Fixed month display bugs, cleaned up HTML on bottom month table, added new data to calendar for debugging. --- calendars/Home.ics | 15 ++++++- includes/footer.inc.php | 2 +- month.php | 105 ++++++++++++++++++++++-------------------------- 3 files changed, 64 insertions(+), 58 deletions(-) diff --git a/calendars/Home.ics b/calendars/Home.ics index 1dc22d6..0102fff 100644 --- a/calendars/Home.ics +++ b/calendars/Home.ics @@ -165,6 +165,19 @@ DTSTAMP:20030819T222017Z DURATION:PT10M RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1MO END:VEVENT - +BEGIN:VEVENT +UID:20030425T023455Z-5454-500-1-0@lbt-laplinux.voiping.com +DTSTAMP:20030425T113850Z +DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/America/Chicago: + 20030515T183000 +DTEND;TZID=/softwarestudio.org/Olson_20011030_5/America/Chicago: + 20030515T210000 +SUMMARY:Meeting +SEQUENCE:4 +LAST-MODIFIED:20030425T023611Z +CLASS:PUBLIC +TRANSP:OPAQUE +RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=TH;BYSETPOS=3 +END:VEVENT END:VCALENDAR diff --git a/includes/footer.inc.php b/includes/footer.inc.php index c8375bc..07b5038 100644 --- a/includes/footer.inc.php +++ b/includes/footer.inc.php @@ -1,6 +1,6 @@
$powered_by_lang PHP iCalendar 0.9.3"; +echo "

$powered_by_lang PHP iCalendar 0.9.4"; if ($enable_rss == 'yes') { echo "
\n"; if ((isset($current_view)) && ($current_view == 'rssindex')) { diff --git a/month.php b/month.php index e0694e5..e9ad944 100644 --- a/month.php +++ b/month.php @@ -6,40 +6,37 @@ include(BASE.'functions/ical_parser.php'); if ($minical_view == 'current') $minical_view = 'month'; ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); -$this_day = $day_array2[3]; -$this_month = $day_array2[2]; -$this_year = $day_array2[1]; +$this_day = $day_array2[3]; +$this_month = $day_array2[2]; +$this_year = $day_array2[1]; -$unix_time = strtotime($getdate); -$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)); -$date = mktime(0,0,0,"$this_month","$this_day","$this_year"); +$unix_time = strtotime($getdate); +$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)); // find out next month -$next_month_month = ($this_month+1 == '13') ? '1' : ($this_month+1); -$next_month_day = $this_day; -$next_month_year = ($next_month_month == '1') ? ($this_year+1) : $this_year; +$next_month_month = ($this_month+1 == '13') ? '1' : ($this_month+1); +$next_month_day = $this_day; +$next_month_year = ($next_month_month == '1') ? ($this_year+1) : $this_year; while (!checkdate($next_month_month,$next_month_day,$next_month_year)) $next_month_day--; -$next_month_time = mktime(0,0,0,$next_month_month,$next_month_day,$next_month_year); +$next_month_time = mktime(0,0,0,$next_month_month,$next_month_day,$next_month_year); // find out last month -$prev_month_month = ($this_month-1 == '0') ? '12' : ($this_month-1); -$prev_month_day = $this_day; -$prev_month_year = ($prev_month_month == '12') ? ($this_year-1) : $this_year; +$prev_month_month = ($this_month-1 == '0') ? '12' : ($this_month-1); +$prev_month_day = $this_day; +$prev_month_year = ($prev_month_month == '12') ? ($this_year-1) : $this_year; while (!checkdate($prev_month_month,$prev_month_day,$prev_month_year)) $prev_month_day--; -$prev_month_time = mktime(0,0,0,$prev_month_month,$prev_month_day,$prev_month_year); +$prev_month_time = mktime(0,0,0,$prev_month_month,$prev_month_day,$prev_month_year); - -$next_month = date("Ymd", $next_month_time); -$prev_month = date("Ymd", $prev_month_time); - -$display_date = localizeDate ($dateFormat_month, $date); -$parse_month = date ("Ym", $date); -$first_of_month = $this_year.$this_month."01"; -$start_month_day = dateOfWeek($first_of_month, $week_start_day); -$thisday2 = localizeDate($dateFormat_week_list, $unix_time); -$num_of_events = 0; +$next_month = date("Ymd", $next_month_time); +$prev_month = date("Ymd", $prev_month_time); +$display_date = localizeDate ($dateFormat_month, $unix_time); +$parse_month = date ("Ym", $unix_time); +$first_of_month = $this_year.$this_month."01"; +$start_month_day = dateOfWeek($first_of_month, $week_start_day); +$thisday2 = localizeDate($dateFormat_week_list, $unix_time); +$num_of_events2 = 0; include (BASE.'includes/header.inc.php'); @@ -55,7 +52,7 @@ include (BASE.'includes/header.inc.php'); - +
@@ -94,7 +91,6 @@ include (BASE.'includes/header.inc.php'); $sunday = strtotime("$start_month_day"); $i = 0; $whole_month = TRUE; - $num_of_events = 0; do { $day = date ("j", $sunday); $daylink = date ("Ymd", $sunday); @@ -117,14 +113,17 @@ include (BASE.'includes/header.inc.php'); if ($master_array[("$daylink")]) { foreach ($master_array[("$daylink")] as $event_times) { foreach ($event_times as $val) { - $num_of_events++; + $num_of_events2++; if (!isset($val["event_start"])) { - openevent("$calendar_name", "", "", $val, $month_event_lines, + echo '
'; + openevent("$calendar_name", "", "", $val, $month_event_lines, 15, - "
", - "
", + "", + "", "psf"); + echo '
'; } else { + echo '
 '; $event_start = @$val["event_start"]; $event_end = @$val["event_end"]; $event_start = date($timeFormat, @strtotime ("$event_start")); @@ -136,9 +135,10 @@ include (BASE.'includes/header.inc.php'); $val, $month_event_lines, 11, - "
 $start2 ", - "
", + "$start2 ", + "", "ps3"); + echo '
'; } } } @@ -164,21 +164,14 @@ include (BASE.'includes/header.inc.php'); - + 0)) { ?>
- - - - -
- +
- - - - - - + $val) { @@ -189,9 +182,9 @@ include (BASE.'includes/header.inc.php'); $dayofmonth = localizeDate ($dateFormat_week_list, $dayofmonth); $i = 0; if ($today_today == $key) { - $fontclass="class=\"G10BOLD\""; + $fontclass="G10BOLD"; } else { - $fontclass="class=\"G10B\""; + $fontclass="G10B"; } // Pull out each day @@ -212,19 +205,22 @@ include (BASE.'includes/header.inc.php'); $event_end = ''; } - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + if ($first_time == TRUE) { + echo ""; + $first_time = FALSE; + } + echo "\n"; echo "\n"; } @@ -235,10 +231,7 @@ include (BASE.'includes/header.inc.php'); } ?> -
"; ?>"; ?>
 $dayofmonth ($event_start)\n"; + echo "
$dayofmonth ($event_start)\n"; openevent("$calendar_name", "$event_start", "$event_end", $new_val2, 0, 65, - " ", + "", "", "psf"); - //echo " $event_text\n"; echo "
-
+
-- cgit v1.2.3