aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-02-05 23:45:54 +0000
committerChad Little <clittle@users.sourceforge.net>2004-02-05 23:45:54 +0000
commita0a7d7f0979d6d4bf6c2f39a0e2425d489112aea (patch)
treeaef9ed13221e820a28cba0856be2db681a2c3553 /functions
parent85287f1ac22ea6d20194baff2d378bf075c1c0bd (diff)
downloadphpicalendar-a0a7d7f0979d6d4bf6c2f39a0e2425d489112aea.tar.gz
phpicalendar-a0a7d7f0979d6d4bf6c2f39a0e2425d489112aea.tar.bz2
phpicalendar-a0a7d7f0979d6d4bf6c2f39a0e2425d489112aea.zip
Wired Tomorrow's Events with new function.
Diffstat (limited to 'functions')
-rw-r--r--functions/template.php42
1 files changed, 41 insertions, 1 deletions
diff --git a/functions/template.php b/functions/template.php
index e7bc7f1..ab0c742 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -18,7 +18,7 @@ class Page {
$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);
+ $event = openevent($event_calna, '', '', $allday, 0, '', '<span class="V10WB">', '</span>', 'psf', $event_url);
$loop_tmp = str_replace('{EVENT}', $event, $loop_ad);
$loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp);
$replace .= $loop_tmp;
@@ -45,6 +45,46 @@ class Page {
}
+ function tomorrows_events() {
+ global $template, $getdate, $master_array, $next_day, $timeFormat;
+
+ preg_match("!<\!-- switch t_allday on -->(.*)<\!-- switch t_allday off -->!is", $this->page, $match1);
+ preg_match("!<\!-- switch t_event on -->(.*)<\!-- switch t_event off -->!is", $this->page, $match2);
+ $loop_t_ad = trim($match1[1]);
+ $loop_t_e = trim($match2[1]);
+ $return_adtmp = '';
+ $return_etmp = '';
+
+ if (is_array($master_array[$next_day])) {
+ foreach ($master_array[$next_day] as $event_times) {
+ foreach ($event_times as $val) {
+ $event_text = stripslashes(urldecode($val["event_text"]));
+ $event_text = strip_tags($event_text, '<b><i><u>');
+ if ($event_text != "") {
+ $event_start = $val["event_start"];
+ $event_end = $val["event_end"];
+ $event_calna = $val["calname"];
+ $event_url = $val["url"];
+ $event_start = date ($timeFormat, @strtotime ($event_start));
+ $event_end = date ($timeFormat, @strtotime ($event_end));
+ if (!isset($val["event_start"])) {
+ $event_start = $lang['l_all_day'];
+ $event_end = '';
+ $return_adtmp = openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '', '', 'psf', $event_url);
+ $replace_ad .= str_replace('{T_ALLDAY}', $return_adtmp, $loop_t_ad);
+ } else {
+ $return_etmp = openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '', '', 'ps3', $event_url);
+ $replace_e .= str_replace('{T_EVENT}', $return_etmp, $loop_t_e);
+ }
+ }
+ }
+ }
+ }
+
+ $this->page = ereg_replace('<!-- switch t_allday on -->(.*)<!-- switch t_allday off -->', $replace_ad, $this->page);
+ $this->page = ereg_replace('<!-- switch t_event on -->(.*)<!-- switch t_event off -->', $replace_e, $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);

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