diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-02-05 00:15:37 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-02-05 00:15:37 +0000 |
commit | 4a515d713826621bdb3911d47521b4b221e0b48c (patch) | |
tree | 30c58d399acd64d648c565fc20d3b688777962d9 /functions | |
parent | 4a55f1bbc2a95855d912728b2674d47c81b75b49 (diff) | |
download | phpicalendar-4a515d713826621bdb3911d47521b4b221e0b48c.tar.gz phpicalendar-4a515d713826621bdb3911d47521b4b221e0b48c.tar.bz2 phpicalendar-4a515d713826621bdb3911d47521b4b221e0b48c.zip |
Coded allday events for day.php
Diffstat (limited to 'functions')
-rw-r--r-- | functions/template.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/functions/template.php b/functions/template.php index d5cdd7b..d6e4a1e 100644 --- a/functions/template.php +++ b/functions/template.php @@ -4,6 +4,27 @@ class Page { var $page; + function draw_day($template_p) { + global $template, $getdate, $cal, $master_array ; + $replace = ''; + if (is_array($master_array[$getdate]['-1'])) { + preg_match("!<\!-- loop allday on -->(.*)<\!-- loop allday off -->!is", $this->page, $match1); + $loop_ad = trim($match1[1]); + foreach ($master_array[$getdate]['-1'] as $allday) { + $event_calno = $allday['calnumber']; + $event_calna = $allday['calname']; + $event_url = $allday['url']; + if ($event_calno < 1) $event_calno=1; + if ($event_calno > 7) $event_calno=7; + $event = openevent($event_calna, '', '', $allday, 0, '', '<span class="V10WB">', '</span>', 'psf', $url); + $loop_tmp = str_replace('{EVENT}', $event, $loop_ad); + $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); + $replace .= $loop_tmp; + } + } + $this->page = ereg_replace('<!-- loop allday on -->(.*)<!-- loop allday off -->', $replace, $this->page); + } + function draw_month($template_p, $offset = '+0', $type) { global $template, $getdate, $master_array, $this_year, $this_month, $dateFormat_month, $week_start_day, $cal, $minical_view, $month_event_lines, $daysofweekreallyshort_lang, $daysofweekshort_lang, $daysofweek_lang, $timeFormat_small, $timeFormat; preg_match("!<\!-- loop weekday on -->(.*)<\!-- loop weekday off -->!is", $template_p, $match1); |