diff options
-rw-r--r-- | day.php | 4 | ||||
-rw-r--r-- | functions/template.php | 21 | ||||
-rw-r--r-- | templates/default/day.tpl | 7 |
3 files changed, 25 insertions, 7 deletions
@@ -32,7 +32,7 @@ $list_weeks = list_weeks(); $list_jumps = list_jumps(); $list_calcolors = list_calcolors(); -$page = new Page(BASE.'templates/'.$template.'/DAY.tpl'); +$page = new Page(BASE.'templates/'.$template.'/day.tpl'); $page->replace_tags(array( 'header' => BASE.'templates/'.$template.'/header.tpl', @@ -62,7 +62,7 @@ $page->replace_tags(array( 'style_select' => $style_select )); -$page->monthbottom($this->page); +$page->draw_day($this->page); $page->output(); 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); diff --git a/templates/default/day.tpl b/templates/default/day.tpl index a447eed..5738d9f 100644 --- a/templates/default/day.tpl +++ b/templates/default/day.tpl @@ -35,11 +35,8 @@ <tr> <td> <!-- loop allday on --> - <div class="alldaybg_1"> - <span class="V10WB">Call at some place</span> - </div> - <div class="alldaybg_1"> - <span class="V10WB">Some Holiday</span> + <div class="alldaybg_{CALNO}"> + {EVENT} </div> <!-- loop allday off --> </td> |