diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-11-10 03:24:26 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-11-10 03:24:26 +0000 |
commit | 01ac49f5d81baac6afdb519d313aeed1a2009d6f (patch) | |
tree | ba51d30b8c067c96c0b9ddc67141b65c1256ffb0 | |
parent | b0bc5eb45cabaa3f96670f8726718886fd1dff90 (diff) | |
download | phpicalendar-01ac49f5d81baac6afdb519d313aeed1a2009d6f.tar.gz phpicalendar-01ac49f5d81baac6afdb519d313aeed1a2009d6f.tar.bz2 phpicalendar-01ac49f5d81baac6afdb519d313aeed1a2009d6f.zip |
More work on Preferences.
-rw-r--r-- | functions/ical_parser.php | 2 | ||||
-rw-r--r-- | languages/english.inc.php | 3 | ||||
-rw-r--r-- | month_bottom.php | 2 | ||||
-rw-r--r-- | preferences.php | 102 |
4 files changed, 98 insertions, 11 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 3a245bb..4521988 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -136,7 +136,7 @@ if ($parse_file) { if (!isset($description)) $description = ''; $mArray_begin = mktime (0,0,0,1,1,$this_year); - $mArray_end = mktime (0,0,0,1,10,($this_year + 1)); + $mArray_end = mktime (0,0,0,1,12,($this_year + 1)); //if ((!$allday_end) && (!$end_time)) $allday_end = $mArray_end; if (isset($start_time) && isset($end_time)) { diff --git a/languages/english.inc.php b/languages/english.inc.php index f5fd254..61c41ac 100644 --- a/languages/english.inc.php +++ b/languages/english.inc.php @@ -1,7 +1,7 @@ <?php // English language include -// For version 0.8 PHP iCalendar +// For version 0.9 PHP iCalendar // // Translation by Chad Little (chad@chadsdomain.com) // @@ -25,7 +25,6 @@ $last_year_lang = 'Previous Year'; $subscribe_lang = 'Subscribe'; $download_lang = 'Download'; $powered_by_lang = 'Powered by'; -$version_lang = '0.8'; $event_lang = 'Event'; $event_start_lang = 'Start Time'; $event_end_lang = 'End Time'; diff --git a/month_bottom.php b/month_bottom.php index d7210d7..f48e7b6 100644 --- a/month_bottom.php +++ b/month_bottom.php @@ -357,7 +357,7 @@ $dayofmonth = strtotime ($key); $dayofmonth = localizeDate ($dateFormat_week_list, $dayofmonth); $i = 0; - if ($getdate == $key) { + if ($today_today == $key) { $fontclass="class=\"G10BOLD\""; } else { $fontclass="class=\"G10B\""; diff --git a/preferences.php b/preferences.php index 65b9c4e..93d9788 100644 --- a/preferences.php +++ b/preferences.php @@ -57,13 +57,101 @@ if ($allow_preferences == 'no') header("Location: $default_view"); <tr> <td width="2%"></td> <td width="98%" valign="top" align="left"> - <br> - Select your default language:<br> - <?php include (BASE.'functions/list_languages.php'); ?> - <br> - Select your default calendar:<br> - <?php include (BASE.'functions/list_icals.php'); ?> - <br> + <form action="preferences.php?action=setcookie"> + <?php + + + + + // Begin Language Selection + // + echo 'Select your default language:<br><br>'; + print "<select name=\"cookie_language\" class=\"query_style\">\n"; + $dir_handle = @opendir(BASE.'languages/'); + $tmp_pref_language = urlencode(ucfirst($language)); + while ($file = readdir($dir_handle)) { + if (substr($file, -8) == ".inc.php") { + $language_tmp = urlencode(ucfirst(substr($file, 0, -8))); + if ($language_tmp == $tmp_pref_language) { + print "<option value=\"$language_tmp\" selected>in $language_tmp</option>\n"; + } else { + print "<option value=\"$language_tmp\">in $language_tmp</option>\n"; + } + } + } + closedir($dir_handle); + print "</select>\n"; + echo '<br><br>'; + + // Begin Calendar Selection + // + echo 'Select your default calendar:<br><br>'; + print "<select name=\"cookie_calendar\" class=\"query_style\">\n"; + $dir_handle = @opendir($calendar_path) or die(error(sprintf($error_path_lang, $calendar_path), $cal_filename)); + while ($file = readdir($dir_handle)) { + if (substr($file, -4) == ".ics") { + $cal_filename_tmp = substr($file,0,-4); + $cal_tmp = urlencode($cal_filename_tmp); + $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); + if (!in_array($cal_filename_tmp, $blacklisted_cals)) { + if ($cal_tmp == $cal) { + print "<option value=\"$cal_tmp\" selected>$cal_displayname_tmp $calendar_lang</option>\n"; + } else { + print "<option value=\"$cal_tmp\">$cal_displayname_tmp $calendar_lang</option>\n"; + } + } + } + } + foreach($list_webcals as $cal_tmp) { + if ($cal_tmp != '') { + $cal_displayname_tmp = basename($cal_tmp); + $cal_displayname_tmp = str_replace("32", " ", $cal_displayname_tmp); + $cal_displayname_tmp = substr($cal_displayname_tmp,0,-4); + $cal_encoded_tmp = urlencode($cal_tmp); + if ($cal_tmp == $cal_httpPrefix || $cal_tmp == $cal_webcalPrefix) { + print "<option value=\"$cal_encoded_tmp\" selected>$cal_displayname_tmp Webcal</option>\n"; + } else { + print "<option value=\"$cal_encoded_tmp\">$cal_displayname_tmp Webcal</option>\n"; + } + } + } + closedir($dir_handle); + print "</select>\n"; + echo '<br><br>'; + + // Begin Style Selection + // + echo 'Select your default view:<br><br>'; + print "<select name=\"cookie_view\" class=\"query_style\">\n"; + print "<option value=\"day\">$day_lang</option>\n"; + print "<option value=\"week\">$week_lang</option>\n"; + print "<option value=\"month\">$month_lang</option>\n"; + print "</select>\n"; + echo '<br><br>'; + + // Begin Style Selection + // + echo 'Select your default style:<br><br>'; + print "<select name=\"cookie_style\" class=\"query_style\">\n"; + $dir_handle = @opendir(BASE.'languages/'); + $tmp_pref_language = urlencode(ucfirst($language)); + while ($file = readdir($dir_handle)) { + if (substr($file, -8) == ".inc.php") { + $language_tmp = urlencode(ucfirst(substr($file, 0, -8))); + if ($language_tmp == $tmp_pref_language) { + print "<option value=\"$language_tmp\" selected>in $language_tmp</option>\n"; + } else { + print "<option value=\"$language_tmp\">in $language_tmp</option>\n"; + } + } + } + closedir($dir_handle); + print "</select>\n"; + echo '<br><br>'; + + echo '<button type="submit" name="set" value="true" class=\"query_style\"><font class="G10">Set Cookie</font></button>'; + echo '</form><br>'; + ?> </td> </tr> </table> |