2 /////////////////////////////////////////////////
3 // PukiWiki - Yet another WikiWikiWeb clone.
5 // $Id: search.inc.php,v 1.2 2004/07/31 03:09:20 henoheno Exp $
8 function plugin_search_action()
11 global $_title_result,$_title_search,$_msg_searching,$_btn_and,$_btn_or,$_btn_search;
13 $s_word = array_key_exists('word',$vars) ? htmlspecialchars($vars['word']) : '';
14 $type = array_key_exists('type',$vars) ? $vars['type'] : '';
18 $msg = str_replace('$1',$s_word,$_title_result);
19 $body = do_search($vars['word'],$type);
23 $msg = $_title_search;
24 $body = "<br />\n$_msg_searching\n";
27 $and_check = $or_check = '';
29 $or_check = ' checked="checked"';
31 $and_check = ' checked="checked"';
34 <form action="$script?cmd=search" method="post">
36 <input type="text" name="word" size="20" value="$s_word" />
37 <input type="radio" name="type" value="AND" $and_check />$_btn_and
38 <input type="radio" name="type" value="OR" $or_check />$_btn_or
39 <input type="submit" value="$_btn_search" />
44 return array('msg'=>$msg,'body'=>$body);