> $w_forum[forum] > $w_topic[subject]"; include "header.php"; if(!isset($verify)) $verify = ""; if (!isset($power_env)) { $power_env = 0; } if(isset($HTTP_GET_VARS["id"])) { if(is_numeric($HTTP_GET_VARS["id"])) { $id = $HTTP_GET_VARS["id"]; } else { $id = ""; echo "Invalid ID"; include "footer.php"; exit; } } if(isset($HTTP_GET_VARS["t_id"])) { if(is_numeric($HTTP_GET_VARS["t_id"])) { $t_id = $HTTP_GET_VARS["t_id"]; } else { $t_id = ""; echo "Invalid Topic ID"; include "footer.php"; exit; } } $topic = listall("./db/$id/$t_id"); $c1 = count($topic); if(!isset($page)) { $page = 1; } $start = $page * $posts_per_page - $posts_per_page; if ($c1 <= $posts_per_page) { $num_pages = 1; } else if (($c1 % $posts_per_page) == 0) { $num_pages = ($c1 / $posts_per_page); } else { $num_pages = ($c1 / $posts_per_page) + 1; } $num_pages = (int) $num_pages; if($topic[0] == "") { echo "Topic not found."; } else { if($num_pages == 1){ $p = "$num_pages"; } else { $p = ""; for($m=1;$m<=$num_pages;$m++) { if($page == $m){ $p .= "$m "; } else { $p .= "$m "; } } } d_posting($p); echo "$skin_viewpostheading "; //show header of topic $t_header = def($topic[0], "./db/p_topic"); echo ""; $x = +1; $y = 0; for($i=$start;$i<$c1;$i++) { if($y >= $posts_per_page) { break; } $stuff = def($topic[$i], "./db/p_topic"); // display each post in the current topic if($x == 0) { $table_color = $table1; $table_font = $font1; $x++; } else { $table_color = $table2; $table_font = $font2; $x--; } @$info = get($stuff[user_id], "./db/users"); if(@$info[sig] != "") { @$info[sig] = undo_format($info[sig]); @$info[sig] = preg_replace("/\[img\](.*?)\[\/img\]/si", "", $info[sig]); @$info[sig] = preg_replace("/\[b\](.*?)\[\/b\]/si", "\\1", $info[sig]); @$info[sig] = preg_replace("/\[u\](.*?)\[\/u\]/si", "\\1", $info[sig]); @$info[sig] = preg_replace("/\[i\](.*?)\[\/i\]/si", "\\1", $info[sig]); @$info[sig] = preg_replace("/\[url\](http:\/\/)?(.*?)\[\/url\]/si", "\\2", $info[sig]); @$info[sig] = preg_replace("/\[url=(http:\/\/)?(.*?)\](.*?)\[\/url\]/si", "\\3", $info[sig]); @$info[sig] = preg_replace("/\[email\](.*?)\[\/email\]/si", "\\1", $info[sig]); @$info[sig] = preg_replace("/\[email=(.*?)\](.*?)\[\/email\]/si", "\\2", $info[sig]); @$info[sig] = "
Author: Topic: $t_header[subject]
$info[sig]
"; } if( $info[ 'posts' ] < $member_post1 ) { $status = ''; $statuscolor = 'black'; } if( $info[ 'level' ] == '1' ) { if( $info[ 'posts' ] >= $member_post1 ) { $status = $member_status1; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $member_post2 ) { $status = $member_status2; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $member_post3 ) { $status = $member_status3; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $member_post4 ) { $status = $member_status4; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $member_post5 ) { $status = $member_status5; $statuscolor = 'black'; } } elseif($info[ 'level' ] == '2' ) { if( $info[ 'posts' ] >= $mod_post1 ) { $status = $mod_status1; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $mod_post2 ) { $status = $mod_status2; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $mod_post3 ) { $status = $mod_status3; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $mod_post4 ) { $status = $mod_status4; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $mod_post5 ) { $status = $mod_status5; $statuscolor = 'black'; } } elseif($info[ 'level' ] == '3' ) { if( $info[ 'posts' ] >= $admin_post1 ) { $status = $admin_status1; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $admin_post2 ) { $status = $admin_status2; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $admin_post3 ) { $status = $admin_status3; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $admin_post4 ) { $status = $admin_status4; $statuscolor = 'black'; } if( $info[ 'posts' ] >= $admin_post5 ) { $status = $admin_status5; $statuscolor = 'black'; } } else { $status = 'Member'; $statuscolor = 'black'; } if((@($id_env == $stuff[user_id])) || ($power_env >= "2")) { $edit = "Edit Post"; } else { $edit = ""; } if((@($id_env == $stuff[user_id])) || ($power_env >= "2")) { $delete = ""; } else { $delete = ""; } if((@($id_env == $stuff[user_id])) || ($power_env >= "1")) { $quote = "Quote"; } else { $quote = ""; } if(isset($id_env) && $stuff[user_id] != $id_env) { $pm = "Send User a PM Send PM"; } else { $pm = ""; } @$msg = undo_format($stuff[message]); //start bad words filter $words = file("db/badwords.dat"); deleteWhiteIndex($words); for($pp=0;$pp", $msg); $msg = str_replace(":(", "", $msg); $msg = str_replace(";)", "", $msg); $msg = str_replace(":P", "", $msg); $msg = str_replace(":o", "", $msg); $msg = str_replace(":D", "", $msg); $msg = str_replace("(C)", "", $msg); $msg = str_replace("(M)", "", $msg); $msg = str_replace("(confused)", "", $msg); $msg = str_replace("(crazy)", "", $msg); $msg = str_replace("(hm)", "", $msg); $msg = str_replace("(hmmlaugh)", "", $msg); $msg = str_replace("(offtopic)", "", $msg); $msg = str_replace("(blink)", "", $msg); $msg = str_replace("(rofl)", "", $msg); $msg = str_replace("(R)", "", $msg); $msg = str_replace("(E)", "", $msg); $msg = str_replace("(wallbash)", "", $msg); $msg = str_replace("(Violin)", "", $msg); $msg = str_replace("(noteeth)", "", $msg); $msg = str_replace("LOL", "", $msg); $msg = str_replace("(Whistle)", "", $msg); $msg = str_replace("(Clap)", "", $msg); //end emoticons //bullet points $msg = str_replace("[list]", "
    ", $msg); $msg = str_replace("[/list]", "
", $msg); $msg = str_replace("[bullet]", "
  • ", $msg); $msg = str_replace("[/bullet]", "
  • ", $msg); //start script for delete.php $msg = str_replace("(emailadmin)", "", $msg); //end script for delete.php //start upb code $msg = preg_replace("/\[center\](.*?)\[\/center\]/si", "
    \\1
    ", $msg); $msg = preg_replace("/\[move\](.*?)\[\/move\]/si", "\\1", $msg); $msg = preg_replace("/\[white\](.*?)\[\/white\]/si", "\\1", $msg); $msg = preg_replace("/\[yellow\](.*?)\[\/yellow\]/si", "\\1", $msg); $msg = preg_replace("/\[green\](.*?)\[\/green\]/si", "\\1", $msg); $msg = preg_replace("/\[purple\](.*?)\[\/purple\]/si", "\\1", $msg); $msg = preg_replace("/\[blue\](.*?)\[\/blue\]/si", "\\1", $msg); $msg = preg_replace("/\[red\](.*?)\[\/red\]/si", "\\1", $msg); $msg = preg_replace("/\[b\](.*?)\[\/b\]/si", "\\1", $msg); $msg = preg_replace("/\[u\](.*?)\[\/u\]/si", "\\1", $msg); $msg = preg_replace("/\[i\](.*?)\[\/i\]/si", "\\1", $msg); $msg = preg_replace("/\[url\](http:\/\/)?(.*?)\[\/url\]/si", "\\2", $msg); $msg = preg_replace("/\[url=(http:\/\/)?(.*?)\](.*?)\[\/url\]/si", "\\3", $msg); $msg = preg_replace("/\[email\](.*?)\[\/email\]/si", "\\1", $msg); $msg = preg_replace("/\[email=(.*?)\](.*?)\[\/email\]/si", "\\2", $msg); $msg = preg_replace("/\[img\](.*?)\[\/img\]/si", "", $msg); $msg = preg_replace("/\[offtopic\](.*?)\[\/offtopic\]/si", "Offtopic: \\1", $msg); $msg = preg_replace("/\[small\](.*?)\[\/small\]/si", "\\1", $msg); $msg = preg_replace("/\[quote\](.*?)\[\/quote\]/si", "
    quote:
    \\1

    ", $msg); $msg = preg_replace("/\[code\](.*?)\[\/code\]/si", "Code:
    \\1
    ", $msg); //end upb code echo "  $stuff[user_name]
     $status"; //add avatar if(@$info[avatar] != "") { echo "
     
    "; } //end avatar echo "
     Posts: $info[posts]
     Registered:
       $info[date_added]

    "; if($pm != "") echo $pm."
    "; if ($info["aim"] != "") { echo "  $info[aim]
    "; } if ($info["msn"] != "") { echo "  $info[msn]
    "; } if ($info["icq"] != "") { echo "  $info[icq]"; } echo"
    Posted: $stuff[date]    
    $edit $delete $quote Profile homepage email $stuff[user_name]

    $msg

    $info[sig]
    "; $y++; } echo "$skin_tablefooter"; d_posting($p); if (isset($power_env)) { if($power_env >= 2) { echo "


    Move Topic To:

    "; } } } include "footer.php"; ?>