|
From: <cl...@us...> - 2003-06-30 22:46:16
|
Update of /cvsroot/phpicalendar/phpicalendar
In directory sc8-pr-cvs1:/tmp/cvs-serv28120
Modified Files:
config.inc.php day.php month.php preferences.php week.php
Log Message:
Multiple Calendar support added.
Index: config.inc.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/config.inc.php,v
retrieving revision 1.102
retrieving revision 1.103
diff -C2 -d -r1.102 -r1.103
*** config.inc.php 30 May 2003 17:58:55 -0000 1.102
--- config.inc.php 30 Jun 2003 22:46:12 -0000 1.103
***************
*** 9,16 ****
$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 = 'Home'; // Exact filename of calendar without .ics
! $language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese'
! $week_start_day = 'Sunday'; // Day of the week your week starts on
! $day_start = '0700'; // Start time for day grid
$gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred
$num_years = '3'; // Number of years to display in 'Jump to'
--- 9,16 ----
$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_calenders_combined971'; // Exact filename of calendar without .ics. Or set to 'all_calenders_combined971' to open all calenders combined into one.
! $language = 'Esperanto'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto'
! $week_start_day = 'Saturday'; // Day of the week your week starts on
! $day_start = '0800'; // Start time for day grid
$gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred
$num_years = '3'; // Number of years to display in 'Jump to'
***************
*** 48,52 ****
// Administration settings
! $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 = 'ftp'; // 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.
--- 48,52 ----
// Administration settings
! $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 = 'ftp'; // 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.
Index: day.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -C2 -d -r1.91 -r1.92
*** day.php 26 Jun 2003 18:08:45 -0000 1.91
--- day.php 30 Jun 2003 22:46:12 -0000 1.92
***************
*** 16,20 ****
$weekstart = 1;
$unix_time = strtotime($getdate);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time));
$yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time));
--- 16,20 ----
$weekstart = 1;
$unix_time = strtotime($getdate);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time));
$yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time));
***************
*** 108,112 ****
foreach($master_array[($getdate)]['-1'] as $allday) {
echo "<tr>\n";
! echo '<td valign="top" align="center" class="eventbg">';
openevent("$calendar_name",
"",
--- 108,115 ----
foreach($master_array[($getdate)]['-1'] as $allday) {
echo "<tr>\n";
! $event_calno = $allday['calnumber'];
! if ($event_calno < 1) $event_calno=1;
! if ($event_calno > 7) $event_calno=7;
! echo '<td valign="top" align="center" class="eventbg_'.$event_calno.'">';
openevent("$calendar_name",
"",
***************
*** 246,251 ****
$event_start = date ($timeFormat, $event_start);
$event_end = date ($timeFormat, $event_end);
! echo '<td rowspan="' . $event_length[$i]['length'] . '" colspan="' . $drawWidth . '" align="left" valign="top" class="eventbg2">'."\n";
echo '<table width="100%" border="0" cellspacing="0" cellpadding="2">'."\n";
echo '<tr>'."\n";
--- 249,257 ----
$event_start = date ($timeFormat, $event_start);
$event_end = date ($timeFormat, $event_end);
+ $event_calno = $this_time_arr[($event_length[$i]['key'])]['calnumber'];
+ if ($event_calno < 1) $event_calno=1;
+ if ($event_calno > 7) $event_calno=7;
! echo '<td rowspan="' . $event_length[$i]['length'] . '" colspan="' . $drawWidth . '" align="left" valign="top" class="eventbg2_'.$event_calno.'">'."\n";
echo '<table width="100%" border="0" cellspacing="0" cellpadding="2">'."\n";
echo '<tr>'."\n";
***************
*** 256,261 ****
echo '<table width="100%" border="0" cellpadding="1" cellspacing="0">'."\n";
echo '<tr>'."\n";
! echo '<td class="eventbg">';
! openevent("$calendar_name",
"$event_start",
"$event_end",
--- 262,269 ----
echo '<table width="100%" border="0" cellpadding="1" cellspacing="0">'."\n";
echo '<tr>'."\n";
! echo '<td class="eventbg_'.$event_calno.'">';
! // Todo: keep track of where the event comes from, and indicate that to openevent instead of "all_calenders_combined971"
! if ($cal == 'all_calenders_combined971') $calendar_name2=$cal; else $calendar_name2=$calendar_name;
! openevent("$calendar_name2",
"$event_start",
"$event_end",
Index: month.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** month.php 26 Jun 2003 18:08:45 -0000 1.90
--- month.php 30 Jun 2003 22:46:12 -0000 1.91
***************
*** 12,16 ****
$unix_time = strtotime($getdate);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time));
$yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time));
--- 12,16 ----
$unix_time = strtotime($getdate);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time));
$yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time));
Index: preferences.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/preferences.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** preferences.php 30 May 2003 00:45:20 -0000 1.28
--- preferences.php 30 Jun 2003 22:46:12 -0000 1.29
***************
*** 65,69 ****
}
-
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
--- 65,68 ----
***************
*** 72,76 ****
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
! <title><?php echo "$cal $calendar_lang - $preferences_lang"; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>">
</head>
--- 71,75 ----
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
! <title><?php echo "$calendar_lang - $preferences_lang"; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>">
</head>
***************
*** 185,189 ****
}
}
! }
foreach($list_webcals as $cal_tmp) {
if ($cal_tmp != '') {
--- 184,196 ----
}
}
! }
! // add option to open all (non-web) calenders together
! // Todo: add $all_calenders_combined_lang (plural) in the language-specific files and use it here
! if ($cookie_calendar == 'all_calenders_combined971') {
! print "<option value=\"all_calenders_combined971\" selected>$all_cal_comb_lang</option>\n";
! } else {
! print "<option value=\"all_calenders_combined971\">$all_cal_comb_lang</option>\n";
! }
!
foreach($list_webcals as $cal_tmp) {
if ($cal_tmp != '') {
Index: week.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -C2 -d -r1.91 -r1.92
*** week.php 26 Jun 2003 18:08:45 -0000 1.91
--- week.php 30 Jun 2003 22:46:12 -0000 1.92
***************
*** 10,14 ****
$unix_time = strtotime($getdate);
$thisday2 = localizeDate($dateFormat_week_list, $unix_time);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$next_week = date("Ymd", strtotime("+1 week", $unix_time));
$prev_week = date("Ymd", strtotime("-1 week", $unix_time));
--- 10,14 ----
$unix_time = strtotime($getdate);
$thisday2 = localizeDate($dateFormat_week_list, $unix_time);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$next_week = date("Ymd", strtotime("+1 week", $unix_time));
$prev_week = date("Ymd", strtotime("-1 week", $unix_time));
***************
*** 179,183 ****
foreach($master_array[($thisday)]["-1"] as $allday) {
echo "<tr>\n";
! echo "<td valign=\"top\" align=\"center\" class=\"eventbg\">";
openevent("$calendar_name",
"",
--- 179,186 ----
foreach($master_array[($thisday)]["-1"] as $allday) {
echo "<tr>\n";
! $event_calno = $allday['calnumber'];
! if ($event_calno < 1) $event_calno=1;
! if ($event_calno > 7) $event_calno=7;
! echo '<td valign="top" align="center" class="eventbg_'.$event_calno.'">';
openevent("$calendar_name",
"",
***************
*** 297,301 ****
$event_start = $this_time_arr[($event_length[$thisday][$i]["key"])]["start_unixtime"];
$event_start = date ($timeFormat, $event_start);
! echo "<td rowspan=\"" . $event_length[$thisday][$i]["length"] . "\" colspan=\"" . $drawWidth . "\" align=\"left\" valign=\"top\" class=\"eventbg2week\">\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "<tr>\n";
--- 300,307 ----
$event_start = $this_time_arr[($event_length[$thisday][$i]["key"])]["start_unixtime"];
$event_start = date ($timeFormat, $event_start);
! $event_calno = $this_time_arr[($event_length[$thisday][$i]['key'])]['calnumber'];
! if ($event_calno < 1) $event_calno=1;
! if ($event_calno > 7) $event_calno=7;
! echo '<td rowspan="' . $event_length[$thisday][$i]['length'] . '" colspan="' . $drawWidth . '" align="left" valign="top" class="eventbg2week_'.$event_calno.'">'."\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "<tr>\n";
***************
*** 306,312 ****
echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n";
echo "<tr>\n";
! echo "<td class=\"eventbg\">";
$event_end = $this_time_arr[($event_length[$thisday][$i]["key"])]["end_unixtime"];
$event_end = date ($timeFormat, $event_end);
openevent("$calendar_name2",
"$event_start",
--- 312,320 ----
echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n";
echo "<tr>\n";
! echo '<td class="eventbg_'.$event_calno.'">';
$event_end = $this_time_arr[($event_length[$thisday][$i]["key"])]["end_unixtime"];
$event_end = date ($timeFormat, $event_end);
+ // Todo: keep track of where the event comes from, and indicate that to openevent instead of "all_calenders_combined971"
+ if ($cal == 'all_calenders_combined971') $calendar_name2=$cal; else $calendar_name2=$calendar_name;
openevent("$calendar_name2",
"$event_start",
|