aboutsummaryrefslogtreecommitdiffstats
path: root/print.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-03-21 09:52:29 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-03-21 09:52:29 +0000
commita430b6f5528f4698cefb45edde90bf869f05eeda (patch)
tree5b21f68143a9f32ad05c98c64685b49994febe2e /print.php
parent3280427d50b95564c2a21396b5d3bb603795d014 (diff)
downloadphpicalendar-a430b6f5528f4698cefb45edde90bf869f05eeda.tar.gz
phpicalendar-a430b6f5528f4698cefb45edde90bf869f05eeda.tar.bz2
phpicalendar-a430b6f5528f4698cefb45edde90bf869f05eeda.zip
add year printview, fix misc bugs
Diffstat (limited to 'print.php')
-rw-r--r--print.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/print.php b/print.php
index 34a9c92..cf09828 100644
--- a/print.php
+++ b/print.php
@@ -1,18 +1,17 @@
<?php
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");
-
+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);
$parse_month = date ("Ym", strtotime($getdate));
$cal_displayname = str_replace("32", " ", $cal);
$events_week = 0;
$unix_time = strtotime($getdate);
-if (!$printview) $printview = $_GET['printview'];
+$printview = 'month';
+if (isset($_GET['printview'])) $printview = $_GET['printview'];
if ($printview == 'day') {
$display_date = localizeDate ($dateFormat_day, strtotime($getdate));
@@ -34,7 +33,18 @@ if ($printview == 'day') {
$prev = date("Ymd", strtotime("-1 month", $unix_time));
$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');

© 2014-2024 Faster IT GmbH | imprint | privacy policy