Destoon sets the custom search method. Step 1: In includeglobal. fun. add two function 1 to php: functionloseSpace ($ pcon) {$ pconpreg_replace (, $ pcon); $ pconpreg_replace (, $ pcon); $ pcon Step 1:
Add two functions to include/global. fun. php.
Function 1:
function loseSpace($pcon){$pcon = preg_replace("/ /","",$pcon);$pcon = preg_replace("/ /","",$pcon);$pcon = preg_replace("/ /","",$pcon);$pcon = preg_replace("/\r\n/","",$pcon);$pcon = str_replace(chr(13),"",$pcon);$pcon = str_replace(chr(10),"",$pcon);$pcon = str_replace(chr(9),"",$pcon);return $pcon;}
Function 2:
Function select_search ($ name, $ tb, $ fid) {global $ db; $ title ="All"; $ R = $ db-> get_one (" SELECT option_value FROM {$ db-> pre} fields WHERE name = '$ name' and tb =' $ TB '"); $ option_value = loseSpace ($ r ["option_value"]); $ ps = split ("\ *", $ option_value); # var_dump ($ matchs ); foreach ($ ps as $ s) {// split by * 1 | available * => 1, available if (! $ S) {continue;} list ($ num, $ word) = split ("\ |", $ s); $ result [$ num] = $ word ;} foreach ($ result as $ n =>$ v) {if ($ n ==$ fid) {$ title. ="". $ V ."";} Else {$ title. ="". $ V ."";}}$ Title. =""; Return $ title ;}
The first function is to filter spaces and press enter.
The second function generates a drop-down list based on name (custom field) tb (model) $ fid (currently selected ID.
Step 2:
$ Day = isset ($ day) in module/modules/search. inc. php )? Intval ($ day): 0; insert under
$chengse = isset($chengse)?intval($chengse):0;
Add the following under if ($ vip) $ condition. = "AND vip> 0 ";
if($chengse) $condition .= " AND chengse=$chengse";
Then use the following in the template file:
{select_search(chengse,sell,$chengse)}
Alias in include/global. fun. add two function 1 to php: function loseSpace ($ pcon) {$ pcon = preg_replace ("//", "", $ pcon ); $ pcon = preg_replace ("//", "", $ pcon); $ pcon =...