aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendars/US Holidays.ics2
-rw-r--r--calendars/test.ics23
-rw-r--r--default_config.php2
-rw-r--r--error.php1
-rw-r--r--functions/date_functions.php37
-rw-r--r--functions/list_functions.php4
-rw-r--r--functions/parse/end_vevent.php19
-rw-r--r--functions/parse/recur_functions.php5
-rw-r--r--functions/template.php86
-rw-r--r--includes/event.php11
-rw-r--r--preferences.php37
-rw-r--r--templates/default/week.tpl2
12 files changed, 165 insertions, 64 deletions
diff --git a/calendars/US Holidays.ics b/calendars/US Holidays.ics
index 96d6684..f9e20bc 100644
--- a/calendars/US Holidays.ics
+++ b/calendars/US Holidays.ics
@@ -660,7 +660,7 @@ DTSTAMP:20061010T210116Z
SUMMARY:Daylight Saving Time Ends (-1 hour)
CREATED:20081223T190054Z
DTEND;VALUE=DATE:20021028
-RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20071027;BYMONTH=10;BYDAY=-1SU
+RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20071027T0000Z;BYMONTH=10;BYDAY=-1SU
END:VEVENT
BEGIN:VEVENT
SEQUENCE:4
diff --git a/calendars/test.ics b/calendars/test.ics
index 0db2f05..ebf1079 100644
--- a/calendars/test.ics
+++ b/calendars/test.ics
@@ -66,6 +66,7 @@ END:VEVENT
BEGIN:VEVENT
SEQUENCE:7
+UID:starts on 12
DTSTAMP:20020918T224617Z
SUMMARY:5 days
STATUS:CONFIRMED
@@ -74,4 +75,26 @@ DTSTART;TZID=US/Eastern:20081212
URL:http://google.com
END:VEVENT
+BEGIN:VEVENT
+SEQUENCE:7
+UID:starts on 10
+DTSTAMP:20020918T224617Z
+SUMMARY:5 days b4
+STATUS:CONFIRMED
+DURATION:P4DT48H
+DTSTART;TZID=US/Eastern:20081210
+URL:http://google.com
+END:VEVENT
+
+BEGIN:VEVENT
+SEQUENCE:7
+UID:starts on 07
+DTSTAMP:20020918T224617Z
+SUMMARY:5 days 07
+STATUS:CONFIRMED
+DURATION:P3D
+DTSTART;TZID=US/Eastern:20081207
+URL:http://google.com
+END:VEVENT
+
END:VCALENDAR
diff --git a/default_config.php b/default_config.php
index 404af5d..0c80659 100644
--- a/default_config.php
+++ b/default_config.php
@@ -22,7 +22,7 @@ class Configs{
$this->day_end = '2000'; // End time for day grid
$this->gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred
$this->num_years = '1'; // Number of years (up and back) to display in 'Jump to'
- $this->month_event_lines = '1'; // Number of lines to wrap each event title in month view, 0 means display all lines.
+ $this->month_event_lines = '0'; // Number of lines to wrap each event title in month view, 0 means display all lines.
$this->tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$this->allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines.
$this->week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
diff --git a/error.php b/error.php
index a7ae585..b5c2571 100644
--- a/error.php
+++ b/error.php
@@ -44,7 +44,6 @@ function error($error_msg='There was an error processing the request.', $file='N
'rss_valid' => '',
'error_msg' => $error_msg,
'error_calendar' => $error_calendar,
- 'generated' => $generated,
'l_powered_by' => $lang['l_powered_by'],
'l_error_back' => $lang['l_error_back'],
'l_error_window' => $lang['l_error_window'],
diff --git a/functions/date_functions.php b/functions/date_functions.php
index ec70fa6..931e613 100644
--- a/functions/date_functions.php
+++ b/functions/date_functions.php
@@ -153,16 +153,33 @@ function chooseOffset($time, $timezone = '') {
}
return $offset;
}
-
+/* Returns a string to make event text with a link to popup boxes
+ $arr is a master array item
+ $lines is the number of lines to restrict the event_text to, using word_wrap
+ $length is the length of one line
+ $link_class is a css class
+ $pre_text and $post_text are to add tags around the link text (e.g. <b> or<i>)
+
+ $title is the tooltip for the link
+*/
function openevent($event_date, $time, $uid, $arr, $lines = 0, $length = 0, $link_class = '', $pre_text = '', $post_text = '') {
- global $cpath, $master_array;
+ global $cpath, $timeFormat, $dateFormat_week;
$return = '';
$event_text = stripslashes(urldecode($arr["event_text"]));
- if (empty($start)) {
+ # build tooltip
+ if ($time == -1) {
+ $start = localizeDate($dateFormat_week, $arr['start_unixtime']);
+ $end = localizeDate($dateFormat_week, ($arr['end_unixtime'] - 60));
$title = $event_text;
+ if ($start != $end) $title = "$start - $end $event_text";
} else {
- $title = $arr['event_start'].' - '.$arr['event_end'].': '.$event_text;
+ $start = date($timeFormat, $arr['start_unixtime']);
+ $end = date($timeFormat, $arr['end_unixtime']);
+ $title = "$start: $event_text";
+ if ($start != $end) $title = "$start - $end $event_text";
}
+ $title .= "\n".urldecode($arr['description'])."\n".urldecode($arr['location']);
+ $title = trim($title);
# for iCal pseudo tag <http> comptability
if (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$matches)) {
$full_event_text = $matches[1] . $matches[2];
@@ -181,14 +198,14 @@ function openevent($event_date, $time, $uid, $arr, $lines = 0, $length = 0, $lin
$escaped_date = addslashes($event_date);
$escaped_time = addslashes($time);
$escaped_uid = addslashes($uid);
- $event_data = addslashes(serialize ($master_array[$event_date][$time][$uid]));
+ $event_data = addslashes(serialize ($arr));
// fix for URL-length bug in IE: populate and submit a hidden form on click
static $popup_data_index = 0;
-$return = "
- <script language=\"Javascript\" type=\"text/javascript\"><!--
- var eventData = new EventData('$escaped_date', '$escaped_time', '$escaped_uid','$cpath','$event_data');
- document.popup_data[$popup_data_index] = eventData;
- // --></script>";
+ $return = "
+ <script language='Javascript' type='text/javascript'><!--
+ var eventData = new EventData('$escaped_date', '$escaped_time', '$escaped_uid','$cpath','$event_data');
+ document.popup_data[$popup_data_index] = eventData;
+ // --></script>";
$return .= '<a class="'.$link_class.'" title="'.$title.'" href="#" onclick="openEventWindow('.$popup_data_index.'); return false;">';
$popup_data_index++;
diff --git a/functions/list_functions.php b/functions/list_functions.php
index 2775059..fb97354 100644
--- a/functions/list_functions.php
+++ b/functions/list_functions.php
@@ -76,13 +76,13 @@ function list_years() {
function list_weeks() {
- global $getdate, $this_year, $cal, $dateFormat_week_jump, $week_start_day;
+ global $getdate, $this_year, $cal, $dateFormat_week_jump, $phpiCal_config;
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];
$check_week = strtotime($getdate);
- $start_week_time = strtotime(dateOfWeek(date("Ymd", strtotime("$this_year-01-01")), $week_start_day));
+ $start_week_time = strtotime(dateOfWeek(date("Ymd", strtotime("$this_year-01-01")), $phpiCal_config->week_start_day));
$end_week_time = $start_week_time + (6 * 25 * 60 * 60);
$return = '';
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php
index 27f7bd3..ac909ff 100644
--- a/functions/parse/end_vevent.php
+++ b/functions/parse/end_vevent.php
@@ -124,9 +124,9 @@ foreach ($rrule_array as $key => $val) {
break;
case 'UNTIL':
# UNTIL must be in UTC
- $until = date("YmdHis",strtotime($val));
+ $until = date("YmdHis",strtotime($val));
ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs);
- $until_unixtime = mktime($regs[4],$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]);
+ $until_unixtime = mktime($regs[4],@$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]);
$recur_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until);
break;
case 'INTERVAL':
@@ -181,7 +181,8 @@ foreach ($rrule_array as $key => $val) {
$wkst3char = two2threeCharDays($wkst);
if($current_view == 'search') $freq_type = 'none';
# $recur is the recurrence info that goes into the master array for this VEVENT
-$recur = @$recur_array[($start_date)][($hour.$minute)][$uid]['recur'];
+$recur ='';
+if (isset($recur_array[($start_date)][($hour.$minute)][$uid]['recur'])) $recur = $recur_array[($start_date)][($hour.$minute)][$uid]['recur'];
/* ============================ Load $recur_data ============================
$recur_data is an array of unix times for days of recurrences of an event. This code handles repeats at the day level or above. The next loop handles the times.
@@ -214,7 +215,7 @@ if($count == 1000000 && $interval == 1 && $mArray_begin > $next_range_unixtime)
if ($next_range_unixtime < $start_date_unixtime) $next_range_unixtime = $start_date_unixtime;
# stop at the until limit if set
-if(isset($until) && $end_range_unixtime > $until_unixtime) $end_range_unixtime = $until_unixtime;
+if(isset($until) && $end_range_unixtime > $until_unixtime) $end_range_unixtime = $until_unixtime;else $until_unixtime = $mArray_end;
# more adjustments
switch ($freq_type){
@@ -257,10 +258,10 @@ while ($next_range_unixtime <= $end_range_unixtime && $count > 0) {
}
break;
case 'year':
- $times = expand_bymonth($time); #echo "exp bymonth";dump_times($times);
- $times = expand_byweekno($times); #echo "exp byweekno";dump_times($times);
- $times = expand_byyearday($times); #echo "exp byyearday";dump_times($times);
- $times = expand_bymonthday($times); #echo "\nexp bymonthday";dump_times($times);
+ $times = expand_bymonth($time); #echo "exp bymonth";dump_times($times);
+ $times = expand_byweekno($times); #echo "exp byweekno";dump_times($times);
+ $times = expand_byyearday($times); #echo "exp byyearday";dump_times($times);
+ $times = expand_bymonthday($times); #echo "\nexp bymonthday";dump_times($times);
foreach($times as $time){
add_recur(expand_byday($time));
}
@@ -319,7 +320,7 @@ foreach($recur_data as $recur_data_unixtime) {
# the day is not the last day of the recurrence
if ($this_date_tmp < $end_date_tmp) $display_end_tmp = '2400';
}
- if($this_date_tmp == $end_date_tmp && ($end_time == '0000' ||$time_key == -1)) continue;
+ if($this_date_tmp == $end_date_tmp && ($end_time == '0000' && $time_key == -1)) continue;
$master_array[$this_date_tmp][$time_key][$uid] = array (
'event_start' => $start_time, # hhmm
'event_end' => $end_time, # hhmm
diff --git a/functions/parse/recur_functions.php b/functions/parse/recur_functions.php
index e936c64..89d39b2 100644
--- a/functions/parse/recur_functions.php
+++ b/functions/parse/recur_functions.php
@@ -10,7 +10,7 @@ We will use two kinds of functions - those that restrict the date to allowed val
function add_recur($times,$freq=''){
global $recur_data;
- global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime, $day_offset, $current_view;
+ global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime,$until_unixtime, $day_offset, $current_view;
if (!is_array($times)) $times = array($times);
/* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */
#dump_times($times);
@@ -27,7 +27,7 @@ function add_recur($times,$freq=''){
}
$until_date = date("Ymd",$end_range_unixtime);
foreach ($times as $time){
- #echo "time:". date("Ymd",$time)."\n";
+ #echo "time:". date("Ymd",$time)." $until_date<br>\n";
if (!isset($time) || $time == '') continue;
$date = date("Ymd",$time);
$time = strtotime("$date 12:00:00");
@@ -38,6 +38,7 @@ function add_recur($times,$freq=''){
&& $time != ''
&& !in_array($time, $recur_data)
&& !in_array($date, $except_dates)
+ && $time <= $until_unixtime
&& $time >= $start_date_unixtime
&& $date <= $until_date
){
diff --git a/functions/template.php b/functions/template.php
index 5470bf9..c220da9 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -65,10 +65,11 @@ class Page {
$seen_events = array();
$final = '';
+ $events_week = 0;
foreach($master_array as $key => $val) {
preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs);
if (((@$regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week')) || ((substr(@$regs[1],0,4) == $parse_year) && ($printview == 'year'))) {
- @$events_week++;
+ $events_week++;
$dayofmonth = strtotime ($key);
$dayofmonth = localizeDate ($dateFormat_day, $dayofmonth);
$events_tmp = $loop_event;
@@ -86,10 +87,10 @@ class Page {
$day_events++;
if (isset($new_val2['event_text'])) {
$event_text = stripslashes(urldecode($new_val2['event_text']));
- $location = stripslashes(urldecode(@$new_val2['location']));
- $description = stripslashes(urldecode(@$new_val2['description']));
- $event_start = @$new_val2['event_start'];
- $event_end = @$new_val2['event_end'];
+ $location = stripslashes(urldecode($new_val2['location']));
+ $description = stripslashes(urldecode($new_val2['description']));
+ $event_start = $new_val2['event_start'];
+ $event_end = $new_val2['event_end'];
if (isset($new_val2['display_end'])) $event_end = $new_val2['display_end'];
if (!isset($new_val2['event_start'])) {
$event_start = $lang['l_all_day'];
@@ -271,14 +272,65 @@ class Page {
}
#echo "<pre>";print_r($nbrGridCols);
// Replaces the allday events
+ preg_match("!<\!-- loop allday row on -->(.*)<\!-- loop alldaysofweek on -->!Uis", $this->page, $match1);
+ $loop_row_begin = trim($match1[1]); # <tr>etc
preg_match("!<\!-- loop allday on -->(.*)<\!-- loop allday off -->!Uis", $this->page, $match1);
preg_match("!<\!-- loop alldaysofweek on -->(.*)<\!-- loop allday on -->!Uis", $this->page, $match2);
preg_match("!<\!-- loop allday off -->(.*)<\!-- loop alldaysofweek off -->!Uis", $this->page, $match3);
- $loop_ad = trim($match1[1]);
- $loop_begin = trim($match2[1]);
- $loop_end = trim($match3[1]);
+ $loop_ad = trim($match1[1]); # one day cell
+ $loop_begin = trim($match2[1]); # <td>
+ $loop_end = trim($match3[1]); # </td>
+ preg_match("!<\!-- loop alldaysofweek off -->(.*)<\!-- loop allday row off -->!Uis", $this->page, $match3);
+ $loop_row_end = trim($match3[1]); # </tr>
+ $allday_uids = array();
+ $allday_uid_dates = array();
$weekreplace = '';
- foreach ($weekarray as $get_date) {
+ foreach ($weekarray as $i=>$get_date){
+ if (isset($master_array[$get_date]['-1']) && is_array($master_array[$get_date]['-1']) && !empty($master_array[$get_date]['-1'])){
+ foreach ($master_array[$get_date]['-1'] as $uid => $allday){
+ if (!array_key_exists($uid, $allday_uids)) $allday_uids[$uid] = $get_date;
+ $allday_uid_dates[$uid][] = $get_date;
+ }
+ }
+ }
+ # new allday routine is better for multiday events
+ while(!empty($allday_uids)){
+ $row = $loop_row_begin;
+ $day = 0;
+ $replace ='';
+ while ($day < $phpiCal_config->week_length){
+ $colspan = 0;
+ $replace .= $loop_begin; # <td>
+ if(array_search($weekarray[$day], $allday_uids)){
+ $uid = array_search($weekarray[$day], $allday_uids);
+ unset($allday_uids[$uid]);
+ $allday = $master_array[$weekarray[$day]]['-1'][$uid];
+ foreach ($allday_uid_dates[$uid] as $date){
+ #$ev = (!isset($ev)) ? " $uid ":"";
+ #$replace .= $ev;
+ $colspan += $nbrGridCols[$weekarray[$day]];
+ $day++;
+ }
+ $event_calno = $allday['calnumber'];
+ $event_calno = (($event_calno - 1) % $phpiCal_config->unique_colors) + 1;
+ $event = openevent($get_date, -1, $uid, $allday, $phpiCal_config->allday_week_lines, 11, 'psf');
+ $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad);
+ $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp);
+ $replace .= $loop_tmp;
+ $replace .= $loop_end;
+ }else{
+ $colspan = $nbrGridCols[$weekarray[$day]];
+ $replace .= $loop_end;
+ $day++;
+ }
+ unset ($ev);
+ $replace = str_replace('{COLSPAN}', "colspan='$colspan'", $replace);
+ }
+ $row .= "$replace $loop_row_end\n";
+ $weekreplace .= "$row\n";
+ }
+ /* old routine
+ foreach ($weekarray as $i=>$get_date) {
$replace = $loop_begin;
$colspan = 'colspan="'.$nbrGridCols[$get_date].'"';
$replace = str_replace('{COLSPAN}', $colspan, $replace);
@@ -286,7 +338,7 @@ class Page {
foreach ($master_array[$get_date]['-1'] as $uid => $allday) {
$event_calno = $allday['calnumber'];
$event_calno = (($event_calno - 1) % $phpiCal_config->unique_colors) + 1;
- $event = openevent($get_date, -1, $uid, $allday, 1, 11, 'psf');
+ $event = openevent($get_date, -1, $uid, $allday, $phpiCal_config->allday_week_lines, 11, 'psf');
$loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad);
$loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp);
$replace .= $loop_tmp;
@@ -295,6 +347,7 @@ class Page {
$replace .= $loop_end;
$weekreplace .= $replace;
}
+ */
$this->page = preg_replace('!<\!-- loop alldaysofweek on -->.*<\!-- loop alldaysofweek off -->!Uis', $weekreplace, $this->page);
// Replaces the daysofweek
@@ -726,10 +779,10 @@ class Page {
$event_text = strip_tags($event_text, '<b><i><u>');
if ($event_text != "") {
if (!isset($val["event_start"])) {
- $return_adtmp = openevent($next_day, $cal_time, $uid, $val, $tomorrows_events_lines, 21, 'psf');
+ $return_adtmp = openevent($next_day, $cal_time, $uid, $val, $phpiCal_config->tomorrows_events_lines, 21, 'psf');
$replace_ad .= str_replace('{T_ALLDAY}', $return_adtmp, $loop_t_ad);
} else {
- $return_etmp = openevent($next_day, $cal_time, $uid, $val, $tomorrows_events_lines, 21, 'ps3');
+ $return_etmp = openevent($next_day, $cal_time, $uid, $val, $phpiCal_config->tomorrows_events_lines, 21, 'ps3');
$replace_e .= str_replace('{T_EVENT}', $return_etmp, $loop_t_e);
}
}
@@ -910,6 +963,7 @@ class Page {
} else {
$temp = $t_month[2];
}
+ $switch['ALLDAY'] = $switch['EVENT'] = '';
if (isset($master_array[$daylink]) && $i <= $phpiCal_config->week_length) {
if ($type != 'small') {
foreach ($master_array[$daylink] as $cal_time => $event_times) {
@@ -920,7 +974,7 @@ class Page {
if ($cal_time == -1) {
if ($type == 'large') {
$switch['ALLDAY'] .= '<div class="V10"><img src="templates/'.$phpiCal_config->template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />';
- $switch['ALLDAY'] .= openevent($daylink, $cal_time, $uid, $val, $month_event_lines, 15, 'psf');
+ $switch['ALLDAY'] .= openevent($daylink, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 15, 'psf');
$switch['ALLDAY'] .= (isset($val['location']) && $val['location'] != '') ? $val['location']."<br />" : '';
$switch['ALLDAY'] .= '</div>';
} else {
@@ -929,8 +983,8 @@ class Page {
} else {
$start2 = date($timeFormat_small, $val['start_unixtime']);
if ($type == 'large') {
- @$switch['EVENT'] .= '<div class="V9"><img src="templates/'.$phpiCal_config->template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />';
- $switch['EVENT'] .= openevent($daylink, $cal_time, $uid, $val, $month_event_lines, 10, 'ps3', "$start2 ").'';
+ $switch['EVENT'] .= '<div class="V9"><img src="templates/'.$phpiCal_config->template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />';
+ $switch['EVENT'] .= openevent($daylink, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 10, 'ps3', "$start2 ").'';
$switch['EVENT'] .= (isset($val['location']) && $val['location'] != '') ? "<br />".$val['location']."<br />" : '';
$switch['EVENT'] .= '</div>';
} else {
@@ -1008,7 +1062,7 @@ class Page {
$switch['CALNAME'] = $val['calname'];
if (!isset($val['event_start'])) {
$switch['START_TIME'] = $lang['l_all_day'];
- $switch['EVENT_TEXT'] = openevent($m_start, $cal_time, $uid, $val, @$month_event_lines, 15, 'psf');
+ $switch['EVENT_TEXT'] = openevent($m_start, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 15, 'psf');
$switch['DESCRIPTION'] = urldecode($val['description']);
} else {
$event_start = $val['start_unixtime'];
diff --git a/includes/event.php b/includes/event.php
index 8d57ae9..c15f3d2 100644
--- a/includes/event.php
+++ b/includes/event.php
@@ -2,6 +2,7 @@
$current_view = "event";
define('BASE', '../');
include_once(BASE.'functions/init.inc.php');
+require_once(BASE.'functions/date_functions.php');
require_once(BASE.'functions/template.php');
# information for the popup is sent via $_POST by a javascript snippet in
@@ -14,9 +15,15 @@ $attendee = unserialize($event['attendee']);
// Format event time
// All day
if ($_POST['time'] == -1) {
- $event_times = $lang['l_all_day'];
+ $start = localizeDate($dateFormat_week, $event['start_unixtime']);
+ $end = localizeDate($dateFormat_week, ($event['end_unixtime'] - 60));
+ $event_times = $lang['l_all_day']." $start";
+ if ($start != $end) $event_times = "$start - $end";
} else {
- $event_times = date($timeFormat, $event['start_unixtime']) . ' - ' . date($timeFormat, $event['end_unixtime']);
+ $start = date($timeFormat, $event['start_unixtime']);
+ $end = date($timeFormat, $event['end_unixtime']);
+ $event_times = "$start";
+ if ($start != $end) $event_times = "$start - $end";
}
$event['event_text'] = urldecode($event['event_text']);
diff --git a/preferences.php b/preferences.php
index 400f09e..eb0f17a 100644
--- a/preferences.php
+++ b/preferences.php
@@ -156,20 +156,20 @@ $timezone_subset = array(
'Canada/Newfoundland',
'CET',
'EET',
- 'Etc/GMT-1',
- 'Etc/GMT-2',
- 'Etc/GMT-3',
- 'Etc/GMT-4',
- 'Etc/GMT-5',
- 'Etc/GMT-6',
- 'Etc/GMT-7',
- 'Etc/GMT-8',
- 'Etc/GMT-9',
- 'Etc/GMT-10',
- 'Etc/GMT-11',
- 'Etc/GMT-12',
- 'Etc/GMT-13',
'Etc/GMT-14',
+ 'Etc/GMT-13',
+ 'Etc/GMT-12',
+ 'Etc/GMT-11',
+ 'Etc/GMT-10',
+ 'Etc/GMT-9',
+ 'Etc/GMT-8',
+ 'Etc/GMT-7',
+ 'Etc/GMT-6',
+ 'Etc/GMT-5',
+ 'Etc/GMT-4',
+ 'Etc/GMT-3',
+ 'Etc/GMT-2',
+ 'Etc/GMT-1',
'Etc/GMT+1',
'Etc/GMT+2',
'Etc/GMT+3',
@@ -187,12 +187,13 @@ $timezone_subset = array(
'NZ',
'WET'
);
+
$timezone_select = '';
-foreach ($timezone_subset as $i => $timezone) {
- if ($timezone_subset[$i] == $cookie_timezone) {
+foreach ($timezone_subset as $timezone) {
+ if ($timezone == $cookie_timezone) {
$timezone_select .= "<option value='$timezone' selected='selected'>$timezone</option>\n";
} else {
- $timezone_select .= "<option value='$timezone.'>$timezone</option>\n";
+ $timezone_select .= "<option value='$timezone'>$timezone</option>\n";
}
}
@@ -209,9 +210,6 @@ while ($file = readdir($dir_handle)) {
}
closedir($dir_handle);
-$php_ended = getmicrotime();
-$generated = number_format(($php_ended-$php_started),3);
-
$page = new Page(BASE.'templates/'.$phpiCal_config->template.'/preferences.tpl');
$page->replace_files(array(
@@ -242,7 +240,6 @@ $page->replace_tags(array(
'startday_select' => $startday_select,
'style_select' => $style_select,
'display_date' => $lang['l_preferences'],
- 'generated' => $generated,
'message' => $message,
'l_preferences' => $lang['l_preferences'],
'l_prefs_subhead' => $lang['l_prefs_subhead'],
diff --git a/templates/default/week.tpl b/templates/default/week.tpl
index d3f7a70..451a8c6 100644
--- a/templates/default/week.tpl
+++ b/templates/default/week.tpl
@@ -51,6 +51,7 @@
</td>
<!-- loop daysofweek off -->
</tr>
+ <!-- loop allday row on -->
<tr valign="top" id="allday">
<td width="60" class="rowOff2" colspan="4"><img src="images/spacer.gif" width="60" height="1" alt=" " /></td>
<td width="1"></td>
@@ -65,6 +66,7 @@
</td>
<!-- loop alldaysofweek off -->
</tr>
+ <!-- loop allday row off -->
<!-- loop row on -->
<tr>
<td rowspan="4" align="center" valign="top" width="60" class="timeborder">9:00 AM</td>

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