aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2002-09-17 07:11:20 +0000
committerChad Little <clittle@users.sourceforge.net>2002-09-17 07:11:20 +0000
commit9525ea3700597fd2366ca4ad426925ab14674cb0 (patch)
tree8ad5382fb88925a997f46d35ef0133e2897cf33a
parent4fbfa5ab655d196766f72470e94a96ecebb1d3ae (diff)
downloadphpicalendar-9525ea3700597fd2366ca4ad426925ab14674cb0.tar.gz
phpicalendar-9525ea3700597fd2366ca4ad426925ab14674cb0.tar.bz2
phpicalendar-9525ea3700597fd2366ca4ad426925ab14674cb0.zip
*** empty log message ***
-rw-r--r--config.inc.php18
-rw-r--r--day.php250
-rw-r--r--ical_parser.php282
-rw-r--r--list_icals.php16
-rw-r--r--month.php330
-rw-r--r--week.php410
6 files changed, 1300 insertions, 6 deletions
diff --git a/config.inc.php b/config.inc.php
index f4e7514..dc569b1 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -1 +1,17 @@
-<? // Retain some compatibility backwards like. if(phpversion() >= "4.2.0") { extract($HTTP_POST_VARS); extract($HTTP_GET_VARS); } $style_sheet = "default.css"; // what iCal file are we using $fullpath = "webcal://"; $filename = "calendars/Home.ics"; ?> \ No newline at end of file
+<?
+
+// Retain some compatibility backwards like.
+if(phpversion() >= "4.2.0")
+
+ {
+ extract($HTTP_POST_VARS);
+ extract($HTTP_GET_VARS);
+ }
+
+$style_sheet = "default.css";
+
+// what iCal file are we using
+$fullpath = "webcal://";
+$filename = "calendars/Home.ics";
+
+?> \ No newline at end of file
diff --git a/day.php b/day.php
index df512f4..54a2b6f 100644
--- a/day.php
+++ b/day.php
@@ -1 +1,249 @@
-<? include "ical_parser.php"; if ($getdate == (date("Ymd"))) { $display_date = date ("l, F d"); $tomorrows_date = date( "Ymd", (time() + (25*3600))); $yesterdays_date = date( "Ymd", (time() - (25*3600))); } else { 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]; $unix_time = mktime(0,0,0,"$this_month","$this_day","$this_year"); $display_date = date ("l, F d", $unix_time); $tomorrow = $unix_time + (25*3600); $yesterday = $unix_time - (25*3600); $tomorrows_date = date( "Ymd", ($tomorrow)); $yesterdays_date = date( "Ymd", ($yesterday)); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title><? echo "$calendar_name"; ?></title> <link rel="stylesheet" type="text/css" href="styles/<? echo "$style_sheet"; ?>"> </head> <body bgcolor="#FFFFFF"> <center> <table width="700" border="0" cellspacing="0" cellpadding="0" class="V12"> <tr> <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td> <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td> <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="24" width="1"></td> </tr> <tr> <td class="V12" align="left" valign="top" width="5%" nowrap><a class="psf" href="day.php?getdate=<? echo "$yesterdays_date"; ?>">Previous Day</a></td> <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$display_date"; ?></td> <td class="V12" align="right" valign="top" width="5%" nowrap><a class="psf" href="day.php?getdate=<? echo "$tomorrows_date"; ?>">Next Day</a></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td> </tr> </table> <table width="700" border="0" cellspacing="1" cellpadding="2" class="calborder"> <tr> <td> <table width="700" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="middle"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#a1a5a9" class="G10B"> <tr> <td align="center" valign="top"> <table border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan="3" bgcolor="white" nowrap> <table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <td align="left" valign="middle"><b><font class="V12"><? echo "$calendar_name"; ?> Calendar</font></b></td> <td align="right" valign="middle" class="V12"><a class="psf" href="<? echo "$fullpath"; ?>">Subscribe</a>&nbsp;|&nbsp;<a class="psf" href="<? echo "$filename"; ?>">Download</a></td> </tr> </table> </td> </tr> <? // The all day events returned here. $i = 0; if ($master_array[($getdate)]["0001"]["event_text"] != "") { echo "<tr height=\"30\">\n"; echo "<td colspan=\"3\" height=\"30\" valign=\"middle\" align=\"center\" class=\"eventbg\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">\n"; foreach($master_array[($getdate)]["0001"]["event_text"] as $all_day_text) { if ($i > 0) { echo "<tr>\n"; echo "<td bgcolor=\"#eeeeee\" height=\"1\"></td>\n"; echo "</tr>\n"; } echo "<tr>\n"; echo "<td valign=\"top\" align=\"center\"><font class=\"eventfont\"><i>$all_day_text</i></font></td>\n"; echo "</tr>\n"; $i++; } echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; } ?> <tr> <td nowrap bgcolor="#a1a5a9" width="60"><img src="images/spacer.gif" width="60" height="1"></td> <td nowrap bgcolor="#a1a5a9" width="1"><img src="images/spacer.gif" width="1" height="1"></td> <td colspan="3" nowrap bgcolor="#a1a5a9"><img src="images/spacer.gif" width="649" height="1"></td> </tr> <? // $master_array[($getdate)]["$day_time"] $event_length = 0; foreach ($day_array as $key) { // The first <TR> $k = 0; $cal_time = $key; $key = strtotime ("$key"); $key = date ("g:i A", $key); if (ereg("^([0-9]{1,2}):00", $key)) { if ($master_array[($getdate)]["$cal_time"] == "") { echo "<tr height=\"30\">\n"; echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n"; echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n"; if ($event_length > 0) { $event_length--; } else { echo "<td bgcolor=\"#ffffff\"><img src=\"images/spacer.gif\" width=\"1\" height=\"30\"></td>\n"; } echo "</tr>\n"; } elseif ($event_started != TRUE) { $event_started = TRUE; $event_text = $master_array[($getdate)]["$cal_time"][$k]["event_text"]; $event_start = $master_array[($getdate)]["$cal_time"][$k]["event_start"]; $event_end = $master_array[($getdate)]["$cal_time"][$k]["event_end"]; $event_length = $master_array[($getdate)]["$cal_time"][$k]["event_length"]; $event_start = strtotime ("$event_start"); $event_start = date ("g:i a", $event_start); $event_end = strtotime ("$event_end"); $event_end = date ("g:i a", $event_end); echo "<tr height=\"30\">\n"; echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n"; echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n"; echo "<td rowspan=\"$event_length\" align=\"left\" valign=\"top\" class=\"eventbg\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"; echo "<tr>\n"; echo "<td class=\"eventborder\"><font class=\"eventfont\"><b>$event_start</b> - $event_end</font></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>\n"; echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n"; echo "<tr>\n"; echo "<td bgcolor=\"#68aaef\"><font class=\"eventfont\">$event_text</font></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; $event_length--; } else { echo "<tr height=\"30\">\n"; echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n"; echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n"; if ($event_length > 0) { $event_length--; } else { echo "<td bgcolor=\"#ffffff\"><img src=\"images/spacer.gif\" width=\"1\" height=\"30\"></td>\n"; } echo "</tr>\n"; } } if ($event_length == 0) $event_started = FALSE; // The second <TR> if (ereg("([0-9]{1,2}):30", $key)) { if (($master_array[($getdate)]["$cal_time"] == "") && ($event_started != TRUE)) { echo "<tr height=\"30\">\n"; echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n"; echo "<td bgcolor=\"#ffffff\">&nbsp;</td>\n"; echo "</tr>\n"; } elseif ($event_length > 0) { echo "<tr height=\"30\">\n"; echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"</td>\n"; echo "</tr>\n"; $event_length--; } else { $event_started = TRUE; $event_text = $master_array[($getdate)]["$cal_time"][$k]["event_text"]; $event_start = $master_array[($getdate)]["$cal_time"][$k]["event_start"]; $event_end = $master_array[($getdate)]["$cal_time"][$k]["event_end"]; $event_length = $master_array[($getdate)]["$cal_time"][$k]["event_length"]; echo "<tr>\n"; echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n"; echo "<td rowspan=\"$event_length\" align=\"left\" valign=\"top\" class=\"eventbg\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"; echo "<tr>\n"; echo "<td class=\"eventborder\"><font class=\"eventfont\"><b>$event_start</b></font></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>\n"; echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n"; echo "<tr>\n"; echo "<td bgcolor=\"#68aaef\"><font class=\"eventfont\">$event_text</font></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; $event_length--; } } } ?> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table width="700" border="0" cellspacing="0" cellpadding="0" class="V12"> <tr> <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td> </tr> <tr> <td class="V12" align="left" valign="middle" width="5%" nowrap><a class="psf" href="day.php">Previous Day</a></td> <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$display_date"; ?></td> <td class="V12" align="right" valign="middle" width="5%" nowrap><a class="psf" href="day.php">Next Day</a></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="24" width="1"></td> </tr> <tr> <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td> <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td> <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td> </tr> </table> </center> </body> </html> \ No newline at end of file
+<?
+
+include "ical_parser.php";
+if ($getdate == (date("Ymd"))) {
+ $display_date = date ("l, F d");
+ $tomorrows_date = date( "Ymd", (time() + (25*3600)));
+ $yesterdays_date = date( "Ymd", (time() - (25*3600)));
+} else {
+ 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];
+ $unix_time = mktime(0,0,0,"$this_month","$this_day","$this_year");
+ $display_date = date ("l, F d", $unix_time);
+ $tomorrow = $unix_time + (25*3600);
+ $yesterday = $unix_time - (25*3600);
+ $tomorrows_date = date( "Ymd", ($tomorrow));
+ $yesterdays_date = date( "Ymd", ($yesterday));
+}
+
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title><? echo "$calendar_name"; ?></title>
+ <link rel="stylesheet" type="text/css" href="styles/<? echo "$style_sheet"; ?>">
+</head>
+<body bgcolor="#FFFFFF">
+<center>
+
+
+<table width="700" border="0" cellspacing="0" cellpadding="0" class="V12">
+ <tr>
+ <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td>
+ <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td>
+ <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="24" width="1"></td>
+ </tr>
+ <tr>
+ <td class="V12" align="left" valign="top" width="5%" nowrap><a class="psf" href="day.php?getdate=<? echo "$yesterdays_date"; ?>">Previous Day</a></td>
+ <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$display_date"; ?></td>
+ <td class="V12" align="right" valign="top" width="5%" nowrap><a class="psf" href="day.php?getdate=<? echo "$tomorrows_date"; ?>">Next Day</a></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td>
+ </tr>
+</table>
+<table width="700" border="0" cellspacing="1" cellpadding="2" class="calborder">
+<tr>
+<td>
+
+<table width="700" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td align="center" valign="middle">
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#a1a5a9" class="G10B">
+ <tr>
+ <td align="center" valign="top">
+ <table border="0" cellspacing="1" cellpadding="0">
+ <tr>
+ <td colspan="3" bgcolor="white" nowrap>
+ <table width="100%" border="0" cellspacing="4" cellpadding="0">
+ <tr>
+ <td align="left" valign="middle"><b><font class="V12"><? echo "$calendar_name"; ?> Calendar</font></b></td>
+ <td align="right" valign="middle" class="V12"><a class="psf" href="<? echo "$fullpath"; ?>">Subscribe</a>&nbsp;|&nbsp;<a class="psf" href="<? echo "$filename"; ?>">Download</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <?
+ // The all day events returned here.
+ $i = 0;
+ if ($master_array[($getdate)]["0001"]["event_text"] != "") {
+ echo "<tr height=\"30\">\n";
+ echo "<td colspan=\"3\" height=\"30\" valign=\"middle\" align=\"center\" class=\"eventbg\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">\n";
+ foreach($master_array[($getdate)]["0001"]["event_text"] as $all_day_text) {
+ if ($i > 0) {
+ echo "<tr>\n";
+ echo "<td bgcolor=\"#eeeeee\" height=\"1\"></td>\n";
+ echo "</tr>\n";
+ }
+ echo "<tr>\n";
+ echo "<td valign=\"top\" align=\"center\"><font class=\"eventfont\"><i>$all_day_text</i></font></td>\n";
+ echo "</tr>\n";
+ $i++;
+ }
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ }
+ ?>
+
+ <tr>
+ <td nowrap bgcolor="#a1a5a9" width="60"><img src="images/spacer.gif" width="60" height="1"></td>
+ <td nowrap bgcolor="#a1a5a9" width="1"><img src="images/spacer.gif" width="1" height="1"></td>
+ <td colspan="3" nowrap bgcolor="#a1a5a9"><img src="images/spacer.gif" width="649" height="1"></td>
+ </tr>
+ <?
+ // $master_array[($getdate)]["$day_time"]
+ $event_length = 0;
+
+ foreach ($day_array as $key) {
+ // The first <TR>
+ $k = 0;
+ $cal_time = $key;
+ $key = strtotime ("$key");
+ $key = date ("g:i A", $key);
+
+ if (ereg("^([0-9]{1,2}):00", $key)) {
+ if ($master_array[($getdate)]["$cal_time"] == "") {
+ echo "<tr height=\"30\">\n";
+ echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n";
+ echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n";
+ if ($event_length > 0) {
+ $event_length--;
+ } else {
+ echo "<td bgcolor=\"#ffffff\"><img src=\"images/spacer.gif\" width=\"1\" height=\"30\"></td>\n";
+ }
+ echo "</tr>\n";
+ } elseif ($event_started != TRUE) {
+ $event_started = TRUE;
+ $event_text = $master_array[($getdate)]["$cal_time"][$k]["event_text"];
+ $event_start = $master_array[($getdate)]["$cal_time"][$k]["event_start"];
+ $event_end = $master_array[($getdate)]["$cal_time"][$k]["event_end"];
+ $event_length = $master_array[($getdate)]["$cal_time"][$k]["event_length"];
+ $event_start = strtotime ("$event_start");
+ $event_start = date ("g:i a", $event_start);
+ $event_end = strtotime ("$event_end");
+ $event_end = date ("g:i a", $event_end);
+ echo "<tr height=\"30\">\n";
+ echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n";
+ echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n";
+ echo "<td rowspan=\"$event_length\" align=\"left\" valign=\"top\" class=\"eventbg\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n";
+ echo "<tr>\n";
+ echo "<td class=\"eventborder\"><font class=\"eventfont\"><b>$event_start</b> - $event_end</font></td>\n";
+ echo "</tr>\n";
+ echo "<tr>\n";
+ echo "<td>\n";
+ echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n";
+ echo "<tr>\n";
+ echo "<td bgcolor=\"#68aaef\"><font class=\"eventfont\">$event_text</font></td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ $event_length--;
+ } else {
+ echo "<tr height=\"30\">\n";
+ echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n";
+ echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n";
+ if ($event_length > 0) {
+ $event_length--;
+ } else {
+ echo "<td bgcolor=\"#ffffff\"><img src=\"images/spacer.gif\" width=\"1\" height=\"30\"></td>\n";
+ }
+ echo "</tr>\n";
+ }
+ }
+
+ if ($event_length == 0) $event_started = FALSE;
+
+
+ // The second <TR>
+ if (ereg("([0-9]{1,2}):30", $key)) {
+ if (($master_array[($getdate)]["$cal_time"] == "") && ($event_started != TRUE)) {
+ echo "<tr height=\"30\">\n";
+ echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n";
+ echo "<td bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ echo "</tr>\n";
+ } elseif ($event_length > 0) {
+ echo "<tr height=\"30\">\n";
+ echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"</td>\n";
+ echo "</tr>\n";
+ $event_length--;
+ } else {
+ $event_started = TRUE;
+ $event_text = $master_array[($getdate)]["$cal_time"][$k]["event_text"];
+ $event_start = $master_array[($getdate)]["$cal_time"][$k]["event_start"];
+ $event_end = $master_array[($getdate)]["$cal_time"][$k]["event_end"];
+ $event_length = $master_array[($getdate)]["$cal_time"][$k]["event_length"];
+ echo "<tr>\n";
+ echo "<td align=\"center\" valign=\"top\" nowrap bgcolor=\"#a1a5a9\" width=\"1\" height=\"30\"></td>\n";
+ echo "<td rowspan=\"$event_length\" align=\"left\" valign=\"top\" class=\"eventbg\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n";
+ echo "<tr>\n";
+ echo "<td class=\"eventborder\"><font class=\"eventfont\"><b>$event_start</b></font></td>\n";
+ echo "</tr>\n";
+ echo "<tr>\n";
+ echo "<td>\n";
+ echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n";
+ echo "<tr>\n";
+ echo "<td bgcolor=\"#68aaef\"><font class=\"eventfont\">$event_text</font></td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ $event_length--;
+ }
+ }
+ }
+
+ ?>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+</td>
+</tr>
+</table>
+<table width="700" border="0" cellspacing="0" cellpadding="0" class="V12">
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td>
+ </tr>
+ <tr>
+ <td class="V12" align="left" valign="middle" width="5%" nowrap><a class="psf" href="day.php">Previous Day</a></td>
+ <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$display_date"; ?></td>
+ <td class="V12" align="right" valign="middle" width="5%" nowrap><a class="psf" href="day.php">Next Day</a></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="24" width="1"></td>
+ </tr>
+ <tr>
+ <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td>
+ <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td>
+ <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td>
+ </tr>
+</table>
+
+
+</center>
+</body>
+</html>
+
diff --git a/ical_parser.php b/ical_parser.php
index b345f95..cdf7da4 100644
--- a/ical_parser.php
+++ b/ical_parser.php
@@ -1 +1,281 @@
-<? include "config.inc.php"; include "functions/date_add.php"; $day_array = array ("0700", "0730", "0800", "0830", "0900", "0930", "1000", "1030", "1100", "1130", "1200", "1230", "1300", "1330", "1400", "1430", "1500", "1530", "1600", "1630", "1700", "1730", "1800", "1830", "1900", "1930", "2000", "2030", "2100", "2130", "2200", "2230", "2300", "2330"); // what date we want to get data for (for day calendar) if (!$getdate) $getdate = date("Ymd"); 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]; // open the iCal file, read it into a string $fp = @fopen($filename, "r"); $contents = @fread ($fp, filesize ($filename)); @fclose ($fp); // turn that string into an array $contents = ereg_replace("\n ", "", $contents); $contents = split ("\n", $contents); // parse our new array foreach($contents as $line) { if (strstr($line, "BEGIN:VEVENT")) { $start_time = ""; $end_time = ""; $summary = ""; $allday_start = ""; $allday_end = ""; $start = ""; $end = ""; $the_duration = ""; $beginning = ""; $rrule_array = ""; } elseif (strstr($line, "END:VEVENT")) { //echo "<b>Start</b> $start_time <b>End</B> $end_time <b>Summary</b> $summary<br>\n"; if ($start_time != "") { ereg ("([0-9]{2})([0-9]{2})", $start_time, $time); $hour = $time[1]; $minute = $time[2]; if ($minute < 15) { $minute = "00"; } elseif ($minute >=15 && $minute < 45) { $minute = "30"; } elseif ($minute >= 45) { $hour = sprintf("%.02d", ($hour + 1)); $minute = "00"; } ereg ("([0-9]{2})([0-9]{2})", $end_time, $time2); $length = round((($time2[1]*60+$time2[2]) - ($time[1]*60+$time[2]))/30); } // Handling of the all day events if (($allday_start != "") && ($rrule_array == "")) { $start = strtotime("$allday_start"); $end = strtotime("$allday_end"); do { $start_date = date("Ymd", $start); $master_array[($start_date)][("0001")]["event_text"][] = "$summary"; $i++; $start = ($start + (24*3600)); } while ($start != $end); } // Handling of the recurring events, RRULE // This will be quite a bit of work, thats for sure. if (is_array($rrule_array)) { if ($allday_start != "") { $rrule_array["START_DAY"] = $allday_start; $rrule_array["END_DAY"] = $allday_end; $rrule_array["END"] = "end"; $recur_start = $allday_start; } else { $rrule_array["START_DATE"] = $start_date; $rrule_array["START_TIME"] = $start_time; $rrule_array["END_TIME"] = $end_time; $rrule_array["END"] = "end"; } //print_r($rrule_array); foreach ($rrule_array as $key => $val) { if ($key == "FREQ") { if ($val == "YEARLY") { $interval = "yyyy"; } elseif ($val == "MONTHLY") { $interval = "m"; } elseif ($val == "WEEKLY") { $interval = "ww"; } elseif ($val == "DAILY") { $interval = "d"; } elseif ($val == "HOURLY") { $interval = "h"; } elseif ($val == "MINUTELY") { $interval = "n"; } elseif ($val == "SECONDLY") { $interval = "s"; } } elseif ($key == "COUNT") { $count = $val; } elseif ($key == "UNTIL") { $until = $val; } elseif ($key == "INTERVAL") { $number = $val; } elseif ($key == "BYSECOND") { $bysecond = $val; } elseif ($key == "BYMINUTE") { $byminute = $val; } elseif ($key == "BYHOUR") { $byhour = $val; } elseif ($key == "BYDAY") { $byday = $val; } elseif ($key == "BYMONTHDAY") { $bymonthday = $val; } elseif ($key == "BYYEARDAY") { $byyearday = $val; } elseif ($key == "BYWEEKNO") { $byweekno = $val; } elseif ($key == "BYMONTH") { $bymonth = $val; } elseif ($key == "BYSETPOS") { $bysetpos = $val; } elseif ($key == "WKST") { $wkst = $val; } elseif ($key == "END") { // Since we hit the end of the RRULE array, lets do something. $recur_year = date("Y", strtotime("$allday_start")); $date = strtotime("$allday_start"); $end_date = strtotime("$allday_end"); if (($this_year != $recur_year) && ($this_year > $recur_year)) { do { $date = DateAdd ($interval, $number, $date); $end_date = DateAdd ($interval, $number, $end_date); $recur_year = date ("Y", $date); //echo "$this_year:$recur_year "; } while (($this_year != $recur_year) && ($this_year > $recur_year)); $allday_start = date ("Ymd", $date); $allday_end = date ("Ymd", $end_date); //echo "$allday_start, $allday_end"; } //echo "$interval - $number - $date - $recur_year - $this_year - $next<br>\n"; if ($allday_start != "") { $start = strtotime("$allday_start"); $end = strtotime("$allday_end"); do { $start_date = date("Ymd", $start); $check_year = date("Y", $start); // Only write the current year if ($this_year == $check_year) { $master_array[($start_date)][("0001")]["event_text"][] = "$summary"; } $start = ($start + (24*3600)); } while ($start != $end); } else { $master_array[($start_date)][($hour.$minute)][] = array ("event_start" => $start_time, "event_text" => $summary, "event_end" => $end_time, "event_length" => $length); } } } } // Let's write all the data to the master array if ($start_time != "") { $master_array[($start_date)][($hour.$minute)][] = array ("event_start" => $start_time, "event_text" => $summary, "event_end" => $end_time, "event_length" => $length); } } else { $field = ""; $data = ""; sscanf($line, "%[^:]:%[^\n]", &$field, &$data); if(strstr($field, "DTSTART;TZID")) { $data = ereg_replace("T", "", $data); ereg ("([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})", $data, $regs); $year = $regs[1]; $month = $regs[2]; $day = $regs[3]; $hour = $regs[4]; $minute = $regs[5]; $start_date = $year . $month . $day; $start_time = $hour . $minute; } elseif (strstr($field, "DTEND;TZID")) { $data = ereg_replace("T", "", $data); ereg ("([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})", $data, $regs); $year = $regs[1]; $month = $regs[2]; $day = $regs[3]; $hour = $regs[4]; $minute = $regs[5]; $end_day = $year . $month . $day; $end_time = $hour . $minute; } elseif (strstr($field, "SUMMARY")) { $summary = $data; } elseif (strstr($field, "X-WR-CALNAME")) { $calendar_name = $data; } elseif (strstr($field, "DTSTART;VALUE=DATE")) { $allday_start = $data; // echo "$allday_start"; } elseif (strstr($field, "DTEND;VALUE=DATE")) { $allday_end = $data; } elseif (strstr($field, "DURATION")) { ereg ("^P([0-9]{1,2})?([W,D]{0,1})?(T)?([0-9]{1,2})?(H)?([0-9]{1,2})?(M)?([0-9]{1,2})?(S)?", $data, $duration); if ($durartion[2] = "W") { $weeks = $durartion[1]; } else { $days = $durartion[1]; } $hours = $duration[4]; $minutes = $duration[6]; $seconds = $duration[8]; $the_duration = ($weeks * 60 * 60 * 24 * 7) + ($days * 60 * 60 * 24) + ($hours * 60 * 60) + ($minutes * 60) + ($seconds); $beginning = (strtotime($start_time) + $the_duration); $end_time = date ("Hi", $beginning); } elseif (strstr($field, "RRULE")) { // $data = "RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30"; $data = ereg_replace ("RRULE:", "", $data); $rrule = split (";", $data); foreach ($rrule as $recur) { ereg ("(.*)=(.*)", $recur, $regs); $rrule_array[$regs[1]] = $regs[2]; } } elseif (strstr($field, "ATTENDEE")) { $attendee = $data; // echo "$attendee"; } } } ksort($master_array); reset($master_array); // If you want to see the values in the arrays, uncomment below. // print_r($master_array); // print_r($day_array); // print_r($rrule); ?> \ No newline at end of file
+<?
+
+include "config.inc.php";
+include "functions/date_add.php";
+
+
+$day_array = array ("0700", "0730", "0800", "0830", "0900", "0930", "1000", "1030", "1100", "1130", "1200", "1230", "1300", "1330", "1400", "1430", "1500", "1530", "1600", "1630", "1700", "1730", "1800", "1830", "1900", "1930", "2000", "2030", "2100", "2130", "2200", "2230", "2300", "2330");
+
+
+// what date we want to get data for (for day calendar)
+if (!$getdate) $getdate = date("Ymd");
+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];
+
+
+// open the iCal file, read it into a string
+$fp = @fopen($filename, "r");
+$contents = @fread ($fp, filesize ($filename));
+@fclose ($fp);
+
+
+// turn that string into an array
+$contents = ereg_replace("\n ", "", $contents);
+$contents = split ("\n", $contents);
+
+
+// parse our new array
+foreach($contents as $line) {
+ if (strstr($line, "BEGIN:VEVENT")) {
+ $start_time = "";
+ $end_time = "";
+ $summary = "";
+ $allday_start = "";
+ $allday_end = "";
+ $start = "";
+ $end = "";
+ $the_duration = "";
+ $beginning = "";
+ $rrule_array = "";
+ } elseif (strstr($line, "END:VEVENT")) {
+
+ //echo "<b>Start</b> $start_time <b>End</B> $end_time <b>Summary</b> $summary<br>\n";
+ if ($start_time != "") {
+ ereg ("([0-9]{2})([0-9]{2})", $start_time, $time);
+ $hour = $time[1];
+ $minute = $time[2];
+
+ if ($minute < 15) {
+ $minute = "00";
+ } elseif ($minute >=15 && $minute < 45) {
+ $minute = "30";
+ } elseif ($minute >= 45) {
+ $hour = sprintf("%.02d", ($hour + 1));
+ $minute = "00";
+ }
+ ereg ("([0-9]{2})([0-9]{2})", $end_time, $time2);
+ $length = round((($time2[1]*60+$time2[2]) - ($time[1]*60+$time[2]))/30);
+ }
+
+
+ // Handling of the all day events
+ if (($allday_start != "") && ($rrule_array == "")) {
+ $start = strtotime("$allday_start");
+ $end = strtotime("$allday_end");
+ do {
+ $start_date = date("Ymd", $start);
+ $master_array[($start_date)][("0001")]["event_text"][] = "$summary";
+ $i++;
+ $start = ($start + (24*3600));
+ } while ($start != $end);
+ }
+
+
+ // Handling of the recurring events, RRULE
+ // This will be quite a bit of work, thats for sure.
+ if (is_array($rrule_array)) {
+ if ($allday_start != "") {
+ $rrule_array["START_DAY"] = $allday_start;
+ $rrule_array["END_DAY"] = $allday_end;
+ $rrule_array["END"] = "end";
+ $recur_start = $allday_start;
+ } else {
+ $rrule_array["START_DATE"] = $start_date;
+ $rrule_array["START_TIME"] = $start_time;
+ $rrule_array["END_TIME"] = $end_time;
+ $rrule_array["END"] = "end";
+ }
+ //print_r($rrule_array);
+ foreach ($rrule_array as $key => $val) {
+ if ($key == "FREQ") {
+ if ($val == "YEARLY") {
+ $interval = "yyyy";
+ } elseif ($val == "MONTHLY") {
+ $interval = "m";
+ } elseif ($val == "WEEKLY") {
+ $interval = "ww";
+ } elseif ($val == "DAILY") {
+ $interval = "d";
+ } elseif ($val == "HOURLY") {
+ $interval = "h";
+ } elseif ($val == "MINUTELY") {
+ $interval = "n";
+ } elseif ($val == "SECONDLY") {
+ $interval = "s";
+ }
+ } elseif ($key == "COUNT") {
+ $count = $val;
+
+ } elseif ($key == "UNTIL") {
+ $until = $val;
+
+ } elseif ($key == "INTERVAL") {
+ $number = $val;
+
+ } elseif ($key == "BYSECOND") {
+ $bysecond = $val;
+
+ } elseif ($key == "BYMINUTE") {
+ $byminute = $val;
+
+ } elseif ($key == "BYHOUR") {
+ $byhour = $val;
+
+ } elseif ($key == "BYDAY") {
+ $byday = $val;
+
+ } elseif ($key == "BYMONTHDAY") {
+ $bymonthday = $val;
+
+ } elseif ($key == "BYYEARDAY") {
+ $byyearday = $val;
+
+ } elseif ($key == "BYWEEKNO") {
+ $byweekno = $val;
+
+ } elseif ($key == "BYMONTH") {
+ $bymonth = $val;
+
+ } elseif ($key == "BYSETPOS") {
+ $bysetpos = $val;
+
+ } elseif ($key == "WKST") {
+ $wkst = $val;
+
+ } elseif ($key == "END") {
+ // Since we hit the end of the RRULE array, lets do something.
+ $recur_year = date("Y", strtotime("$allday_start"));
+ $date = strtotime("$allday_start");
+ $end_date = strtotime("$allday_end");
+ if (($this_year != $recur_year) && ($this_year > $recur_year)) {
+ do {
+ $date = DateAdd ($interval, $number, $date);
+ $end_date = DateAdd ($interval, $number, $end_date);
+ $recur_year = date ("Y", $date);
+ //echo "$this_year:$recur_year ";
+ } while (($this_year != $recur_year) && ($this_year > $recur_year));
+
+ $allday_start = date ("Ymd", $date);
+ $allday_end = date ("Ymd", $end_date);
+ //echo "$allday_start, $allday_end";
+ }
+ //echo "$interval - $number - $date - $recur_year - $this_year - $next<br>\n";
+
+ if ($allday_start != "") {
+ $start = strtotime("$allday_start");
+ $end = strtotime("$allday_end");
+ do {
+ $start_date = date("Ymd", $start);
+ $check_year = date("Y", $start);
+ // Only write the current year
+ if ($this_year == $check_year) {
+ $master_array[($start_date)][("0001")]["event_text"][] = "$summary";
+ }
+ $start = ($start + (24*3600));
+ } while ($start != $end);
+ } else {
+ $master_array[($start_date)][($hour.$minute)][] = array ("event_start" => $start_time, "event_text" => $summary, "event_end" => $end_time, "event_length" => $length);
+ }
+ }
+ }
+ }
+
+ // Let's write all the data to the master array
+ if ($start_time != "") {
+ $master_array[($start_date)][($hour.$minute)][] = array ("event_start" => $start_time, "event_text" => $summary, "event_end" => $end_time, "event_length" => $length);
+ }
+
+
+
+
+
+ } else {
+
+ $field = "";
+ $data = "";
+
+ sscanf($line, "%[^:]:%[^\n]", &$field, &$data);
+
+ if(strstr($field, "DTSTART;TZID")) {
+ $data = ereg_replace("T", "", $data);
+ ereg ("([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})", $data, $regs);
+ $year = $regs[1];
+ $month = $regs[2];
+ $day = $regs[3];
+ $hour = $regs[4];
+ $minute = $regs[5];
+
+ $start_date = $year . $month . $day;
+ $start_time = $hour . $minute;
+
+ } elseif (strstr($field, "DTEND;TZID")) {
+ $data = ereg_replace("T", "", $data);
+ ereg ("([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})", $data, $regs);
+ $year = $regs[1];
+ $month = $regs[2];
+ $day = $regs[3];
+ $hour = $regs[4];
+ $minute = $regs[5];
+
+ $end_day = $year . $month . $day;
+ $end_time = $hour . $minute;
+
+ } elseif (strstr($field, "SUMMARY")) {
+ $summary = $data;
+
+ } elseif (strstr($field, "X-WR-CALNAME")) {
+ $calendar_name = $data;
+
+ } elseif (strstr($field, "DTSTART;VALUE=DATE")) {
+ $allday_start = $data;
+ // echo "$allday_start";
+
+ } elseif (strstr($field, "DTEND;VALUE=DATE")) {
+ $allday_end = $data;
+
+ } elseif (strstr($field, "DURATION")) {
+ ereg ("^P([0-9]{1,2})?([W,D]{0,1})?(T)?([0-9]{1,2})?(H)?([0-9]{1,2})?(M)?([0-9]{1,2})?(S)?", $data, $duration);
+
+ if ($durartion[2] = "W") {
+ $weeks = $durartion[1];
+ } else {
+ $days = $durartion[1];
+ }
+
+ $hours = $duration[4];
+ $minutes = $duration[6];
+ $seconds = $duration[8];
+
+ $the_duration = ($weeks * 60 * 60 * 24 * 7) + ($days * 60 * 60 * 24) + ($hours * 60 * 60) + ($minutes * 60) + ($seconds);
+ $beginning = (strtotime($start_time) + $the_duration);
+ $end_time = date ("Hi", $beginning);
+
+ } elseif (strstr($field, "RRULE")) {
+ // $data = "RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30";
+ $data = ereg_replace ("RRULE:", "", $data);
+ $rrule = split (";", $data);
+ foreach ($rrule as $recur) {
+ ereg ("(.*)=(.*)", $recur, $regs);
+ $rrule_array[$regs[1]] = $regs[2];
+ }
+ } elseif (strstr($field, "ATTENDEE")) {
+ $attendee = $data;
+ // echo "$attendee";
+
+ }
+ }
+}
+
+ksort($master_array);
+reset($master_array);
+// If you want to see the values in the arrays, uncomment below.
+// print_r($master_array);
+// print_r($day_array);
+// print_r($rrule);
+
+
+
+
+?> \ No newline at end of file
diff --git a/list_icals.php b/list_icals.php
index 3745cd1..e8b08a8 100644
--- a/list_icals.php
+++ b/list_icals.php
@@ -1 +1,15 @@
-<? $path = "/Users/clittle/Sites/php_ical/templates"; $dir_handle = @opendir($path) or die("Unable to open $path"); while ($file = readdir($dir_handle)) { $date = date("Ymd", filemtime($file)); if (strstr ($file, ".ics")) { $listofiles[$date] = $file; } } closedir($dir_handle); print_r($listofiles); ?> \ No newline at end of file
+<?
+
+$path = "/Users/clittle/Sites/php_ical/templates";
+$dir_handle = @opendir($path) or die("Unable to open $path");
+while ($file = readdir($dir_handle)) {
+ $date = date("Ymd", filemtime($file));
+ if (strstr ($file, ".ics")) {
+ $listofiles[$date] = $file;
+ }
+}
+
+closedir($dir_handle);
+print_r($listofiles);
+
+?> \ No newline at end of file
diff --git a/month.php b/month.php
index 9798438..ad7c5c3 100644
--- a/month.php
+++ b/month.php
@@ -1 +1,329 @@
-<? include "ical_parser.php"; 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]; $date = mktime(0,0,0,"$this_month","$this_day","$this_year"); $next_date = DateAdd ("m", "1", $date); $prev_date = DateAdd ("m", "-1", $date); $next_month = date( "Ym01", $next_date); $prev_month = date( "Ym01", $prev_date); $display_month = date ("F Y", $date); $parse_month = date ("Ym", $date); $first_sunday = sundayOfWeek($this_year, $this_month, "1"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title><? echo "$calendar_name"; ?></title> <link rel="stylesheet" type="text/css" href="styles/<? echo "$style_sheet"; ?>"> </head> <body bgcolor="#FFFFFF"> <center> <table width="760" border="0" cellspacing="0" cellpadding="0" class="V12"> <tr> <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td> <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td> <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td> </tr> </table> <table width="760" border="0" cellspacing="1" cellpadding="2" class="calborder"> <tr> <td> <table width="760" border="0" cellspacing="0" cellpadding="0" class="calborder"> <tr> <td align="center" valign="middle"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#A1A5A9"> <tr> <td align="center" valign="middle" bgcolor="white"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr height="36"> <td align="left" valign="middle" bgcolor="white" height="36"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left"> <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$prev_month"; ?>">Last Month</a></font> </td> <td class="H20" align="center" valign="middle" bgcolor="white" height="36"> <? echo "$display_month"; ?> </td> <td align="right"> <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$next_month"; ?>">Next Month</a></font> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="center" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> <tr height="28"> <td align="left" valign="middle" height="26"> <b><font class="V12"><? echo "$calendar_name"; ?> Calendar</font></b> </td> <td align="right" class="G10B"> &nbsp;<a class="psf" href="<? echo "$fullpath"; ?>">Subscribe</a>&nbsp;|&nbsp;<a class="psf" href="<? echo "$filename"; ?>">Download</a>&nbsp; </td> </tr> </table> </td> </tr> <tr> <td align="center" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="0" class="G10B"> <tr height="11"> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Sunday</b></font></center> </td> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Monday</b></font></center> </td> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Tuesday</b></font></center> </td> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Wednesday</b></font></center> </td> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Thursday</b></font></center> </td> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Friday</b></font></center> </td> <td valign="top" width="99" height="13" class="eventbg"> <center><font class="eventfont"><b>Saturday</b></font></center> </td> </tr> <? $sunday = strtotime("$first_sunday"); $i = 0; $whole_month = TRUE; do { $day = date ("j", $sunday); $daylink = date ("Ymd", $sunday); $check_month = date ("m", $sunday); if ($check_month != $this_month) $day= "<font style=\"color: #D6D6D6\">$day</font>"; if ($i == 0) echo "<tr height=\"99\">\n"; if (($master_array[("$daylink")]) && ($check_month == $this_month)) { echo "<td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"99\" height=\"99\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"; echo "<tr>\n"; echo "<td align=\"right\" valign=\"top\">\n"; echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\">$day</a>\n"; echo "</td>\n"; echo "</tr>\n"; if ($master_array[("$daylink")]["0001"]["event_text"]) { foreach ($master_array[("$daylink")]["0001"]["event_text"] as $event_text) { if (strlen($event_text) > 15) { $event_text = substr("$event_text", 0, 12); $event_text = $event_text . "..."; } echo "<tr height=\"15\">\n"; echo "<td height=\"15\" valign=\"middle\" align=\"center\" bgcolor=\"#ffffff\">\n"; echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\"><i>$event_text</i></a>\n"; echo "</td>\n"; echo "</tr>\n"; } } else { foreach ($master_array[("$daylink")] as $event_times) { foreach ($event_times as $val) { $event_text = $val["event_text"]; if (strlen($event_text) > 12) { $event_text = substr("$event_text", 0, 10); $event_text = $event_text . "..."; } echo "<tr>\n"; echo "<td class=\"label\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr>\n"; echo "<td class=\"label\">\n"; echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\"><font class=\"G10B\">&#149; $event_text</font></a>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; } } } echo "</table>\n"; echo "</td>\n"; } else { echo "<td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"99\" height=\"99\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"; echo "<tr>\n"; echo "<td align=\"right\" valign=\"top\">\n"; echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\">$day</a>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; } $sunday = ($sunday + (25 * 60 * 60)); $i++; if ($i == 7) { echo "</tr>\n"; $i = 0; $checkagain = date ("m", $sunday); if ($checkagain != $this_month) $whole_month = FALSE; } } while ($whole_month == TRUE); ?> </table> </td> </tr> <tr> <td align="center" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr height="36"> <td align="left" valign="middle" bgcolor="white" height="36"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left"> <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$prev_month"; ?>">&nbsp;Last Month</a></font> </td> <td align="right"> <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$next_month"; ?>">Next Month&nbsp;</a></font> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> <table width="760" border="0" cellspacing="1" cellpadding="2" class="calborder"> <tr> <td> <table width="760" border="0" cellspacing="0" cellpadding="0" class="calborder"> <tr> <td align="center" valign="middle"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#A1A5A9"> <tr> <td align="center" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr height="25"> <td colspan="3" align="center" valign="middle" class="eventborder" width="825" height="25"> <font class="V12" color="#FFFFFF"><b>This Month's Events</b></font> </td> </tr> <tr height="11"> <td valign="middle" width="150" height="11" class="eventbg"> <font class="eventfont"><b>&nbsp;Date</b></font> </td> <td width="1" height="11" class="eventbg"><img src="images/spacer.gif" height="15" width="1"> </td> <td valign="middle" width="551" height="11" class="eventbg"> <font class="eventfont"><b>&nbsp;Summary</b></font> </td> </tr> <tr height="1"> <td colspan="3" width="825" height="1"> </td> </tr> <? // Iterate the entire master array foreach($master_array as $key => $val) { // Pull out only this months ereg ("([0-9]{6})([0-9]{2})", $key, $regs); if ($regs[1] == $parse_month) { $dayofmonth = strtotime ($key); $dayofmonth = date ("l, F jS", $dayofmonth); $i = 0; // Pull out each day foreach ($val as $new_val) { // Pull out each time foreach ($new_val as $new_key2 => $new_val2) { if (!$new_val2["event_text"]) { foreach ($new_val2 as $all_day) { $event_text = $all_day; echo "<tr height=\"20\">\n"; echo "<td valign=\"middle\" bgcolor=\"white\" width=\"150\" height=\"20\">\n"; echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$dayofmonth</font></a>\n"; echo "</td>\n"; echo "<td width=\"1\" height=\"20\">\n"; echo "</td>\n"; echo "<td valign=\"middle\" bgcolor=\"white\" width=\"551\" height=\"20\">\n"; echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$event_text</font></a> <font class=\"V9\">(All day event)</font>\n"; echo "</td>\n"; echo "</tr>\n"; } } elseif ($new_val2["event_text"]) { $event_text = $new_val2["event_text"]; $event_start = $new_val2["event_start"]; $event_end = $new_val2["event_end"]; $event_start = strtotime ("$event_start"); $event_start = date ("g:i a", $event_start); $event_end = strtotime ("$event_end"); $event_end = date ("g:i a", $event_end); echo "<tr height=\"20\">\n"; echo "<td valign=\"middle\" bgcolor=\"white\" width=\"150\" height=\"20\">\n"; echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$dayofmonth</font></a>\n"; echo "</td>\n"; echo "<td width=\"1\" height=\"20\">\n"; echo "</td>\n"; echo "<td valign=\"middle\" bgcolor=\"white\" width=\"551\" height=\"20\">\n"; echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$event_text</a></font> <font class=\"V9\">($event_start - $event_end)</font>\n"; echo "</td>\n"; echo "</tr>\n"; } } } } } ?> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> <table width="760" border="0" cellspacing="0" cellpadding="0" class="V12"> <tr> <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td> <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td> <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td> </tr> </table> </center> </body> </html> \ No newline at end of file
+<? include "ical_parser.php";
+
+ 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];
+ $date = mktime(0,0,0,"$this_month","$this_day","$this_year");
+ $next_date = DateAdd ("m", "1", $date);
+ $prev_date = DateAdd ("m", "-1", $date);
+ $next_month = date( "Ym01", $next_date);
+ $prev_month = date( "Ym01", $prev_date);
+ $display_month = date ("F Y", $date);
+ $parse_month = date ("Ym", $date);
+ $first_sunday = sundayOfWeek($this_year, $this_month, "1");
+
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title><? echo "$calendar_name"; ?></title>
+ <link rel="stylesheet" type="text/css" href="styles/<? echo "$style_sheet"; ?>">
+</head>
+<body bgcolor="#FFFFFF">
+<center>
+<table width="760" border="0" cellspacing="0" cellpadding="0" class="V12">
+ <tr>
+ <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td>
+ <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td>
+ <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td>
+ </tr>
+</table>
+<table width="760" border="0" cellspacing="1" cellpadding="2" class="calborder">
+<tr>
+<td>
+ <table width="760" border="0" cellspacing="0" cellpadding="0" class="calborder">
+ <tr>
+ <td align="center" valign="middle">
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#A1A5A9">
+ <tr>
+ <td align="center" valign="middle" bgcolor="white">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr height="36">
+ <td align="left" valign="middle" bgcolor="white" height="36">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="left">
+ <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$prev_month"; ?>">Last Month</a></font>
+ </td>
+ <td class="H20" align="center" valign="middle" bgcolor="white" height="36">
+ <? echo "$display_month"; ?>
+ </td>
+ <td align="right">
+ <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$next_month"; ?>">Next Month</a></font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" valign="middle">
+
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
+ <tr height="28">
+ <td align="left" valign="middle" height="26">
+ <b><font class="V12"><? echo "$calendar_name"; ?> Calendar</font></b>
+ </td>
+ <td align="right" class="G10B">
+ &nbsp;<a class="psf" href="<? echo "$fullpath"; ?>">Subscribe</a>&nbsp;|&nbsp;<a class="psf" href="<? echo "$filename"; ?>">Download</a>&nbsp;
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+
+ <td align="center" valign="top">
+ <table width="100%" border="0" cellspacing="1" cellpadding="0" class="G10B">
+ <tr height="11">
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Sunday</b></font></center>
+ </td>
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Monday</b></font></center>
+ </td>
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Tuesday</b></font></center>
+ </td>
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Wednesday</b></font></center>
+ </td>
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Thursday</b></font></center>
+ </td>
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Friday</b></font></center>
+ </td>
+ <td valign="top" width="99" height="13" class="eventbg">
+ <center><font class="eventfont"><b>Saturday</b></font></center>
+ </td>
+ </tr>
+ <?
+ $sunday = strtotime("$first_sunday");
+ $i = 0;
+ $whole_month = TRUE;
+ do {
+ $day = date ("j", $sunday);
+ $daylink = date ("Ymd", $sunday);
+ $check_month = date ("m", $sunday);
+ if ($check_month != $this_month) $day= "<font style=\"color: #D6D6D6\">$day</font>";
+ if ($i == 0) echo "<tr height=\"99\">\n";
+ if (($master_array[("$daylink")]) && ($check_month == $this_month)) {
+ echo "<td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"99\" height=\"99\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n";
+ echo "<tr>\n";
+ echo "<td align=\"right\" valign=\"top\">\n";
+ echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\">$day</a>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ if ($master_array[("$daylink")]["0001"]["event_text"]) {
+ foreach ($master_array[("$daylink")]["0001"]["event_text"] as $event_text) {
+ if (strlen($event_text) > 15) {
+ $event_text = substr("$event_text", 0, 12);
+ $event_text = $event_text . "...";
+ }
+ echo "<tr height=\"15\">\n";
+ echo "<td height=\"15\" valign=\"middle\" align=\"center\" bgcolor=\"#ffffff\">\n";
+ echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\"><i>$event_text</i></a>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ }
+ } else {
+ foreach ($master_array[("$daylink")] as $event_times) {
+ foreach ($event_times as $val) {
+ $event_text = $val["event_text"];
+ if (strlen($event_text) > 12) {
+ $event_text = substr("$event_text", 0, 10);
+ $event_text = $event_text . "...";
+ }
+ echo "<tr>\n";
+ echo "<td class=\"label\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
+ echo "<tr>\n";
+ echo "<td class=\"label\">\n";
+ echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\"><font class=\"G10B\">&#149; $event_text</font></a>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ }
+ }
+ }
+ echo "</table>\n";
+ echo "</td>\n";
+ } else {
+ echo "<td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"99\" height=\"99\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n";
+ echo "<tr>\n";
+ echo "<td align=\"right\" valign=\"top\">\n";
+ echo "<a class=\"psf\" href=\"day.php?getdate=$daylink\">$day</a>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ }
+ $sunday = ($sunday + (25 * 60 * 60));
+ $i++;
+ if ($i == 7) {
+ echo "</tr>\n";
+ $i = 0;
+ $checkagain = date ("m", $sunday);
+ if ($checkagain != $this_month) $whole_month = FALSE;
+ }
+
+
+ } while ($whole_month == TRUE);
+
+
+ ?>
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" valign="middle">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr height="36">
+ <td align="left" valign="middle" bgcolor="white" height="36">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="left">
+ <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$prev_month"; ?>">&nbsp;Last Month</a></font>
+ </td>
+ <td align="right">
+ <font class="G10B"><a class="psf" href="month.php?getdate=<? echo "$next_month"; ?>">Next Month&nbsp;</a></font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <br>
+ <table width="760" border="0" cellspacing="1" cellpadding="2" class="calborder">
+<tr>
+<td>
+ <table width="760" border="0" cellspacing="0" cellpadding="0" class="calborder">
+ <tr>
+ <td align="center" valign="middle">
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#A1A5A9">
+ <tr>
+ <td align="center" valign="top">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr height="25">
+ <td colspan="3" align="center" valign="middle" class="eventborder" width="825" height="25">
+ <font class="V12" color="#FFFFFF"><b>This Month's Events</b></font>
+ </td>
+ </tr>
+ <tr height="11">
+ <td valign="middle" width="150" height="11" class="eventbg">
+ <font class="eventfont"><b>&nbsp;Date</b></font>
+ </td>
+ <td width="1" height="11" class="eventbg"><img src="images/spacer.gif" height="15" width="1">
+ </td>
+ <td valign="middle" width="551" height="11" class="eventbg">
+ <font class="eventfont"><b>&nbsp;Summary</b></font>
+ </td>
+ </tr>
+ <tr height="1">
+ <td colspan="3" width="825" height="1">
+ </td>
+ </tr>
+ <?
+ // Iterate the entire master array
+ foreach($master_array as $key => $val) {
+
+ // Pull out only this months
+ ereg ("([0-9]{6})([0-9]{2})", $key, $regs);
+ if ($regs[1] == $parse_month) {
+ $dayofmonth = strtotime ($key);
+ $dayofmonth = date ("l, F jS", $dayofmonth);
+ $i = 0;
+
+ // Pull out each day
+ foreach ($val as $new_val) {
+
+ // Pull out each time
+ foreach ($new_val as $new_key2 => $new_val2) {
+ if (!$new_val2["event_text"]) {
+ foreach ($new_val2 as $all_day) {
+ $event_text = $all_day;
+ echo "<tr height=\"20\">\n";
+ echo "<td valign=\"middle\" bgcolor=\"white\" width=\"150\" height=\"20\">\n";
+ echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$dayofmonth</font></a>\n";
+ echo "</td>\n";
+ echo "<td width=\"1\" height=\"20\">\n";
+ echo "</td>\n";
+ echo "<td valign=\"middle\" bgcolor=\"white\" width=\"551\" height=\"20\">\n";
+ echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$event_text</font></a> <font class=\"V9\">(All day event)</font>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ }
+ } elseif ($new_val2["event_text"]) {
+ $event_text = $new_val2["event_text"];
+ $event_start = $new_val2["event_start"];
+ $event_end = $new_val2["event_end"];
+ $event_start = strtotime ("$event_start");
+ $event_start = date ("g:i a", $event_start);
+ $event_end = strtotime ("$event_end");
+ $event_end = date ("g:i a", $event_end);
+ echo "<tr height=\"20\">\n";
+ echo "<td valign=\"middle\" bgcolor=\"white\" width=\"150\" height=\"20\">\n";
+ echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$dayofmonth</font></a>\n";
+ echo "</td>\n";
+ echo "<td width=\"1\" height=\"20\">\n";
+ echo "</td>\n";
+ echo "<td valign=\"middle\" bgcolor=\"white\" width=\"551\" height=\"20\">\n";
+ echo "<font class=\"G10B\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$key\">$event_text</a></font> <font class=\"V9\">($event_start - $event_end)</font>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ }
+
+ }
+ }
+ }
+ }
+
+ ?>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <br>
+<table width="760" border="0" cellspacing="0" cellpadding="0" class="V12">
+ <tr>
+ <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td>
+ <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td>
+ <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td>
+ </tr>
+</table>
+</center>
+</body>
+</html>
diff --git a/week.php b/week.php
index f4ad7ad..ef583ac 100644
--- a/week.php
+++ b/week.php
@@ -1 +1,409 @@
-<? include "ical_parser.php"; ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); $this_day = $day_array2[3]; $this_week = $day_array2[2]; $this_year = $day_array2[1]; $sunday = sundayOfWeek($this_year, $this_month, $this_day); $sunday_date = strtotime("$sunday"); $saturday = ($sunday_date + (6 * 25 * 60 * 60)); $start_week = date ("F jS", strtotime("$sunday")); $end_week = date ("F jS", $saturday); $date = strtotime ("$getdate"); $next_week2 = ($date + (7 * 24.4 * 60 * 60)); $prev_week2 = ($date - (7 * 24.4 * 60 * 60)); $next_week = date("Ymd", $next_week2); $prev_week = date("Ymd", $prev_week2); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>Home</title> <link rel="stylesheet" type="text/css" href="styles/default.css"> </head> <body bgcolor="#FFFFFF"> <center> <table width="700" border="0" cellspacing="0" cellpadding="0" class="V12"> <tr> <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td> <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td> <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="24" width="1"></td> </tr> <tr> <td class="V12" align="left" valign="top" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$prev_week"; ?>">Previous Week</a></td> <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$start_week - $end_week"; ?></td> <td class="V12" align="right" valign="top" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$next_week"; ?>">Next Week</a></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td> </tr> </table> <table width="700" border="0" cellspacing="1" cellpadding="2" class="calborder"> <tr> <td> <table width="700" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="middle"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#a1a5a9" class="G10B"> <tr> <td align="center" valign="top"> <table border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan="3" bgcolor="white" nowrap> <table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <td align="left" valign="middle"><b><font class="V12">Home Calendar</font></b></td> <td align="right" valign="middle" class="V12"><a class="psf" href="webcal://chadsdomain.com/ical/Home.ics">Subscribe</a> | <a class="psf" href="http://chadsdomain.com/ical/Home.ics">Download</a></td> </tr> </table> </td> </tr> <tr> <td align="center" valign="top"> <table border="0" cellspacing="1" cellpadding="0" class="G10B"> <tr height="12"> <td colspan="2" height="11" width="60" nowrap bgcolor="#f5f5f5"> &nbsp; </td> <? $thisdate = strtotime ("$sunday"); $i = 0; do { $thisday = date("Ymd", $thisdate); $thisday2 = date("D, M j", $thisdate); echo "<td height=\"12\" width=\"101\" colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=\"#f5f5f5\" class=\"V9\">\n"; echo "<a class=\"psf\" href=\"day.php?getdate=$thisday\">$thisday2</a>\n"; echo "</td>\n"; $thisdate = ($thisdate + (25 * 60 * 60)); $i++; } while ($i != 7); ?> </tr> <tr> <td colspan="2" width="60" valign="top" align="center" bgcolor="#f5f5f5"> <img src="images/spacer.gif" width="1" height="1"> </td> <? $thisdate = strtotime ("$sunday"); $i = 0; do { $thisday = date("Ymd", $thisdate); if ($master_array[("$thisday")]["0001"]["event_text"]) { echo "<td colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=\"#ffffff\">\n"; foreach ($master_array[("$thisday")]["0001"]["event_text"] as $event_text) { echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr height=\"20\">\n"; echo "<td height=\"20\" valign=\"middle\" align=\"center\" class=\"eventbg\">\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr>\n"; echo "<td valign=\"top\" align=\"center\">\n"; echo "<font class=\"eventfont\"><i>$event_text</i></font>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; echo "<tr height=\"1\">\n"; echo "<td height=\"1\">\n"; echo "<img src=\"images/spacer.gif\" width=\"1\" height=\"1\"> \n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; } echo "</td>\n"; } else { echo "<td colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=\"#ffffff\">\n"; echo "<img src=\"images/spacer.gif\" width=\"1\" height=\"1\">\n"; echo "</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $i++; } while ($i != 7); ?> </tr> <tr> <td width="60" bgcolor="#a1a5a9" nowrap> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="1" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> <td width="45" nowrap bgcolor="#a1a5a9"> <img src="images/spacer.gif" width="1" height="1"> </td> </tr> <? $event_length = 0; foreach ($day_array as $key) { $thisdate = strtotime ("$sunday"); $thisday = date("Ymd", $thisdate); $k = 0; $cal_time = $key; $key = strtotime ("$key"); $key = date ("g:i A", $key); // The first <TR> (on the hour) if (ereg("^([0-9]{1,2}):00", $key)) { echo "<tr height=\"30\">\n"; echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n"; echo "<td height=\"30\" width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\n"; // Sunday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Monday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Tuesday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Wednesday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Thursday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Friday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Saturday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // End Week echo "</tr>\n"; } // The second <TR> (on the half hour) $thisdate = strtotime ("$sunday"); $thisday = date("Ymd", $thisdate); if (ereg("([0-9]{1,2}):30", $key)) { echo "<tr height=\"30\">\n"; echo "<td height=\"30\" width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\n"; // Sunday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Monday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Tuesday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Wednesday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Thursday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Friday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); // Saturday if ($master_array[("$thisday")]["$cal_time"]) { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n"; } else { echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n"; } $thisdate = ($thisdate + (25 * 60 * 60)); $thisday = date("Ymd", $thisdate); echo "</tr>\n"; } } ?> <!-- [[td rowspan="2" colspan="2" valign="top" align="left" bgcolor="#68aaef"]] [[table width="100%" border="0" cellpadding="2" cellspacing="0"]] [[tr]] [[td bgcolor="#0065DB"]][[font style="color:#ffffff; font-weight: bold"]]12:00pm[[/font]] [[/td]] [[/tr]] [[tr]] [[td]] [[table width="100%" border="0" cellpadding="1" cellspacing="0"]] [[tr]] [[td bgcolor="#68aaef"]][[font style="font-size: 11px; color:#ffffff"]]Lunch with Stef's mom and sis[[/font]] [[/td]] [[/tr]] [[/table]] [[/td]] [[/tr]] [[/table]] [[/td]] --> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table width="700" border="0" cellspacing="0" cellpadding="0" class="V12"> <tr> <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td> </tr> <tr> <td class="V12" align="left" valign="middle" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$prev_week"; ?>">Previous Week</a></td> <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$today"; ?></td> <td class="V12" align="right" valign="middle" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$next_week"; ?>">Next Week</a></td> </tr> <!-- [[tr]] [[td colspan="3"]][[img src="images/spacer.gif" height="24" width="1"]][[/td]] [[/tr]] [[tr]] [[td align="left" width="5%"]][[a href="day.php"]]Today[[/a]][[/td]] [[td align="center" width="90%"]][[a href="day.php"]]Day[[/a]] | [[a href="week.php"]]Week[[/a]] | [[a href="month.php"]]Month[[/a]][[/td]] [[td align="right" width="5%"]][[a href="preferences.php"]]Preferences[[/a]][[/td]] [[/tr]] --> </table> </center> </body> </html> \ No newline at end of file
+<? include "ical_parser.php";
+
+ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
+$this_day = $day_array2[3];
+$this_week = $day_array2[2];
+$this_year = $day_array2[1];
+$sunday = sundayOfWeek($this_year, $this_month, $this_day);
+$sunday_date = strtotime("$sunday");
+$saturday = ($sunday_date + (6 * 25 * 60 * 60));
+$start_week = date ("F jS", strtotime("$sunday"));
+$end_week = date ("F jS", $saturday);
+
+$date = strtotime ("$getdate");
+$next_week2 = ($date + (7 * 24.4 * 60 * 60));
+$prev_week2 = ($date - (7 * 24.4 * 60 * 60));
+$next_week = date("Ymd", $next_week2);
+$prev_week = date("Ymd", $prev_week2);
+
+
+
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>Home</title>
+ <link rel="stylesheet" type="text/css" href="styles/default.css">
+</head>
+<body bgcolor="#FFFFFF">
+<center>
+ <table width="700" border="0" cellspacing="0" cellpadding="0" class="V12">
+ <tr>
+ <td align="left" width="5%"><!--[[a class="psf" href="day.php"]]Today[[/a]]--></td>
+ <td align="center" width="90%"><a class="psf" href="day.php">Day</a> | <a class="psf" href="week.php">Week</a> | <a class="psf" href="month.php">Month</a></td>
+ <td align="right" width="5%"><!--[[a class="psf" href="preferences.php"]]Preferences[[/a]]--></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="24" width="1"></td>
+ </tr>
+ <tr>
+ <td class="V12" align="left" valign="top" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$prev_week"; ?>">Previous Week</a></td>
+ <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$start_week - $end_week"; ?></td>
+ <td class="V12" align="right" valign="top" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$next_week"; ?>">Next Week</a></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td>
+ </tr>
+ </table>
+ <table width="700" border="0" cellspacing="1" cellpadding="2" class="calborder">
+<tr>
+<td>
+ <table width="700" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td align="center" valign="middle">
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#a1a5a9" class="G10B">
+ <tr>
+ <td align="center" valign="top">
+ <table border="0" cellspacing="1" cellpadding="0">
+ <tr>
+ <td colspan="3" bgcolor="white" nowrap>
+ <table width="100%" border="0" cellspacing="4" cellpadding="0">
+ <tr>
+ <td align="left" valign="middle"><b><font class="V12">Home Calendar</font></b></td>
+ <td align="right" valign="middle" class="V12"><a class="psf" href="webcal://chadsdomain.com/ical/Home.ics">Subscribe</a> | <a class="psf" href="http://chadsdomain.com/ical/Home.ics">Download</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="center" valign="top">
+ <table border="0" cellspacing="1" cellpadding="0" class="G10B">
+ <tr height="12">
+ <td colspan="2" height="11" width="60" nowrap bgcolor="#f5f5f5">
+ &nbsp;
+ </td>
+ <?
+ $thisdate = strtotime ("$sunday");
+ $i = 0;
+ do {
+ $thisday = date("Ymd", $thisdate);
+ $thisday2 = date("D, M j", $thisdate);
+ echo "<td height=\"12\" width=\"101\" colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=\"#f5f5f5\" class=\"V9\">\n";
+ echo "<a class=\"psf\" href=\"day.php?getdate=$thisday\">$thisday2</a>\n";
+ echo "</td>\n";
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $i++;
+
+ } while ($i != 7);
+
+
+
+ ?>
+
+ </tr>
+ <tr>
+ <td colspan="2" width="60" valign="top" align="center" bgcolor="#f5f5f5">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+
+
+ <?
+ $thisdate = strtotime ("$sunday");
+ $i = 0;
+ do {
+ $thisday = date("Ymd", $thisdate);
+ if ($master_array[("$thisday")]["0001"]["event_text"]) {
+ echo "<td colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=\"#ffffff\">\n";
+ foreach ($master_array[("$thisday")]["0001"]["event_text"] as $event_text) {
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
+ echo "<tr height=\"20\">\n";
+ echo "<td height=\"20\" valign=\"middle\" align=\"center\" class=\"eventbg\">\n";
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
+ echo "<tr>\n";
+ echo "<td valign=\"top\" align=\"center\">\n";
+ echo "<font class=\"eventfont\"><i>$event_text</i></font>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "<tr height=\"1\">\n";
+ echo "<td height=\"1\">\n";
+ echo "<img src=\"images/spacer.gif\" width=\"1\" height=\"1\"> \n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ }
+ echo "</td>\n";
+ } else {
+ echo "<td colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=\"#ffffff\">\n";
+ echo "<img src=\"images/spacer.gif\" width=\"1\" height=\"1\">\n";
+ echo "</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $i++;
+
+ } while ($i != 7);
+
+ ?>
+
+ </tr>
+ <tr>
+ <td width="60" bgcolor="#a1a5a9" nowrap>
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="1" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ <td width="45" nowrap bgcolor="#a1a5a9">
+ <img src="images/spacer.gif" width="1" height="1">
+ </td>
+ </tr>
+ <?
+
+ $event_length = 0;
+
+ foreach ($day_array as $key) {
+ $thisdate = strtotime ("$sunday");
+ $thisday = date("Ymd", $thisdate);
+ $k = 0;
+ $cal_time = $key;
+ $key = strtotime ("$key");
+ $key = date ("g:i A", $key);
+
+ // The first <TR> (on the hour)
+ if (ereg("^([0-9]{1,2}):00", $key)) {
+ echo "<tr height=\"30\">\n";
+ echo "<td rowspan=\"2\" align=\"center\" valign=\"top\" bgcolor=\"#f5f5f5\" width=\"60\">$key</td>\n";
+ echo "<td height=\"30\" width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\n";
+
+ // Sunday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Monday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Tuesday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Wednesday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Thursday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Friday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Saturday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // End Week
+ echo "</tr>\n";
+ }
+
+
+ // The second <TR> (on the half hour)
+ $thisdate = strtotime ("$sunday");
+ $thisday = date("Ymd", $thisdate);
+ if (ereg("([0-9]{1,2}):30", $key)) {
+ echo "<tr height=\"30\">\n";
+ echo "<td height=\"30\" width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\n";
+
+ // Sunday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Monday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Tuesday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Wednesday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Thursday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Friday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+
+ // Saturday
+ if ($master_array[("$thisday")]["$cal_time"]) {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;<a class=\"psf\" href=\"day.php?getdate=$thisday\">Event</a></td>\n";
+ } else {
+ echo "<td colspan=\"2\" bgcolor=\"#ffffff\">&nbsp;</td>\n";
+ }
+ $thisdate = ($thisdate + (25 * 60 * 60));
+ $thisday = date("Ymd", $thisdate);
+ echo "</tr>\n";
+ }
+
+
+ }
+
+ ?>
+ <!--
+ [[td rowspan="2" colspan="2" valign="top" align="left" bgcolor="#68aaef"]]
+ [[table width="100%" border="0" cellpadding="2" cellspacing="0"]]
+ [[tr]]
+ [[td bgcolor="#0065DB"]][[font style="color:#ffffff; font-weight: bold"]]12:00pm[[/font]]
+ [[/td]]
+ [[/tr]]
+ [[tr]]
+ [[td]]
+ [[table width="100%" border="0" cellpadding="1" cellspacing="0"]]
+ [[tr]]
+ [[td bgcolor="#68aaef"]][[font style="font-size: 11px; color:#ffffff"]]Lunch with Stef's mom and sis[[/font]]
+ [[/td]]
+ [[/tr]]
+ [[/table]]
+ [[/td]]
+ [[/tr]]
+ [[/table]]
+ [[/td]]
+ -->
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+ <table width="700" border="0" cellspacing="0" cellpadding="0" class="V12">
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" height="10" width="1"></td>
+ </tr>
+ <tr>
+ <td class="V12" align="left" valign="middle" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$prev_week"; ?>">Previous Week</a></td>
+ <td class="H20" align="center" valign="middle" width="90%" nowrap><? echo "$today"; ?></td>
+ <td class="V12" align="right" valign="middle" width="5%" nowrap><a class="psf" href="week.php?getdate=<? echo "$next_week"; ?>">Next Week</a></td>
+ </tr>
+<!--
+ [[tr]]
+ [[td colspan="3"]][[img src="images/spacer.gif" height="24" width="1"]][[/td]]
+ [[/tr]]
+ [[tr]]
+ [[td align="left" width="5%"]][[a href="day.php"]]Today[[/a]][[/td]]
+ [[td align="center" width="90%"]][[a href="day.php"]]Day[[/a]] | [[a href="week.php"]]Week[[/a]] | [[a href="month.php"]]Month[[/a]][[/td]]
+ [[td align="right" width="5%"]][[a href="preferences.php"]]Preferences[[/a]][[/td]]
+ [[/tr]]
+-->
+</table>
+</center>
+</body>
+</html>

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