aboutsummaryrefslogtreecommitdiffstats
path: root/print.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2002-10-27 18:42:32 +0000
committerChad Little <clittle@users.sourceforge.net>2002-10-27 18:42:32 +0000
commitb3e4fe36169086d73e256d8c03d0b0340128efcc (patch)
treed537776a3f277085881e72855aa130bd658312f5 /print.php
parentee47b432da84ee4de372896e4c2f9b779b579d85 (diff)
downloadphpicalendar-b3e4fe36169086d73e256d8c03d0b0340128efcc.tar.gz
phpicalendar-b3e4fe36169086d73e256d8c03d0b0340128efcc.tar.bz2
phpicalendar-b3e4fe36169086d73e256d8c03d0b0340128efcc.zip
Add navigation to Print view.
Diffstat (limited to 'print.php')
-rw-r--r--print.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/print.php b/print.php
index 312820b..b00ccdb 100644
--- a/print.php
+++ b/print.php
@@ -14,17 +14,24 @@ $parse_month = date ("Ym", strtotime($getdate));
$printview = $HTTP_GET_VARS['printview'];
$cal_displayname = str_replace("32", " ", $cal);
$events_week = 0;
+$unix_time = strtotime("$getdate");
if ($printview == 'day') {
$print_title = localizeDate ($dateFormat_day, strtotime($getdate));
+ $next = date("Ymd", strtotime("+1 day", $unix_time));
+ $prev = date("Ymd", strtotime("-1 day", $unix_time));
} elseif ($printview == 'week') {
$start_week = localizeDate($dateFormat_week, $start_week_time);
$end_week = localizeDate($dateFormat_week, $end_week_time);
$print_title = "$start_week - $end_week";
$week_start = date("Ymd", $start_week_time);
$week_end = date("Ymd", $end_week_time);
+ $next = date("Ymd", strtotime("+1 week", $unix_time));
+ $prev = date("Ymd", strtotime("-1 week", $unix_time));
} elseif ($printview == 'month') {
$print_title = localizeDate ($dateFormat_month, strtotime($getdate));
+ $next = date("Ymd", strtotime("+1 month", $unix_time));
+ $prev = date("Ymd", strtotime("-1 month", $unix_time));
}
?>

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