function draw_admin() { global $template, $getdate, $cal, $master_array, $is_loged_in; if ($is_loged_in == TRUE) { // Print Calendar Checkboxes $COLUMNS_TO_PRINT = 3; $column = 1; $filelist = availableCalendars('', '', '', true); foreach ($filelist as $file) { if ($column > $COLUMNS_TO_PRINT) { $delete_table .= '</tr>'; $column = 1; } if ($column == 1) { $delete_table .= '<tr>'; } $cal_filename_tmp = getCalendarName($file); $cal_tmp = urlencode($file); $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); $delete_table .= '<td align="left"><input name="delete_calendar[]" value="' . $cal_tmp . '" type="checkbox" />' . $cal_displayname_tmp . '</td>'; $column++; } // Print remaining empty columns if necessary $number_of_columns = count($filelist); while (gettype($number_of_columns / $COLUMNS_TO_PRINT) != "integer") { $delete_table .= '<td> </td>'; $number_of_columns++; } $this->page = str_replace('{DELETE_TABLE}', $delete_table, $this->page); } else { $this->page = preg_replace('!<\\!-- switch logged_in on -->(.*)<\\!-- switch logged_in off -->!is', '', $this->page); $this->page = preg_replace('!<\\!-- switch logged_in2 on -->(.*)<\\!-- switch logged_in2 off -->!is', '', $this->page); } }
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]; $next_year = strtotime("+1 year", strtotime($getdate)); $next_year = date("Ymd", $next_year); $prev_year = strtotime("-1 year", strtotime($getdate)); $prev_year = date("Ymd", $prev_year); $sidebar_date = localizeDate($dateFormat_week_list, strtotime($getdate)); // For the side months 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]; // select for calendars $available = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED); $list_icals = display_ical_list($available); $list_years = list_years(); $list_months = list_months(); $list_weeks = list_weeks(); $list_jumps = list_jumps(); $list_calcolors = '<img src="templates/' . $template . '/images/allday_dot.gif" alt=" " width="11" height="10" border="0" />' . $lang['l_all_day'] . '<br> <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($available, TRUE); // login/logout $is_logged_in = $username != '' && !$invalid_login ? true : false; $show_user_login = !$is_logged_in && $phpiCal_config->allow_login == 'yes'; $login_querys = login_querys(); $logout_querys = logout_querys(); $page = new Page(BASE . 'templates/' . $template . '/year.tpl'); $page->replace_files(array('header' => BASE . 'templates/' . $template . '/header.tpl', 'event_js' => BASE . 'functions/event.js', 'footer' => BASE . 'templates/' . $template . '/footer.tpl', 'sidebar' => BASE . 'templates/' . $template . '/sidebar_year.tpl', 'search_box' => BASE . 'templates/' . $template . '/search_box.tpl'));
exit(error($lang['l_error_remotecal'], $web_cal)); } // Pull the display name off the URL. # $cal_displaynames[] = substr(str_replace('32', ' ', basename($web_cal)), 0, -4); $cal_displaynames[] = substr(basename($web_cal), 0, -4); if (in_array($web_cal, $list_webcals)) { $web_cal = md5($phpiCal_config->salt . $web_cal); } $cals[] = urlencode($web_cal); $subscribe_path = $cal_webcalPrefix; // Add the webcal to the available calendars. $cal_filelist[] = $cal_httpPrefix; } // Process the local calendars. if (count($local_cals) > 0) { $local_cals = availableCalendars($username, $password, $local_cals); foreach ($local_cals as $local_cal) { $cal_displaynames[] = str_replace('32', ' ', getCalendarName($local_cal)); } $cal_filelist = array_merge($cal_filelist, $local_cals); $cals = array_merge($cals, array_map("urlencode", array_map("getCalendarName", $local_cals))); // Set the download and subscribe paths from the config, if there is // only one calendar being displayed and those paths are defined. if (count($local_cals) == 1) { $filename = $local_cals[0]; $add_cpath = ''; if (isset($cpath) && $cpath != '') { $add_cpath = "{$cpath}/"; } if ($phpiCal_config->download_uri == '' && preg_match('/(^\\/|\\.\\.\\/)/', $filename) == 0) { $subscribe_path = 'webcal://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . '/' . $filename;
$weekstart = 1; $unix_time = strtotime($getdate); $today_today = date('Ymd', time() + $second_offset); $next_day = date('Ymd', strtotime("+1 day", $unix_time)); $prev_day = date('Ymd', strtotime("-1 day", $unix_time)); $display_date = localizeDate($dateFormat_day, $unix_time); $sidebar_date = localizeDate($dateFormat_week_list, $unix_time); $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); // select for calendars $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); $list_weeks = list_weeks(); $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); // login/logout $is_logged_in = $username != '' && !$invalid_login ? true : false; $show_user_login = !$is_logged_in && $allow_login == 'yes'; $login_querys = login_querys(); $logout_querys = logout_querys(); $page = new Page(BASE . 'templates/' . $template . '/day.tpl'); $page->replace_files(array('header' => BASE . 'templates/' . $template . '/header.tpl', 'event_js' => BASE . 'functions/event.js', 'footer' => BASE . 'templates/' . $template . '/footer.tpl', 'sidebar' => BASE . 'templates/' . $template . '/sidebar.tpl', 'search_box' => BASE . 'templates/' . $template . '/search_box.tpl')); $page->replace_tags(array('version' => $phpicalendar_version, 'charset' => $charset, 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, 'getcpath' => "&cpath={$cpath}", 'cpath' => $cpath, 'calendar_name' => $cal_displayname, 'current_view' => $current_view, 'display_date' => $display_date, 'sidebar_date' => $sidebar_date, 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', 'show_search' => $show_search, 'next_day' => $next_day, 'prev_day' => $prev_day, 'show_goto' => '', 'show_user_login' => $show_user_login, 'invalid_login' => $invalid_login, 'login_querys' => $login_querys, 'is_logged_in' => $is_logged_in, 'username' => $username, 'logout_querys' => $logout_querys, 'list_icals' => $list_icals, 'list_icals_pick' => $list_icals_pick, 'list_years' => $list_years, 'list_months' => $list_months, 'list_weeks' => $list_weeks, 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, 'style_select' => $style_select, 'l_goprint' => $lang['l_goprint'], 'l_preferences' => $lang['l_preferences'], 'l_calendar' => $lang['l_calendar'], 'l_legend' => $lang['l_legend'], 'l_tomorrows' => $lang['l_tomorrows'], 'l_jump' => $lang['l_jump'], 'l_todo' => $lang['l_todo'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], 'l_month' => $lang['l_month'], 'l_year' => $lang['l_year'], 'l_pick_multiple' => $lang['l_pick_multiple'], 'l_powered_by' => $lang['l_powered_by'], 'l_subscribe' => $lang['l_subscribe'], 'l_download' => $lang['l_download'], 'l_search' => $lang['l_search'], 'l_this_site_is' => $lang['l_this_site_is'])); if ($allow_preferences != 'yes') { $page->replace_tags(array('allow_preferences' => '')); } if ($allow_login == 'yes') { $page->replace_tags(array('l_invalid_login' => $lang['l_invalid_login'], 'l_password' => $lang['l_password'], 'l_username' => $lang['l_username'], 'l_login' => $lang['l_login'], 'l_logout' => $lang['l_logout'])); } if ($show_search != 'yes') {
function availableCalendarNames($username, $password, $cal_filename, $admin = false) { // Grab the available calendar paths. $calendars = availableCalendars($username, $password, $cal_filename, $admin); // Strip the paths off the calendars. foreach (array_keys($calendars) as $key) { $calendars[$key] = getCalendarName($key); } // Return the sorted calendar names. natcasesort($calendars); return $calendars; }
<?php if ($display_ical_list == "yes") { echo "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value+'"; if (isset($query)) { echo $query; } echo "');\">"; // List the calendars. display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); print "</select>"; } ?>
$dir_handle = @opendir(BASE . 'languages/'); $tmp_pref_language = urlencode(ucfirst($language)); $language_select = ''; while ($file = readdir($dir_handle)) { if (substr($file, -8) == ".inc.php") { $language_tmp = urlencode(ucfirst(substr($file, 0, -8))); if ($language_tmp == $cookie_language) { $language_select .= '<option value="' . $language_tmp . '" selected="selected">' . $language_tmp . '</option>'; } else { $language_select .= '<option value="' . $language_tmp . '">' . $language_tmp . '</option>'; } } } closedir($dir_handle); // 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 = 0; $i <= 2400; $i += 100) { $s = sprintf("%04d", $i); $time_select .= '<option value="' . $s . '"'; if ($s == $cookie_time) { $time_select .= ' selected="selected"'; } $time_select .= ">{$s}</option>\n";
$filename = $cal_filename; $subscribe_path = $cal_webcalPrefix; // empty the filelist array $cal_filelist = array(); array_push($cal_filelist, $filename); } else { exit(error($error_remotecal_lang, $HTTP_GET_VARS['cal'])); } } else { $cal_displayname = str_replace('32', ' ', $cal_filename); $cal = urlencode($cal_filename); if (in_array($cal_filename, $blacklisted_cals)) { exit(error($error_restrictedcal_lang, $cal_filename)); } else { if (!isset($filename)) { $cal_filelist = availableCalendars($username, $password, $cal_filename); if (count($cal_filelist) == 1) { $filename = $cal_filelist[0]; } } // Sets the download and subscribe paths from the config if present. if ($download_uri == '' && preg_match('/(^\\/|\\.\\.\\/)/', $filename) == 0) { $subscribe_path = 'webcal://' . $HTTP_SERVER_VARS['SERVER_NAME'] . dirname($HTTP_SERVER_VARS['PHP_SELF']) . '/' . $filename; $download_filename = $filename; } elseif ($download_uri != '') { $newurl = eregi_replace("^(http://)", "", $download_uri); $subscribe_path = 'webcal://' . $newurl . '/' . $cal_filename . '.ics'; $download_filename = $download_uri . '/' . $cal_filename . '.ics'; } else { $subscribe_path = ''; $download_filename = '';
require_once BASE . 'functions/calendar_functions.php'; if ($enable_rss != 'yes') { exit(error($lang['l_rss_notenabled'], $cal, '../')); } 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/')); } else { $default_path = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/rss/')); } } $current_view = "rssindex"; $display_date = "RSS Info"; $rss_list = "<table>\n"; $xml_icon = "<img src = 'xml.gif' alt='xml'>"; $filelist = availableCalendars($username, $password, $ALL_CALENDARS_COMBINED); foreach ($filelist as $file) { // $cal_filename is the filename of the calendar without .ics // $cal is a urlencoded version of $cal_filename // $cal_displayname is $cal_filename with occurrences of "32" replaced with " " if (is_numeric(array_search($file, $cal_filelist))) { $cal_displayname_tmp = $cal_displaynames[array_search($file, $cal_filelist)]; } else { $cal_displayname_tmp = str_replace("32", " ", str_replace(".ics", '', basename($file))); } $rss_list .= '<tr><td rowspan ="3"><font class="V12" color="blue"><b>' . $cal_displayname_tmp . ' ' . $lang['l_calendar'] . '</b></font></td>'; /* Changed to show links without urlencode, but links valid urls */ $rss_list .= "<td>" . $lang['l_day'] . "</td>"; $rss_list .= '<td><a href=' . $default_path . '/rss/rss.php?cal=' . rawurlencode($file) . '&cpath=' . $cpath . '&rssview=day>' . $xml_icon . '</a> RSS 0.91</td>'; $rss_list .= '<td><a href=' . $default_path . '/rss/rss1.0.php?cal=' . rawurlencode($file) . '&cpath=' . $cpath . '&rssview=day>' . $xml_icon . '</a> RSS 1.0</td>'; $rss_list .= '<td><a href=' . $default_path . '/rss/rss2.0.php?cal=' . rawurlencode($file) . '&cpath=' . $cpath . '&rssview=day>' . $xml_icon . '</a> RSS 2.0</td></tr>';
public function _phpicalendar($current_view) { $default_cal_alba = $this->archivo; //substr($this->archivo,0, -4); // $default_cal_alba = BASE.'calendars/'.'Home.ics'; // echo substr($this->archivo,0, -4); // echo $this->archivo; // print_r( file($this->archivo)); $context = sfContext::getInstance(); require_once BASE . 'ical_parser.php'; require_once BASE . 'list_functions.php'; require_once BASE . 'template.php'; $context->getResponse()->addStylesheet("cal/templates/{$template}/default", '', array()); $context->getResponse()->addJavascript("cal/event"); // if (isset($_GET['jumpto_day'])) { // $jumpto_day_time = strtotime($_GET['jumpto_day']); // if ($jumpto_day_time == -1) { // $getdate = date('Ymd', time() + $second_offset); // } else { // $getdate = date('Ymd', $jumpto_day_time); // } // } //datos para construir las urls $modulo = $context->getRequest()->getParameter('module'); $action = $context->getRequest()->getParameter('action'); //sacado de arriba para prueba if (!$this->date) { $getdate = date('Ymd', time() + $second_offset); } else { $getdate = $this->date; } // $current_view = 'day'; // header("Content-Type: text/html; charset=$charset"); if ($minical_view == 'current') { $minical_view = $current_view; } if ($current_view == 'month') { // from month.php 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); $tomorrows_date = date('Ymd', strtotime("+1 day", $unix_time)); $yesterdays_date = date('Ymd', strtotime("-1 day", $unix_time)); $sidebar_date = localizeDate($dateFormat_week_list, $unix_time, $globals_local); // find out next month $next_month_month = $this_month + 1 == '13' ? '1' : $this_month + 1; $next_month_day = $this_day; $next_month_year = $next_month_month == '1' ? $this_year + 1 : $this_year; while (!checkdate($next_month_month, $next_month_day, $next_month_year)) { $next_month_day--; } $next_month_time = mktime(0, 0, 0, $next_month_month, $next_month_day, $next_month_year); // find out last month $prev_month_month = $this_month - 1 == '0' ? '12' : $this_month - 1; $prev_month_day = $this_day; $prev_month_year = $prev_month_month == '12' ? $this_year - 1 : $this_year; while (!checkdate($prev_month_month, $prev_month_day, $prev_month_year)) { $prev_month_day--; } $prev_month_time = mktime(0, 0, 0, $prev_month_month, $prev_month_day, $prev_month_year); $next_month = date("Ymd", $next_month_time); $prev_month = date("Ymd", $prev_month_time); $display_date = localizeDate($dateFormat_month, $unix_time, $globals_local); $parse_month = date("Ym", $unix_time); $first_of_month = $this_year . $this_month . "01"; $start_month_day = dateOfWeek($first_of_month, $week_start_day); $thisday2 = localizeDate($dateFormat_week_list, $unix_time, $globals_local); $num_of_events2 = 0; $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); $list_weeks = list_weeks(); $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); } elseif ($current_view == 'year') { // from year.php 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]; $next_year = strtotime("+1 year", strtotime($getdate)); $next_year = date("Ymd", $next_year); $prev_year = strtotime("-1 year", strtotime($getdate)); $prev_year = date("Ymd", $prev_year); $sidebar_date = localizeDate($dateFormat_day, strtotime($getdate), $globals_local); // For the side months 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]; } $weekstart = 1; $unix_time = strtotime($getdate); $today_today = date('Ymd', time() + $second_offset); $next_day = date('Ymd', strtotime("+1 day", $unix_time)); $prev_day = date('Ymd', strtotime("-1 day", $unix_time)); //from week.php $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); // $globals_local = array(); // $globals_local['daysofweek_lang'] = $daysofweek_lang; // $globals_local['daysofweekshort_lang'] = $daysofweekshort_lang; $globals_local['daysofweekreallyshort_lang'] = $daysofweekreallyshort_lang; // $globals_local['monthsofyear_lang'] = $monthsofyear_lang; // $globals_local['monthsofyearshort_lang'] = $monthsofyearshort_lang; // $globals_local['monthsofyear_lang'] = $monthsofyear_lang; $sidebar_date = localizeDate($dateFormat_week_list, $unix_time, $globals_local); $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); $end_week_time = $start_week_time + ($week_length - 1) * 25 * 60 * 60; $start_week = localizeDate($dateFormat_week, $start_week_time, $globals_local); $end_week = localizeDate($dateFormat_week, $end_week_time, $globals_local); switch ($current_view) { case "week": $display_date = "{$start_week} - {$end_week}"; break; case "day": case "month": default: $display_date = localizeDate($dateFormat_day, $unix_time, $globals_local); } // select for calendars /* $list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); $list_years = list_years(); $list_months = list_months(); $list_weeks = list_weeks(); $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); $list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE); */ // login/logout /* $is_logged_in = ($username != '' && !$invalid_login) ? true : false; $show_user_login = (!$is_logged_in && $allow_login == 'yes'); $login_querys = login_querys(); $logout_querys = logout_querys(); */ //$template = "red"; $page = new Page(BASE . 'templates/' . $template . "/{$current_view}.tpl"); $page->cpath = $cpath; $page->template_started = $template_started; $page->enable_rss = $enable_rss; $page->php_started = $php_started; $page->daysofweekshort_lang = $daysofweekshort_lang; $page->dateFormat_week_list = $dateFormat_week_list; $page->daysofweekreallyshort_lang = $daysofweekreallyshort_lang; $page->month_event_lines = $month_event_lines; $page->minical_view = $minical_view; $page->current_view = $current_view; $page->dateFormat_month; //ver = $dateFormat_month //ver; $page->this_month = $this_month; $page->this_year = $this_year; $page->show_todos = $show_todos; $page->show_completed = $show_completed; $page->tomorrows_events_lines = $tomorrows_events_lines; $page->next_day = $next_day; $page->week_length = $week_length; $page->day_start = $day_start; $page->timeFormat_small = $timeFormat_small; $page->gridLength = $gridLength; $page->day_array = $day_array; $page->start_week_time = $start_week_time; $page->unique_colors = $unique_colors; $page->week_start_day = $week_start_day; $page->the_arr = $the_arr; $page->lang = $lang; $page->week_end = $week_end; $page->week_start = $week_start; $page->timeFormat = $timeFormat; $page->dateFormat_day = $dateFormat_day; $page->printview = $printview; $page->daysofweek_lang = $daysofweek_lang; $page->is_loged_in = $is_loged_in; $page->template = $template; $page->master_array = $master_array; //print_r ($master_array);echo "here";die; $page->getdate = $getdate; $page->cal = $cal; $page->ALL_CALENDARS_COMBINED = $ALL_CALENDARS_COMBINED; $page->subscribe_path = $subscribe_path; $page->download_filename = $download_filename; $page->globals = $globals_local; // foreach ($page as $key => &$var) { // echo $key .'=> ' .$var; // echo "<br/>"; // } // die; $relativeUrlRoot = sfContext::getInstance()->getRequest()->getRelativeUrlRoot(); // echo $relativeUrlRoot;die; // $page->replace_files(array( // 'header' => BASE.'templates/'.$template.'/header.tpl', // 'event_js' => BASE.'event.js', // 'footer' => BASE.'templates/'.$template.'/footer.tpl', // 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', // 'search_box' => BASE.'templates/'.$template.'/search_box.tpl' // )); $url_nueva = sfContext::getInstance()->getRequest()->getUri(); $url_nueva = str_replace("/view/" . $context->getRequest()->getParameter('view') . "/date/" . $getdate, "", $url_nueva); $page->replace_files(array('header' => '', 'event_js' => "", 'footer' => '', 'sidebar' => '', 'search_box' => '', 'calendar_nav' => '')); $prefixUri = sfContext::getInstance()->getRequest()->getUriPrefix(); $globals = array("base" => $relativeUrlRoot . "/images/cal", 'day_view_action' => $url_nueva . '/' . $this->verPorDia, 'week_view_action' => $url_nueva . "/" . $this->verPorSemana, 'month_view_action' => $url_nueva . '/' . $this->verPorMes, 'year_view_action' => $url_nueva . '/' . $this->verPorAnio, 'version' => $phpicalendar_version, 'charset' => $charset, 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, 'getcpath' => "&cpath={$cpath}", 'cpath' => $cpath, 'calendar_name' => $cal_displayname, 'current_view' => $current_view, 'display_date' => $display_date, 'sidebar_date' => $sidebar_date, 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', 'show_search' => $show_search, 'next_day' => $next_day, 'prev_day' => $prev_day, 'show_goto' => '', 'show_user_login' => $show_user_login, 'invalid_login' => $invalid_login, 'login_querys' => $login_querys, 'is_logged_in' => $is_logged_in, 'username' => $username, 'logout_querys' => $logout_querys, 'list_icals' => $list_icals, 'list_icals_pick' => $list_icals_pick, 'list_years' => $list_years, 'list_months' => $list_months, 'list_weeks' => $list_weeks, 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, 'style_select' => $style_select, 'l_goprint' => $lang['l_goprint'], 'l_preferences' => $lang['l_preferences'], 'l_calendar' => $lang['l_calendar'], 'l_legend' => $lang['l_legend'], 'l_tomorrows' => $lang['l_tomorrows'], 'l_jump' => $lang['l_jump'], 'l_todo' => $lang['l_todo'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], 'l_month' => $lang['l_month'], 'l_year' => $lang['l_year'], 'l_pick_multiple' => $lang['l_pick_multiple'], 'l_powered_by' => $lang['l_powered_by'], 'l_subscribe' => $lang['l_subscribe'], 'l_download' => $lang['l_download'], 'l_search' => $lang['l_search'], 'l_this_site_is' => $lang['l_this_site_is']); if ($current_view == 'month') { $globals['next_month'] = $next_month; $globals['prev_month'] = $prev_month; $globals['l_this_months'] = $lang['l_this_months']; } elseif ($current_view == 'year') { $globals['next_year'] = $next_year; $globals['prev_year'] = $prev_year; $globals['l_this_year'] = $lang['l_this_year']; } elseif ($current_view == 'week') { $globals['next_week'] = $next_week; $globals['prev_week'] = $prev_week; } //print_r($globals); $page->replace_tags($globals); //echo $page->output(); die; if ($allow_preferences != 'yes') { $page->replace_tags(array('allow_preferences' => '')); } if ($allow_login == 'yes') { $page->replace_tags(array('l_invalid_login' => $lang['l_invalid_login'], 'l_password' => $lang['l_password'], 'l_username' => $lang['l_username'], 'l_login' => $lang['l_login'], 'l_logout' => $lang['l_logout'])); } if ($show_search != 'yes') { $page->nosearch($page); } switch ($current_view) { case 'month': if ($this_months_events == 'yes') { $page->monthbottom($page); } else { $page->nomonthbottom($page); } break; case 'day': $page->draw_day($page); break; case 'week': $page->draw_week($page); break; case 'year': break; } $page->tomorrows_events($page); $page->get_vtodo($page); // $page->tomorrows_events($page); // $page->get_vtodo($page); $page->draw_subscribe($page); $this->output = $page->output(); }