|
|
#77366
10/09/2001 2:31 PM
|
Joined: Aug 2000
Posts: 1,083
Kahuna
|
|
Kahuna
Joined: Aug 2000
Posts: 1,083 |
function s_search($query) { // Searches for query in the index file. // Multiple word search originally contributed by Matthew Furister $query = trim(strtolower(c_strip_chars($query))); $search_data = @file($GLOBALS[index_file]) or die("$GLOBALS[err_no_search_db]"); $pages_found = " "; foreach ($search_data as $search_page) { $page_arr = explode("|", $search_page); $found_count = 0; $qry_array = split('[, ]+',trim(strtolower($query))); foreach ($qry_array as $qry) { if (in_array($qry, $page_arr)) { ++$found_count; $pages_found .= $page_arr[0] . " "; } } if ($found_count == count($qry_array)) $result_arr[] = $page_arr[0]; } return $result_arr; }
function s_print_title_desc($file_n) { $file = @file($file_n); if ($file) { $line_complete = implode('', $file); eregi("(.*)", $line_complete, $out); $title = trim($out[1]); if($title) $line_complete = str_replace($title, "", $line_complete); $line_complete = strip_tags($line_complete); $line_complete = trim($line_complete); $line_complete = trim(substr($line_complete, 0, 400));
echo ""; if ($title) echo "$title - $file_n"; else echo "$file_n"; echo " $line_complete...n "; } else { echo "$file_n ..."; } }
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,834
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,957
Members13,826
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 6013
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 14
|
|
|
|
|
|