From 115d6920b91245ea2e94fa170cd36b748188a9c8 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 18 Nov 2002 02:38:06 +0000 Subject: Formatted Prefs for languages, cleaned up look and feel. --- preferences.php | 284 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 160 insertions(+), 124 deletions(-) (limited to 'preferences.php') diff --git a/preferences.php b/preferences.php index 83363cd..940cc3c 100644 --- a/preferences.php +++ b/preferences.php @@ -92,130 +92,166 @@ include(BASE.'functions/ical_parser.php');
-
'; - print "\n"; - echo '

'; - - // Begin Calendar Selection - // - echo 'Select your default calendar:

'; - print "\n"; - echo '

'; - - // Begin View Selection - // - echo 'Select your default view:

'; - print "\n"; - echo '

'; - - // Begin Time Selection - // - echo 'Select your default start time:

'; - print "\n"; - echo '

'; - - // Begin Day Start Selection - // - echo 'Select your start day of week:

'; - print "\n"; - echo '

'; - - // Begin Style Selection - // - echo 'Select your default style:

'; - print "\n"; - echo '

'; - #echo '
'; - echo ''; - echo '
'; - ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ \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 == $cookie_language) { + print "\n"; + } else { + print "\n"; + } + } + } + closedir($dir_handle); + print "\n"; + ?> +
+ \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 == $cookie_calendar) { + print "\n"; + } else { + print "\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 "\n"; + } else { + print "\n"; + } + } + } + closedir($dir_handle); + print "\n"; + ?> +
+ \n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + ?> +
+ \n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + ?> +
+ \n"; + $i=0; + foreach ($daysofweek_lang as $daysofweek) { + if ($startdays[$i] == "$cookie_startday") { + print "\n"; + } else { + print "\n"; + } + $i++; + } + print "\n"; + ?> +
+ \n"; + $dir_handle = @opendir(BASE.'styles/'); + while ($file = readdir($dir_handle)) { + if (($file != ".") && ($file != "..") && ($file != "CVS")) { + if (!is_file($file)) { + $file = ucfirst($file); + if ($file == "$cookie_style") { + print "\n"; + } else { + print "\n"; + } + } + } + } + closedir($dir_handle); + print "\n"; + ?> +
 Set Cookie
+
-- cgit v1.2.3