aboutsummaryrefslogtreecommitdiffstats
path: root/week.php
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-09-30 12:09:17 +0000
committerjwangen <jwangen>2002-09-30 12:09:17 +0000
commitea76f46e8677d5d0d3fa5400fb1211d2df6071a6 (patch)
tree1b0483292aae547cf5c2a32d84c77de90952dfa0 /week.php
parent8973b748535409a51987c391c5c892c89d80269f (diff)
downloadphpicalendar-ea76f46e8677d5d0d3fa5400fb1211d2df6071a6.tar.gz
phpicalendar-ea76f46e8677d5d0d3fa5400fb1211d2df6071a6.tar.bz2
phpicalendar-ea76f46e8677d5d0d3fa5400fb1211d2df6071a6.zip
added yearly recurrence support
merged allday events and regular recurring events, see dev-email list for details alldays.ics is a test file that just has allday events
Diffstat (limited to 'week.php')
-rw-r--r--week.php50
1 files changed, 30 insertions, 20 deletions
diff --git a/week.php b/week.php
index 902be48..ed2cf5e 100644
--- a/week.php
+++ b/week.php
@@ -127,31 +127,41 @@ for ($i=0;$i<7;$i++) {
echo "</tr>";
// The all day events returned here.
+ $allday_events_this_week = false;
$thisdate = $start_week_time;
- $i = 0;
- echo "<tr>\n";
- echo "<td bgcolor=\"#f5f5f5\" colspan=\"2\"></td>";
- do {
+ for ($i=0;$i<7;$i++) {
$thisday = date("Ymd", $thisdate);
-
if ($master_array[($thisday)]["-1"]) {
- echo "<td bgcolor=\"#f5f5f5\" height=\"24\">\n";
- echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"V9\">\n";
- foreach($master_array[($thisday)]["-1"] as $allday) {
- $all_day_text = $allday["event_text"];
- $description = $allday["description"];
- echo "<tr>\n";
- echo "<td colspan=\"" . $nbrGridCols[$thisday] . "\" valign=\"top\" align=\"center\" bgcolor=\"#6699CC\"><a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name', '$event_start', '$event_end', '$description')\"><font color=\"#ffffff\">$all_day_text</font></a></td>\n";
- echo "</tr>\n";
- }
- echo "</table>\n";
- echo "</td>\n";
+ $allday_events_this_week = true;
+ break;
}
$thisdate = ($thisdate + (25 * 60 * 60));
- $i++;
- } while ($i < 7);
- echo "</tr>\n";
-
+ }
+ if ($allday_events_this_week) {
+ $thisdate = $start_week_time;
+ $i = 0;
+ echo "<tr>\n";
+ echo "<td bgcolor=\"#f5f5f5\" colspan=\"2\"></td>";
+ do {
+ $thisday = date("Ymd", $thisdate);
+ echo "<td bgcolor=\"#f5f5f5\" height=\"24\">\n";
+ if ($master_array[($thisday)]["-1"]) {
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"V9\">\n";
+ foreach($master_array[($thisday)]["-1"] as $allday) {
+ $all_day_text = $allday["event_text"];
+ $description = $allday["description"];
+ echo "<tr>\n";
+ echo "<td colspan=\"" . $nbrGridCols[$thisday] . "\" valign=\"top\" align=\"center\" bgcolor=\"#6699CC\"><a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name', '$event_start', '$event_end', '$description')\"><font color=\"#ffffff\">$all_day_text</font></a></td>\n";
+ echo "</tr>\n";
+ }
+ echo "</table>\n";
+ }
+ echo "</td>\n";
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $i++;
+ } while ($i < 7);
+ echo "</tr>\n";
+ }
// $master_array[($getdate)]["$day_time"]
$thisdate = $start_week_time;

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