From: <cl...@us...> - 2004-02-08 00:46:12
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15538 Modified Files: day.php print.php week.php Log Message: Placed print template in place, started wiring print.php Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** day.php 6 Feb 2004 05:49:05 -0000 1.109 --- day.php 8 Feb 2004 00:43:13 -0000 1.110 *************** *** 45,48 **** --- 45,49 ---- 'getdate' => $getdate, 'calendar_name' => $calendar_name, + 'current_view' => $current_view, 'display_date' => $display_date, 'sidebar_date' => $sidebar_date, Index: print.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/print.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** print.php 16 Nov 2003 07:02:37 -0000 1.20 --- print.php 8 Feb 2004 00:43:13 -0000 1.21 *************** *** 2,6 **** define('BASE', './'); ! include(BASE.'functions/ical_parser.php'); $cal_displayname2 = $calendar_name . " $calendar_lang"; if (strlen($cal_displayname2) > 24) { --- 2,8 ---- define('BASE', './'); ! require_once(BASE.'functions/ical_parser.php'); ! require_once(BASE.'functions/list_functions.php'); ! require_once(BASE.'functions/template.php'); $cal_displayname2 = $calendar_name . " $calendar_lang"; if (strlen($cal_displayname2) > 24) { *************** *** 48,171 **** } ! include (BASE.'includes/header.inc.php'); ?> - <center> - <table border="0" width="700" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="calborder"> - <tr> - <td> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td align="left" width="90" class="navback"><?php echo '<a href="'.$printview.'.php?cal='.$cal.'&getdate='.$getdate.'"><img src="styles/'.$style_sheet.'/back.gif" alt="['.$back_lang.']" border="0" align="left"></a>'; ?></td> - <td class="navback"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td align="right" width="40%" class="navback"><?php echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$prev&printview=$printview\"><img src=\"styles/$style_sheet/left_day.gif\" alt=\"[$print_prev_nav]\" border=\"0\" align=\"right\"></a>"; ?></td> - <td align="center" width="20%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $display_date; ?></font></td> - <td align="left" width="40%" class="navback"><?php echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$next&printview=$printview\"><img src=\"styles/$style_sheet/right_day.gif\" alt=\"[$print_next_nav]\" border=\"0\" align=\"left\"></a>"; ?></td> - </tr> - </table> - </td> - <td align="right" width="90" class="navback"> - <table width="90" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td><?php echo '<a class="psf" href="print.php?cal='.$cal.'&getdate='.$getdate.'&printview=day"><img src="styles/'.$style_sheet.'/day_on.gif" alt="'.$day_lang.' View" border="0"></a></td>'; ?> - <td><?php echo '<a class="psf" href="print.php?cal='.$cal.'&getdate='.$getdate.'&printview=week"><img src="styles/'.$style_sheet.'/week_on.gif" alt="'.$week_lang.' View" border="0"></a></td>'; ?> - <td><?php echo '<a class="psf" href="print.php?cal='.$cal.'&getdate='.$getdate.'&printview=month"><img src="styles/'.$style_sheet.'/month_on.gif" alt="'.$month_lang.' View" border="0"></a></td>'; ?> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan="3" class="dayborder"><img src="images/spacer.gif" width="1" height="5" alt=" "></td> - </tr> - <tr> - <td colspan="3"> - <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr> - <td align="center" valign="top"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td colspan="3" height="1"></td> - </tr> - <?php - // Iterate the entire master array - foreach($master_array as $key => $val) { - - // Pull out only this months - ereg ("([0-9]{6})([0-9]{2})", $key, $regs); - if ((($regs[1] == $parse_month) && ($printview == "month")) || (($key == $getdate) && ($printview == "day")) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == "week"))) { - $events_week++; - $dayofmonth = strtotime ($key); - $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); - echo "<tr><td width=\"10\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\" alt=\" \"></td>\n"; - echo "<td align=\"left\" colspan=\"2\"><font class=\"V12\"><b>$dayofmonth</b></font></td></tr>"; - echo "<tr><td colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"5\" alt=\" \"></td></tr>\n"; - - // Pull out each day - foreach ($val as $new_val) { - - // Pull out each time - foreach ($new_val as $new_key2 => $new_val2) { - if ($new_val2["event_text"]) { - $event_text = stripslashes(urldecode($new_val2["event_text"])); - $description = stripslashes(urldecode($new_val2["description"])); - $event_start = $new_val2["event_start"]; - $event_end = $new_val2["event_end"]; - if (isset($new_val2["display_end"])) $event_end = $new_val2["display_end"]; - $event_start = date ($timeFormat, strtotime ("$event_start")); - $event_end = date ($timeFormat, strtotime ("$event_end")); - $event_start = "$event_start - $event_end"; - if (!$new_val2["event_start"]) { - $event_start = "$all_day_lang"; - $event_start2 = ''; - $event_end = ''; - } - echo "<tr>\n"; - echo "<td width=\"10\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\" alt=\" \"></td>\n"; - echo "<td width=\"10\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\" alt=\" \"></td>\n"; - echo "<td align=\"left\">\n"; - echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\n"; - echo "<tr>\n"; - echo "<td width=\"100\" class=\"G10BOLD\">$time_lang:</td>\n"; - echo "<td align=\"left\" class=\"G10B\">$event_start</td>\n"; - echo "</tr>\n"; - echo "<tr>\n"; - echo "<td valign=\"top\" width=\"100\" class=\"G10BOLD\">$summary_lang:</td>\n"; - echo "<td valign=\"top\" align=\"left\" class=\"G10B\">$event_text</td>\n"; - echo "</tr>\n"; - if ($new_val2["description"]) { - echo "<tr>\n"; - echo "<td valign=\"top\" width=\"100\" class=\"G10BOLD\">$description_lang:</td>\n"; - echo "<td valign=\"top\" align=\"left\" class=\"G10B\">$description</td>\n"; - echo "</tr>\n"; - } - echo "</table>\n"; - echo "</td>\n"; - echo "</tr>\n"; - echo "<tr><td colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"10\" alt=\" \"></td></tr>\n"; - } - } - } - } - } - - if ($events_week < 1) { - echo "<tr><td width=\"10\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\" alt=\" \"></td>\n"; - echo "<td align=\"left\" colspan=\"2\"><font class=\"V12\"><br><center><b>$zero_events</b></center></font><br></td></tr>"; - echo "<tr><td colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"5\" alt=\" \"></td></tr>\n"; - } - - ?> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - </center> - <?php include (BASE.'includes/footer.inc.php'); ?> --- 50,90 ---- } ! $page = new Page(BASE.'templates/'.$template.'/print.tpl'); ! ! $page->replace_tags(array( ! 'header' => BASE.'templates/'.$template.'/header.tpl', ! 'footer' => BASE.'templates/'.$template.'/footer.tpl', ! 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', ! 'event_js' => BASE.'functions/event.js', ! 'template' => $template, ! 'cal' => $cal, ! 'getdate' => $getdate, ! 'calendar_name' => $calendar_name, ! 'current_view' => $current_view, ! 'display_date' => $display_date, ! 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $rss_powered, ! 'rss_available' => '', ! 'rss_valid' => '', ! 'todo_js' => '', ! 'show_search' => '', ! 'next_day' => $next_day, ! 'prev_day' => $prev_day, ! 'show_goto' => '', ! 'is_logged_in' => '', ! 'list_icals' => $list_icals, ! 'list_years' => $list_years, ! 'list_months' => $list_months, ! 'list_weeks' => $list_weeks, ! 'list_jumps' => $list_jumps, ! 'legend' => $list_calcolors, ! 'style_select' => $style_select ! )); ! ! $page->draw_day($this->page); ! $page->tomorrows_events($this->page); ! $page->get_vtodo($this->page); ! ! $page->output(); ?> Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** week.php 7 Feb 2004 22:55:10 -0000 1.106 --- week.php 8 Feb 2004 00:43:13 -0000 1.107 *************** *** 49,52 **** --- 49,53 ---- 'calendar_name' => $calendar_name, 'display_date' => $display_date, + 'current_view' => $current_view, 'sidebar_date' => $sidebar_date, 'rss_powered' => $rss_powered, |