From: <ji...@us...> - 2006-03-21 10:28:32
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26562/phpicalendar Modified Files: README print.php year.php Log Message: add year printview, fix misc bugs Index: README =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/README,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** README 18 Mar 2006 08:02:30 -0000 1.99 --- README 21 Mar 2006 09:52:29 -0000 1.100 *************** *** 83,93 **** -------- cvs allow image tags in events use real calendar names instead of filenames ! -bug fixes Suppress lots of warnings and notices all combined selection of webcals passing of webcals in calendar links More items controlled by language files 2.21 -patched security hole --- 83,98 ---- -------- cvs + 2.22rc1 allow image tags in events use real calendar names instead of filenames ! Year printview ! Added sidebar to year view ! -bug fixes from 2.21 Suppress lots of warnings and notices all combined selection of webcals passing of webcals in calendar links More items controlled by language files + Problem with webcals with encoded spaces in URL + Fixes related to various recurring event combinations 2.21 -patched security hole Index: print.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/print.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** print.php 1 Dec 2005 06:25:09 -0000 1.37 --- print.php 21 Mar 2006 09:52:29 -0000 1.38 *************** *** 2,10 **** define('BASE', './'); ! require_once(BASE.'functions/ical_parser.php'); ! require_once(BASE.'functions/list_functions.php'); ! require_once(BASE.'functions/template.php'); ! header("Content-Type: text/html; charset=$charset"); ! $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); $end_week_time = $start_week_time + (6 * 25 * 60 * 60); --- 2,8 ---- define('BASE', './'); ! require_once(BASE.'functions/date_functions.php'); ! require_once(BASE.'functions/init.inc.php'); ! $current_view ='print'; $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); $end_week_time = $start_week_time + (6 * 25 * 60 * 60); *************** *** 13,17 **** $events_week = 0; $unix_time = strtotime($getdate); ! if (!$printview) $printview = $_GET['printview']; if ($printview == 'day') { --- 11,16 ---- $events_week = 0; $unix_time = strtotime($getdate); ! $printview = 'month'; ! if (isset($_GET['printview'])) $printview = $_GET['printview']; if ($printview == 'day') { *************** *** 35,39 **** --- 34,49 ---- $week_start = ''; $week_end = ''; + } elseif ($printview == 'year') { + $display_date = localizeDate ($dateFormat_year, strtotime($getdate)); + $next = date("Ymd", strtotime("+1 year", $unix_time)); + $prev = date("Ymd", strtotime("-1 year", $unix_time)); + $week_start = ''; + $week_end = ''; } + require_once(BASE.'functions/ical_parser.php'); + require_once(BASE.'functions/list_functions.php'); + require_once(BASE.'functions/template.php'); + header("Content-Type: text/html; charset=$charset"); + $page = new Page(BASE.'templates/'.$template.'/print.tpl'); Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** year.php 16 Mar 2006 06:15:11 -0000 1.40 --- year.php 21 Mar 2006 09:52:29 -0000 1.41 *************** *** 4,7 **** --- 4,8 ---- $current_view = 'year'; require_once(BASE.'functions/ical_parser.php'); + require_once(BASE.'functions/list_functions.php'); require_once(BASE.'functions/template.php'); header("Content-Type: text/html; charset=$charset"); *************** *** 16,28 **** $prev_year = date ("Ymd", $prev_year); $page = new Page(BASE.'templates/'.$template.'/year.tpl'); $page->replace_files(array( 'header' => BASE.'templates/'.$template.'/header.tpl', ! 'footer' => BASE.'templates/'.$template.'/footer.tpl' )); $page->replace_tags(array( 'event_js' => '', 'template' => $template, 'charset' => $charset, --- 17,59 ---- $prev_year = date ("Ymd", $prev_year); + $sidebar_date = localizeDate($dateFormat_day, 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 + $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 = '<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(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.'/year.tpl'); $page->replace_files(array( 'header' => BASE.'templates/'.$template.'/header.tpl', ! 'footer' => BASE.'templates/'.$template.'/footer.tpl', ! 'sidebar' => BASE.'templates/'.$template.'/sidebar_year.tpl', ! 'search_box' => BASE.'templates/'.$template.'/search_box.tpl' )); $page->replace_tags(array( 'event_js' => '', + 'current_view' => $current_view, 'template' => $template, 'charset' => $charset, *************** *** 34,37 **** --- 65,69 ---- 'calendar_name' => $cal_displayname, 'display_date' => $this_year, + 'sidebar_date' => $sidebar_date, 'rss_powered' => $rss_powered, 'rss_available' => '', *************** *** 40,49 **** --- 72,110 ---- 'event_js' => '', 'this_year' => $this_year, + 'next_day' => $next_day, + 'next_week' => $next_week, + 'prev_day' => $prev_day, + 'prev_week' => $prev_week, 'next_year' => $next_year, 'prev_year' => $prev_year, + '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_search' => $lang['l_search'], + 'l_subscribe' => $lang['l_subscribe'], + 'l_download' => $lang['l_download'], 'l_pick_multiple' => $lang['l_pick_multiple'], 'l_powered_by' => $lang['l_powered_by'], *************** *** 51,55 **** )); ! $page->output(); --- 112,118 ---- )); ! $page->tomorrows_events($page); ! $page->get_vtodo($page); ! $page->draw_subscribe($page); $page->output(); |