aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2007-05-16 22:24:44 +0000
committerJim Hu <jimhu@users.sourceforge.net>2007-05-16 22:24:44 +0000
commit5608a21fee3946d4962adf48c8251c0999a70ae7 (patch)
treef3523459c8313962012060ded9919abe00a14801 /functions
parent6d325063ea9a71890596b95871bde04797fd2c3d (diff)
downloadphpicalendar-5608a21fee3946d4962adf48c8251c0999a70ae7.tar.gz
phpicalendar-5608a21fee3946d4962adf48c8251c0999a70ae7.tar.bz2
phpicalendar-5608a21fee3946d4962adf48c8251c0999a70ae7.zip
modify to reduce memory use in monthbottom; also add location display to month display
Diffstat (limited to 'functions')
-rw-r--r--functions/template.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/functions/template.php b/functions/template.php
index 5b7953f..c7f705b 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -942,6 +942,7 @@ class Page {
$switch['EVENT'] = '<img src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" height="10" border="0" />';
}
}
+ $switch['EVENT'] .= (isset($val['location'])) ? "<span class='V9G'>".$val['location']."</span>" : '';
}
}
}
@@ -998,11 +999,14 @@ class Page {
do {
if (isset($master_array[$m_start])) {
foreach ($master_array[$m_start] as $cal_time => $event_times) {
- $switch['CAL'] = $cal;
- $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start);
+ # $switch['CAL'] = $cal;
+ # $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start);
+ $start_date = localizeDate ($dateFormat_week_list, $u_start);
foreach ($event_times as $uid => $val) {
if (isset($seen_events[$uid])) continue;
$seen_events[$uid] = 1;
+ $switch['CAL'] = $cal;
+ $switch['START_DATE'] = $start_date;
$switch['CALNAME'] = $val['calname'];
if (!isset($val['event_start'])) {
$switch['START_TIME'] = $lang['l_all_day'];
@@ -1027,13 +1031,14 @@ class Page {
$middle .= $temp;
$i = ($i == 1) ? 0 : 1;
}
+ unset ($switch);
}
}
}
$u_start = strtotime("+1 day", $u_start);
$m_start = date('Ymd', $u_start);
$check_month = date('m', $u_start);
- unset ($switch);
+ # unset ($switch);
} while ($this_month == $check_month);
$this->page = preg_replace('!<\!-- loop showbottomevents_odd on -->(.*)<\!-- loop showbottomevents_even off -->!is', $middle, $this->page);

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