diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-20 05:05:25 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-20 05:05:25 +0000 |
commit | d31c02e7d5bc65b9f3a3b747e4bd56ffda38e053 (patch) | |
tree | 52247f74195ccb1b52a49ab39f406c5b53bafa8d | |
parent | b8e244056c990c65a859c1252785ffa7f62fc4a8 (diff) | |
download | phpicalendar-d31c02e7d5bc65b9f3a3b747e4bd56ffda38e053.tar.gz phpicalendar-d31c02e7d5bc65b9f3a3b747e4bd56ffda38e053.tar.bz2 phpicalendar-d31c02e7d5bc65b9f3a3b747e4bd56ffda38e053.zip |
add default_path to search.php
-rw-r--r-- | functions/ical_parser.php | 2 | ||||
-rw-r--r-- | search.php | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 393a076..87a3cf0 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -388,7 +388,7 @@ foreach ($cal_filelist as $cal_key=>$filename) { break; case 'DURATION': if (($first_duration == TRUE) && (!stristr($field, '=DURATION'))) { - ereg ('^P([0-9]{1,2}[W])?([0-9]{1,2}[D])?([T]{0,1})?([0-9]{1,2}[H])?([0-9]{1,2}[M])?([0-9]{1,2}[S])?', $data, $duration); + ereg ('^P([0-9]{1,2}[W])?([0-9]{1,3}[D])?([T]{0,1})?([0-9]{1,2}[H])?([0-9]{1,2}[M])?([0-9]{1,2}[S])?', $data, $duration); $weeks = str_replace('W', '', $duration[1]); $days = str_replace('D', '', $duration[2]); $hours = str_replace('H', '', $duration[4]); @@ -2,11 +2,11 @@ define('BASE','./'); $current_view = 'search'; -$display_date = $lang['l_results']; require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/list_functions.php'); require_once(BASE.'functions/template.php'); -header("Content-Type: text/html; charset=$charset"); +header("Content-Type: text/html; charset=$phpiCal_config->charset"); +$display_date = $lang['l_results']; if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != '') { $back_page = $_SERVER['HTTP_REFERER']; @@ -27,7 +27,7 @@ $search_box .= '<input type="hidden" name="cal" value="'.$cal.'">'."\n". '<input type="hidden" name="getdate" value="'.$getdate.'">'."\n". '<input type="text" size="15" name="query" value="'.$query.'">'."\n". - '<INPUT type="image" src="templates/'.$template.'/images/search.gif" border=0 height="19" width="18" name="submit" value="Search">'."\n". + '<INPUT type="image" src="templates/'.$phpiCal_config->template.'/images/search.gif" border=0 height="19" width="18" name="submit" value="Search">'."\n". '</form>'; $search_started = getmicrotime(); @@ -277,21 +277,22 @@ function format_recur($arr) { } -$page = new Page(BASE.'templates/'.$template.'/search.tpl'); +$page = new Page(BASE.'templates/'.$phpiCal_config->template.'/search.tpl'); $page->draw_search($page); $page->replace_files(array( - 'header' => BASE.'templates/'.$template.'/header.tpl', - 'footer' => BASE.'templates/'.$template.'/footer.tpl', - 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', + 'header' => BASE.'templates/'.$phpiCal_config->template.'/header.tpl', + 'footer' => BASE.'templates/'.$phpiCal_config->template.'/footer.tpl', + 'sidebar' => BASE.'templates/'.$phpiCal_config->template.'/sidebar.tpl', 'event_js' => BASE.'functions/event.js', )); $page->replace_tags(array( - 'version' => $phpicalendar_version, + 'version' => $phpiCal_config->phpicalendar_version, + 'default_path' => $phpiCal_config->default_path, 'formatted_search' => $formatted_search, 'l_results' => $lang['l_results'], 'l_query' => $lang['l_query'], @@ -303,15 +304,14 @@ $page->replace_tags(array( 'l_exception' => $lang['l_exception'], 'l_no_results' => $lang['l_no_results'], 'search_box' => $search_box, - 'charset' => $charset, - 'template' => $template, + 'charset' => $phpiCal_config->charset, + 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, 'cpath' => $cpath, 'calendar_name' => $cal_displayname, 'display_date' => $display_date, 'rss_powered' => $rss_powered, - 'default_path' => '', 'rss_available' => '', 'rss_valid' => '', 'show_search' => $show_search, @@ -352,4 +352,4 @@ $page->output(); #echo "<pre>"; #print_r($the_arr); #echo "</pre>"; -?> +?>
\ No newline at end of file |