diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-11-24 23:04:43 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-11-24 23:04:43 +0000 |
commit | 7476e46daabcee0995eb4f794a62b5306586aa6f (patch) | |
tree | eb8346c2083deeeb5a2f61099ba69b048093f383 /includes | |
parent | c2bf86b86fe02d1834bc4d34a2ce297b9268a30b (diff) | |
download | phpicalendar-7476e46daabcee0995eb4f794a62b5306586aa6f.tar.gz phpicalendar-7476e46daabcee0995eb4f794a62b5306586aa6f.tar.bz2 phpicalendar-7476e46daabcee0995eb4f794a62b5306586aa6f.zip |
Moved all includes to their own folder. Modified pages accordingly. Fixed footer.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/calendar_nav.php | 300 | ||||
-rw-r--r-- | includes/event.php | 90 | ||||
-rw-r--r-- | includes/footer.inc.php | 1 | ||||
-rw-r--r-- | includes/header.inc.php | 1 | ||||
-rw-r--r-- | includes/sidebar.php | 504 | ||||
-rw-r--r-- | includes/todo.php | 119 |
6 files changed, 1015 insertions, 0 deletions
diff --git a/includes/calendar_nav.php b/includes/calendar_nav.php new file mode 100644 index 0000000..2fccf2d --- /dev/null +++ b/includes/calendar_nav.php @@ -0,0 +1,300 @@ + <?php + + $cal_displayname2 = $calendar_name . " $calendar_lang"; + if (strlen($cal_displayname2) > 24) { + $cal_displayname2 = substr("$cal_displayname2", 0, 21); + $cal_displayname2 = $cal_displayname2 . "..."; + } + + $next_day = date("Ymd", strtotime("+1 day", $unix_time)); + $prev_day = date("Ymd", strtotime("-1 day", $unix_time)); + + $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); + ?> +<br> +<table border="0" width="737" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="calborder"> + <tr> + <td align="left" valign="top" width="1%" class="sideback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$prev_day\"><img src=\"styles/$style_sheet/left_arrows.gif\" alt=\"right\" border=\"0\" align=\"left\"></a>"; ?></td> + <td align="center" class="sideback"><font class="G10B"><b><?php print (localizeDate ($dateFormat_day, strtotime($getdate))); ?></b></font></td> + <td align="right" valign="top" width="1%" class="sideback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$next_day\"><img src=\"styles/$style_sheet/right_arrows.gif\" alt=\"right\" border=\"0\" align=\"right\"></a>"; ?></td> + </tr> + <tr> + <td colspan="3"><img src="images/spacer.gif" width="1" height="5"></td> + </tr> + <tr> + <td width="1%" valign="top" align="right"> + <table cellpadding="0" cellspacing="0" border="0" width="160"> + <tr> + <td valign="center" align="center"> + <table width="160" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td align="left" valign="top" width="1"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("-1 month", $fake_getdate_time))); ?></font></td> + <td align="right" valign="top" width="1"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> + <tr> + <td><img src="images/spacer.gif" width="21" height="3"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + </tr> + <tr> + <?php + $start_day = strtotime($week_start_day); + for ($i=0; $i<7; $i++) { + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; + print "<td align=\"center\"><font class=\"G10BOLD\">$day</font></td>\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + </tr> + <tr height="3"> + <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=""></td> + </tr> + <?php + $minical_time = strtotime("-1 month", $fake_getdate_time); + $minical_month = date("m", $minical_time); + $minical_year = date("Y", $minical_time); + $first_of_month = $minical_year.$minical_month."01"; + $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day)); + $i = 0; + $whole_month = TRUE; + do { + $day = date ("j", $start_day); + $daylink = date ("Ymd", $start_day); + $check_month = date ("m", $start_day); + if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>"; + if ($i == 0) echo "<tr>\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } else { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "</tr>\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + </td> + <td width="98%" valign="top" align="center"> + <table border="0" width="330" cellspacing="0" cellpadding="0"> + <tr> + <td width="160" valign="top"> + <table cellpadding="0" cellspacing="0" border="0" width="160"> + <tr> + <td valign="center" align="center"> + <table width="160" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="left"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><font class="G10BOLD"><?php echo "$jump_lang"; ?></font></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="3"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_icals.php'); ?></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="5"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_years.php'); ?></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="5"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_months.php'); ?></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="5"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_weeks.php'); ?></td> + </tr> + <?php + if ($display_custom_goto == "yes") { + ?> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6" class="G10B"> + <form action="day.php" method="GET"> + <input type="hidden" name="cal" value="<?php print urlencode($cal); ?>"> + <input type="text" size="15" name="jumpto_day"> + <input type="submit" value="Go"> + </form> + </td> + </tr> + <?php + } + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + </td> + <td><img src="images/spacer.gif" width="10" height="1"></td> + <td width="160" valign="top"> + <table cellpadding="0" cellspacing="0" border="0" width="160"> + <tr> + <td valign="center" align="left" valign="top"> + <table width="160" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="left" valign="top"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="2"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><font class="G10BOLD"><?php echo "$cal_displayname2"; ?></font></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6" class="G10B"> + <?php echo " + <a class=\"psf\" href=\"day.php?cal=$cal&getdate=$today_today\">$goday_lang</a><br>\n + <a class=\"psf\" href=\"week.php?cal=$cal&getdate=$today_today\">$goweek_lang</a><br>\n + <a class=\"psf\" href=\"month.php?cal=$cal&getdate=$today_today\">$gomonth_lang</a><br>\n + <a class=\"psf\" href=\"year.php?cal=$cal&getdate=$today_today\">$goyear_lang</a><br>\n + <a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n + <a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n + <a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$filename\">$download_lang</a>\n + "; ?> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </td> + <td width="1%" valign="top" align="left"> + <table cellpadding="0" cellspacing="0" border="0" width="160"> + <tr> + <td valign="center" align="center"> + <table width="160" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td align="left" valign="top" width="1"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", $fake_getdate_time))); ?></font></td> + <td align="right" valign="top" width="1"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> + <tr> + <td><img src="images/spacer.gif" width="21" height="3" alt=""></td> + <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> + <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> + <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> + <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> + <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> + <td><img src="images/spacer.gif" width="21" height="1" alt=""></td> + </tr> + <tr> + <?php + $start_day = strtotime($week_start_day); + for ($i=0; $i<7; $i++) { + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; + print "<td align=\"center\"><font class=\"G10BOLD\">$day</font></td>\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + </tr> + <tr height="3"> + <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=""></td> + </tr> + <?php + $minical_time = strtotime("+1 month", $fake_getdate_time); + $minical_month = date("m", $minical_time); + $minical_year = date("Y", $minical_time); + $first_of_month = $minical_year.$minical_month."01"; + $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day)); + $i = 0; + $whole_month = TRUE; + do { + $day = date ("j", $start_day); + $daylink = date ("Ymd", $start_day); + $check_month = date ("m", $start_day); + if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>"; + if ($i == 0) echo "<tr>\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } else { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "</tr>\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=""></td> + </tr> + </table> + </td> + </tr> + </table> +</td> +</tr> +</table> diff --git a/includes/event.php b/includes/event.php new file mode 100644 index 0000000..8a37ed5 --- /dev/null +++ b/includes/event.php @@ -0,0 +1,90 @@ +<?php +define('BASE', '../'); +include (BASE.'functions/init.inc.php'); + +if (isset($HTTP_GET_VARS['event']) && ($HTTP_GET_VARS['event'] !== '') ) { + $event = $HTTP_GET_VARS['event']; +} else { + $event = ''; +} +if (isset($HTTP_GET_VARS['description']) && ($HTTP_GET_VARS['description'] !== '') ) { + $description = $HTTP_GET_VARS['description']; +} else { + $description = ''; +} +if (isset($HTTP_GET_VARS['calendar_name']) && ($HTTP_GET_VARS['calendar_name'] !== '') ) { + $calendar_name = $HTTP_GET_VARS['calendar_name']; +} else { + $calendar_name = ''; +} + +if (isset($HTTP_GET_VARS['start']) && ($HTTP_GET_VARS['start'] !== '') ) { + $start = $HTTP_GET_VARS['start']; +} else { + $start = ''; +} +if (isset($HTTP_GET_VARS['end']) && ($HTTP_GET_VARS['end'] !== '') ) { + $end = $HTTP_GET_VARS['end']; +} else { + $end = ''; +} + +$event = rawurldecode($event); +$event = stripslashes($event); +$event = str_replace('\\', '', $event); +$event = htmlspecialchars($event); +$description = rawurldecode($description); +$description = stripslashes($description); +$description = str_replace('\\', '', $description); +//$description = htmlspecialchars($description); +$calendar_name2 = rawurldecode($calendar_name); +$calendar_name2 = stripslashes($calendar_name2); +$calendar_name2 = str_replace('\\', '', $calendar_name2); +//$calendar_name2 = htmlspecialchars($calendar_name2); +?> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html> +<head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8"> + <title><?php echo $calendar_name2; ?></title> + <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> +</head> +<body bgcolor="#eeeeee"><center> +<table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder"> + <tr> + <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$calendar_name2 $calendar_lang"; ?></font></td> + <td align="right" valign="top" width="1%" class="sideback"></td> + </tr> + <tr> + <td colspan="3"><img src="images/spacer.gif" width="1" height="6"></td> + </tr> + <tr> + <td colspan="3"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <?php + if (($start) && ($end)) $event_times = ' - <font class="V9">(<i>'.$start.' - '.$end.'</i>)</font>'; + if ($start == '' && $end == '' && isset($start, $end)) $event_times = ' - <font class="V9">(<i>'.$all_day_lang.'</i>)</font>'; + ?> + <tr> + <td width="1%"><img src="images/spacer.gif" width="6" height="1"></td> + <td align="left" colspan="2" class="V12"><?php echo $event.' '.$event_times.'<br><br>'; ?></td> + </tr> + + <?php if ($description) { ?> + <tr> + <td width="1%"><img src="images/spacer.gif" width="6" height="1"></td> + <td align="left" colspan="2" class="V12"> + <?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", + '<a target="_new" href="\0">\0</a>', $description); ?></td> + </tr> + <?php } ?> + + </table> + </td> + </tr> +</table> +</center> +</body> +</html> diff --git a/includes/footer.inc.php b/includes/footer.inc.php new file mode 100644 index 0000000..2b550a3 --- /dev/null +++ b/includes/footer.inc.php @@ -0,0 +1 @@ +<?php
echo "<center><font class=\"V9\"><br>$powered_by_lang <a class=\"psf\" href=\"http://phpicalendar.sourceforge.net/nuke/\">PHP iCalendar 0.9 CVS</a>";
if ($enable_rss == 'yes') {
echo "<br>\n";
if ($current_view == 'rssindex') {
echo '<a style="color:gray" href="http://feeds.archive.org/validator/check?url='.$footer_check.'"><img src="'.BASE.'images/valid-rss.png" alt="[Valid RSS]" title="Validate my RSS feed" width="88" height="31" border="1" vspace="3" />';
} else {
echo $this_site_is_lang.' <a class="psf" href="'.BASE.'rss/index.php?cal='.$cal.'&getdate='.$getdate.'"">RSS-Enabled</a></font></center>';
}
}
echo '</font></center>';
?>
\ No newline at end of file diff --git a/includes/header.inc.php b/includes/header.inc.php new file mode 100644 index 0000000..922f9d8 --- /dev/null +++ b/includes/header.inc.php @@ -0,0 +1 @@ +<?php /* Begin Custom Header */ ?>
<?php /* End Custom Header */ ?>
\ No newline at end of file diff --git a/includes/sidebar.php b/includes/sidebar.php new file mode 100644 index 0000000..c0b0140 --- /dev/null +++ b/includes/sidebar.php @@ -0,0 +1,504 @@ + <?php + + $cal_displayname2 = $calendar_name . " $calendar_lang"; + if (strlen($cal_displayname2) > 24) { + $cal_displayname2 = substr("$cal_displayname2", 0, 21); + $cal_displayname2 = $cal_displayname2 . "..."; + } + + $search_box = '<form action="search.php" method="GET"><input type="hidden" name="cal" value="'.$cal.'"><input type="hidden" name="getdate" value="'.$getdate.'"><input type="text" size="15" class="search_style" name="query" value="'.$search_lang.'" onfocus="javascript:if(this.value==\''.$search_lang.'\') {this.value=\'\';}" onblur="javascript:if(this.value==\'\') {this.value=\''.$search_lang.'\'}"><INPUT type="image" src="styles/'.$style_sheet.'/search.gif" border=0 height="19" width="18" name="submit" value="Search"></form>'; + + ?> + + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + <td align="left" valign="top" width="24" class="sideback"><?php echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$yesterdays_date\"><img src=\"styles/$style_sheet/left_arrows.gif\" alt=\"right\" width=\"16\" height=\"20\" border=\"0\" align=\"left\"></a>"; ?></td> + <td align="center" width="112" class="sideback"><font class="G10BOLD"><?php echo "$thisday2"; ?></font></td> + <td align="right" valign="top" width="24" class="sideback"><?php echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$tomorrows_date\"><img src=\"styles/$style_sheet/right_arrows.gif\" alt=\"right\" width=\"16\" height=\"20\" border=\"0\" align=\"right\"></a>"; ?></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="left"> + <table border="0" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF" width="100%"> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="2"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><font class="G10BOLD"><?php echo "$cal_displayname2"; ?></font></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6" class="G10B"> + <?php echo " + <a class=\"psf\" href=\"day.php?cal=$cal&getdate=$today_today\">$goday_lang</a><br>\n + <a class=\"psf\" href=\"week.php?cal=$cal&getdate=$today_today\">$goweek_lang</a><br>\n + <a class=\"psf\" href=\"month.php?cal=$cal&getdate=$today_today\">$gomonth_lang</a><br>\n + <a class=\"psf\" href=\"year.php?cal=$cal&getdate=$today_today\">$goyear_lang</a><br>\n + <a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n + <a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n + <a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$filename\">$download_lang</a>\n + "; ?> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td colspan="3"><img src="images/spacer.gif" width="1" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$jump_lang"; ?></font></td> + <td align="right" valign="top" width="1%" class="sideback"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="left"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="6"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_icals.php'); ?></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="5"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_years.php'); ?></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="5"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_months.php'); ?></td> + </tr> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="5"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6"><?php include('./functions/list_weeks.php'); ?></td> + </tr> + <?php + if ($display_custom_goto == "yes") { + ?> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6" class="G10B"> + <form action="day.php" method="GET"> + <input type="hidden" name="cal" value="<?php print urlencode($cal); ?>"> + <input type="text" size="15" name="jumpto_day"> + <input type="submit" value="Go"> + </form> + </td> + </tr> + <?php + } + if ($show_search == 'yes') { ?> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="3"></td> + </tr> + <tr> + <td width="1%"><img src="images/spacer.gif" width="4" height="1"></td> + <td colspan="6" valign="middle" align="left"><?php echo "$search_box"; ?></td> + </tr> + <?php } ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> +<?php if (isset($master_array[($tomorrows_date)]) && sizeof($master_array[($tomorrows_date)]) > 0) { ?> + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$tomorrows_lang"; ?></font></td> + <td align="right" valign="top" width="1%" class="sideback"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="6"></td> + </tr> + + <?php + echo "<tr>\n"; + echo "<td width=\"1%\"><img src=\"images/spacer.gif\" width=\"4\" height=\"1\"></td>"; + echo "<td colspan=\"6\" class=\"G10B\" align=\"left\">\n"; + foreach ($master_array[("$tomorrows_date")] as $event_times) { + foreach ($event_times as $val) { + $event_text = stripslashes(urldecode($val["event_text"])); + $event_text = strip_tags($event_text, '<b><i><u>'); + if ($event_text != "") { + $event_text2 = rawurlencode(addslashes($val["event_text"])); + $description = addslashes(urlencode($val["description"])); + $event_start = @$val["event_start"]; + $event_end = @$val["event_end"]; + $event_start = date ($timeFormat, @strtotime ("$event_start")); + $event_end = date ($timeFormat, @strtotime ("$event_end")); + $calendar_name2 = addslashes($calendar_name); + $calendar_name2 = urlencode($calendar_name2); + $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); + + if (!isset($val["event_start"])) { + $event_start = $all_day_lang; + $event_end = ''; + echo "<a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name2', '$event_start', '$event_end', '$description')\"><i>$event_text</i></a><br>\n"; + } else { + echo "<a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name2', '$event_start', '$event_end', '$description')\"><font class=\"G10B\">• $event_text</font></a><br>\n"; + } + + } + } + } + echo "</td>\n"; + echo "</tr>\n"; + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> +<?php + } +if ((isset($master_array['-2'])) && ($show_todos == 'yes')) { ?> + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$todo_lang"; ?></font></td> + <td align="right" valign="top" width="1%" class="sideback"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> + <tr> + <td colspan="7"><img src="images/spacer.gif" width="21" height="6"></td> + </tr> + + <?php + echo "<tr>\n"; + echo "<td width=\"1%\"><img src=\"images/spacer.gif\" width=\"4\" height=\"1\"></td>"; + echo "<td colspan=\"6\" class=\"G10B\" align=\"left\">\n"; + foreach ($master_array['-2'] as $vtodo_times) { + foreach ($vtodo_times as $val) { + $vtodo_text = stripslashes(urldecode($val["vtodo_text"])); + $vtodo_text = strip_tags($vtodo_text, '<b><i><u>'); + if ($vtodo_text != "") { + $vtodo_text2 = rawurlencode(addslashes($val["vtodo_text"])); + $description = addslashes(urlencode($val["description"])); + $completed = $val['completed_date']; + if(isset($completed)) $completed = localizeDate($dateFormat_day, strtotime($completed)); + $status = $val["status"]; + if ((!isset($status) || $status == "COMPLETED") && isset($completed)) $status = "Completed on " . $completed; + $start_date = $val["start_date"]; + $start_date = localizeDate ($dateFormat_day, strtotime($start_date)); + if(isset($val['due_date']) && strtotime($val['due_date']) != strtotime("+1 year",strtotime($start_date))) $due_date = localizeDate ($dateFormat_day, strtotime($val['due_date'])); + else $due_date = ''; + + $calendar_name2 = addslashes($calendar_name); + $calendar_name2 = urlencode($calendar_name2); + $vtodo_text = word_wrap($vtodo_text, 21, $tomorrows_events_lines); + if ($status == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) { + if ($show_completed == 'yes') { + $vtodo_text = "<S>$vtodo_text</S>"; + echo "<a class=\"psf\" href=\"javascript:openTodoInfo('$vtodo_text2', '$calendar_name2', '$start_date', '$due_date', '$description', '$status')\"><font class=\"G10B\"><img src=\"images/completed.gif\" alt=\"\" width=\"13\" height=\"11\" border=\"0\" align=\"middle\"> $vtodo_text</font></a><br>\n"; + } + } elseif (isset($val['priority']) && ($val['priority'] != 0) && ($val['priority'] <= 5)) { + echo "<a class=\"psf\" href=\"javascript:openTodoInfo('$vtodo_text2', '$calendar_name2', '$start_date', '$due_date', '$description', '$status')\"><font class=\"G10B\"><img src=\"images/important.gif\" alt=\"\" width=\"13\" height=\"11\" border=\"0\" align=\"middle\"> $vtodo_text</font></a><br>\n"; + } else { + echo "<a class=\"psf\" href=\"javascript:openTodoInfo('$vtodo_text2', '$calendar_name2', '$start_date', '$due_date', '$description', '$status')\"><font class=\"G10B\"><img src=\"images/not_completed.gif\" alt=\"\" width=\"13\" height=\"11\" border=\"0\" align=\"middle\"> $vtodo_text</font></a><br>\n"; + } + } + } + } + echo "</td>\n"; + echo "</tr>\n"; + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> +<?php } + $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); +?> + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + + <td align="left" valign="top" width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" class="sideback"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("-1 month", $fake_getdate_time))); ?></font></td> + <td align="right" valign="top" width="1" class="sideback"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> + <tr> + <td><img src="images/spacer.gif" width="21" height="3"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + </tr> + <tr> + <?php + $start_day = strtotime($week_start_day); + for ($i=0; $i<7; $i++) { + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; + print "<td align=\"center\" class=\"G10BOLD\">$day</td>\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + </tr> + <tr height="3"> + <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=""></td> + </tr> + <?php + $minical_time = strtotime("-1 month", $fake_getdate_time); + $minical_month = date("m", $minical_time); + $minical_year = date("Y", $minical_time); + $first_of_month = $minical_year.$minical_month."01"; + $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day)); + $i = 0; + $whole_month = TRUE; + $num_of_events = 0; + do { + $day = date ("j", $start_day); + $daylink = date ("Ymd", $start_day); + $check_month = date ("m", $start_day); + if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>"; + if ($i == 0) echo "<tr>\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } else { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "</tr>\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + <td align="left" valign="top" width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" class="sideback"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime($getdate))); ?></font></td> + <td align="right" valign="top" width="1" class="sideback"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> + <tr> + <td><img src="images/spacer.gif" width="21" height="3"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + </tr> + <tr> + <?php + $start_day = strtotime($week_start_day); + for ($i=0; $i<7; $i++) { + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; + print "<td align=\"center\" class=\"G10BOLD\">$day</td>\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + </tr> + <tr height="3"> + <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=""></td> + </tr> + <?php + $minical_time = $fake_getdate_time; + $minical_month = date("m", $minical_time); + $minical_year = date("Y", $minical_time); + $first_of_month = $minical_year.$minical_month."01"; + $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day)); + $i = 0; + $whole_month = TRUE; + $num_of_events = 0; + do { + $day = date ("j", $start_day); + $daylink = date ("Ymd", $start_day); + $check_month = date ("m", $start_day); + if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>"; + if ($i == 0) echo "<tr>\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } else { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "</tr>\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> + <br> + <table cellpadding="0" cellspacing="0" border="0" width="170"> + <tr> + <td valign="center" align="center"> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> + <tr> + <td align="left" valign="top" width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> + <td align="center" class="sideback"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", strtotime($getdate)))); ?></font></td> + <td align="right" valign="top" width="1" class="sideback"></td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF" align="center"> + <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> + <tr> + <td><img src="images/spacer.gif" width="21" height="3"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + <td><img src="images/spacer.gif" width="21" height="1"></td> + </tr> + <tr> + <?php + $start_day = strtotime($week_start_day); + for ($i=0; $i<7; $i++) { + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; + print "<td align=\"center\" class=\"G10BOLD\">$day</td>\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + </tr> + <tr height="3"> + <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=""></td> + </tr> + <?php + $minical_time = strtotime("+1 month", $fake_getdate_time); + $minical_month = date("m", $minical_time); + $minical_year = date("Y", $minical_time); + $first_of_month = $minical_year.$minical_month."01"; + $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day)); + $i = 0; + $whole_month = TRUE; + $num_of_events = 0; + do { + $day = date ("j", $start_day); + $daylink = date ("Ymd", $start_day); + $check_month = date ("m", $start_day); + if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>"; + if ($i == 0) echo "<tr>\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } else { + echo "<td align=\"center\" class=\"G10B\">\n"; + echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n"; + echo "</td>\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "</tr>\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> + </table> + </td> + </tr> + <tr> + <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6"></td> + </tr> + </table> + </td> + </tr> + </table> diff --git a/includes/todo.php b/includes/todo.php new file mode 100644 index 0000000..d9dca39 --- /dev/null +++ b/includes/todo.php @@ -0,0 +1,119 @@ +<?php
+
+define('BASE', '../');
+include (BASE.'functions/init.inc.php');
+
+if (isset($HTTP_GET_VARS['vtodo']) && ($HTTP_GET_VARS['vtodo'] !== '') ) {
+ $vtodo = $HTTP_GET_VARS['vtodo'];
+} else {
+ $vtodo = '';
+}
+
+if (isset($HTTP_GET_VARS['description']) && ($HTTP_GET_VARS['description'] !== '') ) {
+ $description = $HTTP_GET_VARS['description'];
+} else {
+ $description = '';
+}
+
+if (isset($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] !== '') ) {
+ $status = $HTTP_GET_VARS['status'];
+} else {
+ $status = '';
+}
+
+if (isset($HTTP_GET_VARS['calendar_name']) && ($HTTP_GET_VARS['calendar_name'] !== '') ) {
+ $calendar_name = $HTTP_GET_VARS['calendar_name'];
+} else {
+ $calendar_name = '';
+}
+
+if (isset($HTTP_GET_VARS['start']) && ($HTTP_GET_VARS['start'] !== '') ) {
+ $start = $HTTP_GET_VARS['start'];
+} else {
+ $start = '';
+}
+
+if (isset($HTTP_GET_VARS['due']) && ($HTTP_GET_VARS['due'] !== '') ) {
+ $due = $HTTP_GET_VARS['due'];
+} else {
+ $due = '';
+}
+
+$vtodo = rawurldecode($vtodo);
+$vtodo = stripslashes($vtodo);
+$vtodo = str_replace('\\', '', $vtodo);
+//$vtodo = htmlspecialchars($vtodo);
+$description = rawurldecode($description);
+$description = stripslashes($description);
+$description = str_replace('\\', '', $description);
+//$description = htmlspecialchars($description);
+$calendar_name2 = rawurldecode($calendar_name);
+$calendar_name2 = stripslashes($calendar_name2);
+$calendar_name2 = str_replace('\\', '', $calendar_name2);
+//$calendar_name2 = htmlspecialchars($calendar_name2);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8">
+ <title><?php echo $calendar_name2; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>">
+</head>
+<body bgcolor="#eeeeee"><center>
+<table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder">
+ <tr>
+ <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td>
+ <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$calendar_name2 $calendar_lang"; ?></font></td>
+ <td align="right" valign="top" width="1%" class="sideback"></td>
+ </tr>
+ <tr>
+ <td colspan="3"><img src="images/spacer.gif" width="1" height="6"></td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <?php
+// if (($start) && ($end)) $vtodo_times = ' - <font class="V9">(<i>'.$start.' - '.$end.'</i>)</font>';
+// if ($start == '' && $end == '' && isset($start, $end)) $vtodo_times = ' - <font class="V9">(<i>'.$all_day_lang.'</i>)</font>';
+ ?>
+ <tr>
+ <td width="1%"><img src="images/spacer.gif" width="6" height="1"></td>
+ <td align="left" colspan="2" class="V12"><?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo).' '.$vtodo_times.'<br /><br />'; ?></td>
+ </tr>
+
+ <?php if ($description) { ?>
+ <tr>
+ <td width="1%"><img src="images/spacer.gif" width="6" height="1"></td>
+ <td align="left" colspan="2" class="V12">
+ <?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
+ '<a target="_new" href="\0">\0</a>', $description); ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php if ($status) { ?>
+ <tr>
+ <td></td>
+ <td align="left" colspan="2" class="V12">Status: <? echo $status; ?></td>
+ </tr>
+ <?php } ?>
+
+ <tr>
+ <td></td>
+ <td align="left" colspan="2" class="V12">Created: <? echo $start; ?></td>
+ </tr>
+
+ <?php if ($due) { ?>
+ <tr>
+ <td></td>
+ <td align="left" colspan="2" class="V12">Due: <? echo $due; ?></td>
+ </tr>
+ <?php } ?>
+
+ </table>
+ </td>
+ </tr>
+</table>
+</center>
+</body>
+</html>
|