From: <ji...@us...> - 2008-12-20 04:24:46
|
Update of /cvsroot/phpicalendar/phpicalendar In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11521 Modified Files: preferences.php Log Message: misc error warnings and notices Index: preferences.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/preferences.php,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** preferences.php 13 Dec 2008 23:42:31 -0000 1.63 --- preferences.php 20 Dec 2008 04:24:42 -0000 1.64 *************** *** 1,8 **** <?php - define('BASE','./'); require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/template.php'); ! $display_date = $preferences_lang; if ($phpiCal_config->allow_preferences != 'yes') { --- 1,8 ---- <?php define('BASE','./'); + $current_view = 'preferences'; require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/template.php'); ! $display_date = $lang['l_preferences']; if ($phpiCal_config->allow_preferences != 'yes') { *************** *** 11,15 **** $current_view = "preferences"; ! $back_page = BASE.$default_view.'.php?cal='.$cal.'&getdate='.$getdate.'&cpath='.$cpath; if ($phpiCal_config->allow_preferences == 'no') header("Location: $back_page"); --- 11,15 ---- $current_view = "preferences"; ! $back_page = BASE.$phpiCal_config->default_view.'.php?cal='.$cal.'&getdate='.$getdate.'&cpath='.$cpath; if ($phpiCal_config->allow_preferences == 'no') header("Location: $back_page"); *************** *** 21,25 **** $startdays = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); - $cpath = $_REQUEST['cpath']; if ($action == 'setcookie') { --- 21,24 ---- *************** *** 31,35 **** $cookie_startday = $_POST['cookie_startday']; $cookie_time = $_POST['cookie_time']; ! $cookie_unset = $_POST['unset']; $the_cookie = array ("cookie_language" => "$cookie_language", "cookie_calendar" => "$cookie_calendar", "cookie_view" => "$cookie_view", "cookie_startday" => "$cookie_startday", "cookie_style" => "$cookie_style", "cookie_time" => "$cookie_time", "cookie_cpath"=>"$cookie_cpath"); $the_cookie = serialize($the_cookie); --- 30,34 ---- $cookie_startday = $_POST['cookie_startday']; $cookie_time = $_POST['cookie_time']; ! $cookie_unset = @$_POST['unset']; $the_cookie = array ("cookie_language" => "$cookie_language", "cookie_calendar" => "$cookie_calendar", "cookie_view" => "$cookie_view", "cookie_startday" => "$cookie_startday", "cookie_style" => "$cookie_style", "cookie_time" => "$cookie_time", "cookie_cpath"=>"$cookie_cpath"); $the_cookie = serialize($the_cookie); *************** *** 86,89 **** --- 85,89 ---- $dir_handle = @opendir(BASE.'languages/'); $tmp_pref_language = urlencode(ucfirst($language)); + $language_select = ''; while ($file = readdir($dir_handle)) { if (substr($file, -8) == ".inc.php") { *************** *** 99,111 **** // select for calendars ! $calendar_select = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED),TRUE); $calendar_select .="<option value=\"$phpiCal_config->ALL_CALENDARS_COMBINED\">$all_cal_comb_lang</option>"; $calendar_select = str_replace("<option value=\"$cookie_calendar\">","<option value=\"$cookie_calendar\" selected='selected'>",$calendar_select); // select for dayview ! $view_select = ($default_view == 'day') ? '<option value="day" selected="selected">{L_DAY}</option>' : '<option value="day">{L_DAY}</option>'; ! $view_select .= ($default_view == 'week') ? '<option value="week" selected="selected">{L_WEEK}</option>' : '<option value="week">{L_WEEK}</option>'; ! $view_select .= ($default_view == 'month') ? '<option value="month" selected="selected">{L_MONTH}</option>' : '<option value="month">{L_MONTH}</option>'; // select for time for ($i = 000; $i <= 1200; $i += 100) { $s = sprintf("%04d", $i); --- 99,112 ---- // select for calendars ! $calendar_select = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED),TRUE); $calendar_select .="<option value=\"$phpiCal_config->ALL_CALENDARS_COMBINED\">$all_cal_comb_lang</option>"; $calendar_select = str_replace("<option value=\"$cookie_calendar\">","<option value=\"$cookie_calendar\" selected='selected'>",$calendar_select); // select for dayview ! $view_select = ($phpiCal_config->default_view == 'day') ? '<option value="day" selected="selected">{L_DAY}</option>' : '<option value="day">{L_DAY}</option>'; ! $view_select .= ($phpiCal_config->default_view == 'week') ? '<option value="week" selected="selected">{L_WEEK}</option>' : '<option value="week">{L_WEEK}</option>'; ! $view_select .= ($phpiCal_config->default_view == 'month') ? '<option value="month" selected="selected">{L_MONTH}</option>' : '<option value="month">{L_MONTH}</option>'; // select for time + $time_select = ''; for ($i = 000; $i <= 1200; $i += 100) { $s = sprintf("%04d", $i); *************** *** 119,122 **** --- 120,124 ---- // select for day of week $i=0; + $startday_select = ''; foreach ($daysofweek_lang as $daysofweek) { if ($startdays[$i] == $cookie_startday) { *************** *** 129,132 **** --- 131,135 ---- $dir_handle = @opendir(BASE.'templates/'); + $style_select = ''; while ($file = readdir($dir_handle)) { if (($file != ".") && ($file != "..") && ($file != "CVS")) { *************** *** 153,157 **** 'charset' => $phpiCal_config->charset, 'template' => $phpiCal_config->template, ! 'default_path' => '', 'cpath' => $cpath, 'cal' => $cal, --- 156,160 ---- 'charset' => $phpiCal_config->charset, 'template' => $phpiCal_config->template, ! 'default_path' => $phpiCal_config->default_path, 'cpath' => $cpath, 'cal' => $cal, |