From: <ji...@us...> - 2005-04-08 06:38:52
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17618/phpicalendar Modified Files: search.php Log Message: Modifications search.php. Requires updated functions/template.php Index: search.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/search.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** search.php 2 Sep 2004 18:44:43 -0000 1.34 --- search.php 8 Apr 2005 06:38:38 -0000 1.35 *************** *** 24,31 **** $search_box .= '<form action="search.php" method="GET">'."\n". '<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="styles/'.$style_sheet.'/search.gif" border=0 height="19" width="18" name="submit" value="Search">'."\n". '</form>'; --- 24,32 ---- $search_box .= '<form action="search.php" method="GET">'."\n". + '<input type="hidden" name="cpath" value="'.$cpath.'">'."\n". '<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". '</form>'; *************** *** 46,50 **** --- 47,54 ---- if (is_array($event_tmp)) { if (!isset($the_arr[$uid_tmp]) || isset($event_tmp['exception'])) { + #print_r($format_search_arr); + #echo "<br>this event:".$event_tmp['event_text']."<br>"; $results1 = search_boolean($format_search_arr,$event_tmp['event_text']); + if (!$results1) { $results2 = search_boolean($format_search_arr,$event_tmp['description']); *************** *** 182,185 **** --- 186,190 ---- // check against the AND foreach($and_arr as $s) { + #echo "haystack: $haystack<br>needle: $s<br>"; if (is_string(strstr($haystack,$s)) == false) { return false; *************** *** 204,207 **** --- 209,213 ---- } // if we haven't returned false, then we return true + # echo "return true<br>"; return true; } *************** *** 271,277 **** } $page = new Page(BASE.'templates/'.$template.'/search.tpl'); ! $page->replace_tags(array( 'header' => BASE.'templates/'.$template.'/header.tpl', 'footer' => BASE.'templates/'.$template.'/footer.tpl', --- 277,287 ---- } + $page = new Page(BASE.'templates/'.$template.'/search.tpl'); ! $page->draw_search($page); ! ! ! $page->replace_files(array( 'header' => BASE.'templates/'.$template.'/header.tpl', 'footer' => BASE.'templates/'.$template.'/footer.tpl', *************** *** 293,297 **** )); - $page->output(); ?> --- 303,365 ---- )); + $page->replace_tags(array( + 'formatted_search' => $formatted_search, + 'l_results' => $lang['l_results'], + 'l_query' => $lang['l_query'], + 'l_time' => $lang['l_time'], + 'l_summary' => $lang['l_summary'], + 'l_description' => $lang['l_description'], + 'l_recurring_event' => $lang['l_recurring_event'], + 'l_exception' => $lang['l_exception'], + 'l_no_results' => $lang['l_no_results'], + 'search_box' => $search_box, + 'charset' => $charset, + 'template' => $template, + 'cal' => $cal, + 'getdate' => $getdate, + 'calendar_name' => $calendar_name, + 'display_date' => $display_date, + 'rss_powered' => $rss_powered, + 'default_path' => '', + 'rss_available' => '', + 'rss_valid' => '', + 'show_search' => '', + 'next_month' => $next_month, + 'prev_month' => $prev_month, + 'show_goto' => '', + 'is_logged_in' => '', + 'list_jumps' => $list_jumps, + 'list_icals' => $list_icals, + 'list_years' => $list_years, + 'list_months' => $list_months, + 'list_weeks' => $list_weeks, + 'legend' => $list_calcolors, + 'current_view' => $current_view, + 'style_select' => $style_select, + 'sidebar_date' => $sidebar_date, + 'l_goprint' => $lang['l_goprint'], + 'l_preferences' => $lang['l_preferences'], + 'l_calendar' => $lang['l_calendar'], + 'l_legend' => $lang['l_legend'], + 'l_tomorrows' => $lang['l_tomorrows'], + 'l_jump' => $lang['l_jump'], + 'l_todo' => $lang['l_todo'], + 'l_day' => $lang['l_day'], + 'l_week' => $lang['l_week'], + 'l_month' => $lang['l_month'], + 'l_year' => $lang['l_year'], + 'l_subscribe' => $lang['l_subscribe'], + 'l_download' => $lang['l_download'], + 'l_this_months' => $lang['l_this_months'], + 'l_powered_by' => $lang['l_powered_by'], + 'l_this_site_is' => $lang['l_this_site_is'] + )); + + + + $page->output(); + #echo "<pre>"; + #print_r($the_arr); + #echo "</pre>"; ?> |