You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(25) |
Mar
(18) |
Apr
|
May
(26) |
Jun
(14) |
Jul
(1) |
Aug
(5) |
Sep
(82) |
Oct
(3) |
Nov
(130) |
Dec
(9) |
2004 |
Jan
(4) |
Feb
(62) |
Mar
|
Apr
(3) |
May
(100) |
Jun
|
Jul
(6) |
Aug
(49) |
Sep
(33) |
Oct
(47) |
Nov
(2) |
Dec
(1) |
2005 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(8) |
May
(17) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(26) |
Oct
(18) |
Nov
(37) |
Dec
(14) |
2006 |
Jan
(2) |
Feb
(18) |
Mar
(34) |
Apr
(52) |
May
(7) |
Jun
(3) |
Jul
(2) |
Aug
(10) |
Sep
|
Oct
|
Nov
(18) |
Dec
(4) |
2007 |
Jan
|
Feb
(7) |
Mar
(7) |
Apr
(6) |
May
(52) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(15) |
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(250) |
2009 |
Jan
(35) |
Feb
(45) |
Mar
|
Apr
(4) |
May
(35) |
Jun
(13) |
Jul
(49) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
2010 |
Jan
(3) |
Feb
(30) |
Mar
|
Apr
(35) |
May
(12) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
From: <ji...@us...> - 2008-12-11 22:17:26
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1642/functions/parse Log Message: Directory /cvsroot/phpicalendar/phpicalendar/functions/parse added to the repository |
From: <ji...@us...> - 2008-12-11 22:17:19
|
Update of /cvsroot/phpicalendar/phpicalendar/templates/default In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1548/templates/default Modified Files: admin.tpl Log Message: update lots of files Index: admin.tpl =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/templates/default/admin.tpl,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin.tpl 2 Oct 2004 01:23:53 -0000 1.12 --- admin.tpl 11 Dec 2008 21:54:53 -0000 1.13 *************** *** 24,28 **** </tr> <tr> ! <td class="dayborder"><img src="images/spacer.gif" width="1" height="5" alt=" " /></td> </tr> <tr> --- 24,28 ---- </tr> <tr> ! <td class="dayborder"><img src="../images/spacer.gif" width="1" height="5" alt=" " /></td> </tr> <tr> *************** *** 123,129 **** <table width="600" border="0" cellpadding="0" cellspacing="0"> <tr> ! <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td> ! <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td> ! <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td> </tr> </table> --- 123,129 ---- <table width="600" border="0" cellpadding="0" cellspacing="0"> <tr> ! <td class="tbll"><img src="../images/spacer.gif" alt="" width="8" height="4" /></td> ! <td class="tblbot"><img src="../images/spacer.gif" alt="" width="8" height="4" /></td> ! <td class="tblr"><img src="../images/spacer.gif" alt="" width="8" height="4" /></td> </tr> </table> |
Update of /cvsroot/phpicalendar/phpicalendar In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1548 Modified Files: day.php default_config.php error.php index.php month.php week.php year.php Log Message: update lots of files Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** day.php 10 Apr 2006 02:21:07 -0000 1.131 --- day.php 11 Dec 2008 21:54:52 -0000 1.132 *************** *** 8,13 **** } } - define('BASE', './'); $current_view = 'day'; require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/list_functions.php'); --- 8,13 ---- } } $current_view = 'day'; + if (!defined('BASE')) define('BASE', './'); require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/list_functions.php'); *************** *** 29,33 **** // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); --- 29,33 ---- // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); *************** *** 35,39 **** $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); // login/logout --- 35,39 ---- $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE); // login/logout *************** *** 43,47 **** $logout_querys = logout_querys(); ! $page = new Page(BASE.'templates/'.$template.'/day.tpl'); $page->replace_files(array( --- 43,47 ---- $logout_querys = logout_querys(); ! $page = new Page(BASE.'templates/'.$phpiCal_config->template.'/day.tpl'); $page->replace_files(array( *************** *** 54,61 **** $page->replace_tags(array( ! 'version' => $phpicalendar_version, ! 'charset' => $charset, 'default_path' => '', ! 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, --- 54,61 ---- $page->replace_tags(array( ! 'version' => $phpiCal_config->phpicalendar_version, ! 'charset' => $phpiCal_config->charset, 'default_path' => '', ! 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, Index: default_config.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/default_config.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** default_config.php 22 May 2007 01:31:34 -0000 1.2 --- default_config.php 11 Dec 2008 21:54:52 -0000 1.3 *************** *** 1,77 **** <?php ! // Configuration file for PHP iCalendar 2.23rc1 ! // ! // To set values, change the text between the single quotes ! // Follow instructions to the right for detailed information ! ! $template = 'default'; // Template support ! $default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year' ! $minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current' ! $default_cal = "$ALL_CALENDARS_COMBINED"; // Exact filename of calendar without .ics. Or set to $ALL_CALENDARS_COMBINED to open all calenders combined into one. ! #$default_cal = 'Other_racing'; // Exact filename of calendar without .ics. Or set to $ALL_CALENDARS_COMBINED to open all calenders combined into one. ! $language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto', 'Korean' ! $week_start_day = 'Sunday'; // Day of the week your week starts on ! $week_length = '7'; // Number of days to display in the week view ! $day_start = '0600'; // Start time for day grid ! $day_end = '2000'; // End time for day grid ! $gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred ! $num_years = '1'; // Number of years (up and back) to display in 'Jump to' ! $month_event_lines = '1'; // Number of lines to wrap each event title in month view, 0 means display all lines. ! $tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines. ! $allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines. ! $week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines. ! $timezone = ''; // Set timezone. Read TIMEZONES file for more information ! $calendar_path = ''; // Leave this blank on most installs, place your full FILE SYSTEM PATH to calendars if they are outside the phpicalendar folder. ! $second_offset = ''; // The time in seconds between your time and your server's time. ! $bleed_time = '-1'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359', or '-1' for no bleed time. ! $cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar -- AUTO SETTING -- Only set if you are having cookie issues. ! $download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars -- AUTO SETTING -- Only set if you are having subscribe issues. ! $default_path = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar ! $charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, or iso-8859-1 for most languages. ! ! // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. ! $allow_webcals = 'no'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. ! $this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page. ! $enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). ! $rss_link_to_event = ''; // Set to yes to have links in the feed popup an event window. Default is to link to day.php ! $show_search = 'no'; // Show the search box in the sidebar. ! $allow_preferences = 'no'; // Allow visitors to change various preferences via cookies. ! $printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above). ! $show_todos = 'yes'; // Show your todo list on the side of day and week view. ! $show_completed = 'yes'; // Show completed todos on your todo list. ! $allow_login = 'no'; // Set to yes to prompt for login to unlock calendars. ! $login_cookies = 'no'; // Set to yes to store authentication information via (unencrypted) cookies. Set to no to use sessions. ! $support_ical = 'no'; // Set to yes to support the Apple iCal calendar database structure. ! $recursive_path = 'no'; // Set to yes to recurse into subdirectories of the calendar path. ! ! // Calendar Caching (decreases page load times) ! $save_parsed_cals = 'no'; // Saves a copy of the cal in /tmp after it's been parsed. Improves performance. ! $tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X). Any php-writable folder works. ! $webcal_hours = '24'; // Number of hours to cache webcals. Setting to '0' will always re-parse webcals. ! ! // Webdav style publishing ! $phpicalendar_publishing = '0'; // Set to '1' to enable remote webdav style publish. See 'calendars/publish.php' for complete information; ! ! // Administration settings (/admin/) ! $allow_admin = 'no'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $auth_method ! $auth_method = 'internal'; // Valid values are: 'ftp', 'internal', or 'none'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $auth_internal_username and $auth_internal_password defined below - CHANGE the password. 'none' uses NO authentication - meant to be used with another form of authentication such as http basic. ! $auth_internal_username = 'admin'; // Only used if $auth_method='internal'. The username for the administrator. ! $auth_internal_password = 'admin'; // Only used if $auth_method='internal'. The password for the administrator. ! $ftp_server = 'localhost'; // Only used if $auth_method='ftp'. The ftp server name. 'localhost' will work for most servers. ! $ftp_port = '21'; // Only used if $auth_method='ftp'. The ftp port. '21' is the default for ftp servers. ! $ftp_calendar_path = ''; // Only used if $auth_method='ftp'. The full path to the calendar directory on the ftp server. If = '', will attempt to deduce the path based on $calendar_path, but may not be accurate depending on ftp server config. ! ! // Calendar colors ! // ! // You can increase the number of unique colors by adding additional images (monthdot_n.gif) ! // and in the css file (default.css) classes .alldaybg_n, .eventbg_n and .eventbg2_n ! // Colors will repeat from the beginning for calendars past $unique_colors (7 by default), with no limit. ! $unique_colors = '7'; ! ! $blacklisted_cals = array(); ! $list_webcals = array(); ! $locked_cals = array(); ! $locked_map = array(); ?> --- 1,104 ---- <?php + class Configs{ + private static $instance; + private function __construct(){ + $this->phpicalendar_version = '2.3rc1'; + // Configuration file for PHP iCalendar 2.25rc1 + // + // To set values, change the text between the single quotes + // Follow instructions to the right for detailed information + #=================Initialize global variables================================= + // Define some magic strings. + $this->ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; + $this->template = 'default'; // Template support + $this->default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year' + $this->minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current' + $this->default_cal = $this->ALL_CALENDARS_COMBINED; // Exact filename of calendar without .ics. Or set to $this->ALL_CALENDARS_COMBINED to open all calenders combined into one. + #$this->default_cal = 'Other_racing'; // Exact filename of calendar without .ics. Or set to $this->ALL_CALENDARS_COMBINED to open all calenders combined into one. + $this->language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto', 'Korean' + $this->week_start_day = 'Sunday'; // Day of the week your week starts on + $this->week_length = '7'; // Number of days to display in the week view + $this->day_start = '0600'; // Start time for day grid + $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->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. + $this->timezone = ''; // Set timezone. Read TIMEZONES file for more information + $this->calendar_path = ''; // Leave this blank on most installs, place your full FILE SYSTEM PATH to calendars if they are outside the phpicalendar folder. + $this->second_offset = ''; // The time in seconds between your time and your server's time. + $this->bleed_time = '-1'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359', or '-1' for no bleed time. + $this->cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar -- AUTO SETTING -- Only set if you are having cookie issues. + $this->download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars -- AUTO SETTING -- Only set if you are having subscribe issues. + $this->default_path = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar + $this->charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, or iso-8859-1 for most languages. + + // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. + $this->allow_webcals = 'no'; // Allow http:// and webcal:// prefixed URLs to be used as the $this->cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. + $this->this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page. + $this->enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). + $this->rss_link_to_event = ''; // Set to yes to have links in the feed popup an event window. Default is to link to day.php + $this->show_search = 'no'; // Show the search box in the sidebar. + $this->allow_preferences = 'no'; // Allow visitors to change various preferences via cookies. + $this->printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $this->default_view (listed well above). + $this->show_todos = 'yes'; // Show your todo list on the side of day and week view. + $this->show_completed = 'yes'; // Show completed todos on your todo list. + $this->allow_login = 'no'; // Set to yes to prompt for login to unlock calendars. + $this->login_cookies = 'no'; // Set to yes to store authentication information via (unencrypted) cookies. Set to no to use sessions. + $this->support_ical = 'no'; // Set to yes to support the Apple iCal calendar database structure. + $this->recursive_path = 'no'; // Set to yes to recurse into subdirectories of the calendar path. + + // Calendar Caching (decreases page load times) + $this->save_parsed_cals = 'no'; // Saves a copy of the cal in /tmp after it's been parsed. Improves performance. + $this->tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X). Any php-writable folder works. + $this->webcal_hours = '24'; // Number of hours to cache webcals. Setting to '0' will always re-parse webcals. + + // Webdav style publishing + $this->phpicalendar_publishing = '0'; // Set to '1' to enable remote webdav style publish. See 'calendars/publish.php' for complete information; + + // Administration settings (/admin/) + $this->allow_admin = 'no'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $this->auth_method + $this->auth_method = 'internal'; // Valid values are: 'ftp', 'internal', or 'none'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $this->auth_internal_username and $this->auth_internal_password defined below - CHANGE the password. 'none' uses NO authentication - meant to be used with another form of authentication such as http basic. + $this->auth_internal_username = 'admin'; // Only used if $this->auth_method='internal'. The username for the administrator. + $this->auth_internal_password = 'admin'; // Only used if $this->auth_method='internal'. The password for the administrator. + $this->ftp_server = 'localhost'; // Only used if $this->auth_method='ftp'. The ftp server name. 'localhost' will work for most servers. + $this->ftp_port = '21'; // Only used if $this->auth_method='ftp'. The ftp port. '21' is the default for ftp servers. + $this->ftp_calendar_path = ''; // Only used if $this->auth_method='ftp'. The full path to the calendar directory on the ftp server. If = '', will attempt to deduce the path based on $this->calendar_path, but may not be accurate depending on ftp server config. + + // Calendar colors + // + // You can increase the number of unique colors by adding additional images (monthdot_n.gif) + // and in the css file (default.css) classes .alldaybg_n, .eventbg_n and .eventbg2_n + // Colors will repeat from the beginning for calendars past $this->unique_colors (7 by default), with no limit. + $this->unique_colors = '7'; + + $this->blacklisted_cals = array(); + $this->list_webcals = array(); + $this->locked_cals = array(); + $this->locked_map = array(); + $this->verbose_errors = false; + return true; + } + + public static function getInstance(){ + if (empty(self::$instance)){ + self::$instance = new Configs; + } + return self::$instance; + } + + # val can be an array + public function setProperty($key,$val){ + $this->$key = $val; + return; + } + public function getProperty($key){ + return $this->$key; + } + } ! $phpiCal_config = Configs::getInstance(); ?> Index: error.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/error.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** error.php 10 Apr 2006 02:21:07 -0000 1.4 --- error.php 11 Dec 2008 21:54:52 -0000 1.5 *************** *** 5,10 **** function error($error_msg='There was an error processing the request.', $file='NONE', $error_base='./') { ! global $template, $language, $enable_rss, $lang, $charset, $default_path; ! if (!isset($template)) $template = 'default'; if (!isset($lang['l_powered_by'])) $lang['l_powered_by'] = 'Powered by'; if (!isset($lang['l_error_title'])) $lang['l_error_title'] = 'Error!'; --- 5,10 ---- function error($error_msg='There was an error processing the request.', $file='NONE', $error_base='./') { ! global $language, $enable_rss, $lang, $charset, $phpiCal_config; ! if (!isset($template)) $template = $phpiCal_config->template; if (!isset($lang['l_powered_by'])) $lang['l_powered_by'] = 'Powered by'; if (!isset($lang['l_error_title'])) $lang['l_error_title'] = 'Error!'; *************** *** 20,24 **** $calendar_name = $lang['l_error_title']; ! if (empty($default_path)) { if (isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) { $default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/')); --- 20,25 ---- $calendar_name = $lang['l_error_title']; ! $default_path = $phpiCal_config->default_path; ! if (empty($phpiCal_config->default_path)) { if (isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) { $default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/')); Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/index.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** index.php 23 May 2007 18:19:36 -0000 1.16 --- index.php 11 Dec 2008 21:54:52 -0000 1.17 *************** *** 1,27 **** <?php - - if (!isset($ALL_CALENDARS_COMBINED)) $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; if (!defined('BASE')) define('BASE', './'); ! include_once(BASE.'default_config.php'); ! if (is_file(BASE.'config.inc.php')) include_once(BASE.'config.inc.php'); ! if (isset($_COOKIE['phpicalendar'])) { ! $phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar'])); ! $default_view = $phpicalendar['cookie_view']; ! } ! if ($printview_default == 'yes') { ! $printview = $default_view; ! $default_view = "print.php"; } else { $check = array ('day', 'week', 'month', 'year'); ! if (in_array($default_view, $check)) { ! $default_view = $default_view . '.php'; } else { ! die; } } if(isset($_GET['cpath'])){ ! $default_view .= '?cpath='.$_GET['cpath']; } ! header("Location: $default_view"); ?> --- 1,21 ---- <?php if (!defined('BASE')) define('BASE', './'); ! include_once(BASE.'functions/init.inc.php'); ! ! if ($phpiCal_config->printview_default == 'yes') { ! $printview = $phpiCal_config->default_view; ! $phpiCal_config->setProperty('default_view', "print.php"); } else { $check = array ('day', 'week', 'month', 'year'); ! if (in_array($phpiCal_config->default_view, $check)) { ! $phpiCal_config->setProperty('default_view', $phpiCal_config->default_view . '.php'); } else { ! die('illegal view'); } } if(isset($_GET['cpath'])){ ! $phpiCal_config->default_view .= '?cpath='.$_GET['cpath']; } ! header("Location: $phpiCal_config->default_view"); ?> Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** month.php 12 Oct 2007 06:42:32 -0000 1.140 --- month.php 11 Dec 2008 21:54:52 -0000 1.141 *************** *** 39,43 **** // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); --- 39,43 ---- // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); *************** *** 45,49 **** $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); $page = new Page(BASE.'templates/'.$template.'/month.tpl'); --- 45,49 ---- $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE); $page = new Page(BASE.'templates/'.$template.'/month.tpl'); *************** *** 58,64 **** $page->replace_tags(array( ! 'version' => $phpicalendar_version, ! 'charset' => $charset, ! 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, --- 58,64 ---- $page->replace_tags(array( ! 'version' => $phpiCal_config->phpicalendar_version, ! 'charset' => $phpiCal_config->charset, ! 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, *************** *** 67,71 **** 'calendar_name' => $cal_displayname, 'display_date' => $display_date, ! 'rss_powered' => $rss_powered, 'default_path' => '', 'rss_available' => '', --- 67,71 ---- 'calendar_name' => $cal_displayname, 'display_date' => $display_date, ! 'rss_powered' => $phpiCal_config->rss_powered, 'default_path' => '', 'rss_available' => '', Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** week.php 12 Oct 2007 06:41:33 -0000 1.131 --- week.php 11 Dec 2008 21:54:52 -0000 1.132 *************** *** 30,34 **** // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); --- 30,34 ---- // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); *************** *** 36,40 **** $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); // login/logout --- 36,40 ---- $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE); // login/logout *************** *** 55,62 **** $page->replace_tags(array( ! 'version' => $phpicalendar_version, ! 'charset' => $charset, 'default_path' => '', ! 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, --- 55,62 ---- $page->replace_tags(array( ! 'version' => $phpiCal_config->phpicalendar_version, ! 'charset' => $phpiCal_config->charset, 'default_path' => '', ! 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, *************** *** 67,71 **** 'current_view' => $current_view, 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', --- 67,71 ---- 'current_view' => $current_view, 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $phpiCal_config->rss_powered, 'rss_available' => '', 'rss_valid' => '', Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** year.php 12 Oct 2007 06:41:33 -0000 1.46 --- year.php 11 Dec 2008 21:54:52 -0000 1.47 *************** *** 25,29 **** // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); --- 25,29 ---- // select for calendars ! $list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); *************** *** 33,37 **** <img src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" height="10" border="0" />'.$lang['l_event']."<br>"; ; ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); // login/logout --- 33,37 ---- <img src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" height="10" border="0" />'.$lang['l_event']."<br>"; ; ! $list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE); // login/logout *************** *** 53,61 **** $page->replace_tags(array( ! 'version' => $phpicalendar_version, 'event_js' => '', 'current_view' => $current_view, ! 'template' => $template, ! 'charset' => $charset, 'default_path' => '', 'cal' => $cal, --- 53,61 ---- $page->replace_tags(array( ! 'version' => $phpiCal_config->phpicalendar_version, 'event_js' => '', 'current_view' => $current_view, ! 'template' => $phpiCal_config->template, ! 'charset' => $phpiCal_config->charset, 'default_path' => '', 'cal' => $cal, *************** *** 66,70 **** 'display_date' => $this_year, 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', --- 66,70 ---- 'display_date' => $this_year, 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $phpiCal_config->rss_powered, 'rss_available' => '', 'rss_valid' => '', |
From: <ji...@us...> - 2007-12-05 23:56:37
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2667/phpicalendar/functions Modified Files: ical_parser.php Log Message: fix path bug for inclusion of end_vevent.php Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.221 retrieving revision 1.222 diff -C2 -d -r1.221 -r1.222 *** ical_parser.php 12 Oct 2007 08:07:23 -0000 1.221 --- ical_parser.php 5 Dec 2007 23:56:40 -0000 1.222 *************** *** 172,177 **** case 'END:VEVENT': ! include "functions/end_vevent.php"; ! break; case 'END:VTODO': --- 172,176 ---- case 'END:VEVENT': ! include BASE."functions/end_vevent.php"; break; case 'END:VTODO': *************** *** 194,198 **** } } ! $master_array['-2']["$vtodo_sort"]["$uid"] = array ('start_date' => $start_date, 'start_time' => $start_time, 'vtodo_text' => $summary, 'due_date'=> $due_date, 'due_time'=> $due_time, 'completed_date' => $completed_date, 'completed_time' => $completed_time, 'priority' => $vtodo_priority, 'status' => $status, 'class' => $class, 'categories' => $vtodo_categories, 'description' => $description, 'calname' => $actual_calname); unset ($start_date, $start_time, $due_date, $due_time, $completed_date, $completed_time, $vtodo_priority, $status, $class, $vtodo_categories, $summary, $description); --- 193,197 ---- } } ! $master_array['-2']["$vtodo_sort"]["$uid"] = array ('start_date' => $start_date, 'start_time' => $start_time, 'vtodo_text' => $summary, 'due_date'=> $due_date, 'due_time'=> $due_time, 'completed_date' => $completed_date, 'completed_time' => $completed_time, 'priority' => $vtodo_priority, 'status' => $status, 'class' => $class, 'categories' => $vtodo_categories, 'description' => $description, 'calname' => $actual_calname); unset ($start_date, $start_time, $due_date, $due_time, $completed_date, $completed_time, $vtodo_priority, $status, $class, $vtodo_categories, $summary, $description); |
From: <ji...@us...> - 2007-10-12 08:07:21
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7144/phpicalendar/functions Modified Files: ical_parser.php Log Message: include timezone parser Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.220 retrieving revision 1.221 diff -C2 -d -r1.220 -r1.221 *** ical_parser.php 12 Oct 2007 06:43:13 -0000 1.220 --- ical_parser.php 12 Oct 2007 08:07:23 -0000 1.221 *************** *** 115,118 **** --- 115,121 ---- $actual_mtime = @filemtime($filename); } + + include(BASE.'functions/parse_tzs.php'); + $ifile = @fopen($filename, "r"); |
From: <ji...@us...> - 2007-10-12 08:04:49
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6087/phpicalendar/functions Added Files: parse_tzs.php Log Message: add timezone parser --- NEW FILE: parse_tzs.php --- <?php $ifile = @fopen($filename, "r"); if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename)); $nextline = fgets($ifile, 1024); if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename)); // read file in line by line // XXX end line is skipped because of the 1-line readahead while (!feof($ifile)) { $line = $nextline; $nextline = fgets($ifile, 1024); $nextline = ereg_replace("[\r\n]", "", $nextline); #handle continuation lines that start with either a space or a tab (MS Outlook) while (isset($nextline{0}) && ($nextline{0} == " " || $nextline{0} == "\t")) { $line = $line . substr($nextline, 1); $nextline = fgets($ifile, 1024); $nextline = ereg_replace("[\r\n]", "", $nextline); } $line = trim($line); switch ($line) { case 'BEGIN:VTIMEZONE': unset($tz_name, $offset_from, $offset_to, $tz_id); break; case 'BEGIN:STANDARD': unset ($offset_s); break; case 'END:STANDARD': $offset_s = $offset_to; break; case 'BEGIN:DAYLIGHT': unset ($offset_d); break; case 'END:DAYLIGHT': $offset_d = $offset_to; break; case 'END:VTIMEZONE': $tz_array[$tz_id] = array($offset_s, $offset_d); #echo "<pre>$tz_id"; print_r($tz_array[$tz_id]);echo"</pre>"; break; default: unset ( $data, $prop_pos, $property); if (ereg ("([^:]+):(.*)", $line, $line)){ $property = $line[1]; $data = $line[2]; $prop_pos = strpos($property,';'); if ($prop_pos !== false) $property = substr($property,0,$prop_pos); $property = strtoupper($property); switch ($property) { case 'TZID': $tz_id = $data; break; case 'TZOFFSETFROM': $offset_from = $data; break; case 'TZOFFSETTO': $offset_to = $data; break; } } } } ?> |
From: <ji...@us...> - 2007-10-12 08:04:49
|
Update of /cvsroot/phpicalendar/phpicalendar3/calendars In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6087/phpicalendar3/calendars Modified Files: Deutsche_Feiertage.ics Log Message: add timezone parser Index: Deutsche_Feiertage.ics =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/calendars/Deutsche_Feiertage.ics,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Deutsche_Feiertage.ics 16 Mar 2007 02:57:26 -0000 1.1 --- Deutsche_Feiertage.ics 12 Oct 2007 08:04:51 -0000 1.2 *************** *** 1358,1361 **** --- 1358,1362 ---- SEQUENCE:4 END:VEVENT + BEGIN:VTIMEZONE TZID:Europe/Berlin |
From: <ji...@us...> - 2007-10-12 06:53:08
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12865/phpicalendar/functions Modified Files: end_vevent.php Log Message: treat single events as recurrences with one instance...fix various date calc bugs Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/end_vevent.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** end_vevent.php 11 Oct 2007 23:49:08 -0000 1.1 --- end_vevent.php 12 Oct 2007 06:53:09 -0000 1.2 *************** *** 14,18 **** // Handle DURATION ! if (!isset($end_unixtime) && isset($the_duration)) { $end_unixtime = $start_unixtime + $the_duration; $end_time = date ('Hi', $end_unixtime); --- 14,19 ---- // Handle DURATION ! if (!isset($end_unixtime)) { ! if(!isset($the_duration)) $the_duration = 0; [...1234 lines suppressed...] + 'url' => $url, + 'recur' => $recur); + if (isset($display_end_tmp)){ + $master_array[($recur_data_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; + } + checkOverlap($recur_data_date, ($hour.$minute), $uid); } } } } } } ! } #end while loop ! } # end if time compare ! unset($recur_data); ! } # end switch $key (rrule type) ! } # end foreach rrule ! // This should remove any exdates that were missed. |
From: <ji...@us...> - 2007-10-12 06:45:15
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9985/phpicalendar/functions Modified Files: template.php Log Message: deal with various unset variable warning situations Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** template.php 23 May 2007 18:17:50 -0000 1.93 --- template.php 12 Oct 2007 06:45:17 -0000 1.94 *************** *** 901,904 **** --- 901,906 ---- } + $weekday_loop = ''; + $middle = ''; for ($i=0; $i<7; $i++) { $day_num = date("w", $start_day); *************** *** 1007,1010 **** --- 1009,1013 ---- $i=0; $seen_events = array(); + $middle = ''; do { if (isset($master_array[$m_start])) { *************** *** 1021,1025 **** 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['DESCRIPTION'] = urldecode($val['description']); } else { --- 1024,1028 ---- 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['DESCRIPTION'] = urldecode($val['description']); } else { |
From: <ji...@us...> - 2007-10-12 06:43:13
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9238/phpicalendar/functions Modified Files: ical_parser.php Log Message: deal with various unset variable warning situations Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.219 retrieving revision 1.220 diff -C2 -d -r1.219 -r1.220 *** ical_parser.php 11 Oct 2007 23:50:37 -0000 1.219 --- ical_parser.php 12 Oct 2007 06:43:13 -0000 1.220 *************** *** 135,139 **** $nextline = ereg_replace("[\r\n]", "", $nextline); #handle continuation lines that start with either a space or a tab (MS Outlook) ! while ($nextline{0} == " " || $nextline{0} == "\t") { $line = $line . substr($nextline, 1); $nextline = fgets($ifile, 1024); --- 135,139 ---- $nextline = ereg_replace("[\r\n]", "", $nextline); #handle continuation lines that start with either a space or a tab (MS Outlook) ! while (isset($nextline{0}) && ($nextline{0} == " " || $nextline{0} == "\t")) { $line = $line . substr($nextline, 1); $nextline = fgets($ifile, 1024); |
From: <ji...@us...> - 2007-10-12 06:42:30
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8878/phpicalendar Modified Files: month.php Log Message: deal with various unset variable warning situations Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** month.php 11 Oct 2007 23:46:31 -0000 1.139 --- month.php 12 Oct 2007 06:42:32 -0000 1.140 *************** *** 13,16 **** --- 13,17 ---- $yesterdays_date = date('Ymd', strtotime("-1 day", $unix_time)); $sidebar_date = localizeDate($dateFormat_week_list, $unix_time); + if (!isset($style_select)) $style_select = ''; // find out next month |
From: <ji...@us...> - 2007-10-12 06:42:30
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8878/phpicalendar/functions Modified Files: list_functions.php Log Message: deal with various unset variable warning situations Index: list_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/list_functions.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** list_functions.php 15 Dec 2005 03:26:31 -0000 1.16 --- list_functions.php 12 Oct 2007 06:42:32 -0000 1.17 *************** *** 15,18 **** --- 15,19 ---- function list_calcolors() { global $template, $master_array, $unique_colors; + $return = ''; $i = 1; if (is_array($master_array['-3'])) { *************** *** 31,34 **** --- 32,36 ---- $month_time = strtotime("$this_year-01-01"); $getdate_month = date("m", strtotime($getdate)); + $return = ''; for ($i=0; $i<12; $i++) { $monthdate = date ("Ymd", $month_time); *************** *** 49,52 **** --- 51,55 ---- global $getdate, $this_year, $cal, $num_years; $year_time = strtotime($getdate); + $return = ''; for ($i=0; $i < $num_years; $i++) { $offset = $num_years - $i; *************** *** 82,85 **** --- 85,89 ---- $start_week_time = strtotime(dateOfWeek(date("Ymd", strtotime("$this_year-01-01")), $week_start_day)); $end_week_time = $start_week_time + (6 * 25 * 60 * 60); + $return = ''; do { *************** *** 102,105 **** --- 106,110 ---- function list_languages() { global $getdate, $cal, $current_view; + $return = ''; $dir_handle = @opendir(BASE.'languages/'); $tmp_pref_language = urlencode(ucfirst($language)); |
From: <ji...@us...> - 2007-10-12 06:41:31
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8513/phpicalendar Modified Files: print.php week.php year.php Log Message: deal with various unset variable warning situations Index: print.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/print.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** print.php 10 Apr 2006 02:21:07 -0000 1.39 --- print.php 12 Oct 2007 06:41:33 -0000 1.40 *************** *** 1,8 **** <?php - define('BASE', './'); require_once(BASE.'functions/date_functions.php'); require_once(BASE.'functions/init.inc.php'); - $current_view ='print'; $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); $end_week_time = $start_week_time + (6 * 25 * 60 * 60); --- 1,7 ---- <?php define('BASE', './'); + $current_view ='print'; require_once(BASE.'functions/date_functions.php'); require_once(BASE.'functions/init.inc.php'); $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); $end_week_time = $start_week_time + (6 * 25 * 60 * 60); Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** week.php 10 Apr 2006 02:21:07 -0000 1.130 --- week.php 12 Oct 2007 06:41:33 -0000 1.131 *************** *** 1,4 **** <?php - $current_view = "week"; define('BASE', './'); --- 1,3 ---- Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** year.php 19 May 2007 03:55:35 -0000 1.45 --- year.php 12 Oct 2007 06:41:33 -0000 1.46 *************** *** 1,4 **** <?php - define('BASE', './'); $current_view = 'year'; --- 1,3 ---- |
From: <ji...@us...> - 2007-10-12 06:41:31
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8513/phpicalendar/functions Modified Files: calendar_functions.php date_functions.php init.inc.php Log Message: deal with various unset variable warning situations Index: calendar_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/calendar_functions.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** calendar_functions.php 11 Nov 2006 20:25:36 -0000 1.25 --- calendar_functions.php 12 Oct 2007 06:41:33 -0000 1.26 *************** *** 208,211 **** --- 208,212 ---- global $cal, $ALL_CALENDARS_COMBINED, $current_view, $getdate, $calendar_lang, $all_cal_comb_lang, $cal_filelist, $cal_displaynames; // Print each calendar option. + $return = ''; foreach ($cals as $cal_tmp) { // Format the calendar path for display. Index: date_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** date_functions.php 12 Nov 2006 08:06:30 -0000 1.37 --- date_functions.php 12 Oct 2007 06:41:33 -0000 1.38 *************** *** 237,240 **** --- 237,241 ---- $unixtime = strtotime($data); $date = date('Ymd', $unixtime); + $time = ''; $allday = $data; } Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** init.inc.php 23 May 2007 11:51:07 -0000 1.111 --- init.inc.php 12 Oct 2007 06:41:33 -0000 1.112 *************** *** 51,55 **** } #set up specific webcals for a particular cpath ! if (is_array($more_webcals[$cpath])){ $list_webcals = array_merge($list_webcals, $more_webcals["$cpath"]); } --- 51,55 ---- } #set up specific webcals for a particular cpath ! if (isset($more_webcals) && is_array($more_webcals[$cpath])){ $list_webcals = array_merge($list_webcals, $more_webcals["$cpath"]); } |
From: <ji...@us...> - 2007-10-11 23:50:35
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24114/phpicalendar/functions Modified Files: ical_parser.php Log Message: split off end vevent code Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.218 retrieving revision 1.219 diff -C2 -d -r1.218 -r1.219 *** ical_parser.php 5 Dec 2006 06:40:44 -0000 1.218 --- ical_parser.php 11 Oct 2007 23:50:37 -0000 1.219 *************** *** 169,926 **** case 'END:VEVENT': ! ! if (!isset($url)) $url = ''; ! if (!isset($type)) $type = ''; ! ! // Handle DURATION ! if (!isset($end_unixtime) && isset($the_duration)) { ! $end_unixtime = $start_unixtime + $the_duration; ! $end_time = date ('Hi', $end_unixtime); ! } ! ! // CLASS support ! if (isset($class)) { ! if ($class == 'PRIVATE') { ! $summary ='**PRIVATE**'; ! $description ='**PRIVATE**'; ! } elseif ($class == 'CONFIDENTIAL') { ! $summary ='**CONFIDENTIAL**'; ! $description ='**CONFIDENTIAL**'; ! } ! } ! ! // make sure we have some value for $uid ! if (!isset($uid)) { ! $uid = $uid_counter; ! $uid_counter++; ! $uid_valid = false; ! } else { ! $uid_valid = true; ! } ! ! if ($uid_valid && isset($processed[$uid]) && isset($recurrence_id['date'])) { ! ! $old_start_date = $processed[$uid][0]; ! $old_start_time = $processed[$uid][1]; ! if ($recurrence_id['value'] == 'DATE') $old_start_time = '-1'; ! $start_date_tmp = $recurrence_id['date']; ! if (!isset($start_date)) $start_date = $old_start_date; ! if (!isset($start_time)) $start_time = $master_array[$old_start_date][$old_start_time][$uid]['event_start']; ! if (!isset($start_unixtime)) $start_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['start_unixtime']; ! if (!isset($end_unixtime)) $end_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['end_unixtime']; ! if (!isset($end_time)) $end_time = $master_array[$old_start_date][$old_start_time][$uid]['event_end']; ! if (!isset($summary)) $summary = $master_array[$old_start_date][$old_start_time][$uid]['event_text']; ! if (!isset($length)) $length = $master_array[$old_start_date][$old_start_time][$uid]['event_length']; ! if (!isset($description)) $description = $master_array[$old_start_date][$old_start_time][$uid]['description']; ! if (!isset($location)) $location = $master_array[$old_start_date][$old_start_time][$uid]['location']; ! if (!isset($organizer)) $organizer = $master_array[$old_start_date][$old_start_time][$uid]['organizer']; ! if (!isset($status)) $status = $master_array[$old_start_date][$old_start_time][$uid]['status']; ! if (!isset($attendee)) $attendee = $master_array[$old_start_date][$old_start_time][$uid]['attendee']; ! if (!isset($url)) $url = $master_array[$old_start_date][$old_start_time][$uid]['url']; ! removeOverlap($start_date_tmp, $old_start_time, $uid); ! if (isset($master_array[$start_date_tmp][$old_start_time][$uid])) { ! unset($master_array[$start_date_tmp][$old_start_time][$uid]); // SJBO added $uid twice here ! if (sizeof($master_array[$start_date_tmp][$old_start_time]) == 0) { ! unset($master_array[$start_date_tmp][$old_start_time]); ! } ! } ! ! $write_processed = false; ! } else { ! $write_processed = true; ! } ! ! if (!isset($summary)) $summary = ''; ! if (!isset($description)) $description = ''; ! if (!isset($status)) $status = ''; ! if (!isset($class)) $class = ''; ! if (!isset($location)) $location = ''; ! ! $mArray_begin = mktime (0,0,0,12,21,($this_year - 1)); ! $mArray_end = mktime (0,0,0,1,12,($this_year + 1)); ! ! if (isset($start_time) && isset($end_time)) { ! // Mozilla style all-day events or just really long events ! if (($end_time - $start_time) > 2345) { ! $allday_start = $start_date; ! $allday_end = ($start_date + 1); ! } ! } ! if (isset($start_unixtime,$end_unixtime) && date('Ymd',$start_unixtime) != date('Ymd',$end_unixtime)) { ! $spans_day = true; ! $bleed_check = (($start_unixtime - $end_unixtime) < (60*60*24)) ? '-1' : '0'; ! } else { ! $spans_day = false; ! $bleed_check = 0; ! } ! if (isset($start_time) && $start_time != '') { ! preg_match ('/([0-9]{2})([0-9]{2})/', $start_time, $time); ! preg_match ('/([0-9]{2})([0-9]{2})/', $end_time, $time2); ! if (isset($start_unixtime) && isset($end_unixtime)) { ! $length = $end_unixtime - $start_unixtime; ! } else { ! $length = ($time2[1]*60+$time2[2]) - ($time[1]*60+$time[2]); ! } ! ! $drawKey = drawEventTimes($start_time, $end_time); ! preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3); ! $hour = $time3[1]; ! $minute = $time3[2]; ! } ! ! // RECURRENCE-ID Support ! if (isset($recurrence_d)) { ! ! $recurrence_delete["$recurrence_d"]["$recurrence_t"] = $uid; ! } ! ! // handle single changes in recurring events ! // Maybe this is no longer need since done at bottom of parser? - CL 11/20/02 ! if ($uid_valid && $write_processed) { ! if (!isset($hour)) $hour = 00; ! if (!isset($minute)) $minute = 00; ! $processed[$uid] = array($start_date,($hour.$minute), $type); ! } ! ! // Handling of the all day events ! if ((isset($allday_start) && $allday_start != '')) { ! $start = strtotime($allday_start); ! if ($spans_day) { ! $allday_end = date('Ymd',$end_unixtime); ! } ! if (isset($allday_end)) { ! $end = strtotime($allday_end); ! } else { ! $end = strtotime('+1 day', $start); ! } ! // Changed for 1.0, basically write out the entire event if it starts while the array is written. ! # while loop handles multi-day allday events to write separate master_array elements for each day. ! if (($start < $mArray_end) && ($start < $end)) { ! while (($start != $end) && ($start < $mArray_end)) { ! $start_date2 = date('Ymd', $start); ! $master_array[($start_date2)][('-1')][$uid]= array ( ! 'event_text' => $summary, ! 'description' => $description, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url, ! 'status' => $status, ! 'class' => $class ); ! $start = strtotime('+1 day', $start); ! } ! if (!$write_processed) $master_array[($start_date)]['-1'][$uid]['exception'] = true; ! } ! } ! ! // Handling regular events ! if ((isset($start_time) && $start_time != '') && (!isset($allday_start) || $allday_start == '')) { ! if (($end_time >= $bleed_time) && ($bleed_check == '-1')) { ! $start_tmp = strtotime(date('Ymd',$start_unixtime)); ! $end_date_tmp = date('Ymd',$end_unixtime); ! while ($start_tmp < $end_unixtime) { ! $start_date_tmp = date('Ymd',$start_tmp); ! if ($start_date_tmp == $start_date) { ! $time_tmp = $hour.$minute; ! $start_time_tmp = $start_time; ! } else { ! $time_tmp = '0000'; ! $start_time_tmp = '0000'; ! } ! if ($start_date_tmp == $end_date_tmp) { ! $end_time_tmp = $end_time; ! } else { ! $end_time_tmp = '2400'; ! $display_end_tmp = $end_time; ! } ! ! $master_array[$start_date_tmp][$time_tmp][$uid] = array ( ! 'event_start' => $start_time_tmp, ! 'event_end' => $end_time_tmp, ! 'start_unixtime' => $start_unixtime, ! 'end_unixtime' => $end_unixtime, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => true, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url ); ! if (isset($display_end_tmp)){ ! $master_array[$start_date_tmp][$time_tmp][$uid]['display_end'] = $display_end_tmp; ! } ! checkOverlap($start_date_tmp, $time_tmp, $uid); ! $start_tmp = strtotime('+1 day',$start_tmp); ! } ! if (!$write_processed) $master_array[$start_date][($hour.$minute)][$uid]['exception'] = true; ! } else { ! if ($bleed_check == '-1') { ! $display_end_tmp = $end_time; ! $end_time_tmp1 = '2400'; ! } ! ! if (!isset($end_time_tmp1)) $end_time_tmp1 = $end_time; ! ! // This if statement should prevent writing of an excluded date if its the first recurrance - CL ! if (!in_array($start_date, $except_dates)) { ! $master_array[($start_date)][($hour.$minute)][$uid] = array ( ! 'event_start' => $start_time, ! 'event_end' => $end_time_tmp1, ! 'start_unixtime' => $start_unixtime, ! 'end_unixtime' => $end_unixtime, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => false, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url ); ! if (isset($display_end_tmp)){ ! $master_array[($start_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; ! } ! checkOverlap($start_date, ($hour.$minute), $uid); ! if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; ! } ! } ! } ! ! // Handling of the recurring events, RRULE ! if (isset($rrule_array) && is_array($rrule_array)) { ! if (isset($allday_start) && $allday_start != '') { ! $hour = '-'; ! $minute = '1'; ! $rrule_array['START_DAY'] = $allday_start; ! $rrule_array['END_DAY'] = $allday_end; ! $rrule_array['END'] = 'end'; ! $recur_start = $allday_start; ! $start_date = $allday_start; ! if (isset($allday_end)) { ! $diff_allday_days = dayCompare($allday_end, $allday_start); ! } else { ! $diff_allday_days = 1; ! } ! } else { ! $rrule_array['START_DATE'] = $start_date; ! $rrule_array['START_TIME'] = $start_time; ! $rrule_array['END_TIME'] = $end_time; ! $rrule_array['END'] = 'end'; ! } ! ! $start_date_time = strtotime($start_date); ! if (!isset($fromdate)){ ! #this should happen if not in one of the rss views ! $this_month_start_time = strtotime($this_year.$this_month.'01'); ! if ($current_view == 'year' || ($save_parsed_cals == 'yes' && !$is_webcal)|| $current_view == 'print' && $printview == 'year') { ! $start_range_time = strtotime($this_year.'-01-01 -2 weeks'); ! $end_range_time = strtotime($this_year.'-12-31 +2 weeks'); ! } else { ! $start_range_time = strtotime('-1 month -2 day', $this_month_start_time); ! $end_range_time = strtotime('+2 month +2 day', $this_month_start_time); ! } ! }else{ ! $start_range_time = strtotime($fromdate); ! $end_range_time = strtotime($todate)+60*60*24; ! } ! foreach ($rrule_array as $key => $val) { ! switch($key) { ! case 'FREQ': ! switch ($val) { ! case 'YEARLY': $freq_type = 'year'; break; ! case 'MONTHLY': $freq_type = 'month'; break; ! case 'WEEKLY': $freq_type = 'week'; break; ! case 'DAILY': $freq_type = 'day'; break; ! case 'HOURLY': $freq_type = 'hour'; break; ! case 'MINUTELY': $freq_type = 'minute'; break; ! case 'SECONDLY': $freq_type = 'second'; break; ! } ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = strtolower($val); ! break; ! case 'COUNT': ! $count = $val; ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $count; ! break; ! case 'UNTIL': ! $until = str_replace('T', '', $val); ! $until = str_replace('Z', '', $until); ! if (strlen($until) == 8) $until = $until.'235959'; ! $abs_until = $until; ! ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); ! $until = mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); ! break; ! case 'INTERVAL': ! if ($val > 0){ ! $number = $val; ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $number; ! } ! break; ! case 'BYSECOND': ! $bysecond = $val; ! $bysecond = split (',', $bysecond); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bysecond; ! break; ! case 'BYMINUTE': ! $byminute = $val; ! $byminute = split (',', $byminute); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byminute; ! break; ! case 'BYHOUR': ! $byhour = $val; ! $byhour = split (',', $byhour); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byhour; ! break; ! case 'BYDAY': ! $byday = $val; ! $byday = split (',', $byday); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byday; ! break; ! case 'BYMONTHDAY': ! $bymonthday = $val; ! $bymonthday = split (',', $bymonthday); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bymonthday; ! break; ! case 'BYYEARDAY': ! $byyearday = $val; ! $byyearday = split (',', $byyearday); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byyearday; ! break; ! case 'BYWEEKNO': ! $byweekno = $val; ! $byweekno = split (',', $byweekno); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byweekno; ! break; ! case 'BYMONTH': ! $bymonth = $val; ! $bymonth = split (',', $bymonth); ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bymonth; ! break; ! case 'BYSETPOS': ! $bysetpos = $val; ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bysetpos; ! break; ! case 'WKST': ! $wkst = $val; ! $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $wkst; ! break; ! case 'END': ! ! $recur = $master_array[($start_date)][($hour.$minute)][$uid]['recur']; ! ! // Modify the COUNT based on BYDAY ! if ((is_array($byday)) && (isset($count))) { ! $blah = sizeof($byday); ! $count = ($count / $blah); ! unset ($blah); ! } ! ! if (!isset($number)) $number = 1; ! // if $until isn't set yet, we set it to the end of our range we're looking at ! ! if (!isset($until)) $until = $end_range_time; ! if (!isset($abs_until)) $abs_until = date('YmdHis', $end_range_time); ! $end_date_time = $until; ! $start_range_time_tmp = $start_range_time; ! $end_range_time_tmp = $end_range_time; ! ! // If the $end_range_time is less than the $start_date_time, or $start_range_time is greater ! // than $end_date_time, we may as well forget the whole thing ! // It doesn't do us any good to spend time adding data we aren't even looking at ! // this will prevent the year view from taking way longer than it needs to ! if ($end_range_time_tmp >= $start_date_time && $start_range_time_tmp <= $end_date_time) { ! ! // if the beginning of our range is less than the start of the item, we may as well set it equal to it ! if ($start_range_time_tmp < $start_date_time){ ! $start_range_time_tmp = $start_date_time; ! } ! if ($end_range_time_tmp > $end_date_time) $end_range_time_tmp = $end_date_time; ! ! // initialize the time we will increment ! $next_range_time = $start_range_time_tmp; ! ! // FIXME: This is a hack to fix repetitions with $interval > 1 ! if ($count > 1 && $number > 1) $count = 1 + ($count - 1) * $number; ! ! $count_to = 0; ! // start at the $start_range and go until we hit the end of our range. ! if(!isset($wkst)) $wkst='SU'; ! $wkst3char = two2threeCharDays($wkst); ! ! while (($next_range_time >= $start_range_time_tmp) && ($next_range_time <= $end_range_time_tmp) && ($count_to != $count)) { ! $func = $freq_type.'Compare'; ! $diff = $func(date('Ymd',$next_range_time), $start_date); ! if ($diff < $count) { ! if ($diff % $number == 0) { ! $interval = $number; ! switch ($rrule_array['FREQ']) { ! case 'DAILY': ! $next_date_time = $next_range_time; ! $recur_data[] = $next_date_time; ! break; ! case 'WEEKLY': ! // Populate $byday with the default day if it's not set. ! if (!isset($byday)) { ! $byday[] = strtoupper(substr(date('D', $start_date_time), 0, 2)); ! } ! if (is_array($byday)) { ! foreach($byday as $day) { ! $day = two2threeCharDays($day); ! #need to find the first day of the appropriate week. ! #dateOfweek uses weekstartday as a global variable. This has to be changed to $wkst, ! #but then needs to be reset for other functions ! $week_start_day_tmp = $week_start_day; ! $week_start_day = $wkst3char; ! ! $the_sunday = dateOfWeek(date("Ymd",$next_range_time), $wkst3char); ! $next_date_time = strtotime($day,strtotime($the_sunday)) + (12 * 60 * 60); ! $week_start_day = $week_start_day_tmp; #see above reset to global value ! ! #reset $next_range_time to first instance in this week. ! if ($next_date_time < $next_range_time){ ! $next_range_time = $next_date_time; ! } ! // Since this renders events from $next_range_time to $next_range_time + 1 week, I need to handle intervals ! // as well. This checks to see if $next_date_time is after $day_start (i.e., "next week"), and thus ! // if we need to add $interval weeks to $next_date_time. ! if ($next_date_time > strtotime($week_start_day, $next_range_time) && $interval > 1) { ! # $next_date_time = strtotime('+'.($interval - 1).' '.$freq_type, $next_date_time); ! } ! $recur_data[] = $next_date_time; ! } ! } ! break; ! case 'MONTHLY': ! if (empty($bymonth)) $bymonth = array(1,2,3,4,5,6,7,8,9,10,11,12); ! $next_range_time = strtotime(date('Y-m-01', $next_range_time)); ! $next_date_time = $next_date_time; ! if (isset($bysetpos)){ ! /* bysetpos code from dustinbutler ! start on day 1 or last day. ! if day matches any BYDAY the count is incremented. ! SETPOS = 4, need 4th match ! SETPOS = -1, need 1st match ! */ ! $year = date('Y', $next_range_time); ! $month = date('m', $next_range_time); ! if ($bysetpos > 0) { ! $next_day = '+1 day'; ! $day = 1; ! } else { ! $next_day = '-1 day'; ! $day = $totalDays[$month]; ! } ! $day = mktime(0, 0, 0, $month, $day, $year); ! $countMatch = 0; ! while ($countMatch != abs($bysetpos)) { ! /* Does this day match a BYDAY value? */ ! $thisDay = $day; ! $textDay = strtoupper(substr(date('D', $thisDay), 0, 2)); ! if (in_array($textDay, $byday)) { ! $countMatch++; ! } ! $day = strtotime($next_day, $thisDay); ! } ! $recur_data[] = $thisDay; ! }elseif ((isset($bymonthday)) && (!isset($byday))) { ! foreach($bymonthday as $day) { ! if ($day < 0) $day = ((date('t', $next_range_time)) + ($day)) + 1; ! $year = date('Y', $next_range_time); ! $month = date('m', $next_range_time); ! if (checkdate($month,$day,$year)) { ! $next_date_time = mktime(0,0,0,$month,$day,$year); ! $recur_data[] = $next_date_time; ! } ! } ! } elseif (is_array($byday)) { ! foreach($byday as $day) { ! ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr); ! //Added for 2.0 when no modifier is set ! if ($byday_arr[2] != '') { ! $nth = $byday_arr[2]-1; ! } else { ! $nth = 0; ! } ! $on_day = two2threeCharDays($byday_arr[3]); ! $on_day_num = two2threeCharDays($byday_arr[3],false); ! if ((isset($byday_arr[1])) && ($byday_arr[1] == '-')) { ! $last_day_tmp = date('t',$next_range_time); ! $next_range_time = strtotime(date('Y-m-'.$last_day_tmp, $next_range_time)); ! $last_tmp = (date('w',$next_range_time) == $on_day_num) ? '' : 'last '; ! $next_date_time = strtotime($last_tmp.$on_day, $next_range_time) - $nth * 604800; ! $month = date('m', $next_date_time); ! if (in_array($month, $bymonth)) { ! $recur_data[] = $next_date_time; ! } ! #reset next_range_time to start of month ! $next_range_time = strtotime(date('Y-m-'.'1', $next_range_time)); ! ! } elseif (isset($bymonthday) && (!empty($bymonthday))) { ! // This supports MONTHLY where BYDAY and BYMONTH are both set ! foreach($bymonthday as $day) { ! $year = date('Y', $next_range_time); ! $month = date('m', $next_range_time); ! if (checkdate($month,$day,$year)) { ! $next_date_time = mktime(0,0,0,$month,$day,$year); ! $daday = strtolower(strftime("%a", $next_date_time)); ! if ($daday == $on_day && in_array($month, $bymonth)) { ! $recur_data[] = $next_date_time; ! } ! } ! } ! } elseif ((isset($byday_arr[1])) && ($byday_arr[1] != '-')) { ! $next_date_time = strtotime($on_day, $next_range_time) + $nth * 604800; ! $month = date('m', $next_date_time); ! if (in_array($month, $bymonth)) { ! $recur_data[] = $next_date_time; ! } ! } ! $next_date = date('Ymd', $next_date_time); ! } ! } ! break; ! case 'YEARLY': ! if ((!isset($bymonth)) || (sizeof($bymonth) == 0)) { ! $m = date('m', $start_date_time); ! $bymonth = array("$m"); ! } ! ! foreach($bymonth as $month) { ! // Make sure the month & year used is within the start/end_range. ! if ($month < date('m', $next_range_time)) { ! $year = date('Y', $next_range_time); ! } else { ! $year = date('Y', $next_range_time); ! } ! if (isset($bysetpos)){ ! /* bysetpos code from dustinbutler ! start on day 1 or last day. ! if day matches any BYDAY the count is incremented. ! SETPOS = 4, need 4th match ! SETPOS = -1, need 1st match ! */ ! if ($bysetpos > 0) { ! $next_day = '+1 day'; ! $day = 1; ! } else { ! $next_day = '-1 day'; ! $day = date("t",$month); ! } ! $day = mktime(12, 0, 0, $month, $day, $year); ! $countMatch = 0; ! while ($countMatch != abs($bysetpos)) { ! /* Does this day match a BYDAY value? */ ! $thisDay = $day; ! $textDay = strtoupper(substr(date('D', $thisDay), 0, 2)); ! if (in_array($textDay, $byday)) { ! $countMatch++; ! } ! $day = strtotime($next_day, $thisDay); ! } ! $recur_data[] = $thisDay; ! } ! if ((isset($byday)) && (is_array($byday))) { ! $checkdate_time = mktime(0,0,0,$month,1,$year); ! foreach($byday as $day) { ! ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr); ! if ($byday_arr[2] != '') { ! $nth = $byday_arr[2]-1; ! } else { ! $nth = 0; ! } ! $on_day = two2threeCharDays($byday_arr[3]); ! $on_day_num = two2threeCharDays($byday_arr[3],false); ! if ($byday_arr[1] == '-') { ! $last_day_tmp = date('t',$checkdate_time); ! $checkdate_time = strtotime(date('Y-m-'.$last_day_tmp, $checkdate_time)); ! $last_tmp = (date('w',$checkdate_time) == $on_day_num) ? '' : 'last '; ! $next_date_time = strtotime($last_tmp.$on_day.' -'.$nth.' week', $checkdate_time); ! } else { ! $next_date_time = strtotime($on_day.' +'.$nth.' week', $checkdate_time); ! } ! } ! } else { ! $day = date('d', $start_date_time); ! $next_date_time = mktime(0,0,0,$month,$day,$year); ! //echo date('Ymd',$next_date_time).$summary.'<br>'; ! } ! $recur_data[] = $next_date_time; ! } ! if (isset($byyearday)) { ! foreach ($byyearday as $yearday) { ! ereg ('([-\+]{0,1})?([0-9]{1,3})', $yearday, $byyearday_arr); ! if ($byyearday_arr[1] == '-') { ! $ydtime = mktime(0,0,0,12,31,$this_year); ! $yearnum = $byyearday_arr[2] - 1; ! $next_date_time = strtotime('-'.$yearnum.' days', $ydtime); ! } else { ! $ydtime = mktime(0,0,0,1,1,$this_year); ! $yearnum = $byyearday_arr[2] - 1; ! $next_date_time = strtotime('+'.$yearnum.' days', $ydtime); ! } ! $recur_data[] = $next_date_time; ! } ! } ! break; ! default: ! // anything else we need to end the loop ! $next_range_time = $end_range_time_tmp + 100; ! $count_to = $count; ! } ! } else { ! $interval = 1; ! } ! $next_range_time = strtotime('+'.$interval.' '.$freq_type, $next_range_time); ! } else { ! // end the loop because we aren't going to write this event anyway ! $count_to = $count; ! } ! // use the same code to write the data instead of always changing it 5 times ! if (isset($recur_data) && is_array($recur_data)) { ! $recur_data_hour = @substr($start_time,0,2); ! $recur_data_minute = @substr($start_time,2,2); ! foreach($recur_data as $recur_data_time) { ! $recur_data_year = date('Y', $recur_data_time); ! $recur_data_month = date('m', $recur_data_time); ! $recur_data_day = date('d', $recur_data_time); ! $recur_data_date = $recur_data_year.$recur_data_month.$recur_data_day; ! ! if (($recur_data_time > $start_date_time) && ($recur_data_time <= $end_date_time) && ($count_to != $count) && !in_array($recur_data_date, $except_dates)) { ! if (isset($allday_start) && $allday_start != '') { ! $start_time2 = $recur_data_time; ! $end_time2 = strtotime('+'.$diff_allday_days.' days', $recur_data_time); ! while ($start_time2 < $end_time2) { ! $start_date2 = date('Ymd', $start_time2); ! $master_array[($start_date2)][('-1')][$uid] = array ('event_text' => $summary, 'description' => $description, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class, 'recur' => $recur ); ! $start_time2 = strtotime('+1 day', $start_time2); ! } ! } else { ! $start_unixtime_tmp = mktime($recur_data_hour,$recur_data_minute,0,$recur_data_month,$recur_data_day,$recur_data_year); ! $end_unixtime_tmp = $start_unixtime_tmp + $length; ! ! if (($end_time >= $bleed_time) && ($bleed_check == '-1')) { ! $start_tmp = strtotime(date('Ymd',$start_unixtime_tmp)); ! $end_date_tmp = date('Ymd',$end_unixtime_tmp); ! while ($start_tmp < $end_unixtime_tmp) { ! $start_date_tmp = date('Ymd',$start_tmp); ! if ($start_date_tmp == $recur_data_year.$recur_data_month.$recur_data_day) { ! $time_tmp = $hour.$minute; ! $start_time_tmp = $start_time; ! } else { ! $time_tmp = '0000'; ! $start_time_tmp = '0000'; ! } ! if ($start_date_tmp == $end_date_tmp) { ! $end_time_tmp = $end_time; ! } else { ! $end_time_tmp = '2400'; ! $display_end_tmp = $end_time; ! } ! ! // Let's double check the until to not write past it ! $until_check = $start_date_tmp.$time_tmp.'00'; ! if ($abs_until > $until_check) { ! $master_array[$start_date_tmp][$time_tmp][$uid] = array ( ! 'event_start' => $start_time_tmp, ! 'event_end' => $end_time_tmp, ! 'start_unixtime' => $start_unixtime_tmp, ! 'end_unixtime' => $end_unixtime_tmp, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => true, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url, ! 'recur' => $recur); ! if (isset($display_end_tmp)){ ! $master_array[$start_date_tmp][$time_tmp][$uid]['display_end'] = $display_end_tmp; ! } ! checkOverlap($start_date_tmp, $time_tmp, $uid); ! } ! $start_tmp = strtotime('+1 day',$start_tmp); ! } ! } else { ! if ($bleed_check == '-1') { ! $display_end_tmp = $end_time; ! $end_time_tmp1 = '2400'; ! ! } ! if (!isset($end_time_tmp1)) $end_time_tmp1 = $end_time; ! ! // Let's double check the until to not write past it ! $until_check = $recur_data_date.$hour.$minute.'00'; ! if ($abs_until > $until_check) { ! $master_array[($recur_data_date)][($hour.$minute)][$uid] = array ( ! 'event_start' => $start_time, ! 'event_end' => $end_time_tmp1, ! 'start_unixtime' => $start_unixtime_tmp, ! 'end_unixtime' => $end_unixtime_tmp, ! 'event_text' => $summary, ! 'event_length' => $length, ! 'event_overlap' => 0, ! 'description' => $description, ! 'status' => $status, ! 'class' => $class, ! 'spans_day' => false, ! 'location' => $location, ! 'organizer' => serialize($organizer), ! 'attendee' => serialize($attendee), ! 'calnumber' => $calnumber, ! 'calname' => $actual_calname, ! 'url' => $url, ! 'recur' => $recur); ! if (isset($display_end_tmp)){ ! $master_array[($recur_data_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; ! } ! checkOverlap($recur_data_date, ($hour.$minute), $uid); ! } ! } ! } ! } ! } ! unset($recur_data); ! } ! } ! } ! } ! } ! } ! ! // This should remove any exdates that were missed. ! // Added for version 0.9.5 modified in 2.22 remove anything that doesn't have an event_start ! if (is_array($except_dates)) { ! foreach ($except_dates as $key => $value) { ! if (isset ($master_array[$value])){ ! foreach ($master_array[$value] as $time => $value2){ ! if (!isset($value2[$uid]['event_start'])){ ! unset($master_array[$value][$time][$uid]); ! } ! } ! } ! } ! } ! ! // Clear event data now that it's been saved. ! unset($start_time, $start_time_tmp, $end_time, $end_time_tmp, $start_unixtime, $start_unixtime_tmp, $end_unixtime, $end_unixtime_tmp, $summary, $length, $description, $status, $class, $location, $organizer, $attendee); ! break; case 'END:VTODO': --- 169,174 ---- case 'END:VEVENT': ! include "functions/end_vevent.php"; ! break; case 'END:VTODO': |
From: <ji...@us...> - 2007-10-11 23:49:06
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23353/phpicalendar/functions Added Files: end_vevent.php Log Message: split end vevent code for maintainability --- NEW FILE: end_vevent.php --- <?php /* end_vevent.php What happens in this file: 1. Initialization 2. */ if (!isset($url)) $url = ''; if (!isset($type)) $type = ''; // Handle DURATION if (!isset($end_unixtime) && isset($the_duration)) { $end_unixtime = $start_unixtime + $the_duration; $end_time = date ('Hi', $end_unixtime); } // CLASS support if (isset($class)) { if ($class == 'PRIVATE') { $summary ='**PRIVATE**'; $description ='**PRIVATE**'; } elseif ($class == 'CONFIDENTIAL') { $summary ='**CONFIDENTIAL**'; $description ='**CONFIDENTIAL**'; } } // make sure we have some value for $uid if (!isset($uid)) { $uid = $uid_counter; $uid_counter++; $uid_valid = false; } else { $uid_valid = true; } if ($uid_valid && isset($processed[$uid]) && isset($recurrence_id['date'])) { $old_start_date = $processed[$uid][0]; $old_start_time = $processed[$uid][1]; if ($recurrence_id['value'] == 'DATE') $old_start_time = '-1'; $start_date_tmp = $recurrence_id['date']; if (!isset($start_date)) $start_date = $old_start_date; if (!isset($start_time)) $start_time = $master_array[$old_start_date][$old_start_time][$uid]['event_start']; if (!isset($start_unixtime)) $start_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['start_unixtime']; if (!isset($end_unixtime)) $end_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['end_unixtime']; if (!isset($end_time)) $end_time = $master_array[$old_start_date][$old_start_time][$uid]['event_end']; if (!isset($summary)) $summary = $master_array[$old_start_date][$old_start_time][$uid]['event_text']; if (!isset($length)) $length = $master_array[$old_start_date][$old_start_time][$uid]['event_length']; if (!isset($description)) $description = $master_array[$old_start_date][$old_start_time][$uid]['description']; if (!isset($location)) $location = $master_array[$old_start_date][$old_start_time][$uid]['location']; if (!isset($organizer)) $organizer = $master_array[$old_start_date][$old_start_time][$uid]['organizer']; if (!isset($status)) $status = $master_array[$old_start_date][$old_start_time][$uid]['status']; if (!isset($attendee)) $attendee = $master_array[$old_start_date][$old_start_time][$uid]['attendee']; if (!isset($url)) $url = $master_array[$old_start_date][$old_start_time][$uid]['url']; removeOverlap($start_date_tmp, $old_start_time, $uid); if (isset($master_array[$start_date_tmp][$old_start_time][$uid])) { unset($master_array[$start_date_tmp][$old_start_time][$uid]); // SJBO added $uid twice here if (sizeof($master_array[$start_date_tmp][$old_start_time]) == 0) { unset($master_array[$start_date_tmp][$old_start_time]); } } $write_processed = false; } else { $write_processed = true; } if (!isset($summary)) $summary = ''; if (!isset($description)) $description = ''; if (!isset($status)) $status = ''; if (!isset($class)) $class = ''; if (!isset($location)) $location = ''; $mArray_begin = mktime (0,0,0,12,21,($this_year - 1)); $mArray_end = mktime (0,0,0,1,12,($this_year + 1)); if (isset($start_time) && isset($end_time)) { // Mozilla style all-day events or just really long events if (($end_time - $start_time) > 2345) { $allday_start = $start_date; $allday_end = ($start_date + 1); } } if (isset($start_unixtime,$end_unixtime) && date('Ymd',$start_unixtime) != date('Ymd',$end_unixtime)) { $spans_day = true; $bleed_check = (($start_unixtime - $end_unixtime) < (60*60*24)) ? '-1' : '0'; } else { $spans_day = false; $bleed_check = 0; } if (isset($start_time) && $start_time != '') { preg_match ('/([0-9]{2})([0-9]{2})/', $start_time, $time); preg_match ('/([0-9]{2})([0-9]{2})/', $end_time, $time2); if (isset($start_unixtime) && isset($end_unixtime)) { $length = $end_unixtime - $start_unixtime; } else { $length = ($time2[1]*60+$time2[2]) - ($time[1]*60+$time[2]); } $drawKey = drawEventTimes($start_time, $end_time); preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3); $hour = $time3[1]; $minute = $time3[2]; } // RECURRENCE-ID Support if (isset($recurrence_d)) { $recurrence_delete["$recurrence_d"]["$recurrence_t"] = $uid; } // handle single changes in recurring events // Maybe this is no longer need since done at bottom of parser? - CL 11/20/02 if ($uid_valid && $write_processed) { if (!isset($hour)) $hour = 00; if (!isset($minute)) $minute = 00; $processed[$uid] = array($start_date,($hour.$minute), $type); } // Handling of the all day events if ((isset($allday_start) && $allday_start != '')) { $start = strtotime($allday_start); if ($spans_day) { $allday_end = date('Ymd',$end_unixtime); } if (isset($allday_end)) { $end = strtotime($allday_end); } else { $end = strtotime('+1 day', $start); } // Changed for 1.0, basically write out the entire event if it starts while the array is written. # while loop handles multi-day allday events to write separate master_array elements for each day. if (($start < $mArray_end) && ($start < $end)) { while (($start != $end) && ($start < $mArray_end)) { $start_date2 = date('Ymd', $start); $master_array[($start_date2)][('-1')][$uid]= array ( 'event_text' => $summary, 'description' => $description, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class ); $start = strtotime('+1 day', $start); } if (!$write_processed) $master_array[($start_date)]['-1'][$uid]['exception'] = true; } } // Handling regular events if ((isset($start_time) && $start_time != '') && (!isset($allday_start) || $allday_start == '')) { if (($end_time >= $bleed_time) && ($bleed_check == '-1')) { $start_tmp = strtotime(date('Ymd',$start_unixtime)); $end_date_tmp = date('Ymd',$end_unixtime); while ($start_tmp < $end_unixtime) { $start_date_tmp = date('Ymd',$start_tmp); if ($start_date_tmp == $start_date) { $time_tmp = $hour.$minute; $start_time_tmp = $start_time; } else { $time_tmp = '0000'; $start_time_tmp = '0000'; } if ($start_date_tmp == $end_date_tmp) { $end_time_tmp = $end_time; } else { $end_time_tmp = '2400'; $display_end_tmp = $end_time; } $master_array[$start_date_tmp][$time_tmp][$uid] = array ( 'event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); if (isset($display_end_tmp)){ $master_array[$start_date_tmp][$time_tmp][$uid]['display_end'] = $display_end_tmp; } checkOverlap($start_date_tmp, $time_tmp, $uid); $start_tmp = strtotime('+1 day',$start_tmp); } if (!$write_processed) $master_array[$start_date][($hour.$minute)][$uid]['exception'] = true; } else { if ($bleed_check == '-1') { $display_end_tmp = $end_time; $end_time_tmp1 = '2400'; } if (!isset($end_time_tmp1)) $end_time_tmp1 = $end_time; // This if statement should prevent writing of an excluded date if its the first recurrance - CL if (!in_array($start_date, $except_dates)) { $master_array[($start_date)][($hour.$minute)][$uid] = array ( 'event_start' => $start_time, 'event_end' => $end_time_tmp1, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url ); if (isset($display_end_tmp)){ $master_array[($start_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; } checkOverlap($start_date, ($hour.$minute), $uid); if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true; } } } // Handling of the recurring events, RRULE if (isset($rrule_array) && is_array($rrule_array)) { if (isset($allday_start) && $allday_start != '') { $hour = '-'; $minute = '1'; $rrule_array['START_DAY'] = $allday_start; $rrule_array['END_DAY'] = $allday_end; $rrule_array['END'] = 'end'; $recur_start = $allday_start; $start_date = $allday_start; if (isset($allday_end)) { $diff_allday_days = dayCompare($allday_end, $allday_start); } else { $diff_allday_days = 1; } } else { $rrule_array['START_DATE'] = $start_date; $rrule_array['START_TIME'] = $start_time; $rrule_array['END_TIME'] = $end_time; $rrule_array['END'] = 'end'; } $start_date_time = strtotime($start_date); if (!isset($fromdate)){ #this should happen if not in one of the rss views $this_month_start_time = strtotime($this_year.$this_month.'01'); if ($current_view == 'year' || ($save_parsed_cals == 'yes' && !$is_webcal)|| $current_view == 'print' && $printview == 'year') { $start_range_time = strtotime($this_year.'-01-01 -2 weeks'); $end_range_time = strtotime($this_year.'-12-31 +2 weeks'); } else { $start_range_time = strtotime('-1 month -2 day', $this_month_start_time); $end_range_time = strtotime('+2 month +2 day', $this_month_start_time); } }else{ $start_range_time = strtotime($fromdate); $end_range_time = strtotime($todate)+60*60*24; } foreach ($rrule_array as $key => $val) { switch($key) { case 'FREQ': switch ($val) { case 'YEARLY': $freq_type = 'year'; break; case 'MONTHLY': $freq_type = 'month'; break; case 'WEEKLY': $freq_type = 'week'; break; case 'DAILY': $freq_type = 'day'; break; case 'HOURLY': $freq_type = 'hour'; break; case 'MINUTELY': $freq_type = 'minute'; break; case 'SECONDLY': $freq_type = 'second'; break; } $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = strtolower($val); break; case 'COUNT': $count = $val; $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $count; break; case 'UNTIL': $until = str_replace('T', '', $val); $until = str_replace('Z', '', $until); if (strlen($until) == 8) $until = $until.'235959'; $abs_until = $until; ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); $until = mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); break; case 'INTERVAL': if ($val > 0){ $number = $val; $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $number; } break; case 'BYSECOND': $bysecond = $val; $bysecond = split (',', $bysecond); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bysecond; break; case 'BYMINUTE': $byminute = $val; $byminute = split (',', $byminute); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byminute; break; case 'BYHOUR': $byhour = $val; $byhour = split (',', $byhour); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byhour; break; case 'BYDAY': $byday = $val; $byday = split (',', $byday); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byday; break; case 'BYMONTHDAY': $bymonthday = $val; $bymonthday = split (',', $bymonthday); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bymonthday; break; case 'BYYEARDAY': $byyearday = $val; $byyearday = split (',', $byyearday); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byyearday; break; case 'BYWEEKNO': $byweekno = $val; $byweekno = split (',', $byweekno); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $byweekno; break; case 'BYMONTH': $bymonth = $val; $bymonth = split (',', $bymonth); $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bymonth; break; case 'BYSETPOS': $bysetpos = $val; $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $bysetpos; break; case 'WKST': $wkst = $val; $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = $wkst; break; case 'END': $recur = $master_array[($start_date)][($hour.$minute)][$uid]['recur']; // Modify the COUNT based on BYDAY if ((is_array($byday)) && (isset($count))) { $blah = sizeof($byday); $count = ($count / $blah); unset ($blah); } if (!isset($number)) $number = 1; // if $until isn't set yet, we set it to the end of our range we're looking at if (!isset($until)) $until = $end_range_time; if (!isset($abs_until)) $abs_until = date('YmdHis', $end_range_time); $end_date_time = $until; $start_range_time_tmp = $start_range_time; $end_range_time_tmp = $end_range_time; // If the $end_range_time is less than the $start_date_time, or $start_range_time is greater // than $end_date_time, we may as well forget the whole thing // It doesn't do us any good to spend time adding data we aren't even looking at // this will prevent the year view from taking way longer than it needs to if ($end_range_time_tmp >= $start_date_time && $start_range_time_tmp <= $end_date_time) { // if the beginning of our range is less than the start of the item, we may as well set it equal to it if ($start_range_time_tmp < $start_date_time){ $start_range_time_tmp = $start_date_time; } if ($end_range_time_tmp > $end_date_time) $end_range_time_tmp = $end_date_time; // initialize the time we will increment $next_range_time = $start_range_time_tmp; // FIXME: This is a hack to fix repetitions with $interval > 1 if ($count > 1 && $number > 1) $count = 1 + ($count - 1) * $number; $count_to = 0; // start at the $start_range and go until we hit the end of our range. if(!isset($wkst)) $wkst='SU'; $wkst3char = two2threeCharDays($wkst); while (($next_range_time >= $start_range_time_tmp) && ($next_range_time <= $end_range_time_tmp) && ($count_to != $count)) { $func = $freq_type.'Compare'; $diff = $func(date('Ymd',$next_range_time), $start_date); if ($diff < $count) { if ($diff % $number == 0) { $interval = $number; switch ($rrule_array['FREQ']) { case 'DAILY': $next_date_time = $next_range_time; $recur_data[] = $next_date_time; break; case 'WEEKLY': // Populate $byday with the default day if it's not set. if (!isset($byday)) { $byday[] = strtoupper(substr(date('D', $start_date_time), 0, 2)); } if (is_array($byday)) { foreach($byday as $day) { $day = two2threeCharDays($day); #need to find the first day of the appropriate week. #dateOfweek uses weekstartday as a global variable. This has to be changed to $wkst, #but then needs to be reset for other functions $week_start_day_tmp = $week_start_day; $week_start_day = $wkst3char; $the_sunday = dateOfWeek(date("Ymd",$next_range_time), $wkst3char); $next_date_time = strtotime($day,strtotime($the_sunday)) + (12 * 60 * 60); $week_start_day = $week_start_day_tmp; #see above reset to global value #reset $next_range_time to first instance in this week. if ($next_date_time < $next_range_time){ $next_range_time = $next_date_time; } // Since this renders events from $next_range_time to $next_range_time + 1 week, I need to handle intervals // as well. This checks to see if $next_date_time is after $day_start (i.e., "next week"), and thus // if we need to add $interval weeks to $next_date_time. if ($next_date_time > strtotime($week_start_day, $next_range_time) && $interval > 1) { # $next_date_time = strtotime('+'.($interval - 1).' '.$freq_type, $next_date_time); } $recur_data[] = $next_date_time; } } break; case 'MONTHLY': if (empty($bymonth)) $bymonth = array(1,2,3,4,5,6,7,8,9,10,11,12); $next_range_time = strtotime(date('Y-m-01', $next_range_time)); $next_date_time = $next_date_time; if (isset($bysetpos)){ /* bysetpos code from dustinbutler start on day 1 or last day. if day matches any BYDAY the count is incremented. SETPOS = 4, need 4th match SETPOS = -1, need 1st match */ $year = date('Y', $next_range_time); $month = date('m', $next_range_time); if ($bysetpos > 0) { $next_day = '+1 day'; $day = 1; } else { $next_day = '-1 day'; $day = $totalDays[$month]; } $day = mktime(0, 0, 0, $month, $day, $year); $countMatch = 0; while ($countMatch != abs($bysetpos)) { /* Does this day match a BYDAY value? */ $thisDay = $day; $textDay = strtoupper(substr(date('D', $thisDay), 0, 2)); if (in_array($textDay, $byday)) { $countMatch++; } $day = strtotime($next_day, $thisDay); } $recur_data[] = $thisDay; }elseif ((isset($bymonthday)) && (!isset($byday))) { foreach($bymonthday as $day) { if ($day < 0) $day = ((date('t', $next_range_time)) + ($day)) + 1; $year = date('Y', $next_range_time); $month = date('m', $next_range_time); if (checkdate($month,$day,$year)) { $next_date_time = mktime(0,0,0,$month,$day,$year); $recur_data[] = $next_date_time; } } } elseif (is_array($byday)) { foreach($byday as $day) { ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr); //Added for 2.0 when no modifier is set if ($byday_arr[2] != '') { $nth = $byday_arr[2]-1; } else { $nth = 0; } $on_day = two2threeCharDays($byday_arr[3]); $on_day_num = two2threeCharDays($byday_arr[3],false); if ((isset($byday_arr[1])) && ($byday_arr[1] == '-')) { $last_day_tmp = date('t',$next_range_time); $next_range_time = strtotime(date('Y-m-'.$last_day_tmp, $next_range_time)); $last_tmp = (date('w',$next_range_time) == $on_day_num) ? '' : 'last '; $next_date_time = strtotime($last_tmp.$on_day, $next_range_time) - $nth * 604800; $month = date('m', $next_date_time); if (in_array($month, $bymonth)) { $recur_data[] = $next_date_time; } #reset next_range_time to start of month $next_range_time = strtotime(date('Y-m-'.'1', $next_range_time)); } elseif (isset($bymonthday) && (!empty($bymonthday))) { // This supports MONTHLY where BYDAY and BYMONTH are both set foreach($bymonthday as $day) { $year = date('Y', $next_range_time); $month = date('m', $next_range_time); if (checkdate($month,$day,$year)) { $next_date_time = mktime(0,0,0,$month,$day,$year); $daday = strtolower(strftime("%a", $next_date_time)); if ($daday == $on_day && in_array($month, $bymonth)) { $recur_data[] = $next_date_time; } } } } elseif ((isset($byday_arr[1])) && ($byday_arr[1] != '-')) { $next_date_time = strtotime($on_day, $next_range_time) + $nth * 604800; $month = date('m', $next_date_time); if (in_array($month, $bymonth)) { $recur_data[] = $next_date_time; } } $next_date = date('Ymd', $next_date_time); } } break; case 'YEARLY': if ((!isset($bymonth)) || (sizeof($bymonth) == 0)) { $m = date('m', $start_date_time); $bymonth = array("$m"); } foreach($bymonth as $month) { // Make sure the month & year used is within the start/end_range. if ($month < date('m', $next_range_time)) { $year = date('Y', $next_range_time); } else { $year = date('Y', $next_range_time); } if (isset($bysetpos)){ /* bysetpos code from dustinbutler start on day 1 or last day. if day matches any BYDAY the count is incremented. SETPOS = 4, need 4th match SETPOS = -1, need 1st match */ if ($bysetpos > 0) { $next_day = '+1 day'; $day = 1; } else { $next_day = '-1 day'; $day = date("t",$month); } $day = mktime(12, 0, 0, $month, $day, $year); $countMatch = 0; while ($countMatch != abs($bysetpos)) { /* Does this day match a BYDAY value? */ $thisDay = $day; $textDay = strtoupper(substr(date('D', $thisDay), 0, 2)); if (in_array($textDay, $byday)) { $countMatch++; } $day = strtotime($next_day, $thisDay); } $recur_data[] = $thisDay; } if ((isset($byday)) && (is_array($byday))) { $checkdate_time = mktime(0,0,0,$month,1,$year); foreach($byday as $day) { ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr); if ($byday_arr[2] != '') { $nth = $byday_arr[2]-1; } else { $nth = 0; } $on_day = two2threeCharDays($byday_arr[3]); $on_day_num = two2threeCharDays($byday_arr[3],false); if ($byday_arr[1] == '-') { $last_day_tmp = date('t',$checkdate_time); $checkdate_time = strtotime(date('Y-m-'.$last_day_tmp, $checkdate_time)); $last_tmp = (date('w',$checkdate_time) == $on_day_num) ? '' : 'last '; $next_date_time = strtotime($last_tmp.$on_day.' -'.$nth.' week', $checkdate_time); } else { $next_date_time = strtotime($on_day.' +'.$nth.' week', $checkdate_time); } } } else { $day = date('d', $start_date_time); $next_date_time = mktime(0,0,0,$month,$day,$year); //echo date('Ymd',$next_date_time).$summary.'<br>'; } $recur_data[] = $next_date_time; } if (isset($byyearday)) { foreach ($byyearday as $yearday) { ereg ('([-\+]{0,1})?([0-9]{1,3})', $yearday, $byyearday_arr); if ($byyearday_arr[1] == '-') { $ydtime = mktime(0,0,0,12,31,$this_year); $yearnum = $byyearday_arr[2] - 1; $next_date_time = strtotime('-'.$yearnum.' days', $ydtime); } else { $ydtime = mktime(0,0,0,1,1,$this_year); $yearnum = $byyearday_arr[2] - 1; $next_date_time = strtotime('+'.$yearnum.' days', $ydtime); } $recur_data[] = $next_date_time; } } break; default: // anything else we need to end the loop $next_range_time = $end_range_time_tmp + 100; $count_to = $count; } } else { $interval = 1; } $next_range_time = strtotime('+'.$interval.' '.$freq_type, $next_range_time); } else { // end the loop because we aren't going to write this event anyway $count_to = $count; } // use the same code to write the data instead of always changing it 5 times if (isset($recur_data) && is_array($recur_data)) { $recur_data_hour = @substr($start_time,0,2); $recur_data_minute = @substr($start_time,2,2); foreach($recur_data as $recur_data_time) { $recur_data_year = date('Y', $recur_data_time); $recur_data_month = date('m', $recur_data_time); $recur_data_day = date('d', $recur_data_time); $recur_data_date = $recur_data_year.$recur_data_month.$recur_data_day; if (($recur_data_time > $start_date_time) && ($recur_data_time <= $end_date_time) && ($count_to != $count) && !in_array($recur_data_date, $except_dates)) { if (isset($allday_start) && $allday_start != '') { $start_time2 = $recur_data_time; $end_time2 = strtotime('+'.$diff_allday_days.' days', $recur_data_time); while ($start_time2 < $end_time2) { $start_date2 = date('Ymd', $start_time2); $master_array[($start_date2)][('-1')][$uid] = array ('event_text' => $summary, 'description' => $description, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class, 'recur' => $recur ); $start_time2 = strtotime('+1 day', $start_time2); } } else { $start_unixtime_tmp = mktime($recur_data_hour,$recur_data_minute,0,$recur_data_month,$recur_data_day,$recur_data_year); $end_unixtime_tmp = $start_unixtime_tmp + $length; if (($end_time >= $bleed_time) && ($bleed_check == '-1')) { $start_tmp = strtotime(date('Ymd',$start_unixtime_tmp)); $end_date_tmp = date('Ymd',$end_unixtime_tmp); while ($start_tmp < $end_unixtime_tmp) { $start_date_tmp = date('Ymd',$start_tmp); if ($start_date_tmp == $recur_data_year.$recur_data_month.$recur_data_day) { $time_tmp = $hour.$minute; $start_time_tmp = $start_time; } else { $time_tmp = '0000'; $start_time_tmp = '0000'; } if ($start_date_tmp == $end_date_tmp) { $end_time_tmp = $end_time; } else { $end_time_tmp = '2400'; $display_end_tmp = $end_time; } // Let's double check the until to not write past it $until_check = $start_date_tmp.$time_tmp.'00'; if ($abs_until > $until_check) { $master_array[$start_date_tmp][$time_tmp][$uid] = array ( 'event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'recur' => $recur); if (isset($display_end_tmp)){ $master_array[$start_date_tmp][$time_tmp][$uid]['display_end'] = $display_end_tmp; } checkOverlap($start_date_tmp, $time_tmp, $uid); } $start_tmp = strtotime('+1 day',$start_tmp); } } else { if ($bleed_check == '-1') { $display_end_tmp = $end_time; $end_time_tmp1 = '2400'; } if (!isset($end_time_tmp1)) $end_time_tmp1 = $end_time; // Let's double check the until to not write past it $until_check = $recur_data_date.$hour.$minute.'00'; if ($abs_until > $until_check) { $master_array[($recur_data_date)][($hour.$minute)][$uid] = array ( 'event_start' => $start_time, 'event_end' => $end_time_tmp1, 'start_unixtime' => $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => 0, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'recur' => $recur); if (isset($display_end_tmp)){ $master_array[($recur_data_date)][($hour.$minute)][$uid]['display_end'] = $display_end_tmp; } checkOverlap($recur_data_date, ($hour.$minute), $uid); } } } } } unset($recur_data); } } } } } } // This should remove any exdates that were missed. // Added for version 0.9.5 modified in 2.22 remove anything that doesn't have an event_start if (is_array($except_dates)) { foreach ($except_dates as $key => $value) { if (isset ($master_array[$value])){ foreach ($master_array[$value] as $time => $value2){ if (!isset($value2[$uid]['event_start'])){ unset($master_array[$value][$time][$uid]); } } } } } // Clear event data now that it's been saved. unset($start_time, $start_time_tmp, $end_time, $end_time_tmp, $start_unixtime, $start_unixtime_tmp, $end_unixtime, $end_unixtime_tmp, $summary, $length, $description, $status, $class, $location, $organizer, $attendee); ?> |
From: <ji...@us...> - 2007-10-11 23:46:29
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22591/phpicalendar Modified Files: config.inc-dist.php month.php Log Message: modify mont.php to set current view before parsing, and to remove some extraneous stuff duplicated in init.inc.php Index: config.inc-dist.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/config.inc-dist.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.inc-dist.php 23 May 2007 18:29:33 -0000 1.2 --- config.inc-dist.php 11 Oct 2007 23:46:31 -0000 1.3 *************** *** 1,5 **** <?php ! // Configuration file for PHP iCalendar 2.23rc1 // // To set values, change the text between the single quotes --- 1,5 ---- <?php ! // Configuration file for PHP iCalendar 2.25 // // To set values, change the text between the single quotes Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** month.php 2 Nov 2006 08:06:03 -0000 1.138 --- month.php 11 Oct 2007 23:46:31 -0000 1.139 *************** *** 1,16 **** <?php define('BASE', './'); require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/list_functions.php'); require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$charset"); - $current_view = "month"; if ($minical_view == 'current') $minical_view = 'month'; - 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 = strtotime($getdate); $today_today = date('Ymd', time() + $second_offset); --- 1,11 ---- <?php define('BASE', './'); + $current_view = "month"; require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/list_functions.php'); require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$charset"); if ($minical_view == 'current') $minical_view = 'month'; $unix_time = strtotime($getdate); $today_today = date('Ymd', time() + $second_offset); |
From: <ji...@us...> - 2007-10-11 23:46:29
|
Update of /cvsroot/phpicalendar/phpicalendar3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22591/phpicalendar3 Modified Files: parser_tests.php Log Message: modify mont.php to set current view before parsing, and to remove some extraneous stuff duplicated in init.inc.php Index: parser_tests.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/parser_tests.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** parser_tests.php 2 May 2007 13:41:52 -0000 1.2 --- parser_tests.php 11 Oct 2007 23:46:31 -0000 1.3 *************** *** 20,25 **** # test line folder ! if (!$parser->process_file('calendars/Deutsche_Feiertage.ics')) ! echo 'failed open'; $start = 42929730712; --- 20,28 ---- # test line folder ! #if (!$parser->process_file('calendars/Deutsche_Feiertage.ics')) echo 'failed open'; ! ! #print_r($parser); ! if (!$parser->process_file('calendars/US32Holidays.ics')) echo 'failed open'; ! print_r($parser); $start = 42929730712; |
From: <ji...@us...> - 2007-10-11 23:46:29
|
Update of /cvsroot/phpicalendar/phpicalendar3/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22591/phpicalendar3/functions Modified Files: class.Parser.php class.Vcalendar.php class.Vtimezone.php class.iCalObj.php Log Message: modify mont.php to set current view before parsing, and to remove some extraneous stuff duplicated in init.inc.php Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.Parser.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Parser.php 2 May 2007 13:41:52 -0000 1.3 --- class.Parser.php 11 Oct 2007 23:46:31 -0000 1.4 *************** *** 85,89 **** $obj = null; $obj_stack = array(); ! if (!$this->open_file($filename)) return "can't open file"; --- 85,89 ---- $obj = null; $obj_stack = array(); ! $tz_list = array(); if (!$this->open_file($filename)) return "can't open file"; *************** *** 100,105 **** # echo "key:$key\n"; ! switch ($key) ! { case 'BEGIN': $type = ucfirst(strtolower($tmp[1])); --- 100,104 ---- # echo "key:$key\n"; ! switch ($key){ case 'BEGIN': $type = ucfirst(strtolower($tmp[1])); *************** *** 124,128 **** case 'END': $obj = array_pop($obj_stack); ! if (is_object(end($obj_stack))) { $parent_obj = end($obj_stack); --- 123,132 ---- case 'END': $obj = array_pop($obj_stack); ! switch (get_class($obj)){ ! case 'Vtimezone': $this->tz_list[$obj->tzid] = $obj; break; ! case 'Vevent': $this->event_list[$obj->uid] = $obj; break; ! case 'Vtodo': $this->todo_list[] = $obj; break; ! case 'Vfreebusy': $this->freebusy_list[] = $obj; break; ! } if (is_object(end($obj_stack))) { $parent_obj = end($obj_stack); *************** *** 164,168 **** } ! print_r($this->cal); return true; --- 168,173 ---- } ! # print_r($this->cal); ! # print_r($tz_list); return true; Index: class.Vcalendar.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.Vcalendar.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Vcalendar.php 2 May 2007 13:41:52 -0000 1.3 --- class.Vcalendar.php 11 Oct 2007 23:46:31 -0000 1.4 *************** *** 26,28 **** --- 26,34 ---- function Vcalendar() {} + function process_child($obj) { + #echo "\t".get_class($this)." object processing child of type ".get_class($obj)."\n"; + + # $this->children[] = $obj; + } + } ?> \ No newline at end of file Index: class.Vtimezone.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.Vtimezone.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Vtimezone.php 4 May 2007 21:02:23 -0000 1.3 --- class.Vtimezone.php 11 Oct 2007 23:46:31 -0000 1.4 *************** *** 21,23 **** --- 21,29 ---- function Vtimezone() {} + function process_child($obj) { + #echo "\t".get_class($this)." object processing child of type ".get_class($obj)."\n"; + $this->{get_class($obj)} = $obj; + } + + } ?> \ No newline at end of file Index: class.iCalObj.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.iCalObj.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** class.iCalObj.php 22 May 2007 01:02:45 -0000 1.4 --- class.iCalObj.php 11 Oct 2007 23:46:31 -0000 1.5 *************** *** 54,59 **** */ function process_line($key, $line) { ! echo "\tfeed key= $key line=$line to the object of type ". ! get_class($this)."\n"; switch ($key) --- 54,58 ---- */ function process_line($key, $line) { ! #echo "\tfeed key= $key line=$line to the object of type ". get_class($this)."\n"; switch ($key) *************** *** 73,78 **** */ function process_child($obj) { ! echo "\t".get_class($this)." object processing child of type ". ! get_class($obj)."\n"; $this->children[] = $obj; --- 72,76 ---- */ function process_child($obj) { ! #echo "\t".get_class($this)." object processing child of type ". get_class($obj)."\n"; $this->children[] = $obj; *************** *** 86,90 **** */ function finish() { ! echo "END:tell the ".get_class($this)." object to finish up, pop it off the stack.\n"; } --- 84,88 ---- */ function finish() { ! #echo "END:tell the ".get_class($this)." object to finish up, pop it off the stack.\n"; } |
From: <bo...@us...> - 2007-07-07 15:07:35
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25210 Modified Files: sanitize.php Log Message: Bugfix for 1740062 (https://sourceforge.net/tracker/index.php?func=detail&aid=1740062&group_id=62270&atid=500017) Index: sanitize.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/sanitize.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sanitize.php 18 May 2007 19:04:23 -0000 1.3 --- sanitize.php 7 Jul 2007 15:07:35 -0000 1.4 *************** *** 1,3 **** --- 1,36 ---- <?php + /** + * Sanitizes variables and arrays in a recursive manner + * + * This method was created as a result of strip_tags() happening on an array + * would destroy the contents of the array. Thus, in order to avoid this from + * happening we need checks to see if something is an array and to process + * it as such. + * + * The only sanitizing this method provides is stripping non-allowed tags. + * + * @author Christopher Weldon <cw...@ta...> + * @param mixed $value Value to be sanitized + * @return mixed + */ + function recursiveSanitize($value) { + if (is_array($value)) { + $valmod = array(); + foreach ($value as $key => $subval) { + if (is_array($subval)) { + $subval = recursiveSanitize($subval); + } else { + $subval = strip_tags($subval); + } + $valmod[$key] = $subval; + } + $value = $valmod; + } else { + $value = strip_tags($value); + } + + return $value; + } + foreach ($_REQUEST as $key=>$val){ switch ($key){ *************** *** 9,13 **** default: # cpath ! $val = strip_tags($val); } --- 42,46 ---- default: # cpath ! $val = recursiveSanitize($val); } *************** *** 25,29 **** break; default: ! $val = strip_tags($val); } $_POST[$key] = $val; --- 58,62 ---- break; default: ! $val = recursiveSanitize($val); } $_POST[$key] = $val; *************** *** 47,51 **** break; default: ! $val = strip_tags($val); } if ($key != 'cal') $_GET[$key] = $val; --- 80,84 ---- break; default: ! $val = recursiveSanitize($val); } if ($key != 'cal') $_GET[$key] = $val; *************** *** 58,62 **** break; default: ! $val = strip_tags($val); } $_COOKIE[$key] = $val; --- 91,95 ---- break; default: ! $val = recursiveSanitize($val); } $_COOKIE[$key] = $val; |
From: <ji...@us...> - 2007-05-23 18:30:38
|
Update of /cvsroot/phpicalendar/phpicalendar/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26168/phpicalendar/admin Modified Files: index.php Log Message: patches to change none to server - fix the comment too Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/admin/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 23 May 2007 18:29:34 -0000 1.6 --- index.php 23 May 2007 18:30:37 -0000 1.7 *************** *** 29,33 **** ! // if $auth_method == 'none', don't do any authentication $username = $_POST['username']; $password = $_POST['password']; --- 29,33 ---- ! // if $auth_method == 'server', don't do any authentication $username = $_POST['username']; $password = $_POST['password']; |
From: <ji...@us...> - 2007-05-23 18:29:33
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25759/phpicalendar Modified Files: config.inc-dist.php Log Message: patches to change none to server Index: config.inc-dist.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/config.inc-dist.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.inc-dist.php 23 May 2007 18:27:19 -0000 1.1 --- config.inc-dist.php 23 May 2007 18:29:33 -0000 1.2 *************** *** 55,59 **** // Administration settings (/admin/) $allow_admin = 'yes'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $auth_method ! $auth_method = 'internal'; // Valid values are: 'ftp', 'internal', or 'none'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $auth_internal_username and $auth_internal_password defined below - CHANGE the password. 'none' uses NO authentication - meant to be used with another form of authentication such as http basic. $auth_internal_username = 'admin'; // Only used if $auth_method='internal'. The username for the administrator. $auth_internal_password = 'admin'; // Only used if $auth_method='internal'. The password for the administrator. --- 55,59 ---- // Administration settings (/admin/) $allow_admin = 'yes'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $auth_method ! $auth_method = 'internal'; // Valid values are: 'ftp', 'internal', or 'server'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $auth_internal_username and $auth_internal_password defined below - CHANGE the password. 'server' uses NO authentication from phpicalendar - meant to be used with another form of authentication such as http basic. $auth_internal_username = 'admin'; // Only used if $auth_method='internal'. The username for the administrator. $auth_internal_password = 'admin'; // Only used if $auth_method='internal'. The password for the administrator. |
From: <ji...@us...> - 2007-05-23 18:29:33
|
Update of /cvsroot/phpicalendar/phpicalendar/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25759/phpicalendar/admin Modified Files: index.php Log Message: patches to change none to server Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/admin/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 14 Aug 2006 04:57:16 -0000 1.5 --- index.php 23 May 2007 18:29:34 -0000 1.6 *************** *** 33,37 **** $password = $_POST['password']; ! if ($auth_method == 'none') { $is_loged_in = TRUE; } else { --- 33,37 ---- $password = $_POST['password']; ! if ($auth_method == 'server') { $is_loged_in = TRUE; } else { |
From: <ji...@us...> - 2007-05-23 18:27:20
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25029/phpicalendar Added Files: config.inc-dist.php Removed Files: config.inc.php Log Message: change cvs to use config.inc-dist.php instead of config.inc.php --- NEW FILE: config.inc-dist.php --- <?php // Configuration file for PHP iCalendar 2.23rc1 // // To set values, change the text between the single quotes // Follow instructions to the right for detailed information $template = 'default'; // Template support $default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year' $minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current' $default_cal = $ALL_CALENDARS_COMBINED; // Exact filename of calendar without .ics. Or set to $ALL_CALENDARS_COMBINED to open all calenders combined into one. $language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto', 'Korean' $week_start_day = 'Sunday'; // Day of the week your week starts on $week_length = '7'; // Number of days to display in the week view $day_start = '0700'; // Start time for day grid $day_end = '2300'; // End time for day grid $gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred $num_years = '1'; // Number of years (up and back) to display in 'Jump to' $month_event_lines = '1'; // Number of lines to wrap each event title in month view, 0 means display all lines. $tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines. $allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines. $week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines. $timezone = ''; // Set timezone. Read TIMEZONES file for more information $calendar_path = ''; // Leave this blank on most installs, place your full FILE SYSTEM PATH to calendars if they are outside the phpicalendar folder. $second_offset = ''; // The time in seconds between your time and your server's time. $bleed_time = '-1'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359', or '-1' for no bleed time. $cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar -- AUTO SETTING -- Only set if you are having cookie issues. $download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars -- AUTO SETTING -- Only set if you are having subscribe issues. $default_path = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar $charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, or iso-8859-1 for most languages. // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. $allow_webcals = 'no'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. $this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page. $enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). $rss_link_to_event = ''; // Set to yes to have links in the feed popup an event window. Default is to link to day.php $show_search = 'yes'; // Show the search box in the sidebar. $allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies. $printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above). $show_todos = 'yes'; // Show your todo list on the side of day and week view. $show_completed = 'yes'; // Show completed todos on your todo list. $allow_login = 'yes'; // Set to yes to prompt for login to unlock calendars. $login_cookies = 'no'; // Set to yes to store authentication information via (unencrypted) cookies. Set to no to use sessions. $support_ical = 'no'; // Set to yes to support the Apple iCal calendar database structure. $recursive_path = 'no'; // Set to yes to recurse into subdirectories of the calendar path. // Calendar Caching (decreases page load times) $save_parsed_cals = 'no'; // Saves a copy of the cal in /tmp after it's been parsed. Improves performance. $tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X). Any php-writable folder works. $webcal_hours = '24'; // Number of hours to cache webcals. Setting to '0' will always re-parse webcals. // Webdav style publishing $phpicalendar_publishing = ''; // Set to '1' to enable remote webdav style publish. See 'calendars/publish.php' for complete information; // Administration settings (/admin/) $allow_admin = 'yes'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $auth_method $auth_method = 'internal'; // Valid values are: 'ftp', 'internal', or 'none'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $auth_internal_username and $auth_internal_password defined below - CHANGE the password. 'none' uses NO authentication - meant to be used with another form of authentication such as http basic. $auth_internal_username = 'admin'; // Only used if $auth_method='internal'. The username for the administrator. $auth_internal_password = 'admin'; // Only used if $auth_method='internal'. The password for the administrator. $ftp_server = 'localhost'; // Only used if $auth_method='ftp'. The ftp server name. 'localhost' will work for most servers. $ftp_port = '21'; // Only used if $auth_method='ftp'. The ftp port. '21' is the default for ftp servers. $ftp_calendar_path = ''; // Only used if $auth_method='ftp'. The full path to the calendar directory on the ftp server. If = '', will attempt to deduce the path based on $calendar_path, but may not be accurate depending on ftp server config. // Calendar colors // // You can increase the number of unique colors by adding additional images (monthdot_n.gif) // and in the css file (default.css) classes .alldaybg_n, .eventbg_n and .eventbg2_n // Colors will repeat from the beginning for calendars past $unique_colors (7 by default), with no limit. $unique_colors = '7'; $blacklisted_cals[] = ''; // Fill in between the quotes the name of the calendars $blacklisted_cals[] = ''; // you wish to 'blacklist' or that you don't want to show up in your calendar $blacklisted_cals[] = ''; // list. This should be the exact calendar filename without .ics $blacklisted_cals[] = ''; // the parser will *not* parse any cal that is in this list (it will not be Web accessible) // add more lines as necessary $list_webcals[] = ''; // Fill in between the quotes exact URL of a calendar that you wish $list_webcals[] = ''; // to show up in your calendar list. You must prefix the URL with http:// $list_webcals[] = ''; // or webcal:// and the filename should contain the .ics suffix $list_webcals[] = ''; // $allow_webcals does *not* need to be "yes" for these to show up and work // add more lines as necessary #$more_webcals['cpath'][] = '' //add webcals that will show up only for a particular cpath. $locked_cals[] = 'work'; // Fill in-between the quotes the names of the calendars you wish to hide $locked_cals[] = ''; // unless unlocked by a username/password login. This should be the $locked_cals[] = ''; // exact calendar filename without the .ics suffix. $locked_cals[] = ''; // // add more lines as necessary $locked_map['user1:pass'] = array(''); // Map username:password accounts to locked calendars that should be $locked_map['user2:pass'] = array(''); // unlocked if logged in. Calendar names should be the same as what is $locked_map['user3:pass'] = array(''); // listed in the $locked_cals, again without the .ics suffix. $locked_map['user4:pass'] = array(''); // Example: $locked_map['username:password'] = array('Locked1', 'Locked2'); // add more lines as necessary $apache_map['user1'] = array(''); // Map HTTP authenticated users to specific calendars. Users listed here and $apache_map['user2'] = array(''); // authenticated via HTTP will not see the public calendars, and will not be $apache_map['user3'] = array(''); // given any login/logout options. Calendar names not include the .ics suffix. $apache_map['user4'] = array(''); // Example: $apache_map['username'] = array('Calendar1', 'Calendar2'); // add more lines as necessary ?> --- config.inc.php DELETED --- |
From: <ji...@us...> - 2007-05-23 18:19:36
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22077/phpicalendar Modified Files: index.php Log Message: fix index.php to use default config Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/index.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** index.php 12 Nov 2006 08:07:51 -0000 1.15 --- index.php 23 May 2007 18:19:36 -0000 1.16 *************** *** 2,6 **** if (!isset($ALL_CALENDARS_COMBINED)) $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; ! include "./config.inc.php"; if (isset($_COOKIE['phpicalendar'])) { $phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar'])); --- 2,8 ---- if (!isset($ALL_CALENDARS_COMBINED)) $ALL_CALENDARS_COMBINED = 'all_calendars_combined971'; ! if (!defined('BASE')) define('BASE', './'); ! include_once(BASE.'default_config.php'); ! if (is_file(BASE.'config.inc.php')) include_once(BASE.'config.inc.php'); if (isset($_COOKIE['phpicalendar'])) { $phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar'])); |