Project

General

Profile

1
//:Create a searchbox on the position
2
//:usage: [[searchbox]].
3
//:Optional parameter "?msg=the search message"
4
global $TEXT;
5
$return_value = true;
6
if (!isset($msg)) $msg='search this site..';
7
$j = "onfocus=\"if(this.value=='$msg'){this.value='';this.style.color='#000';}else{this.select();}\"
8
onblur=\"if(this.value==''){this.value='$msg';this.style.color='#b3b3b3';}\"";
9
if(SHOW_SEARCH) {
10
$return_value  = '<div class="searchbox">';
11
$return_value  .= '<form action="'.WB_URL.'/search/index'.PAGE_EXTENSION.'" method="get" name="search" class="searchform" id="search">';
12
$return_value  .= '<input style="color:#b3b3b3;" type="text" name="string" size="25" class="textbox" value="'.$msg.'" '.$j.'  />&nbsp;';
13
$return_value  .= '</form>';
14
$return_value  .= '</div>';
15
}
16
return $return_value;
(10-10/17)