aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2005-02-13 17:52:52 +0000
committerJim Hu <jimhu@users.sourceforge.net>2005-02-13 17:52:52 +0000
commit59c73a00cb6aebe5fcf6dd58d0b13c238829fc0d (patch)
tree4911a83d6d3e9e19d3128201cfbbb9f0fdd22cca /functions
parent9853c72b020f4092663db5a61389b472a7ea4441 (diff)
downloadphpicalendar-59c73a00cb6aebe5fcf6dd58d0b13c238829fc0d.tar.gz
phpicalendar-59c73a00cb6aebe5fcf6dd58d0b13c238829fc0d.tar.bz2
phpicalendar-59c73a00cb6aebe5fcf6dd58d0b13c238829fc0d.zip
changes to template.php to work with cpath variable (alternate calendar directories selected by REQUEST).
Diffstat (limited to 'functions')
-rw-r--r--functions/template.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/functions/template.php b/functions/template.php
index 205d452..28439b4 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -176,7 +176,7 @@ class Page {
preg_match("!<\!-- loop daysofweek on -->(.*)<\!-- loop daysofweek off -->!is", $this->page, $match1);
$loop_dof = trim($match1[1]);
$start_wt = strtotime(dateOfWeek($getdate, $week_start_day));
- $start_wt = strtotime(dateOfWeek($getdate, $week_start_day));
+ $start_day = strtotime($week_start_day);
for ($i=0; $i<7; $i++) {
$day_num = date("w", $start_day);
$daylink = date('Ymd', $start_wt);
@@ -941,7 +941,7 @@ class Page {
}
function output() {
- global $template, $php_started, $lang, $enable_rss, $template_started;
+ global $template, $php_started, $lang, $enable_rss, $template_started, $cpath;
// Looks for {MONTH} before sending page out
preg_match_all ('!\{MONTH_([A-Z]*)\|?([+|-])([0-9]{1,2})\}!is', $this->page, $match);
@@ -977,6 +977,9 @@ class Page {
} else {
$this->page = str_replace('{BASE}', BASE, $this->page);
}
+ if ($cpath){
+ $this->page = str_replace('&amp;getdate', "&amp;cpath=$cpath&amp;getdate", $this->page);
+ }
print($this->page);
}
}

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