From 7cade3b04274ecc2d3583a0602cc5de3643e81a6 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sat, 31 Jan 2004 22:59:28 +0000 Subject: More template work. --- functions/error.php | 96 ++++++++++++++++++-------------------------- functions/list_functions.php | 2 + functions/list_icals.php | 12 ------ functions/template.php | 2 +- 4 files changed, 41 insertions(+), 71 deletions(-) delete mode 100644 functions/list_icals.php (limited to 'functions') diff --git a/functions/error.php b/functions/error.php index 9633eb0..81c2013 100644 --- a/functions/error.php +++ b/functions/error.php @@ -1,69 +1,49 @@ + $page = new Page(BASE.'templates/'.$template.'/error.tpl'); -
- - - - -
- - - - - - - -
- - - - - - -
-
- - - - -
-
- -
-
- -
-
- -
-
-
-
-
-
-replace_tags(array( + 'header' => BASE.'templates/'.$template.'/header.tpl', + 'footer' => BASE.'templates/'.$template.'/footer.tpl', + 'calendar_nav' => BASE.'templates/'.$template.'/calendar_nav.tpl', + 'template' => $template, + 'cal' => $cal, + 'getdate' => $getdate, + 'calendar_name' => $calendar_name, + 'display_date' => $display_date, + 'rss_powered' => $rss_powered, + 'rss_available' => '', + 'todo_available' => '', + 'rss_valid' => '', + 'error_msg' => $error_msg, + 'error_calendar' => $error_calendar, + 'generated' => $generated + + )); + + $page->output(); - include (BASE.'includes/footer.inc.php'); + } diff --git a/functions/list_functions.php b/functions/list_functions.php index 8d4d3a6..c9ae6fd 100644 --- a/functions/list_functions.php +++ b/functions/list_functions.php @@ -1,5 +1,7 @@ "; - - // List the calendars. - display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); - - print ""; -} -?> diff --git a/functions/template.php b/functions/template.php index 856d926..0a6d0cb 100644 --- a/functions/template.php +++ b/functions/template.php @@ -130,7 +130,7 @@ class Page { $data = (file_exists($data)) ? $this->parse($data) : $data; // This removes any unfilled tags - if ($data == '') { + if (!$data) { $this->page = ereg_replace('(.*)', '', $this->page); } -- cgit v1.2.3