From: <cl...@us...> - 2003-06-30 22:37:55
|
Update of /cvsroot/phpicalendar/phpicalendar/includes In directory sc8-pr-cvs1:/tmp/cvs-serv26723/includes Modified Files: calendar_nav.php event.php sidebar.php todo.php Log Message: Multiple Calendar support. Index: calendar_nav.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/calendar_nav.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** calendar_nav.php 24 Feb 2003 20:23:42 -0000 1.5 --- calendar_nav.php 30 Jun 2003 22:37:52 -0000 1.6 *************** *** 1,5 **** <?php ! $cal_displayname2 = $calendar_name . " $calendar_lang"; if (strlen($cal_displayname2) > 24) { $cal_displayname2 = substr("$cal_displayname2", 0, 21); --- 1,9 ---- <?php ! if ($cal == 'all_calenders_combined971') { ! $cal_displayname2 = $all_cal_comb_lang; ! } else { ! $cal_displayname2 = $calendar_name . " $calendar_lang"; ! } if (strlen($cal_displayname2) > 24) { $cal_displayname2 = substr("$cal_displayname2", 0, 21); *************** *** 9,13 **** $next_day = date("Ymd", strtotime("+1 day", $unix_time)); $prev_day = date("Ymd", strtotime("-1 day", $unix_time)); ! $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); ?> --- 13,21 ---- $next_day = date("Ymd", strtotime("+1 day", $unix_time)); $prev_day = date("Ymd", strtotime("-1 day", $unix_time)); ! ! // Get the real date to display as "go to today", not the date displayed in the calendar ! $really_unix_time = strtotime(date('Ymd')); ! $really_today_today = date ('Ymd', $really_unix_time); ! $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); ?> *************** *** 193,203 **** <td colspan="6" class="G10B"> <?php ! echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$today_today\">$goday_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"week.php?cal=$cal&getdate=$today_today\">$goweek_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$today_today\">$gomonth_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$today_today\">$goyear_lang</a><br>\n"; echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n"; if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n"; ?> </td> --- 201,211 ---- <td colspan="6" class="G10B"> <?php ! echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$really_today_today\">$goday_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"week.php?cal=$cal&getdate=$really_today_today\">$goweek_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$really_today_today\">$gomonth_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$really_today_today\">$goyear_lang</a><br>\n"; echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n"; if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n"; ! if ($cal != 'all_calenders_combined971') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n"; ?> </td> Index: event.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/event.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** event.php 28 May 2003 04:19:25 -0000 1.6 --- event.php 30 Jun 2003 22:37:52 -0000 1.7 *************** *** 82,86 **** <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> ! <title><?php echo $calendar_name2; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> </head> --- 82,91 ---- <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> ! <title><?php ! if ($calendar_name == 'all_calenders_combined971') { ! echo "$all_cal_comb_lang"; ! } else { ! echo "$calendar_name2"; ! }?></title> <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> </head> *************** *** 89,93 **** <tr> <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> ! <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$calendar_name2 $calendar_lang"; ?></font></td> <td align="right" valign="top" width="1%" class="sideback"></td> </tr> --- 94,106 ---- <tr> <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> ! <td align="center" width="98%" class="sideback"><font class="G10BOLD"> ! <?php ! if ($calendar_name == 'all_calenders_combined971') { ! echo "$all_cal_comb_lang"; ! } else { ! echo "$calendar_name2 $calendar_lang"; ! } ! ?> ! </font></td> <td align="right" valign="top" width="1%" class="sideback"></td> </tr> Index: sidebar.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/sidebar.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** sidebar.php 10 Mar 2003 18:34:18 -0000 1.9 --- sidebar.php 30 Jun 2003 22:37:52 -0000 1.10 *************** *** 1,10 **** <?php ! $cal_displayname2 = $calendar_name . " $calendar_lang"; if (strlen($cal_displayname2) > 24) { $cal_displayname2 = substr("$cal_displayname2", 0, 21); $cal_displayname2 = $cal_displayname2 . "..."; } ! $search_box = '<form action="search.php" method="GET"><input type="hidden" name="cal" value="'.$cal.'"><input type="hidden" name="getdate" value="'.$getdate.'"><input type="text" size="15" class="search_style" name="query" value="'.$search_lang.'" onfocus="javascript:if(this.value==\''.$search_lang.'\') {this.value=\'\';}" onblur="javascript:if(this.value==\'\') {this.value=\''.$search_lang.'\'}"><INPUT type="image" src="styles/'.$style_sheet.'/search.gif" name="submit" value="Search"></form>'; --- 1,17 ---- <?php + // Get the real date to display in the sidebar, not the date displayed in the calendar + $really_unix_time = strtotime(date('Ymd')); + $really_today_today = date ('Ymd', $really_unix_time); ! if ($cal == 'all_calenders_combined971') { ! $cal_displayname2 = $all_cal_comb_lang; ! } else { ! $cal_displayname2 = $calendar_name . " $calendar_lang"; ! } if (strlen($cal_displayname2) > 24) { $cal_displayname2 = substr("$cal_displayname2", 0, 21); $cal_displayname2 = $cal_displayname2 . "..."; } ! $search_box = '<form action="search.php" method="GET"><input type="hidden" name="cal" value="'.$cal.'"><input type="hidden" name="getdate" value="'.$getdate.'"><input type="text" size="15" class="search_style" name="query" value="'.$search_lang.'" onfocus="javascript:if(this.value==\''.$search_lang.'\') {this.value=\'\';}" onblur="javascript:if(this.value==\'\') {this.value=\''.$search_lang.'\'}"><INPUT type="image" src="styles/'.$style_sheet.'/search.gif" name="submit" value="Search"></form>'; *************** *** 34,44 **** <td colspan="6" class="G10B"> <?php ! echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$today_today\">$goday_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"week.php?cal=$cal&getdate=$today_today\">$goweek_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$today_today\">$gomonth_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$today_today\">$goyear_lang</a><br>\n"; echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n"; if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n"; ?> </td> --- 41,51 ---- <td colspan="6" class="G10B"> <?php ! echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$really_today_today\">$goday_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"week.php?cal=$cal&getdate=$really_today_today\">$goweek_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$really_today_today\">$gomonth_lang</a><br>\n"; ! echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$really_today_today\">$goyear_lang</a><br>\n"; echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n"; if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n"; ! if ($cal != 'all_calenders_combined971') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n"; ?> </td> Index: todo.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/todo.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** todo.php 8 Feb 2003 04:47:57 -0000 1.7 --- todo.php 30 Jun 2003 22:37:52 -0000 1.8 *************** *** 1,135 **** ! <?php ! ! define('BASE', '../'); ! include (BASE.'functions/init.inc.php'); ! include (BASE.'functions/date_functions.php'); ! ! // Unserialize the array so that we can use it. ! $vtodo_array = unserialize(base64_decode($HTTP_GET_VARS['vtodo_array'])); ! ! // Set the variables from the array ! if (isset($vtodo_array['vtodo_text']) && ($vtodo_array['vtodo_text'] !== '') ) { ! $vtodo_text = $vtodo_array['vtodo_text']; ! } else { ! $vtodo_text = ''; ! } ! ! if (isset($vtodo_array['description']) && ($vtodo_array['description'] !== '') ) { ! $description = $vtodo_array['description']; ! } else { ! $description = ''; ! } ! ! if (isset($vtodo_array['completed_date']) && ($vtodo_array['completed_date'] !== '') ) { ! $completed_date = localizeDate ($dateFormat_day, strtotime($vtodo_array['completed_date'])); ! } ! ! if (isset($vtodo_array['status']) && ($vtodo_array['status'] !== '') ) { ! $status = $vtodo_array['status']; ! } ! if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) { ! $status = "$completed_date_lang $completed_date"; ! } else if ($status == "COMPLETED") { ! $status = $completed_lang; ! } else { ! $status = $unfinished_lang; ! } ! ! if (isset($vtodo_array['cal']) && ($vtodo_array['cal'] !== '') ) { ! $calendar_name = $vtodo_array['cal']; ! } else { ! $calendar_name = ''; ! } ! ! if (isset($vtodo_array['start_date']) && ($vtodo_array['start_date'] !== '') ) { ! $start_date = localizeDate ($dateFormat_day, strtotime($vtodo_array['start_date'])); ! } ! ! if (isset($vtodo_array['due_date']) && ($vtodo_array['due_date'] !== '') && strtotime($vtodo_array['due_date']) != strtotime("+1 year", strtotime($start_date))) { ! $due_date = localizeDate ($dateFormat_day, strtotime($vtodo_array['due_date'])); ! } else { ! $due_date = ''; ! } ! ! if (isset($vtodo_array['priority']) && ($vtodo_array['priority'] !== '')) { ! $priority = $vtodo_array['priority']; ! ! if ($priority >= 1 && $priority <= 4) { ! $priority = $priority_high_lang; ! } else if ($priority == 5) { ! $priority = $priority_medium_lang; ! } else if ($priority >= 6 && $priority <= 9) { ! $priority = $priority_low_lang; ! } else { ! $priority = $priority_none_lang; ! } ! } else { ! $priority = $priority_none_lang; ! } ! ! ?> ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ! "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> ! <html> ! <head> ! <meta http-equiv="content-type" content="text/html;charset=UTF-8"> ! <title><?php echo $calendar_name; ?></title> ! <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> ! </head> ! <body bgcolor="#eeeeee"><center> ! <table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder"> ! <tr> ! <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> ! <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$calendar_name $calendar_lang"; ?></font></td> ! <td align="right" valign="top" width="1%" class="sideback"></td> ! </tr> ! <tr> ! <td colspan="3"><img src="images/spacer.gif" width="1" height="6" alt=" "></td> ! </tr> ! <tr> ! <td colspan="3"> ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td> ! <td align="left" colspan="2" class="V12"><?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo_text).'<br /><br />'; ?></td> ! </tr> ! ! <?php if ($description) { ?> ! <tr> ! <td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td> ! <td align="left" colspan="2" class="V12"> ! <?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '<a target="_new" href="\0">\0</a>', $description); ?></td> ! </tr> ! <?php } ?> ! ! <?php if ($status) { ?> ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$status_lang $status"; ?></td> ! </tr> ! <?php } ?> ! ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$priority_lang $priority"; ?></td> ! </tr> ! ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$created_lang $start_date"; ?></td> ! </tr> ! ! <?php if ($due_date) { ?> ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$due_lang $due_date"; ?></td> ! </tr> ! <?php } ?> ! ! </table> ! </td> ! </tr> ! </table> ! </center> ! </body> ! </html> --- 1,135 ---- ! <?php ! ! define('BASE', '../'); ! include (BASE.'functions/init.inc.php'); ! include (BASE.'functions/date_functions.php'); ! ! // Unserialize the array so that we can use it. ! $vtodo_array = unserialize(base64_decode($HTTP_GET_VARS['vtodo_array'])); ! ! // Set the variables from the array ! if (isset($vtodo_array['vtodo_text']) && ($vtodo_array['vtodo_text'] !== '') ) { ! $vtodo_text = $vtodo_array['vtodo_text']; ! } else { ! $vtodo_text = ''; ! } ! ! if (isset($vtodo_array['description']) && ($vtodo_array['description'] !== '') ) { ! $description = $vtodo_array['description']; ! } else { ! $description = ''; ! } ! ! if (isset($vtodo_array['completed_date']) && ($vtodo_array['completed_date'] !== '') ) { ! $completed_date = localizeDate ($dateFormat_day, strtotime($vtodo_array['completed_date'])); ! } ! ! if (isset($vtodo_array['status']) && ($vtodo_array['status'] !== '') ) { ! $status = $vtodo_array['status']; ! } ! if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) { ! $status = "$completed_date_lang $completed_date"; ! } else if ($status == "COMPLETED") { ! $status = $completed_lang; ! } else { ! $status = $unfinished_lang; ! } ! ! if (isset($vtodo_array['cal']) && ($vtodo_array['cal'] !== '') ) { ! $calendar_name = $vtodo_array['cal']; ! } else { ! $calendar_name = ''; ! } ! ! if (isset($vtodo_array['start_date']) && ($vtodo_array['start_date'] !== '') ) { ! $start_date = localizeDate ($dateFormat_day, strtotime($vtodo_array['start_date'])); ! } ! ! if (isset($vtodo_array['due_date']) && ($vtodo_array['due_date'] !== '') && strtotime($vtodo_array['due_date']) != strtotime("+1 year", strtotime($start_date))) { ! $due_date = localizeDate ($dateFormat_day, strtotime($vtodo_array['due_date'])); ! } else { ! $due_date = ''; ! } ! ! if (isset($vtodo_array['priority']) && ($vtodo_array['priority'] !== '')) { ! $priority = $vtodo_array['priority']; ! ! if ($priority >= 1 && $priority <= 4) { ! $priority = $priority_high_lang; ! } else if ($priority == 5) { ! $priority = $priority_medium_lang; ! } else if ($priority >= 6 && $priority <= 9) { ! $priority = $priority_low_lang; ! } else { ! $priority = $priority_none_lang; ! } ! } else { ! $priority = $priority_none_lang; ! } ! ! ?> ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ! "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> ! <html> ! <head> ! <meta http-equiv="content-type" content="text/html;charset=UTF-8"> ! <title><?php echo $calendar_name; ?></title> ! <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> ! </head> ! <body bgcolor="#eeeeee"><center> ! <table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder"> ! <tr> ! <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> ! <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$calendar_name $calendar_lang"; ?></font></td> ! <td align="right" valign="top" width="1%" class="sideback"></td> ! </tr> ! <tr> ! <td colspan="3"><img src="images/spacer.gif" width="1" height="6" alt=" "></td> ! </tr> ! <tr> ! <td colspan="3"> ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td> ! <td align="left" colspan="2" class="V12"><?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo_text).'<br /><br />'; ?></td> ! </tr> ! ! <?php if ($description) { ?> ! <tr> ! <td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td> ! <td align="left" colspan="2" class="V12"> ! <?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '<a target="_new" href="\0">\0</a>', $description); ?></td> ! </tr> ! <?php } ?> ! ! <?php if ($status) { ?> ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$status_lang $status"; ?></td> ! </tr> ! <?php } ?> ! ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$priority_lang $priority"; ?></td> ! </tr> ! ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$created_lang $start_date"; ?></td> ! </tr> ! ! <?php if ($due_date) { ?> ! <tr> ! <td></td> ! <td align="left" colspan="2" class="V12"><?php echo "$due_lang $due_date"; ?></td> ! </tr> ! <?php } ?> ! ! </table> ! </td> ! </tr> ! </table> ! </center> ! </body> ! </html> |