From 97490a16baeab752422569259366b309163cb6e5 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 26 Jan 2004 06:34:09 +0000 Subject: Template class checking, first round trying to get event templated. --- includes/event.php | 65 +++++++++++++++++++++--------------------------------- 1 file changed, 25 insertions(+), 40 deletions(-) (limited to 'includes') diff --git a/includes/event.php b/includes/event.php index 2f39c3b..7e3f08e 100644 --- a/includes/event.php +++ b/includes/event.php @@ -1,6 +1,8 @@ (' . $all_day_lang . ')'; } -if ($description) { - $display = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$description); - $display .= '
'; -} +if ($description) $description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$description); if ($organizer) { $i=0; $display .= $organizer_lang . ' - '; @@ -41,8 +40,7 @@ if ($organizer) { $organizers .= $organizer[$i]["name"] . ', '; $i++; } - $display .= substr($organizers,0,-2); - $display .= '
'; + $organizer = substr($organizers,0,-2); } if ($attendee) { $i=0; @@ -51,48 +49,35 @@ if ($attendee) { $attendees .= $attendee[$i]["name"] . ', '; $i++; } - $display .= substr($attendees,0,-2); - $display .= '
'; -} -if ($status) { - $display .= $status_lang . ' - ' . $status. '
' . "\n"; + $attendee = substr($attendees,0,-2); } + if ($location) { if ($url != '') $location = ''.$location.''; - $display .= $location_lang . ' - ' . $location.'
'; } $sheet_href = BASE.'styles/'.$style_sheet.'/default.css'; +$page = new Page(BASE.'templates/default/event.tpl'); -echo <<replace_tags(array( + 'cal' => $cal, + 'event' => $event, + 'event_times' => $event_times, + 'description' => $description, + 'organizer_lang' => $organizer_lang, + 'organizer' => $organizer, + 'attendee_lang' => $attendee_lang, + 'attendee' => $attendee, + 'status_lang' => $status_lang, + 'status' => $status, + 'location_lang' => $location_lang, + 'location' => $location, + 'sheet_href' => $sheet_href, + 'cal_title_full' => $cal_title_full + + )); - - - - - {$cal} - - - -
- - - - - - - -
{$cal_title_full}
-
-

{$event} {$event_times}

- {$display} -
-
-
- - +$page->output(); -END; ?> -- cgit v1.2.3