From b1b0bb48e861325551b48be4001de5f9cf1ff852 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 26 Jan 2004 22:50:47 +0000 Subject: More templating. --- includes/event.php | 4 +--- includes/todo.php | 47 +++++++++++++++++++---------------------------- 2 files changed, 20 insertions(+), 31 deletions(-) (limited to 'includes') diff --git a/includes/event.php b/includes/event.php index ec94749..3caad2f 100644 --- a/includes/event.php +++ b/includes/event.php @@ -2,7 +2,6 @@ define('BASE', '../'); include_once(BASE.'functions/init.inc.php'); require_once(BASE.'functions/template.php'); -error_reporting(E_ALL); function decode_popup ($item) { $item = stripslashes(rawurldecode($item)); @@ -76,8 +75,7 @@ $page->replace_tags(array( 'location' => $location, 'sheet_href' => $sheet_href, 'cal_title_full' => $cal_title_full, - 'base' => BASE, - 'template' => $template + 'template' => $template, )); diff --git a/includes/todo.php b/includes/todo.php index b4cefbd..d9933d7 100644 --- a/includes/todo.php +++ b/includes/todo.php @@ -3,6 +3,7 @@ define('BASE', '../'); include_once(BASE.'functions/init.inc.php'); include_once(BASE.'functions/date_functions.php'); +require_once(BASE.'functions/template.php'); $vtodo_array = unserialize(base64_decode($HTTP_GET_VARS['vtodo_array'])); @@ -19,7 +20,6 @@ $priority = (isset($vtodo_array['priority'])) ? $vtodo_array['priority'] : ('' $cal_title_full = $calendar_name.' '.$calendar_lang; $description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '\0', $description); $vtodo_text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$vtodo_text); -$sheet_href = BASE.'styles/'.$style_sheet.'/default.css'; if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) { @@ -48,34 +48,25 @@ if ($priority != '') $display .= $priority_lang.' '.$priority.'
'; if ($start_date != '') $display .= $created_lang.' '.$start_date.'
'; if ($due_date != '') $display .= $due_lang.' '.$due_date.'
'; -echo << - - - - {$calendar_name} - - - -
- - - - - - - -
{$cal_title_full}
-
-

{$display}

-
-
-
- - +$page->replace_tags(array( + 'cal' => $cal_title_full, + 'vtodo_text' => $vtodo_text, + 'description' => $description, + 'priority_lang' => $priority_lang, + 'priority' => $priority, + 'created_lang' => $created_lang, + 'start_date' => $start_date, + 'status_lang' => $status_lang, + 'status' => $status, + 'due_lang' => $due_lang, + 'due_date' => $due_date, + 'cal_title_full' => $cal_title_full, + 'template' => $template + + )); -END; +$page->output(); ?> \ No newline at end of file -- cgit v1.2.3