aboutsummaryrefslogtreecommitdiffstats
path: root/sidebar.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2002-11-24 18:35:46 +0000
committerChad Little <clittle@users.sourceforge.net>2002-11-24 18:35:46 +0000
commit2f2aa4a790c2827c3e6145cd44020c49ecc6b95a (patch)
tree657aee577650e2436d91ffcd0e2ebd9b82d916c3 /sidebar.php
parentac62b5bc2658e26dfa3f044fb682cc9d0c83e651 (diff)
downloadphpicalendar-2f2aa4a790c2827c3e6145cd44020c49ecc6b95a.tar.gz
phpicalendar-2f2aa4a790c2827c3e6145cd44020c49ecc6b95a.tar.bz2
phpicalendar-2f2aa4a790c2827c3e6145cd44020c49ecc6b95a.zip
Added patches for VTODO.
Diffstat (limited to 'sidebar.php')
-rw-r--r--sidebar.php39
1 files changed, 22 insertions, 17 deletions
diff --git a/sidebar.php b/sidebar.php
index 18e1b09..c0b0140 100644
--- a/sidebar.php
+++ b/sidebar.php
@@ -213,29 +213,34 @@ if ((isset($master_array['-2'])) && ($show_todos == 'yes')) { ?>
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 $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"]));
+ 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"]));
- $event_start = @$val["event_start"];
- $event_end = @$val["event_end"];
- $event_start = date ($timeFormat, @strtotime ("$event_start"));
- $event_end = date ($timeFormat, @strtotime ("$event_end"));
+ $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);
- $event_text = word_wrap($event_text, 21, $tomorrows_events_lines);
- if ($val['status'] == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) {
+ $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') {
- $event_text = "<S>$event_text</S>";
- echo "<a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name2', '$event_start', '$event_end', '$description')\"><font class=\"G10B\"><img src=\"images/completed.gif\" alt=\"\" width=\"13\" height=\"11\" border=\"0\" align=\"middle\"> $event_text</font></a><br>\n";
+ $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'] <= 5)) {
- echo "<a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name2', '$event_start', '$event_end', '$description')\"><font class=\"G10B\"><img src=\"images/important.gif\" alt=\"\" width=\"13\" height=\"11\" border=\"0\" align=\"middle\"> $event_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:openEventInfo('$event_text2', '$calendar_name2', '$event_start', '$event_end', '$description')\"><font class=\"G10B\"><img src=\"images/not_completed.gif\" alt=\"\" width=\"13\" height=\"11\" border=\"0\" align=\"middle\"> $event_text</font></a><br>\n";
+ 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";
}
}
}

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