aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-09-19 21:21:19 +0000
committerChad Little <clittle@users.sourceforge.net>2003-09-19 21:21:19 +0000
commitb971ff0dab0db4e6b9b0723b531de5fd0e0313a3 (patch)
treec6dd5036b555b80c8689da91c813ffed8eb67805
parent67ddb8a12aec7bc68a6c445b1712a1a6e18533ae (diff)
downloadphpicalendar-b971ff0dab0db4e6b9b0723b531de5fd0e0313a3.tar.gz
phpicalendar-b971ff0dab0db4e6b9b0723b531de5fd0e0313a3.tar.bz2
phpicalendar-b971ff0dab0db4e6b9b0723b531de5fd0e0313a3.zip
Fixed month display bugs, cleaned up HTML on bottom month table, added
new data to calendar for debugging.
-rw-r--r--calendars/Home.ics15
-rw-r--r--includes/footer.inc.php2
-rw-r--r--month.php105
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 @@
<?php
-echo "<center><font class=\"V9\"><br>$powered_by_lang <a class=\"psf\" href=\"http://phpicalendar.sourceforge.net/nuke/\">PHP iCalendar 0.9.3</a>";
+echo "<center><font class=\"V9\"><br>$powered_by_lang <a class=\"psf\" href=\"http://phpicalendar.sourceforge.net/nuke/\">PHP iCalendar 0.9.4</a>";
if ($enable_rss == 'yes') {
echo "<br>\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');
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" width="40%" class="navback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&amp;getdate=$prev_month\"><img src=\"styles/$style_sheet/left_day.gif\" alt=\"[$last_month_lang]\" border=\"0\" align=\"right\"></a>"; ?></td>
- <td align="center" width="20%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $display_month; ?></font></td>
+ <td align="center" width="20%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $display_date; ?></font></td>
<td align="left" width="40%" class="navback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&amp;getdate=$next_month\"><img src=\"styles/$style_sheet/right_day.gif\" alt=\"[$next_month_lang]\" border=\"0\" align=\"left\"></a>"; ?></td>
</tr>
</table>
@@ -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 '<div align="center" class="V10">';
+ openevent("$calendar_name", "", "", $val, $month_event_lines,
15,
- "<div align=\"center\" class=\"V10\"><i>",
- "</i></div>",
+ "<i>",
+ "</i>",
"psf");
+ echo '</div>';
} else {
+ echo '<div align="left" class="V9">&nbsp;';
$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,
- "<div align=\"left\" class=\"V9\">&nbsp;$start2 ",
- "</div>",
+ "$start2 ",
+ "",
"ps3");
+ echo '</div>';
}
}
}
@@ -164,21 +164,14 @@ include (BASE.'includes/header.inc.php');
</tr>
</table>
<?php include (BASE.'includes/calendar_nav.php'); ?>
-<?php if ($this_months_events == "yes") { ?>
+<?php if (($this_months_events == "yes") && ($num_of_events2 > 0)) { ?>
<br>
-<table border="0" cellspacing="0" cellpadding="0" width="737" bgcolor="#FFFFFF" class="calborder">
- <tr>
- <td align="center" valign="top">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <table width="737" border="0" cellspacing="0" cellpadding="3" class="calborder">
<tr>
- <td align="left" valign="top" width="160" class="sideback"><?php echo "<img src=\"images/spacer.gif\" alt=\" \" width=\"16\" height=\"20\" border=\"0\" align=\"left\">"; ?></td>
- <td align="center" class="sideback" width="417" nowrap><font class="G10BOLD"><?php echo "$this_months_lang"; ?></font></td>
- <td align="right" valign="top" width="160" class="sideback"><?php echo "<img src=\"images/spacer.gif\" alt=\" \" width=\"16\" height=\"20\" border=\"0\" align=\"right\">"; ?></td>
- </tr>
- <tr>
- <td colspan="3" height="1"></td>
+ <td colspan="3" align="center" class="sideback" nowrap><div style="height: 16px;" class="G10BOLD"><?php echo "$this_months_lang"; ?></div></td>
</tr>
<?php
+ $first_time = TRUE;
// Iterate the entire master array
foreach($master_array as $key => $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 "<tr>\n";
- echo "<td align=\"left\" valign=\"top\" width =\"160\" class=\"montheventline\" nowrap><font $fontclass>&nbsp;<a class=\"psf\" href=\"day.php?cal=$cal&amp;getdate=$key\">$dayofmonth</a></font> <font class=\"V9G\">($event_start)</font></td>\n";
- echo "<td align=\"left\" valign=\"top\" colspan=\"2\">\n";
+ echo "<tr align=\"left\" valign=\"top\">\n";
+ echo "<td width =\"155\" class=\"$fontclass\" nowrap><a class=\"psf\" href=\"day.php?cal=$cal&amp;getdate=$key\">$dayofmonth</a> <font class=\"V9G\">($event_start)</font></td>\n";
+ if ($first_time == TRUE) {
+ echo "<td width=\"5\" class=\"montheventline\" rowspan=\"$num_of_events2\"></td>";
+ $first_time = FALSE;
+ }
+ echo "<td>\n";
openevent("$calendar_name",
"$event_start",
"$event_end",
$new_val2,
0,
65,
- "<font class=\"G10B\">&nbsp;",
+ "<font class=\"G10B\">",
"</font>",
"psf");
- //echo "&nbsp;<a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name', '$event_start2', '$event_end', '$description', '$status')\"><font class=\"G10B\">$event_text</font></a>\n";
echo "</td>\n";
echo "</tr>\n";
}
@@ -235,10 +231,7 @@ include (BASE.'includes/header.inc.php');
}
?>
- </table>
- </td>
- </tr>
-</table>
+ </table>
<?php } ?>
<?php include (BASE.'includes/footer.inc.php'); ?>
</center>

© 2014-2024 Faster IT GmbH | imprint | privacy policy