"; if(isset($_POST["text"])) { if(isset($_POST["start"])) $start = $_POST["start"]; else $start = 0; $board_id = $_POST["board_id"]; $prev = $start-$thread_limit; $next = $start+$thread_limit; echo ""; $search_for = ""; if($_POST["search_type"] == "any") $join = "or"; else $join = "and"; if($_POST["text"]) { $text_array = explode(" ", addslashes(trim($_POST["text"]))); if($_POST["search"] == "both") { foreach($text_array as $value) { $search_for .= "$join thr.title like '%$value%' "; $search_for .= "$join pst.comment like '%$value%' "; } } elseif($_POST["search"] == "title") { foreach($text_array as $value) { $search_for .= "$join thr.title like '%$value%' "; } } else { foreach($text_array as $value) { $search_for .= "$join pst.comment like '%$value%' "; } } } //remove the first join if($_POST["search_type"] == "any") $search_for = substr($search_for, 2); else $search_for = substr($search_for, 3); if($_POST["alias"]) $search_for1 = "and pst.alias like '%".trim($_POST["alias"])."%'"; else $search_for1 = ""; if($_POST["ttl_img"]) $search_for2 = "and thr.ttl_img = '".$_POST["ttl_img"]."'"; else $search_for2 = ""; $query = mysql_query("select thr.ref_id, thr.title, thr.ttl_img, thr.category, thr.rating, thr.rt_cnt, thr.first_alias, thr.last_post, thr.last_alias, DATE_FORMAT(thr.last_time, '%a %D %b %\'%y %l%:%i%p') as last_time, thr.no_posts-1 as no_posts, brd.view from thread thr, board brd, post pst where thr.ref_id = pst.ref_id and brd.board_id = thr.board_id and brd.board_id = '$board_id' $search_for1 $search_for2 and ($search_for) group by thr.ref_id order by thr.last_post desc limit $start, $thread_limit") or die(mysql_error()); if(mysql_num_rows($query) > 0) { echo "
"; if($start > 0) echo ""; echo "

Search Results

"; //Check if there are more results than are displayed $next_page = mysql_query("select thr.ref_id from thread thr, board brd, post pst where thr.ref_id = pst.ref_id and brd.board_id = thr.board_id and brd.board_id = '$board_id' $search_for1 and ($search_for) group by thr.ref_id limit $next, 1") or die(mysql_error()); if(mysql_num_rows($next_page) > 0) echo ""; echo "

"; if($admin) echo ""; if($admin > 1) echo ""; echo ""; while ($row = mysql_fetch_array($query)) { if($row["category"] == 1) echo ""; elseif($row["category"] == 3 || $row["category"] == 4) echo ""; else echo ""; echo ""; if($row["rt_cnt"] > 0) { $rating_full = round($row["rating"]/$row["rt_cnt"], 3); $rating_int = round($rating_full); echo ""; } else echo ""; if($row["no_posts"] > $post_limit) { echo ""; } else echo ""; echo ""; if($admin) { if($row["view"] != 2) { echo ""; } else echo ""; } if($admin > 1) { echo ""; } echo ""; } echo "
Type Rating Subject Started By Last On RepliesArchiveDelete
---
".stripslashes($row["title"])." Page:"; $no_pages = $row["no_posts"]/$post_limit; for($i=0; $i<$no_pages; $i++) { $first = $i*$post_limit; echo " ".($i+1).""; } echo "
".stripslashes($row["title"])."".$row["first_alias"]." ".$row["last_alias"]." ".$row["last_time"]." ".$row["no_posts"]." ---
"; } else echo "

No Matches Found

"; } if(isset($_POST["search"])) $search = $_POST["search"]; else $search = "title"; if(isset($_POST["search_type"])) $search_type = $_POST["search_type"]; else $search_type = "any"; if(isset($_POST["board_id"])) $board_id = $_POST["board_id"]; else $board_id = 0; if(isset($_POST["ttl_img"])) $ttl_img = $_POST["ttl_img"]; else $ttl_img = 0; echo "

Search The Forum

*Search Text
*User Name
Search Title Search Comment Search Both
Match any words Match all words
In Board
"; for($i=1; $i<=14; $i++) { echo " "; if($i == 7) echo "
"; } echo "

* Separate search items with spaces only."; if(isset($_GET["user_posts"]) || isset($_GET["number"])) { include "include/replace.html"; if($usr) { $query = mysql_query("select show_avatar from users where user_id = $usr") or die(mysql_error()); $show_avatar = mysql_result($query, 0); } else $show_avatar = 1; if(!$usr) $extravals = "and brd.view <= 2 and pst.deleted = 0"; else if(!$admin) $extravals = "and brd.view <= 3 and pst.deleted = 0"; else $extravals = ""; if(isset($_GET["user_posts"])) { $user_posts = $_GET["user_posts"]; $query = mysql_query("select pst.post_id, pst.ref_id, pst.user_id, pst.alias, pst.sig, pst.comment, DATE_FORMAT(pst.post_time, '%a %D %b %\'%y %l%:%i%p') as post_time, pst.parse_url, pst.use_avatar, pst.use_url, pst.use_email, pst.category as post_category, pst.deleted, thr.category as thread_category, thr.board_id, thr.title as thread_title, brd.title as board_title, brd.view from post pst, thread thr, board brd where pst.user_id = $user_posts and pst.ref_id = thr.ref_id and thr.board_id = brd.board_id $extravals order by pst.post_id desc limit 10") or die(mysql_error()); } else { $number = $_GET["number"]; if($_GET["board_id"]) $board = "and brd.board_id = ".$_GET["board_id"]; else $board = ""; $query = mysql_query("select pst.post_id, pst.ref_id, pst.user_id, pst.alias, pst.sig, pst.comment, DATE_FORMAT(pst.post_time, '%a %D %b %\'%y %l%:%i%p') as post_time, pst.parse_url, pst.use_avatar, pst.use_url, pst.use_email, pst.category as post_category, pst.deleted, thr.category as thread_category, thr.board_id, thr.title as thread_title, brd.title as board_title, brd.view from post pst, thread thr, board brd where pst.ref_id = thr.ref_id and thr.board_id = brd.board_id $extravals $board order by pst.post_id limit $number, 1") or die(mysql_error()); } if(mysql_num_rows($query)) { echo "
"; while ($row = mysql_fetch_array($query)) { $alias = ucfirst(stripslashes($row["alias"])); if(!$row["view"]) $review = 1; else $review = 0; echo ""; if($row["deleted"]) echo "
"; else if($row["post_category"] == 3) echo ""; else if($row["post_category"] == 1 || $row["thread_category"] == 1) echo ""; else echo ""; echo ""; if($row["post_category"] == 2 || $row["post_category"] == 3) { echo ""; } else { $registered = 0; if(!$row["user_id"]) { echo ""; } else { $query1 = mysql_query("select admin, email, cust_ttl, url, avatar, def_av, blog, web, DATE_FORMAT(reg_date, '%D %b %\'%y') as reg_date, no_posts, ct_lock from users where user_id = ".$row["user_id"]." and deleted = 0") or die(mysql_error()); if($user = mysql_fetch_array($query1)) { $registered = 1; if($user["admin"]) $alias = "$alias*"; echo ""; if($user["cust_ttl"] && !$user["ct_lock"]) $rating = stripslashes($user["cust_ttl"]); else { if(($user["no_posts"]) < 10) $rating = "Forum Newbie"; elseif(($user["no_posts"]) < 20) $rating = "Trainee Daddy"; elseif(($user["no_posts"]) < 50) $rating = "Daddy Mack"; elseif(($user["no_posts"]) < 100) $rating = "Big Daddy"; elseif(($user["no_posts"]) < 200) $rating = "Forum Daddy"; elseif(($user["no_posts"]) < 400) $rating = "Daddy-licious"; elseif(($user["no_posts"]) < 800) $rating = "The Daddy"; elseif(($user["no_posts"]) < 1200) $rating = "Daddykong"; elseif(($user["no_posts"]) < 1600) $rating = "´┐Żberdaddy"; else $rating = "Grand High Daddy!"; } echo ""; if($row["use_avatar"]) { echo ""; } echo ""; } else { echo ""; } } } echo "
Forum Admin Team
Taking care of business
".$row["post_time"]."
$alias
Unregistered
Wannabe
Forummer
".$row["post_time"]."
$alias
$rating
".$row["post_time"]."
".$user["no_posts"]." Posts
"; if($user["avatar"]) echo "\"".stripslashes($row["alias"])."'s"; else echo "\"".stripslashes($row["alias"])."'s"; echo "
Member Since
".$user["reg_date"]."
$alias
$alias has left the building
".$row["post_time"]."
\"Goodbye
"; $no_ratings = 0; $cum_rating = 0; if($review && $row["ref_id"] != $row["post_id"]) { $query1 = mysql_query("select title, rating from review where post_id = ".$row["post_id"]) or die(mysql_error()); if($row1 = mysql_fetch_array($query1)) { $rating = $row1["rating"]; $cum_rating = $row1["rating"]; if(strpos("$rating", ".")) { $rating = number_format($rating, 2, ".", ""); if(substr($rating, -1) == '0') $rating = substr($rating, 0, -1); } echo ""; } } echo ""; if($row["sig"]) echo ""; if($review && $row["ref_id"] != $row["post_id"]) { $query1 = mysql_query("select review_id, user_id, alias, comment, rating, DATE_FORMAT(dt, '%D %b %\'%y') as dt from review_2nd where post_id = ".$row["post_id"]) or die(mysql_error()); $no_ratings = mysql_num_rows($query1) + 1; while($row1 = mysql_fetch_array($query1)) { $rating = $row1["rating"]; $cum_rating += $rating; if(strpos("$rating", ".")) { $rating = number_format($rating, 2, ".", ""); if(substr($rating, -1) == '0') $rating = substr($rating, 0, -1); } echo ""; } } echo "
".stripslashes($row["thread_title"])."  \"Digg ".stripslashes($row["board_title"])."
".stripslashes($row1["title"])." $rating/10
"; if(!$html_tags) $comment = strip_tags($row["comment"]); else $comment = $row["comment"]; $comment = parse_quote(" ".$comment." "); if($row["parse_url"]) $comment = parse_link($comment); $comment = stripslashes(nl2br($comment)); echo "$comment

".parse_link(nl2br(stripslashes(" ".$row["sig"]." ")))."
"; if($row1["user_id"]) { echo "Second opinion by ".stripslashes($row1["alias"]).""; } else echo stripslashes($row1["alias"]); echo " on ".$row1["dt"]." $rating/10
"; if(!$html_tags) $comment = strip_tags($row1["comment"]); else $comment = $row1["comment"]; $comment = parse_quote(" ".$comment." "); if($row["parse_url"]) $comment = parse_link($comment); $comment = stripslashes(nl2br($comment)); echo "$comment
"; if($review && $no_ratings > 1) { $av_rating = $cum_rating/$no_ratings; if(strpos("$av_rating", ".")) { $av_rating = number_format($av_rating, 2, ".", ""); if(substr($av_rating, -1, 1) == '0') $av_rating = substr($av_rating, 0, -1); } echo ""; } echo "
"; if($registered) { echo ""; if($usr && $row["user_id"] != $usr) { echo " "; if($row["use_email"]) echo " "; } if($row["use_url"] && $user["url"]) echo " "; if($user["blog"]) echo " "; if($user["web"]) echo " "; echo " "; } echo "Average Rating $av_rating

"; } } else echo "

No Matches

"; } echo "

Last 10 Posts by

View th Post in board

Or Use Google!


".$_SERVER['SERVER_NAME']." Internet
"; include "include/footer.html"; ?>