From aba3742b77e18aa1001a70a8a87f4a10ccf0531f Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 8 Feb 2004 23:46:47 +0000 Subject: Initial wiring of search.tpl. --- search.php | 198 ++++++++----------------------------------------------------- 1 file changed, 26 insertions(+), 172 deletions(-) (limited to 'search.php') diff --git a/search.php b/search.php index c57a891..89d4f1b 100644 --- a/search.php +++ b/search.php @@ -3,7 +3,9 @@ define('BASE','./'); $current_view = 'search'; $display_date = $results_lang; -include('./functions/ical_parser.php'); +require_once(BASE.'functions/ical_parser.php'); +require_once(BASE.'functions/list_functions.php'); +require_once(BASE.'functions/template.php'); if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER'] != '') { $back_page = $HTTP_SERVER_VARS['HTTP_REFERER']; @@ -72,173 +74,6 @@ $search_ended = getmicrotime(); $search_took = number_format(($search_ended-$search_started),3); -include (BASE.'includes/header.inc.php'); - -?> - -
- - - - - - - - - - -
- - - - - - -
-
-
-

'.$query_lang.': '.$formatted_search.'

'; - - if (isset($the_arr) && is_array($the_arr)) { - foreach($the_arr as $val) { - $key = $val['date']; - if ($key > 1) { - $dayofmonth = strtotime ($key); - $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); - echo ''.$dayofmonth.'
'; - } - if ($val["event_text"]) { - $event_text = stripslashes(urldecode($val["event_text"])); - $description = stripslashes(urldecode($val["description"])); - $event_start = $val["event_start"]; - $event_end = $val["event_end"]; - $event_calna = $val["calname"]; - $event_start = date ($timeFormat, strtotime ("$event_start")); - $event_end = date ($timeFormat, strtotime ("$event_end")); - $event_start = "$event_start - $event_end"; - if (!$val["event_start"]) { - $event_start = "$all_day_lang"; - $event_start2 = ''; - $event_end = ''; - } - echo '
'; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if (isset($val['recur'])) { - $recur = $val['recur']; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($val["description"]) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
$time_lang:$event_start
$summary_lang:$event_text
Recurring event:$recur
$description_lang:$description
\n"; - echo '
'; - if (isset($val['exceptions'])) { - echo "\n"; - foreach($val['exceptions'] as $val2) { - $key = $val2['date']; - $dayofmonth = strtotime ($key); - $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); - echo ""; - - if ($val2["event_text"]) { - $event_text = stripslashes(urldecode($val2["event_text"])); - $description = stripslashes(urldecode($val2["description"])); - $event_start = $val2["event_start"]; - $event_end = $val2["event_end"]; - $event_start = date ($timeFormat, strtotime ("$event_start")); - $event_end = date ($timeFormat, strtotime ("$event_end")); - $event_start = "$event_start - $event_end"; - if (!$val2["event_start"]) { - $event_start = "$all_day_lang"; - $event_start2 = ''; - $event_end = ''; - } - echo "\n"; - echo " - -
$exception_lang: $dayofmonth
\n"; - echo '
'; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if (isset($val2['recur'])) { - $recur = $val2['recur']; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($val2["description"]) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
$time_lang:$event_start
$summary_lang:$event_text
$recurring_event_lang:$recur
$description_lang:$description
"; - echo '

'; - - } - } - } - } - } - } else { - echo '
'; - echo '

'.$no_results_lang.'

'; - echo '
'; - } - - echo '
'; - echo $search_box; - echo '

'.sprintf($search_took_lang,$search_took).'

'; - echo ''; - ?> - -
-
-
-replace_tags(array( + 'header' => BASE.'templates/'.$template.'/header.tpl', + 'footer' => BASE.'templates/'.$template.'/footer.tpl', + 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', + 'event_js' => BASE.'functions/event.js', + 'template' => $template, + 'cal' => $cal, + 'getdate' => $getdate, + 'calendar_name' => $calendar_name, + 'display_date' => $display_date, + 'current_view' => $current_view, + 'sidebar_date' => $sidebar_date, + 'rss_powered' => $rss_powered, + 'rss_available' => '', + 'rss_valid' => '', + 'todo_js' => '', + 'show_search' => '' + )); + +$page->output(); + ?> -- cgit v1.2.3