$master_board_name
  $_LANG[suche]"; if ($usergroup_rights['search'] !=1){ include $APB_rp."_header.inc"; apb_error("$_LANG[serc_lang_1]", FALSE); } include $APB_rp."_header.inc"; $apb_useronline_string = "$_LANG[uo_search]"; $delete_time = $akt_time - 10 * 60; $db->unbuffered_query("DELETE FROM apb".$n."_search WHERE zeit < '$delete_time'"); if($spu==1 && $search_user){ $string_method='and'; $search_method='user'; $ExactName=1; $wo_suchen[]='all_boards'; $multiple_hits_p_thread=1; $zeit_methode='egal'; $letzte_tage_value=10; $zeitraum_start_tag=1; $zeitraum_start_mon=1; $zeitraum_start_jahr=date("Y", $installdate); $zeitraum_stop_tag=1; $zeitraum_stop_mon=1; $zeitraum_stop_jahr=date("Y", $installdate); } if (isset($search_id)) { if (strlen($search_id) != 32) { apb_error("Falscher Search-Code angegeben!", FALSE); } $search_id = stripslashes($search_id); $search = $db->unbuffered_query("SELECT * FROM apb".$n."_search WHERE search_code = '$search_id'"); if (!($search = $db->next_record($search))) { apb_error("$_LANG[serc_lang_2]", FALSE); } $search_method = $search[search_method]; $string_method = $search[string_method]; $only_search_title = $search[only_search_title]; $search_post = $search[search_post]; $ExactName = $search[ExactName]; $search_user = $search[search_user]; $multiple_hits_p_thread = $search[multiple_hits_p_thread]; $new_windows = $search[new_windows]; $wo_suchen = stripslashes($search[wo_suchen]); $wo_suchen = unserialize($wo_suchen); $zeit_methode = $search[zeit_methode]; $letzte_tage_value = $search[letzte_tage_value]; $start_time = $search[start_time]; $stop_time = $search[stop_time]; } if ($search_method != "") { if ($search_method != "string" && $search_method != "user") { $search_method = "string"; } $query_string = "FROM apb".$n."_posts AS posts, apb".$n."_threads AS threads, apb".$n."_boards AS boards, apb".$n."_categories AS cats, apb".$n."_user_table as users WHERE $PERM[NO_boards_boardid] $PERM[NO_pw_boards] ("; if ($search_method == "string") { $verknuepf = "AND"; if ($string_method == "or") { $verknuepf = "OR"; } if ($only_search_title == "1") { $search_message_threadname = "threadname"; } else { $search_message_threadname = "message"; } if ($string_method == "zusammen") { if (strlen($search_post) < 3) { apb_error($_LANG[s_error_min_3_buchstaben], FALSE); } $query_string .= "$search_message_threadname LIKE '%$search_post%'"; } else { $chk_str=str_replace(" ", "",trim($search_post)); $nochk_str=0; $search_array = explode(" ", $search_post); $sa_cnt=count($search_array); if($sa_cnt>1 && strlen($chk_str) >2 && $string_method != "or"){ $nochk_str=1; } while (list($key, $val) = each($search_array)) { if (strlen($val) < 3) { if($nochk_str != 1){ apb_error($_LANG[s_error_min_3_buchstaben], FALSE); } } } reset($search_array); $first = 1; while (list($key, $aktuell) = each($search_array)) { if ( strlen($aktuell) > 2 || $nochk_str == 1) { if ($first == 1) { $query_string .= "$search_message_threadname LIKE '%$aktuell%'"; $first = 0; } else { $query_string .= " $verknuepf $search_message_threadname LIKE '%$aktuell%'"; } } } } } elseif ($search_method == "user") { if (strlen($search_user) < 1) { apb_error("$_LANG[serc_lang_3]", FALSE); } if ($ExactName == "0") { $query_string .= "publicname LIKE '%$search_user%'"; } else { $query_string .= "publicname = '$search_user'"; } } $query_string .= ") AND posts.threadparentid = threads.threadid AND threads.boardparentid = boards.boardid AND boards.categoryparentid = cats.catid AND posts.authorid = users.userid"; @reset($wo_suchen); if (!(@in_array("all_boards", $wo_suchen))) { $boards_string = " AND boards.boardid"; if (@count($wo_suchen) >= 1) { $boards_string .= " IN ("; } $first = 1; @reset($wo_suchen); while (list($key, $val) = @each($wo_suchen)) { $val += 0; if (is_int($val)) { if ($first == "1") { $boards_string .= "$val"; $first = 0; } else { $boards_string .= ", $val"; } } } if (@count($wo_suchen) >= 1) { $boards_string .= ")"; } $query_string .= $boards_string; } if ($zeit_methode == "letzte_tage") { $letzte_tage_value += 0; if ($letzte_tage_value == 0) { $letzte_tage_value = 1; } $start_time = mktime (0,0,0,date("m",$akt_time) ,date("d",$akt_time) - $letzte_tage_value, date("Y",$akt_time)); $query_string .= " AND posttime > '$start_time'"; } elseif ($zeit_methode == "zeitraum") { if (!isset($start_time) && !isset($stop_time)) { $zeitraum_start_tag += 0; $zeitraum_start_mon += 0; $zeitraum_start_jahr += 0; $zeitraum_stop_tag += 0; $zeitraum_stop_mon += 0; $zeitraum_stop_jahr += 0; $start_time = mktime(0, 0, 0, $zeitraum_start_mon, $zeitraum_start_tag, $zeitraum_start_jahr); $start_time += ($server_zeit_unterschied * 3600); $stop_time = mktime(0, 0, 0, $zeitraum_stop_mon, $zeitraum_stop_tag + 1, $zeitraum_stop_jahr); $stop_time += ($server_zeit_unterschied * 3600); if ($stop_time < $start_time) { $stop_time = $start_time + (24 * 60 * 60); } } else { $start_time += 0; $stop_time += 0; } $query_string .= " AND posttime > '$start_time' AND posttime < '$stop_time'"; } elseif ($zeit_methode == "heute") { $start_time = mktime (0,0,0,date("m",$akt_time) ,date("d",$akt_time), date("Y",$akt_time)); $query_string .= " AND posttime > '$start_time'"; } if ($multiple_hits_p_thread != "1") { $query_string .= " GROUP BY threadparentid"; } $count_string = "SELECT COUNT(*) ".$query_string; $count_query = $db->unbuffered_query_first($count_string); $count_query = $count_query[0]; $query_string = "SELECT posts.*, threads.threadname, threads.topicicon, threads.replies, threads.author, threads.authorid as threadauthorid, boards.boardid, boards.boardname, cats.catid, cats.catname, users.publicname ".$query_string; $query_string .= " ORDER BY threadparentid DESC"; $count_hits = $db->query($query_string); $count_hits = $db->num_rows($count_hits); if(!$start || $start<1)$start=1; $start=((floor($start/$hits_per_page)*$hits_per_page)+1); $query_string .= " LIMIT ".($start-1).",$hits_per_page"; $posts = $db->query($query_string); if (!isset($search_id)) { $wo_suchen = serialize($wo_suchen); $wo_suchen = stripslashes($wo_suchen); $search_id = md5(generate_pw(16)); $db->unbuffered_query("INSERT INTO apb".$n."_search VALUES ('', '$akt_time', '$search_id', '$search_method', '$string_method', '$only_search_title', '$search_post', '$ExactName', '$search_user', '$multiple_hits_p_thread', '$new_windows', '$wo_suchen', '$zeit_methode', '$letzte_tage_value', '$start_time', '$stop_time')"); } $pages_string=GetPageNumbers($start, $hits_per_page, $count_hits, 10, 10, "search.$suffix?search_id=$search_id"); ?> "; ?>  »  -
"; } else { //function highlight_search($word, $haystack){ //return preg_replace('|('.quotemeta($word).')|iU', '\\1', $haystack); //} /*function highlight_search( $words, $haystack, $hs = "", $he = ""){ if (is_array( $words)) foreach( $words as $word) $haystack = preg_replace("|(".$word.")|iU", $hs."\\1".$he, $haystack); else $haystack = preg_replace("|(".$words.")|iU", $hs."\\1".$he, $haystack); return $haystack; }*/ while ($result = $db->next_record($posts)) { if ($thiscolor == 'B') $thiscolor = 'A'; else $thiscolor = 'B'; $threadparentid = $result[threadparentid]; $topicicon = ($topicicon_array[$result[topicicon]] ? $topicicon_array[$result[topicicon]] : $topicicon_array[$default_topic_icon]); $postid = $result[postid]; $authorname = $result[publicname]; $authorid = $result[authorid]; $posttime = HackDate2($result[posttime]); $boardparentid = $result[boardid]; $boardname = $result[boardname]; $catid = $result[catid]; $catname = $result[catname]; $topic = apb_censor(RemoveCrop(stripslashes($result[threadname]))); $replies = $result[replies]; $threadstarterid = $result[threadauthorid]; $starter_name = $db->unbuffered_query_first ("SELECT * FROM apb".$n."_user_table WHERE userid = '$threadstarterid'"); $threadstarter = $starter_name[publicname]; $topic1 = $topic; //$topic = highlight_search($search_post, $topic); //$topic = highlight_search($search_user, $topic); $topic = str_replace($search_post,"".$search_post."",$topic); $topic = str_replace($search_user,"".$search_user."",$topic); echo " "; } } ?>
 
 
$_LANG[serc_lang_11]
\"$topic1\" $topic $authorname $posttime $threadstarter $replies $boardname
($catname)
 
">
 » $master_board_name - $_LANG[suche]


 » $_LANG[serc_lang_13]    » $_LANG[serc_lang_18]  

$_LANG[serc_lang_14]  

  $_LANG[serc_lang_15]

  $_LANG[serc_lang_16]

  $_LANG[serc_lang_17] ($_LANG[serc_lang_27])


$_LANG[serc_lang_19]  

  $_LANG[serc_lang_20]

  $_LANG[serc_lang_21]
Suchen in: $_LANG[serc_lang_26]

"; if (!$boardprefix) $all_boards_select = "selected"; echo "

$_LANG[serc_lang_24]


  $_LANG[serc_lang_25]

  $_LANG[serc_lang_28]

  $_LANG[serc_lang_29]

$_LANG[serc_lang_30]

  $_LANG[serc_lang_31]

  $_LANG[serc_lang_32]

  $_LANG[serc_lang_33]   Tage


  Innerhalb Datum:

$_LANG[serc_lang_34]   . .

und:         . .

$sess_hiddenfield

"; } include $APB_rp."statistik.$suffix"; include $APB_rp."_footer.inc"; ?>