diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-01-28 07:27:23 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-01-28 07:27:23 +0000 |
commit | c5e73fa883662edaeef6da6a308f6631b6f0eca5 (patch) | |
tree | 42d148f0935a961f8bcc02514c0f04f946dfc5ea /includes/todo.php | |
parent | 603060dd7b43d47ac4637fee17b818cba6dff3c8 (diff) | |
download | phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.tar.gz phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.tar.bz2 phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.zip |
Major checkin, modified english to new language style. Preferences now
template driven along with event and todo. Header and footer seem to work
as well.
Diffstat (limited to 'includes/todo.php')
-rw-r--r-- | includes/todo.php | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/includes/todo.php b/includes/todo.php index d9933d7..e783380 100644 --- a/includes/todo.php +++ b/includes/todo.php @@ -17,56 +17,46 @@ $start_date = (isset($vtodo_array['start_date'])) ? localizeDate ($dateFormat_d $due_date = (isset($vtodo_array['due_date'])) ? localizeDate ($dateFormat_day, strtotime($vtodo_array['due_date'])) : (''); $priority = (isset($vtodo_array['priority'])) ? $vtodo_array['priority'] : (''); -$cal_title_full = $calendar_name.' '.$calendar_lang; +$cal_title_full = $calendar_name.' '.$lang['l_calendar']; $description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '<a target="_new" href="\0">\0</a>', $description); $vtodo_text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo_text); if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) { - $status = "$completed_date_lang $completed_date"; -} else if ($status == "COMPLETED") { + $status = $lang['l_completed_date'] . ' ' . $completed_date; +} elseif ($status == "COMPLETED") { $status = $completed_lang; } else { $status = $unfinished_lang; } if ($priority >= 1 && $priority <= 4) { - $priority = $priority_high_lang; + $priority = $lang['l_priority_high']; } else if ($priority == 5) { - $priority = $priority_medium_lang; + $priority = $lang['l_priority_medium']; } else if ($priority >= 6 && $priority <= 9) { - $priority = $priority_low_lang; + $priority = $lang['l_priority_low']; } else { - $priority = $priority_none_lang; + $priority = $lang['l_priority_none']; } -$display = ''; -if ($vtodo_text != '') $display .= $vtodo_text.'<br><br>'; -if ($description != '') $display .= $description.'<br>'; -if ($status != '') $display .= $status_lang.': '.$status.'<br>'; -if ($priority != '') $display .= $priority_lang.' '.$priority.'<br>'; -if ($start_date != '') $display .= $created_lang.' '.$start_date.'<br>'; -if ($due_date != '') $display .= $due_lang.' '.$due_date.'<br>'; - $page = new Page(BASE.'templates/'.$template.'/todo.tpl'); $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 )); +$page->replace_langs($lang); + $page->output(); ?>
\ No newline at end of file |