"; } function fetchTitles($id,$thread) { global $US_IGNORED, $ignoredtext, $INPUT_r, $INPUT_v, $PATH; $sql_replies2 = "select * from MB_Replies where MBR_ReplyTo = '" . mysql_real_escape_string($id) . "' and MBR_Thread = '" . mysql_real_escape_string($thread) . "' and MBR_Initial = 0 order by MBR_Date desc"; $res_replies2 = mysql_query($sql_replies2); if (mysql_num_rows($res_replies2)) { echo '';} } function fetchMessages($id,$thread) { $res_replies2 = mysql_query("select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($id) . " and MBR_Thread = " . mysql_real_escape_string($thread) . " and MBR_Initial = 0"); if(mysql_num_rows($res_replies2)) { echo 'No messages were found!'; return; } $row = mysql_fetch_array($res_replies2); echo stripslashes($row["MBR_Subject"]); } function displaySmilies() { echo '
Instructions: Type the [code] required into the text box, or just click the smiley.
[angel] [argue] [ban] [band]
[blush] [bounce] [bow] [boxer]
[bump] [cheerup] [clap] [confused]
[cool] [cry] [dance] [dodge]
[doh] [drink] [explode] [fish]
[flowers] [grin] [hug] [jive]
[kiss] [lol] [lovein] [mad]
[nervous] [no] [nod] [nurse]
[pace] [police] [pop] [raygun]
[redcard] [rofl] [rolleyes] [sadbye]
[santa] [sick] [slap] [smile]
[spam] [stop] [stupid] [superman]
[surprised] [theone] [thumbsdown] [thumbsup]
[tongue] [troll] [tv] [wave]
[weights] [whistle] [whoosh] [wink]
[zzz]
'; } function forumCategories($filter) { global $SITE_ID, $TP_BORDER2, $PATH, $US_ID, $FORUM_FORMAT; #if ($FORUM_FORMAT == "S") return(""); $cat = "Filter: "; if (isset($US_ID)) { $sql = "select US_Stats_BoardPosts from US_Users where US_ID = $US_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($filter == "z" and $filter != "0") $cat .= "  My Posts ({$row['US_Stats_BoardPosts']}) "; else $cat .= "  My Posts ({$row['US_Stats_BoardPosts']}) "; } } $sql_cats = "select * from MB_Categories where MBC_Domain = $SITE_ID order by MBC_Order"; $res_cats = mysql_query($sql_cats); while ($row_cats = mysql_fetch_array($res_cats)) { $sel_count_users = "select count(*) from MB_Threads where MBT_Domain = $SITE_ID and MBT_Category = " . $row_cats['MBC_ID']; $res_count_users = mysql_query($sel_count_users); $row_count_users = mysql_fetch_row($res_count_users); if ($filter == $row_cats['MBC_ID']) $style = "style=\"background: #$TP_BORDER2; font: white;\""; else $style = ""; $cat .= "   " . $row_cats['MBC_ShortTitle'] . " (" . $row_count_users[0] . ") "; } $sel_count_users = "select count(*) from MB_Threads where MBT_Domain = $SITE_ID"; $res_count_users = mysql_query($sel_count_users); $row_count_users = mysql_fetch_row($res_count_users); $cat .= ""; if ($filter == "0") $style = "style=\"background: #$TP_BORDER2; color: white;\""; else $style = ""; $cat .= "   ALL posts (" . $row_count_users[0] . ") "; return($cat); } function boardContent() { global $SITE_NAME, $SITE_ID, $TEAM_NAME, $US_ID, $PATH, $DO_TWITTERAPP; $x = rand(0, 6); switch ($x) { case 1: { # latest site poll print "

Latest $TEAM_NAME Poll

"; $sql = "select * from PO_PollQuestions where POQ_User = 0 and POQ_Domain = $SITE_ID and POQ_Status != 'D' order by POQ_DateTime desc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $poll_title = stripslashes($row['POQ_Question']); $answers = explode("\n", $row['POQ_Answers']); $poll_data = ""; foreach ($answers as $x => $v) { $sql2 = "select count(*) as cnt from PO_PollAnswers where POA_Poll = {$row['POQ_ID']} and POA_Answer = " . ($x+1); $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { if ($poll_data != "") $poll_data .= ","; $poll_data .= "['" . trim(stripslashes($v)) . "', " . $row2['cnt'] . "]"; } } print " "; print "
Click here to vote
"; } break; } case 2: { # betting # $today = date("Ymd"); $timenow = date("Hi"); # $sql = "select * from Football_GA_Games where PLG_Type = 'L' and (PLG_HomeTeam = '$TEAM_NAME' or PLG_AwayTeam = '$TEAM_NAME') and ((PLG_Date = $today and PLG_Time > $timenow) or PLG_Date > $today) order by PLG_Date, PLG_Time limit 1"; # $res = mysql_query($sql); # while ($row = mysql_fetch_array($res)) { # $date = date('l jS F Y G:i', strtotime($row['PLG_Date'] . " " . $row['PLG_Time'])); # if(isset($_COOKIE['ODDS'])) $INPUT_odds = $_COOKIE['ODDS']; else $INPUT_odds = 'F'; # $NM_MatchDesc = storyTitle("{$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}"); # $bet = ""; # $sql_bet = "select * from BT_Betting888 where BT_Event = \"{$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}\" and BT_SubEvent = \"90 Minutes\" and BT_Selection = \"{$row['PLG_HomeTeam']}\" and BT_Merchant != \"Betfair\" order by BT_Odds desc, rand() limit 1"; $res_bet = mysql_query($sql_bet); while ($row_bet = mysql_fetch_array($res_bet)) { $bet1 = displayMerchant($row_bet['BT_Merchant']) . " " . "" . displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $row_bet['BT_Merchant']) . " "; $best[0] = $row_bet['BT_Odds']; } # $sql_bet = "select * from BT_Betting888 where BT_Event = \"{$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}\" and BT_SubEvent = \"90 Minutes\" and BT_Selection = \"Draw\" and BT_Merchant != \"Betfair\" order by BT_Odds desc, rand() limit 1"; $res_bet = mysql_query($sql_bet); while ($row_bet = mysql_fetch_array($res_bet)) { $bet2 = displayMerchant($row_bet['BT_Merchant']) . " " . "" . displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $row_bet['BT_Merchant']) . " "; $best[1] = $row_bet['BT_Odds']; } # $sql_bet = "select * from BT_Betting888 where BT_Event = \"{$row['PLG_HomeTeam']} v {$row['PLG_AwayTeam']}\" and BT_SubEvent = \"90 Minutes\" and BT_Selection = \"{$row['PLG_AwayTeam']}\" and BT_Merchant != \"Betfair\" order by BT_Odds desc, rand() limit 1"; $res_bet = mysql_query($sql_bet); while ($row_bet = mysql_fetch_array($res_bet)) { $bet3 = displayMerchant($row_bet['BT_Merchant']) . " " . "" . displayOdds($row_bet['BT_Odds'], $row_bet['BT_Fractional'], $row_bet['BT_Merchant']) . " "; $best[2] = $row_bet['BT_Odds']; } # print "

Latest Odds

$date
{$row['PLG_HomeTeam']}$bet1
X$bet2
{$row['PLG_AwayTeam']}$bet3
"; # print "
Click here for more $TEAM_NAME odds
"; # } # break; } $x = 3; } case 3: { # gallery global $MINDATE; $sql = "select * from PH_Photos, Football_GA_Games where PLG_ID = PH_Match and PH_Match != 0 and PLG_Date > $MINDATE and PH_Domain = $SITE_ID and PLG_HomeScore >= 0 and (PLG_HomeTeam = '$TEAM_NAME' or PLG_AwayTeam = '$TEAM_NAME') order by RAND() limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($row['PLG_HomeTeam'] == $TEAM_NAME) $op = $row['PLG_AwayTeam']; else $op = $row['PLG_HomeTeam']; print "

$op Gallery

"; print "
"; print "

View Gallery
"; } break; } case 4: { # on this day global $NEWS; $mmdd = date("m-d"); $timenow = date("Y-m-d"); $onthisday = ""; # $sql = "select * from NE_News where NE_DateTime like '%-$mmdd %' and NE_DateTime < '$timenow' and NE_Domain = $SITE_ID and NE_TopStory != 'H' order by rand() limit 1"; # $res = mysql_query($sql); # while ($row = mysql_fetch_array($res)) { # $y = date("Y", strtotime($row['NE_DateTime'])); # print "

On This Day In $y

"; # print "

" . stripslashes($row['NE_Title']) . "
" . stripslashes($row['NE_Intro']) . "

Read more
"; # } break; } case 5: { # your report $today = date("Ymd"); $timenow = date("Hi"); $sql = "select * from Football_GA_Games where PLG_HomeScore > -1 and (PLG_HomeTeam = '$TEAM_NAME' or PLG_AwayTeam = '$TEAM_NAME') and ((PLG_Date = $today and PLG_Time < $timenow) or PLG_Date < $today) order by PLG_Date desc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($row['PLG_HomeTeam'] == $TEAM_NAME) $oppo = $row['PLG_AwayTeam']; else $oppo = $row['PLG_HomeTeam']; $date = date('l jS F Y G:i', strtotime($row['PLG_Date'] . " " . $row['PLG_Time'])); print "

Your Report: $oppo

"; $sql1 = "select * from Football_YR_YourReport, US_Users where US_ID = YR_User and YR_Flag = 'A' and YR_Match = {$row['PLG_ID']} order by rand() limit 1"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_array($res1)) { print "
{$row1['US_Username']} wrote:

" . processText(shortenString($row1['YR_Text'], 400)) . "
"; print "
More reports
"; } } break; } default: { # latest blog print "

Latest $TEAM_NAME Blog

"; $sql = "select * from BL_Blogs, US_Users where BL_Author = US_ID and BL_DateTime < now() and BL_Domain = $SITE_ID order by BL_DateTime desc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $intro = stripslashes($row['BL_Intro']); # $pos = strpos($intro, ". "); # if ($pos !== false) $intro = substr($intro, 0, $pos+1); print "" . stripslashes($row['BL_Title']) . "
by {$row['US_Username']} " . date('D jS M Y', strtotime($row['BL_DateTime'])) . "
$intro"; } print "
Click here for more blogs
"; break; } } $adtype = "Forum_Text"; include ("adserver.php"); switch ($x) { case 0: { # predictions #$sql = "select DO_Twitter from DO_Domains where DO_ID = $SITE_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $DO_TWITTER = $row['DO_Twitter']; #print "

twitter.com/$DO_TWITTER

"; #print $DO_TWITTERAPP; #print "
"; global $DO_FACEBOOK; print "

$SITE_NAME on Facebook

"; print ""; break; # $today = date("Ymd"); $timenow = date("Hi"); # $sql = "select * from Football_GA_Games where PLG_Type = 'L' and (PLG_HomeTeam = '$TEAM_NAME' or PLG_AwayTeam = '$TEAM_NAME') and ((PLG_Date = $today and PLG_Time > $timenow) or PLG_Date > $today) order by PLG_Date, PLG_Time limit 1"; # $res = mysql_query($sql); # while ($row = mysql_fetch_array($res)) { # if ($row['PLG_HomeTeam'] == $TEAM_NAME) $oppo = $row['PLG_AwayTeam']; else $oppo = $row['PLG_HomeTeam']; # $date = date('l jS F Y G:i', strtotime($row['PLG_Date'] . " " . $row['PLG_Time'])); # print "

Prediction League

$date
{$row['PLG_HomeTeam']}
v
{$row['PLG_AwayTeam']}

"; # if (isset($US_ID)) { # $preds = ""; # $sql1 = "select * from Football_PL_Predictions where PLE_User = $US_ID and PLE_Match = {$row['PLG_ID']} limit 1"; # $res1 = mysql_query($sql1); # while ($row1 = mysql_fetch_array($res1)) $preds = "You have already registered your prediction for this match, but you may change your mind prior to kick-off. Click here to visit the competition home page."; # if ($preds == "") $preds = "You have yet to register your prediction for this match. Click here to visit the competition home page."; # } else { # $preds = "Please log in or register to predict the scoreline and scorer of this match"; # } # print $preds; # } # break; } case 1: { # football latest # print "

$TEAM_NAME Latest

"; # $sql = "select * from SP_StaticPage where SP_Key = 'FOOTBALL_LATEST' limit 1"; # $res = mysql_query($sql); # while ($row = mysql_fetch_array($res)) { # print $row['SP_Text']; # print "
Click here for more $TEAM_NAME stories
"; # #} $x = 2; #break; } case 2: { # site twitter #$sql = "select DO_Twitter from DO_Domains where DO_ID = $SITE_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $DO_TWITTER = $row['DO_Twitter']; #print "

twitter.com/$DO_TWITTER

"; #print $DO_TWITTERAPP; #print "
"; #break; global $DO_FACEBOOK; print "

$SITE_NAME on Facebook

"; print ""; break; } case 3: { # site facebook global $DO_FACEBOOK; print "

$SITE_NAME on Facebook

"; print ""; break; } case 4: { # club tweets # global $DO_FACEBOOK; # $sql = "select TM_TwitterApp from Football_TM_Teams where TM_TeamName = '$TEAM_NAME' limit 1"; # $res = mysql_query($sql); # while ($row = mysql_fetch_array($res)) { # print "

$TEAM_NAME Tweets

"; # print $row['TM_TwitterApp']; # print "
"; # } # break; #$sql = "select DO_Twitter from DO_Domains where DO_ID = $SITE_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $DO_TWITTER = $row['DO_Twitter']; #print "

twitter.com/$DO_TWITTER

"; #print $DO_TWITTERAPP; #print "
"; #break; global $DO_FACEBOOK; print "

$SITE_NAME on Facebook

"; print ""; break; } case 5: { # player ratings global $TEAM_NUMBER, $SQUAD; $today = date("Ymd"); $timenow = date("Hi"); $sql = "select * from Football_GA_Games where PLG_HomeScore > -1 and (PLG_HomeTeam = '$TEAM_NAME' or PLG_AwayTeam = '$TEAM_NAME') and ((PLG_Date = $today and PLG_Time < $timenow) or PLG_Date < $today) order by PLG_Date desc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($row['PLG_HomeTeam'] == $TEAM_NAME) $oppo = $row['PLG_AwayTeam']; else $oppo = $row['PLG_HomeTeam']; $date = date('l jS F Y G:i', strtotime($row['PLG_Date'] . " " . $row['PLG_Time'])); print "

Player Ratings: $oppo

"; $site = $SITE_ID * -1; $sql1 = "select * from Football_GE_GamesExtra where PLGE_Match = " . $row['PLG_ID'] . " and PLGE_Team = $TEAM_NUMBER limit 1"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_array($res1)) { print "\n"; $playerno = $row1['PLGE_1']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_2']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_3']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_4']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_5']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_6']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_7']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_8']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_9']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_10']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } $playerno = $row1['PLGE_11']; $sql2 = "select * from Football_PV_PlayerVotes, Football_PL_Players where PRV_Match = " . $row['PLG_ID'] . " and PRV_User = $site and PLP_ID = PRV_Player and PRV_Player = " . $playerno; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $playername = stripslashes($row2['PLP_Forename'] . ' ' . $row2['PLP_Surname']); print "\n"; } print "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
$playername" . sprintf("%01.2f", $row2['PRV_Vote']) . "
"; print "
Full details and voting here
"; } } break; } case 6: { # fansnetwork print "

FansNetwork Latest

"; $sql = "select * from SP_StaticPage where SP_Key = 'FANSNETWORK' limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print "
"; print $row['SP_Text']; print "
"; } break; }}} function userSignature($id) { global $PATH; $sig = ""; $sql_user = "select US_Username, US_Extra from US_Users where US_ID = $id limit 1"; $res_user = mysql_query($sql_user); while ($row_user = mysql_fetch_array($res_user)) { $username = $row_user['US_Username']; $extra = explode("~", strip_tags(stripslashes($row_user['US_Extra']))); } if ($extra[0] != "") $sig = "{$extra[0]}"; $sql_sig = "select * from PO_PollQuestions where POQ_User = $id and POQ_Status = 'L' order by POQ_DateTime desc limit 1"; $res_sig = mysql_query($sql_sig); while ($row_sig = mysql_fetch_array($res_sig)) $sig .= "Poll: " . stripslashes($row_sig['POQ_Question']) . ""; $sql_sig = "select * from BL_Blogs where BL_Author = $id and BL_DateTime < now() order by BL_DateTime desc limit 1"; $res_sig = mysql_query($sql_sig); while ($row_sig = mysql_fetch_array($res_sig)) $sig .= "Blog: " . stripslashes($row_sig['BL_Title']) . ""; if ($sig != "") echo "
$sig

"; } ################################################################################################################################################################################################ require_once("fb_start.php"); # if ((date('Hi') >= 1430) and (date('Hi') <= 1436)) header("Location: https://www.twtd.co.uk/page/beattie"); # if (isset($US_ID) and ($US_ID == 1) and (isset($_COOKIE['screenwidth'])) and ($_COOKIE['screenwidth'] < 400) and ($SCRIPT == "forum")) require "fb_forum_mobile_v1.php"; # testing gav mobile forum $AdserverPageType = "FORUM"; if ($FORUM_FORMAT == "S" and $PARAMETER1 == "") { $PARM_CATEGORY = 0; $_COOKIE['TAG'] = 0; } #if in split mode, clear tag if root forum selected $STYLESHEET = "a.sm:link, a.sm:visited { font-size:0.9em; text-decoration: underline; } a.sm:hover { text-decoration: none; } .sm {font-size:0.9em;} a.blk:link, a.blk:visited { text-decoration: underline; } a.blk:hover { text-decoration: none; }"; if (isset($_COOKIE['RES'])) $INPUT_resolution = $_COOKIE['RES']; else $INPUT_resolution = 1; if ($INPUT_resolution == 3) $TOP = "top100"; else if ($INPUT_resolution == 2) $TOP = "top1200"; else $TOP = "top960"; if (isset($_REQUEST['odds'])) { setcookie("ODDS",$_REQUEST['odds'],time()+(10*365*24*3600), "/"); $INPUT_odds = $_REQUEST['odds']; } else if(isset($_COOKIE['ODDS'])) $INPUT_odds = $_COOKIE['ODDS']; else $INPUT_odds = 'F'; if (isset($PARM_CATEGORY)) { if ($PARM_CATEGORY == "z") { setcookie("TAG",$PARM_CATEGORY,time()+(10*365*24*3600), "/"); } else if (!is_numeric($PARM_CATEGORY) and $PARM_CATEGORY != "") { header("location:$PATH/forum/"); exit; } else { setcookie("TAG",intval($PARM_CATEGORY),time()+(10*365*24*3600), "/"); } } else if(isset($_COOKIE['TAG'])) $PARM_CATEGORY = $_COOKIE['TAG']; else $PARM_CATEGORY = "0"; if ($PARM_CATEGORY != "z") $PARM_CATEGORY = intval($PARM_CATEGORY); if ($PARM_CATEGORY == "z" and !isset($US_ID)) $PARM_CATEGORY = 0; if (!isset($US_IGNORED)) $US_IGNORED = ""; $PAGE_TITLE = "The " . $TEAM_NAME . " Forum"; $pagerecs = 25; $indexrecs = 40; if (isset($INPUT_v)) setcookie("MBMODE",$INPUT_v,time()+(10*365*24*3600), "/"); else if(isset($_COOKIE['MBMODE'])) { if (($_COOKIE['MBMODE'] == "be") or ($_COOKIE['MBMODE'] == "bc") or ($_COOKIE['MBMODE'] == "bs") or ($_COOKIE['MBMODE'] == "tu") or ($_COOKIE['MBMODE'] == "td")) $INPUT_v = $_COOKIE['MBMODE']; else $INPUT_v = 'bc'; } else if ($SITE_ID == 1010) $INPUT_v = 'bs'; else $INPUT_v = 'bc'; if ($PARAMETER1 == "hide-thread" and (isset($US_TYPE)) and (isset($US_ID)) and (isset($PARAMETER2)) and (is_numeric($PARAMETER2))) { # hide thread $sql = "select * from MB_Threads where MBT_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if (strpos($row['MBT_BadPost'], "<$US_ID>") === false) { $sql = "update MB_Threads set MBT_BadPost = concat(MBT_BadPost, \"<$US_ID>\") where MBT_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } } header("location: $PATH/forum/"); exit; } $earlier = mktime(date("G"), (date("i") - 10), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; $JAVASCRIPT = ""; if ($PARAMETER1 == "next-thread" and is_numeric($PARAMETER2)) { # Next thread $PARAMETER2 = intval($PARAMETER2); require_once("fb_start.php"); $sql_prv = "select * from MB_Threads where MBT_ID = $PARAMETER2"; $res_prv = mysql_query($sql_prv); while ($row_prv = mysql_fetch_array($res_prv)) { if ($INPUT_v == "td") $sql_prv2 = "select * from MB_Threads where MBT_Domain = $SITE_ID and MBT_Date1 > '" . $row_prv["MBT_Date1"] . "' order by MBT_Date1 asc limit 1"; else $sql_prv2 = "select * from MB_Threads where MBT_Domain = $SITE_ID and MBT_Date2 > '" . $row_prv["MBT_Date2"] . "' order by MBT_Date2 asc limit 1"; $res_prv2 = mysql_query($sql_prv2); while ($row_prv2 = mysql_fetch_array($res_prv2)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_prv2['MBT_ID'] ." and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; header ("location: $PATH/forum/{$row_prv2['MBT_ID']}/" . storyTitle($row_prv2['MBT_Subject']) . "/#$posts"); exit; } header("Location: $PATH/forum/"); exit; } } if ($PARAMETER1 == "previous-thread" and is_numeric($PARAMETER2)) { # Previous thread $PARAMETER2 = intval($PARAMETER2); require_once("fb_start.php"); $sql_prv = "select * from MB_Threads where MBT_ID = $PARAMETER2"; $res_prv = mysql_query($sql_prv); while ($row_prv = mysql_fetch_array($res_prv)) { if ($INPUT_v == "td") $sql_prv2 = "select * from MB_Threads where MBT_Domain = $SITE_ID and MBT_Date1 < '" . $row_prv["MBT_Date1"] . "' order by MBT_Date1 desc limit 1"; else $sql_prv2 = "select * from MB_Threads where MBT_Domain = $SITE_ID and MBT_Date2 < '" . $row_prv["MBT_Date2"] . "' order by MBT_Date2 desc limit 1"; $res_prv2 = mysql_query($sql_prv2); while ($row_prv2 = mysql_fetch_array($res_prv2)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_prv2['MBT_ID'] ." and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; header ("location: $PATH/forum/{$row_prv2['MBT_ID']}/" . storyTitle($row_prv2['MBT_Subject']) . "/#$posts"); exit; } header("Location: $PATH/forum/"); exit; } } if ($PARAMETER1 == "follow" and is_numeric($PARAMETER2) and is_numeric($PARAMETER3)) { # Follow unread thread $PARAMETER2 = intval($PARAMETER2); $PARAMETER3 = intval($PARAMETER3); $sql = "select * from MB_Replies where MBR_Thread = $PARAMETER2 and MBR_ID > $PARAMETER3 and MBR_Initial = 0 order by MBR_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = $PARAMETER2 and MBR_Initial = 0 and MBR_ID <= {$row['MBR_ID']}"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; $pagecount = ceil($posts / $pagerecs); header ("location: $PATH/forum/$PARAMETER2/{$row['MBR_ID']}/" . storyTitle($row['MBR_Subject']) . "/page:$pagecount/#post{$row['MBR_ID']}"); exit; } exit; } if ($PARAMETER1 == "markasread" and is_numeric($PARAMETER2) and isset($US_ID)) { if ($PARAMETER2 == 0) { # delete all reads for this user and add one blanket $sql = "update MB_LastRead set LR_DateTime = now() where where LR_User = $US_ID"; $res = mysql_query($sql); } else { $sql = "select * from MB_Threads, MB_LastRead where LR_User = $US_ID and LR_Thread = MBT_ID and MBT_Category = " . intval($PARAMETER2); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $sql1 = "select * from MB_Replies where MBR_Thread = {$row['MBT_ID']} order by MBR_Date desc limit 1"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_array($res1)) { $sql_upd = "update MB_LastRead set LR_Reply = {$row1['MBR_ID']}, LR_DateTime = now() where LR_User = $US_ID and LR_Thread = {$row['MBT_ID']} limit 1"; $res_upd = mysql_query($sql_upd); } } } header ("location: $PATH/forum/category:$PARAMETER2"); exit;} if (substr($PARAMETER1, 0, 4) == "rate") { # rate, rateup and ratedown /forum/rate-up/thread/reply/user if (isset($US_ID) and isset($PARAMETER4) and ($PARAMETER4 == $US_ID)) { if ($PARAMETER3 == 0) { # thread vote $sql = "select * from MB_Threads where MBT_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($US_ID == $row['MBT_User']) { print "You can't vote for yourself"; exit; } if ($PARAMETER1 == "rate-up") { if (strpos($row['MBT_GoodPost'], "[$US_ID]") === false) { $sql = "update MB_Threads set MBT_GoodPost = concat(MBT_GoodPost, \"[$US_ID]\") where MBT_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } else { print "You have already voted"; exit; } } else { if (strpos($row['MBT_BadPost'], "[$US_ID]") === false) { $sql = "update MB_Threads set MBT_BadPost = concat(MBT_BadPost, \"[$US_ID]\") where MBT_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } else { print "You have already voted"; exit; } } } $sql = "select * from MB_Threads where MBT_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "
" . ((substr_count($row['MBT_GoodPost'], '[')) - (substr_count($row['MBT_BadPost'], '['))) . "
"; exit; } else { # reply vote $sql = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($US_ID == $row['MBR_User']) { print "You can't vote for yourself"; exit; } if ($PARAMETER1 == "rate-up") { if (strpos($row['MBR_GoodPost'], "[$US_ID]") === false) { $sql = "update MB_Replies set MBR_GoodPost = concat(MBR_GoodPost, \"[$US_ID]\") where MBR_ID = " . mysql_real_escape_string($PARAMETER3) . " limit 1"; mysql_query($sql); } else { print "You have already voted"; exit; } } else { if (strpos($row['MBR_BadPost'], "[$US_ID]") === false) { $sql = "update MB_Replies set MBR_BadPost = concat(MBR_BadPost, \"[$US_ID]\") where MBR_ID = " . mysql_real_escape_string($PARAMETER3) . " limit 1"; mysql_query($sql); } else { print "You have already voted"; exit; } } } $sql = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "
" . ((substr_count($row['MBR_GoodPost'], '[')) - (substr_count($row['MBR_BadPost'], '['))) . "
"; exit; } } } if ($PARAMETER1 == "report-abuse") { # report abuse require_once("fb_start.php"); if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; if (is_numeric($PARAMETER3) and ($PARAMETER3 > 0)) $INPUT_r = $PARAMETER3; if ($US_ID != "") { $sql_abuse = "select US_ID from US_Users where US_Type = 'S' or (US_Domain = $SITE_ID and (US_Type = 'A' or US_Type = 'F'))"; $res_abuse = mysql_query($sql_abuse) or die (mysql_error()); while ($row_abuse = mysql_fetch_array($res_abuse)) { $subject = "Abuse Reported"; if ((isset($INPUT_r)) and ($INPUT_r != "")) { $url = "A message reply has been reported as being abusive\n\nClick here to view the message: https://" . $_SERVER['HTTP_HOST'] . "$PATH/forum/$INPUT_t/$INPUT_r/ \n\n"; $sql_upd = "update MB_Replies set MBR_Text = concat(MBR_Text,' ') where MBR_ID = " . $INPUT_r . " limit 1"; mysql_query($sql_upd); } else { $url = "A thread has been reported as being abusive\n\nClick here to view the message: https://" . $_SERVER['HTTP_HOST'] . "$PATH/forum/$INPUT_t/ \n\n"; $sql_upd = "update MB_Threads set MBT_Text = concat(MBT_Text,' ') where MBT_ID = " . $INPUT_t . " limit 1"; mysql_query($sql_upd); } sendPM($US_ID, $row_abuse['US_ID'], $subject, $url); } header("Location: $PATH/messages/sent-items"); } } if ($PARAMETER1 == "report-abuse1") { # report abuse include_once("fb_start.php"); if (!isset($US_ID)) { $_SESSION['url'] = "$PATH/forum/add-reply/$PARAMETER2/$PARAMETER3"; header("Location: $PATH/login/"); exit; } if (!isset($JAVASCRIPT)) $JAVASCRIPT = ""; $JAVASCRIPT .= ""; include("fb_top.php"); if (is_numeric($PARAMETER3) and ($PARAMETER3 > 0)) { $sql_reply = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3); $res_reply = mysql_query($sql_reply); $row_reply = mysql_fetch_array($res_reply); $subject = str_replace("\"", """, stripslashes($row_reply["MBR_Subject"])); } else if (is_numeric($PARAMETER2)) { $sql_reply = "select * from MB_Threads where MBT_ID = " . mysql_real_escape_string($PARAMETER2); $res_reply = mysql_query($sql_reply); $row_reply = mysql_fetch_array($res_reply); $subject = str_replace("\"", """, stripslashes($row_reply["MBT_Subject"])); } if (isset($_REQUEST['subject'])) $subject = $_REQUEST['subject']; else if (!isset($subject)) $subject = ""; if (isset($_REQUEST['text'])) $text = $_REQUEST['text']; else $text = ""; if (strpos($error, "") !== false) { $preview = "

Message Preview


$subject by $US_USERNAME on " . date("H:i - M j") . " with 1 views

" . processText($text) . "
"; if (is_file("images/avatars/$US_ID.gif")) { $preview .= ""; } else { $preview .= ""; } $preview .= "

"; } else { $preview = ""; } if (!isset($error)) $error = ""; ?>"; echo '

Post a reply

Title:
Post:
   
Show/hide smileys | How do I...?

" . stripslashes($row_threadmain["MBT_Subject"]) . " by $username on " . date("H:i - M j", strtotime($row_threadmain['MBT_Date1'])) . " with " . $row_threadmain['MBT_Views'] . " views

' . processText($row_threadmain["MBT_Text"]) . '
'; userPanel($row_threadmain["MBT_User"]); echo '

'; } } else if (is_numeric($PARAMETER3) and is_numeric($PARAMETER2) and ($PARAMETER3 > 0) and $preview == "") { $sql_replymain = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3); $res_replymain = mysql_query($sql_replymain); if (mysql_num_rows($res_replymain)) { $row_replymain = mysql_fetch_array($res_replymain); $sql_user = "select US_Username from US_Users where US_ID = " . $row_replymain['MBR_User'] . " limit 1"; $res_user = mysql_query($sql_user); while ($row_user = mysql_fetch_array($res_user)) $username = $row_user['US_Username']; print ""; echo '
" . stripslashes($row_replymain["MBR_Subject"]) . " by $username on " . date("H:i - M j", strtotime($row_replymain['MBR_Date'])) . " with " . $row_replymain['MBR_Views'] . " views

' . processText($row_replymain["MBR_Text"]) . '
'; userPanel($row_replymain["MBR_User"]); echo '

'; } } echo ""; $adtype = "Skyscraper"; include("adserver.php"); echo "
"; include("fb_bottom.php"); exit; } if (($PARAMETER1 == "remove-thread") and ($US_TYPE == 'F' or $US_TYPE == 'A' or $US_TYPE == 'S')) { # remove thread for forum moderators if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; $sql_ins = "insert into MB_Threads_Removed select * from MB_Threads where MBT_ID = " . $INPUT_t; $res_ins = mysql_query($sql_ins); $sql_posts = "select * from MB_Replies where MBR_Thread = " . $INPUT_t; $res_posts = mysql_query($sql_posts); while ($row_posts = mysql_fetch_array($res_posts)) { $sql_ins = "insert into MB_Replies_Removed select * from MB_Replies where MBR_Thread = " . $INPUT_t; $res_ins = mysql_query($sql_ins); } $sql_del = "delete from MB_Threads where MBT_ID = " . $INPUT_t; $res_del = mysql_query($sql_del); $sql_del = "delete from MB_Replies where MBR_Thread = " . $INPUT_t; $res_del = mysql_query($sql_del); header("location: $PATH/forum/"); exit; } if (($PARAMETER1 == "remove-reply") and ($US_TYPE == 'F' or $US_TYPE == 'A' or $US_TYPE == 'S')) { # remove reply for forum moderators if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; if (is_numeric($PARAMETER3) and ($PARAMETER3 > 0)) $INPUT_r = $PARAMETER3; $sql_upd = "update MB_Replies set MBR_ReplyTo = 0 where MBR_ReplyTo = " . $INPUT_r; mysql_query($sql_upd); $sql_thread = "select MBR_Thread from MB_Replies where MBR_ID = " . $INPUT_r; $res_thread = mysql_query($sql_thread); $row_thread = mysql_fetch_array($res_thread); $sql_ins = "insert into MB_Replies_Removed select * from MB_Replies where MBR_ID = " . $INPUT_r; mysql_query($sql_ins); $sql_ins = "insert into MB_Threads_Removed select * from MB_Threads where MBT_ID = " . $row_id['MBR_Thread']; mysql_query($sql_ins); $sql_del = "delete from MB_Replies where MBR_ID = " . $INPUT_r; mysql_query($sql_del); header("Location: $PATH/forum/$INPUT_t"); } if ($PARAMETER1 == "sticky" and ($US_TYPE == "A" or $US_TYPE == "S")) { # change sticky require_once("fb_start.php"); if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; if (isset($PARAMETER3) and ($PARAMETER3 == "sticky")) $sticky = 1; if (isset($PARAMETER3) and ($PARAMETER3 == "unsticky")) $sticky = 0; if (isset($sticky)) { $sql_upd = "update MB_Threads set MBT_Sticky = $sticky where MBT_ID = $INPUT_t limit 1"; mysql_query($sql_upd); } header("Location:$PATH/forum/"); exit; } if ($PARAMETER1 == "lock" and ($US_TYPE == "A" or $US_TYPE == "S")) { # lock thread require_once("fb_start.php"); if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; if ($PARAMETER3 == "lock") { $sql_ins = "update MB_Threads set MBT_Text = concat(MBT_Text, '') where MBT_ID = $INPUT_t limit 1"; mysql_query($sql_ins); } else if ($PARAMETER3 == "unlock") { $sql_upd = "update MB_Threads set MBT_Text = REPLACE(MBT_Text, '', '') WHERE MBT_ID = $INPUT_t limit 1"; mysql_query($sql_upd); } header("Location:$PATH/forum/"); exit; } if ($PARAMETER1 == "add-poll-insert") { # add poll insert require_once("fb_start.php"); if (($US_TYPE == "") or ($US_TYPE == "B")) { header("Location:$PATH/login/"); exit; } $subject = trim($_REQUEST['subject']); $err = ""; $swearerr = swearcheck($subject); if ($swearerr == "Y") $err .= "Subject contains unacceptable language
"; $noofanswers = 0; $answers = ""; $test = trim(mysql_real_escape_string($_POST['a1'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 1 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a2'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 2 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a3'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 3 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a4'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 4 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a5'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 5 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a6'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 6 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a7'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 7 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a8'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 8 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a9'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 9 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } $test = trim(mysql_real_escape_string($_POST['a10'])); if ($test != "") { if (swearcheck($test) == "Y") $err .= "Answer 10 contains unacceptable language
"; else { $noofanswers = $noofanswers + 1; if ($answers != "") $answers .= "\n"; $answers .= $test; } } if (trim($subject) == "") $err .= "Question cannot be blank
"; if ($noofanswers < 2) $err .= "You need to provide at least two answers for visitors to vote on"; $cat = 0; while (list($var, $val) = each($_POST)) { if (substr($var, 0, 4) == "cat-") $cat = substr($var, 4, 9999999); } if ($cat == 0 and $num_rows = mysql_num_rows(mysql_query("select MBC_ID from MB_Categories where MBC_Domain = $SITE_ID")) > 0) $err .= "Please use the category buttons to submit your message"; if ($err == "") { if ($US_TYPE == "A" or $US_TYPE == "S") { $sql = "update PO_PollQuestions set POQ_Status = 'P' where POQ_Domain = $SITE_ID and POQ_User = 0"; mysql_query($sql); $insert_reply = "insert into PO_PollQuestions values(0, $SITE_ID, 0, \"" . mysql_real_escape_string($subject) . "\", \"" . mysql_real_escape_string($answers) . "\", now(), 'L', '')"; } else $insert_reply = "insert into PO_PollQuestions values(0, $SITE_ID, $US_ID, \"" . mysql_real_escape_string($subject) . "\", \"" . mysql_real_escape_string($answers) . "\", now(), 'L', '')"; mysql_query($insert_reply); $poll = mysql_insert_id(); $sql_ins = "insert into MB_Threads values(0, $SITE_ID, " . mysql_real_escape_string($cat) . ", '". mysql_real_escape_string($subject) . "', '[poll_$poll]', NOW(), NOW(), $US_ID, 0, '" . $_SERVER['REMOTE_ADDR'] . "', 0, '', '')"; if (mysql_query($sql_ins)) { $insert_reply = "insert into MB_Replies values(0, '', now(), " . mysql_insert_id() . ", " . $US_ID . ", 0, '', 1, '', '" . $_SERVER['REMOTE_ADDR'] . "', 0, '', '')"; mysql_query($insert_reply); $update_users = "update US_Users set US_Stats_BoardPosts = US_Stats_BoardPosts + 1 where US_ID = " . $US_ID; mysql_query($update_users); header("Location:$PATH/forum/"); } $sql = "insert into LV_Live values($SITE_ID, 'P', now(), $US_ID, $poll, \"". mysql_real_escape_string($subject) . "\", '')"; mysql_query($sql); } else { session_start(); $_SESSION["subject"] = $subject; $_SESSION['a1'] = $_POST['a1']; $_SESSION['a2'] = $_POST['a2']; $_SESSION['a3'] = $_POST['a3']; $_SESSION['a4'] = $_POST['a4']; $_SESSION['a5'] = $_POST['a5']; $_SESSION['a6'] = $_POST['a6']; $_SESSION['a7'] = $_POST['a7']; $_SESSION['a8'] = $_POST['a8']; $_SESSION['a9'] = $_POST['a9']; $_SESSION['a10'] = $_POST['a10']; $_SESSION["err"] = $err; header("Location:$PATH/forum/add-poll");exit; } } if ($PARAMETER1 == "add-poll") { # add poll screen require_once("fb_start.php"); $AdserverPageType = "NOADS"; if ($US_ID == "") { # if user isn't logged in, redirect to login screen $_SESSION['url'] = $_SERVER['QUERY_STRING']; header("Location: $PATH/login/"); exit; } $cat = ""; $sql_cats = "select * from MB_Categories where MBC_Domain = $SITE_ID order by MBC_Order"; $res_cats = mysql_query($sql_cats); while ($row_cats = mysql_fetch_array($res_cats)) { if ($cat == "") $cat = "Which category should the poll be submitted:
"; $cat .= " "; } if ($cat == "") $cat .= ""; $JAVASCRIPT = " "; include("fb_top.php"); ?>

Add a new poll


What question would you like to pose to other visitors?
Question:

You may complete up to ten possible answers:
Answer 1:
Answer 2:
Answer 3:
Answer 4:
Answer 5:
Answer 6:
Answer 7:
Answer 8:
Answer 9:
Answer 10:
%'"))> 0 ) { header("$PATH/forum/"); exit; } $INPUT_subject = substr(trim($_REQUEST['subject']), 0, 80); $INPUT_text = trim($_REQUEST['text']); $error = ""; if ($_POST['Preview']) $error = ""; $swearerr = swearcheck($INPUT_text); if ($swearerr == "Y") { $error .= "Post contains unacceptable language
"; } $swearerr = swearcheck($INPUT_subject); if ($swearerr == "Y") { $error .= "Subject contains unacceptable language
"; } if (mysql_num_rows(mysql_query("select MBR_ID from MB_Replies where MBR_User = $US_ID and MBR_Subject = \"". mysql_real_escape_string($INPUT_subject) . "\" and MBR_Text = \"". mysql_real_escape_string($INPUT_text) . "\" and MBR_Date > (now()- interval 2 minute) ")) > 0) $error .= "Attempt at duplicate post"; if ($error != "") { $error = "$error"; $PARAMETER1 = "add-reply"; } else { if ($INPUT_r > 0) { $sql_parent = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($INPUT_r); $res_parent = mysql_query($sql_parent); if(mysql_num_rows($res_parent)==0) $reply = 0; else $reply = $INPUT_r; $sql_topic = "select MBR_Thread from MB_Replies where MBR_ID = " . mysql_real_escape_string($INPUT_r); $res_topic = mysql_query($sql_topic); $row_topic = mysql_fetch_array($res_topic); $INPUT_t = $row_topic['MBR_Thread']; } else { $reply = 0; } $testsubject = str_replace(" ", "", $INPUT_subject); if ($testsubject == "") $INPUT_subject = "(No subject)"; $testtext = str_replace(" ", "", $INPUT_text); if ($testtext == "") $INPUT_subject .= " (n/t)"; $sql_insert = "insert into MB_Replies values(0, \"" . mysql_real_escape_string($INPUT_text) . "\", now(), " . $INPUT_t . ", " . $US_ID . ", " . $reply . ", \"" . mysql_real_escape_string($INPUT_subject) . "\", 0, 0, '" . $_SERVER['REMOTE_ADDR'] . "', 0, '', '')"; if (mysql_query($sql_insert)) { $r = mysql_insert_id(); $update_thread = "update MB_Threads set MBT_Date2 = now() where MBT_ID = " . $INPUT_t; mysql_query($update_thread); $update_users = "update US_Users set US_Stats_BoardPosts = US_Stats_BoardPosts + 1 where US_ID = " . $US_ID; mysql_query($update_users); if ($FORUM_FORMAT == "S") { $sql = "select * from MB_Replies where MBR_Thread = $INPUT_t and MBR_ID != $r order by MBR_Date desc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $prev = $row['MBR_ID']; header ("Location:$PATH/forum/follow/$INPUT_t/$prev");exit; } else header("Location:$PATH/forum/"); } else { echo "err "; } }} if ($PARAMETER1 == "add-reply") { # add reply screen include_once("fb_start.php"); if (!isset($US_ID)) { $_SESSION['url'] = "$PATH/forum/add-reply/$PARAMETER2/$PARAMETER3"; header("Location: $PATH/login/"); exit; } if (!isset($JAVASCRIPT)) $JAVASCRIPT = ""; $JAVASCRIPT .= ""; $AdserverPageType = "NOADS"; include("fb_top.php"); if (is_numeric($PARAMETER3) and ($PARAMETER3 > 0)) { $sql_reply = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3); $res_reply = mysql_query($sql_reply); $row_reply = mysql_fetch_array($res_reply); $subject = str_replace("\"", """, stripslashes($row_reply["MBR_Subject"])); } else if (is_numeric($PARAMETER2)) { $sql_reply = "select * from MB_Threads where MBT_ID = " . mysql_real_escape_string($PARAMETER2); $res_reply = mysql_query($sql_reply); $row_reply = mysql_fetch_array($res_reply); $subject = str_replace("\"", """, stripslashes($row_reply["MBT_Subject"])); } if (isset($_REQUEST['subject'])) $subject = $_REQUEST['subject']; else if (!isset($subject)) $subject = ""; if (isset($_REQUEST['text'])) $text = $_REQUEST['text']; else $text = ""; if (strpos($error, "") !== false) { $preview = "

Message Preview


$subject by $US_USERNAME on " . date("H:i - M j") . " with 1 views

" . processText($text) . "
"; if (is_file("images/avatars/$US_ID.gif")) { $preview .= ""; } else { $preview .= ""; } $preview .= "

"; } else { $preview = ""; } if (!isset($error)) $error = ""; ?>"; echo '

Post a reply

Title:
Post:
   
Show/hide smileys | How do I...?

" . stripslashes($row_threadmain["MBT_Subject"]) . " by $username on " . date("H:i - M j", strtotime($row_threadmain['MBT_Date1'])) . " with " . $row_threadmain['MBT_Views'] . " views

' . processText($row_threadmain["MBT_Text"]) . '
'; userPanel($row_threadmain["MBT_User"]); echo '

'; } } else if (is_numeric($PARAMETER3) and is_numeric($PARAMETER2) and ($PARAMETER3 > 0) and $preview == "") { $sql_replymain = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3); $res_replymain = mysql_query($sql_replymain); if (mysql_num_rows($res_replymain)) { $row_replymain = mysql_fetch_array($res_replymain); $sql_user = "select US_Username from US_Users where US_ID = " . $row_replymain['MBR_User'] . " limit 1"; $res_user = mysql_query($sql_user); while ($row_user = mysql_fetch_array($res_user)) $username = $row_user['US_Username']; print ""; echo '
" . stripslashes($row_replymain["MBR_Subject"]) . " by $username on " . date("H:i - M j", strtotime($row_replymain['MBR_Date'])) . " with " . $row_replymain['MBR_Views'] . " views

' . processText($row_replymain["MBR_Text"]) . '
'; userPanel($row_replymain["MBR_User"]); echo '

'; } } echo ""; $adtype = "Skyscraper"; include("adserver.php"); echo "
"; include("fb_bottom.php"); exit; } if ($PARAMETER1 == "add-thread-insert") { # add thread insert require_once('fb_start.php'); if (($US_TYPE == "") or ($US_TYPE == "B")) { header("Location: $PATH/login/"); exit; } $ADMIN_ONLY = "N"; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY != "") and ($PARM_CATEGORY != "0") and ($PARM_CATEGORY != "z")) { # is the category admin only? get desc too $sql = "select * from MB_Categories where MBC_ID = " . mysql_real_escape_string($PARM_CATEGORY) . " limit 1"; $res = mysql_query($sql); while($row = mysql_fetch_array($res)) { $ADMIN_ONLY = $row['MBC_AdminOnly']; $forum_desc = $row['MBC_MBC_Title']; } } if ($ADMIN_ONLY == "Y" and $US_TYPE != "S" and $US_TYPE != "A") { $_SESSION["subject"] = $subject; $_SESSION["text"] = $text; $_SESSION["err"] = "This forum category can only be added to by the admin only"; header("Location:$PATH/forum/add-thread"); exit; } $err = ""; if ($_POST['Preview']) $err = ""; $text = $_REQUEST['text']; $subject = substr($_REQUEST['subject'], 0, 80); $testsubject = str_replace(" ", "", $subject); if ($testsubject == "") $subject = "No subject"; $testtext = str_replace(" ", "", $text); if ($testtext == "") $subject .= " (n/t)"; $swearerr = swearcheck($text); if ($swearerr == "Y") $err .= "Post contains unacceptable language
"; $swearerr = swearcheck($subject); if ($swearerr == "Y") $err .= "Subject contains unacceptable language
"; if ($subject == "No subject (n/t)") $err .= "Subject and post are both blank
"; if (mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_User = $US_ID and MBT_Subject = \"". mysql_real_escape_string($subject) . "\" and MBT_Text = \"". mysql_real_escape_string($text) . "\" and MBT_Date1 > (now()- interval 2 minute) ")) > 0) $err = "Attempt at duplicate post"; if (!isset($INPUT_category) or ($INPUT_category == "")) $cat = 0; else $cat = $INPUT_category; $cat = 0; while (list($var, $val) = each($_POST)) if (substr($var, 0, 4) == "cat-") $cat = substr($var, 4, 9999999); if ($cat == 0 and $num_rows = mysql_num_rows(mysql_query("select MBC_ID from MB_Categories where MBC_Domain = $SITE_ID")) > 0 and $err == "") $err = "Please use the category buttons to submit your message"; if (strpos($err, "") !== false) { $preview = "

Message Preview


$subject by $US_USERNAME on " . date("H:i - M j") . " with 1 views

" . processText($text) . "
"; if (is_file("images/avatars/$US_ID.gif")) { $preview .= ""; } else { $preview .= ""; } $preview .= "

"; } else { $preview = ""; } if ($err == "") { if (isset($_POST['sticky']) and $_POST['sticky'] == 'on') $sticky = 1; else $sticky = 0; $sql_ins = "insert into MB_Threads values(0, $SITE_ID, " . mysql_real_escape_string($cat) . ", '". mysql_real_escape_string($subject) . "','" . mysql_real_escape_string($text) . "', NOW(), NOW(), " . $US_ID . ", " . $sticky . ", '" . $_SERVER['REMOTE_ADDR'] . "', 0, '', '')"; if (mysql_query($sql_ins)) { $thread = mysql_insert_id(); $insert_reply = "insert into MB_Replies values(0, '', now(), " . mysql_insert_id() . ", " . $US_ID . ", 0, '', 1, 0, '" . $_SERVER['REMOTE_ADDR'] . "', 0, '', '')"; mysql_query($insert_reply); $update_users = "update US_Users set US_Stats_BoardPosts = US_Stats_BoardPosts + 1 where US_ID = " . $US_ID; mysql_query($update_users); $sql = "insert into LV_Live values($SITE_ID, 'F', now(), $US_ID, \"$thread\", \"". mysql_real_escape_string($subject) . "\", \"". mysql_real_escape_string($text) . "\")"; mysql_query($sql); if (is_file("images/avatars/$US_ID.gif")) { $thumb = "http://{$_SERVER['HTTP_HOST']}/images/avatars/$US_ID.gif"; } else { $thumb = "http://{$_SERVER['HTTP_HOST']}/images/avatars/0.gif"; } #if (isset($_POST['share']) and $_POST['share'] == 'on') header("Location: http://www.sharethis.com/share?url=http://{$_SERVER['HTTP_HOST']}$PATH/forum/$thread/" . storyTitle($subject) . "&title=$subject&summary=" . shortenString($text, 50, true, true) . "&img=$thumb"); if ($FORUM_FORMAT == "S") header("Location:$PATH/forum/category:$cat"); else header("Location:$PATH/forum/"); } } else { $PARAMETER1 = "add-thread"; #$_SESSION["subject"] = $subject; $_SESSION["text"] = $text; $_SESSION["err"] = $err; header("Location:$PATH/forum/add-thread"); } } if ($PARAMETER1 == "add-thread") { # add thread screen require_once("fb_start.php"); $AdserverPageType = "NOADS"; if (!isset($US_ID)) { $_SESSION['url'] = "$PATH/forum/add-thread"; header("Location: $PATH/login/"); exit; } #if (!isset($_SESSION['subject'])) $_SESSION['subject'] = ""; #if (!isset($_SESSION['text'])) $_SESSION['text'] = ""; if (isset($_REQUEST['subject'])) $subject = $_REQUEST['subject']; else if (!isset($subject)) $subject = ""; if (isset($_REQUEST['text'])) $text = $_REQUEST['text']; else $text = ""; $cat = ""; $submit = ""; if ($FORUM_FORMAT == "S" and $PARM_CATEGORY != 0) { $submit .= " "; } else { $sql_cats = "select * from MB_Categories where MBC_Domain = $SITE_ID order by MBC_Order"; $res_cats = mysql_query($sql_cats); while ($row_cats = mysql_fetch_array($res_cats)) { if ($cat == "") $cat = "Tag: "; } if ($cat != "") $cat .= ""; } $cat = ""; # this is for the category drop down method, not currently implemented. if ($submit != "" and $FORUM_FORMAT != "S") $catdesc = "Which category should the thread be submitted:"; else if ($submit != "" and $FORUM_FORMAT == "S") $catdesc = ""; else $catdesc = ""; $JAVASCRIPT .= " "; $JAVASCRIPT .= ""; include("fb_top.php"); ?>

Post a New Thread

'; ?>

Title:
Post:
Make sticky:
   

Show/hide smileys | How do I...?

0)) $INPUT_t = $PARAMETER2; else exit; $err = ""; $text = $_REQUEST['text']; $subject = substr($_REQUEST['subject'], 0, 80); $testsubject = str_replace(" ", "", $subject); if ($testsubject == "") $subject = "No subject"; $swearerr = swearcheck($text); if ($swearerr == "Y") $err .= "Post contains unacceptable language
"; $swearerr = swearcheck($subject); if ($swearerr == "Y") $err .= "Subject contains unacceptable language
"; if (($text == "") and ($subject == "")) $err .= "Subject and post are both blank
"; while (list($var, $val) = each($_POST)) if (substr($var, 0, 4) == "cat-") $cat = mysql_real_escape_string(substr($var, 4, 9999999)); if ($err == "") { if (isset($_POST['sticky']) and ($_POST['sticky'] == 'on')) $sticky = 1; else $sticky = 0; if ($US_TYPE == "A" or $US_TYPE == "S") $sql_ins = "update MB_Threads set MBT_Category = \"". mysql_real_escape_string($_REQUEST['category']) . "\", MBT_Subject = \"". mysql_real_escape_string($subject) . "\", MBT_Text = \"" . mysql_real_escape_string($text) . " \" where MBT_ID = $INPUT_t"; else $sql_ins = "update MB_Threads set MBT_Category = \"". mysql_real_escape_string($_REQUEST['category']) . "\", MBT_Subject = \"". mysql_real_escape_string($subject) . "\", MBT_Text = \"" . mysql_real_escape_string($text) . " \" where MBT_User = $US_ID and MBT_ID = $INPUT_t"; mysql_query($sql_ins); $_SESSION["subject"] = ""; $_SESSION["text"] = ""; $_SESSION["err"] = ""; header("Location:$PATH/forum/$INPUT_t"); } else { session_start(); $_SESSION["subject"] = $INPUT_subject; $_SESSION["text"] = $INPUT_text; $_SESSION["err"] = $err; header("Location:$PATH/forum/edit-thread/$INPUT_t"); } } if ($PARAMETER1 == "edit-thread") { # edit thread screen require_once("fb_start.php"); $AdserverPageType = "NOADS"; if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = mysql_real_escape_string($PARAMETER2); if ($US_ID == "") { $url = urlencode( $_SERVER['QUERY_STRING']); header("Location: $PATH/forum/?$url"); exit; } $lock = mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_ID = $INPUT_t and MBT_Text like '%%' limit 1")); if ($lock != 0) { header("Location: $PATH/forum/"); exit; } $cat = ""; $submit = ""; $sql = "select MBT_Category from MB_Threads where MBT_ID = $INPUT_t"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $MBT_Category = $row['MBT_Category']; if ($US_TYPE == "S" or $US_TYPE == "A") $sql = "select * from MB_Categories where MBC_Domain = $SITE_ID order by MBC_Order"; else $sql = "select * from MB_Categories where MBC_Domain = $SITE_ID and MBC_AdminOnly != 'Y' order by MBC_Order"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($MBT_Category == $row['MBC_ID']) $selected = "checked"; else $selected = ""; $submit .= " {$row['MBC_Title']}
"; } if ($submit != "") $catdesc = "Which category should the thread be resubmitted:"; else $catdesc = ""; $JAVASCRIPT = ""; include("fb_top.php"); if ($US_TYPE == "A") $sql_edit = "select * from MB_Threads where MBT_ID = $INPUT_t"; else $sql_edit = "select * from MB_Threads where MBT_ID = $INPUT_t and MBT_User = $US_ID"; $res_edit = mysql_query($sql_edit); $row_edit = mysql_fetch_array($res_edit); $subject = str_replace("\"", """, stripslashes($row_edit["MBT_Subject"])); $text = stripslashes($row_edit['MBT_Text']); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $editpos = strpos($text, "

Edit Thread


Title:
Post:




Show/hide smileys | How do I...?

0)) $INPUT_r = $PARAMETER3; if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; $INPUT_text = $_REQUEST['text']; $INPUT_subject = $_REQUEST['subject']; if ($US_ID == "") { $url = urlencode($_SERVER['QUERY_STRING']); header("Location: $PATH/login/?$url"); exit; } $lock = mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_ID = $INPUT_t and MBT_Text like '%%' limit 1")); if ($lock != 0) { header("Location: $PATH/forum/"); exit; } $error = ""; $swearerr = swearcheck($INPUT_text); if ($swearerr == "Y") { $error .= "Post contains unacceptable language
"; } $swearerr = swearcheck($INPUT_subject); if ($swearerr == "Y") { $error .= "Subject contains unacceptable language
"; } if ($error != "") { $error = "$error"; $PARAMETER1 = "ar"; } else { $testsubject = str_replace(" ", "", $INPUT_subject); if ($testsubject == "") $INPUT_subject = "(No subject)"; $testtext = str_replace(" ", "", $INPUT_text); if ($testtext == "") $INPUT_subject .= " (n/t)"; if ($US_TYPE == "A") $sql_insert = "update MB_Replies set MBR_Text = \"" . mysql_real_escape_string($INPUT_text) . " \", MBR_Subject = \"" . mysql_real_escape_string($INPUT_subject) . "\" where MBR_ID = $INPUT_r limit 1"; else $sql_insert = "update MB_Replies set MBR_Subject = \"". mysql_real_escape_string($INPUT_subject) . "\", MBR_Text = \"" . mysql_real_escape_string($INPUT_text) . " \" where MBR_User = $US_ID and MBR_ID = $INPUT_r"; #else $sql_insert = "update MB_Replies set MBR_Text = \"" . mysql_real_escape_string($INPUT_text) . " \", MBR_Subject = \"" . mysql_real_escape_string($INPUT_subject) . "\" where MBR_User = $US_ID and MBR_ID = $INPUT_r limit 1"; mysql_query($sql_insert); header("Location: $PATH/forum/$INPUT_t/$INPUT_r/"); exit; }} if ($PARAMETER1 == "edit-reply") { # edit reply screen include_once("fb_start.php"); if (is_numeric($PARAMETER3) and ($PARAMETER3 > 0)) $INPUT_r = $PARAMETER3; if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_t = $PARAMETER2; if ($US_ID == "") { $url = urlencode($_SERVER['QUERY_STRING']); header("Location: $PATH/login/?$url"); exit; } $lock = mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_ID = $INPUT_t and MBT_Text like '%%' limit 1")); if ($lock != 0) { header("Location: $PATH/forum/"); exit; } $AdserverPageType = "NOADS"; include("fb_top.php"); if ($US_TYPE == "A" or $US_TYPE == "S") $sql_edit = "select * from MB_Replies where MBR_ID = $INPUT_r"; else $sql_edit = "select * from MB_Replies where MBR_ID = $INPUT_r and MBR_User = $US_ID"; $res_edit = mysql_query($sql_edit); $row_edit = mysql_fetch_array($res_edit); $subject = substr(stripslashes($row_edit['MBR_Subject']), 0, 80); $text = stripslashes($row_edit['MBR_Text']); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $editpos = strpos($text, "

Edit reply

Title:
Post:
Show/hide smileys | How do I...?

"; $adtype = "Skyscraper"; include("adserver.php"); echo "

"; include("fb_bottom.php"); exit; } if ($SCRIPT == "polls" and $PARAMETER1 == "") { # show polls $TOP = "top960"; #$STYLESHEET .= "a.button:link, a.button:visited, .button { border:1px solid rgba(255, 255, 255, 0.5); background:black url('$CUSTOMISATION_H1') repeat center center; padding:3px; color: white; text-decoration: none; vertical-align:middle;} a.button:hover { black; border:1px solid rgba(0, 0, 0, 0.5);}"; require("fb_top.php"); print "
"; $sql = "select * from PO_PollQuestions where POQ_User = 0 and POQ_Status != 'D' order by POQ_DateTime desc limit 10"; $res = mysql_query($sql); $polls = ""; while ($row = mysql_fetch_array($res)) { if ($polls != "") $polls .= "|"; $polls .= $row['POQ_ID']; print "\n\n"; } print "

" . stripslashes($row['POQ_Question']) . "

"; print "
Poll created " . date("jS F Y", strtotime($row['POQ_DateTime'])) . "
"; $answers = explode("\n", $row['POQ_Answers']); foreach ($answers as $x => $v) { $v = trim($v); if ($v != "") { print "

$v

"; } } print "
"; $adtype = "SuperMPU"; include ("adserver.php"); print "
"; print " "; require("fb_bottom.php"); exit; } if ($PARAMETER1 == "twitter") { # twitter include("fb_top.php"); echo '
'; echo ''; $bgcolour = "rgb(240,240,240)"; $twittersource = file_get_contents('http://search.twitter.com/search.atom?q=%23itfc'); $xml = new SimpleXMLElement($twittersource); foreach ($xml->entry as $entry) { $ig = stripos($US_IGNORED, "," . $row_threads['MBT_User'] . ";"); if ($ig === false) { if ($bgcolour == "rgb(240,240,240)") $bgcolour = "rgb(255,255,255)"; else $bgcolour = "rgb(240,240,240)"; foreach ($entry->link as $link) { if ($link[type] == "image/png") $image = $link[href]; if ($link[type] == "text/html") $item = $link[href]; } $title = $entry->title; $content = $entry->content; $author = $entry->author->name; $t = strpos($author, " "); $authorx = chop(substr($author, $t + 2, 999), ")"); $authory = substr($author, 0, $t); $authorurl = $entry->author->uri; $date = $entry->updated; $date = date('jS F Y G:i', strtotime($entry->updated)); print ""; } else { $ignoredcount++; $ignoredtext = $ignoredcount . " threads have been hidden"; } } echo "'; echo '
AvatarTweetAuthor
$content@$authory
$date
" . $ignoredtext . '
'; $adtype = "Skyscraper"; include ("adserver.php"); echo '
'; include("fb_bottom.php"); exit; } if ($PARAMETER1 == "faq") { # How do I... include("fb_top.php"); print "
"; print "

Frequently Asked Questions




    "; print "
  • How do hide a specific thread?
    • At the bottom of every thread is the hide icon . Click that and the post will be hidden from that point onwards. To undo your actions, just go to the ignores tab on your profile.

      Back to top

  • "; print "
  • How do I make something italic, bold or underlined?
    • If you want to add some emphasis to your posts, you can make some styling to the text. By using the following codes you can make something [b]bold[/b], [i]italic[/i] or [u]underlined[/u]. Remember to turn off the styling by using the correct end code.

      Back to top

  • "; print "
  • How do I add a smiley to my posts, comments etc?
    • Click the show smileys link if you're on the messageboard and all the available images will be displayed. You can either click the one you want or you can use the code shown. For example using [clap] will insert into your post.

      Back to top

  • "; print "
  • How do I post a link into my posts, comments etc?
    • You just copy and paste (or type) the link into the text box. The link must start with 'http://' or 'www.' and mustn't have any other text immediately before or after it.

      For example, if you were to post https://www.twtd.co.uk it would automatically make that into a clickable link http://www.twtd.co.uk

      Back to top

  • "; print "
  • How do I post an image from the internet into my posts, comments etc?
    • You just copy and paste (or type) the link into the text box. The link must start with http:// and mustn't have any other text immediately before or after it. To get the link, one way may be to click the image with the right mouse button and selecting 'Copy image location', 'Copy image address', 'Copy image url' or similar, depending on your browser. Make sure that no other text is immediately before or after it, and the image link must end in 'jpg', 'gif', or 'png' for the site to recognise that the link is an image.

      For example, if you were to post https://upload.wikimedia.org/wikipedia/en/thumb/a/ab/UEFA_logo_2012.png/150px-UEFA_logo_2012.png it would automatically make that into the image shown to the right.

      Back to top

  • "; print "
  • How do I post an image from my computer/phone into my posts, comments etc?
    • You first need to upload your image onto the internet, using many of available free services such as Tinypic, PhotoBucket or any number of other services. Then follow the instructions above.

      Back to top

  • "; print "
  • How do I post a video from YouTube into my posts, comments etc?
    • You need to just post the link of the page from YouTube and the site will do the rest. So, posting:
      https://www.youtube.com/watch?v=a633kGljLnk will display the video below. Note that there should be no other text either side of the link, and it must start 'https://www.youtube.com'.



      Back to top

  • "; print "
  • How do I post a tweet from Twitter into my posts, comments etc?
    • Click the 'details' link of the tweet which will make that fill the screen. You then get a url like https://twitter.com/BieberTweet/status/212820379788525569. You need to just put that into your post and it will display like the thought provoking message below, with easy ways to follow, retweet, favourite etc.

      \"Why do you love Justin Bieber so much? He's never gonna love you back.\" so.. \"Why do you breathe if you know you're eventually gonna die?\"

      — Kelsi(@BieberTweet) June 13, 2012


      Back to top

  • "; print "
  • How do alert admins that there's a post that should probably be removed?
    • At the bottom of every message there this 'Report Abuse' icon . Clicking that will send a message to all the admins of the site and they will remove it if they agree with you. Because this method uses the private message system, it will only work if you're logged in. If you are not a member but still wish to alert us, please email $SUPPORT with as much information as possible.

      Back to top

  • "; print "
  • How do ignore posts from someone I dislike?
    • Underneath the the person's avatar, you'll see an icon . If you click that, it adds them to your ignored list. You can view your ignored list on your profile settings, and remove anyone you want to give a second chance to.

      Back to top

  • "; print "
  • How do I become a blogger?
    • You need to be a registered member of the site then create your first blog and send it to one of the site admins. You can do that via the Contact Us link at the foot of every page, or send a Private Message to one of the admins a list of whom can be found at the foot of the main forum page.

      When approved, you'll be able to submit your blog yourself via a link on the Blogs page. The admins will then have 24hrs to look over your blog before it gets added to the site.

      Back to top

  • "; print "
"; $adtype = "Skyscraper"; include ("adserver.php"); print "
"; include("fb_bottom.php"); exit; } if ($PARAMETER1 == "search") { # using google search with adsense if (!isset($US_ID)) { header("HTTP/1.1 301 Moved Permanently"); header("Location: $PATH/login/"); die(); } include("fb_top.php"); $sql = "select DO_GoogleCSE from DO_Domains where DO_ID = $SITE_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $googlecse = $row['DO_GoogleCSE']; print "

Search: " . htmlspecialchars($_REQUEST['search']) . "


"; include("fb_bottom.php"); exit; } if ($PARAMETER1 == "dalais-list") { # Dalai's div list include("fb_top.php"); print "

Dalai's Div List

"; $sql = "select * from US_Users where US_Type = 'U' and US_Ignored != ''"; $res = mysql_query($sql_cats); while ($row = mysql_fetch_array($res)) { } print "

" ; $adtype = "Skyscraper"; include("adserver.php"); print "
"; include("fb_bottom.php"); exit;} if ($PARAMETER1 == "whos-online") { # Who is online? if (isset($_REQUEST['today'])) $url = "loadtoday"; else $url = "load"; $JAVASCRIPT = " "; require("fb_top.php"); print "

Members Online Now

"; print "
    "; if (isset($_REQUEST['today'])) { $earlier = mktime(date("G"), (date("i") - 60), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; } else { $earlier = mktime(date("G"), (date("i") - 5), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; } $sql = "select * from US_Users where US_LastOnline >= '$earlier' and US_Domain = $SITE_ID order by US_Username"; $res = mysql_query($sql); $users = 0; while ($row = mysql_fetch_array($res)) { if (is_file("images/avatars/{$row['US_ID']}.gif")) { echo "
  • "; } else { echo "
  • "; } $users++; } echo "
  • $users
  • "; print "
"; print "
"; $adtype = "Skyscraper"; include ("adserver.php"); print "
"; require("fb_bottom.php"); exit; } if ($PARAMETER1 == "whos-online-load") { # Who is online? print "
    "; $earlier = mktime(date("G"), (date("i") - 5), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; $sql = "select * from US_Users where US_LastOnline >= '$earlier' and US_Domain = $SITE_ID order by US_Username"; $res = mysql_query($sql); $users = 0; while ($row = mysql_fetch_array($res)) { if (is_file("images/avatars/{$row['US_ID']}.gif")) { echo "
  • "; } else { echo "
  • "; } $users++; } echo "
  • $users
  • "; print "
"; exit; } if ($PARAMETER1 == "score" and isset($PARAMETER2) and is_numeric($PARAMETER2) and isset($PARAMETER3) and is_numeric($PARAMETER3)) { # thumb score print " $SITE_NAME | Post Voters"; if ($PARAMETER3 == 0) { $sql = "select * from MB_Threads where MBT_ID = " . mysql_real_escape_string($PARAMETER2); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $good = $row['MBT_GoodPost']; $bad = strip_tags($row['MBT_BadPost']); } } else { $sql = "select * from MB_Replies where MBR_ID = " . mysql_real_escape_string($PARAMETER3); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $good = $row['MBR_GoodPost']; $bad = strip_tags($row['MBR_BadPost']); } } print "Post voters:


"; $good = str_replace("]", "", $good); $users = explode("[", $good); foreach ($users as $user) { $sql = "select US_Username from US_Users where US_ID = " . mysql_real_escape_string($user); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "{$row['US_Username']}
"; } print "

"; $bad = str_replace("]", "", $bad); $users = explode("[", $bad); foreach ($users as $user) { $sql = "select US_Username from US_Users where US_ID = " . mysql_real_escape_string($user); $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "{$row['US_Username']}
"; } print "
"; exit; } if ($PARAMETER1 == "x") { # Load data $url = "load"; $sql = "select MBT_ID, MBT_Subject, MBT_Date1, MBT_Date2, MBT_Views, MBT_Text, US_Username, US_ID from MB_Threads, US_Users where MBT_User = US_ID order by MBT_Date2 desc limit 10"; $res = mysql_query($sql); $res = mysql_query($sql); $data = ""; while ($row = mysql_fetch_array($res)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = {$row['MBT_ID']} and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; $minitext = str_replace("\n", "", substr(strip_tags($row['MBT_Text']), 0, 70)); $minitext = str_replace("\r", " ", $minitext); $minitext = stripslashes($minitext); $date = twitter_time_format($row['MBT_Date1']); $last = ""; $lastreply = 0; if ($posts > 0) { $sql1 = "select * from MB_Replies where MBR_Thread = {$row['MBT_ID']} order by MBR_Date desc limit 1"; $res1 = mysql_query($sql1); if ($posts > 0) { $sql1 = "select * from MB_Replies, US_Users where MBR_Thread = {$row['MBT_ID']} and MBR_User = US_ID order by MBR_Date desc limit 1"; $res1 = mysql_query($sql1); if ($row1 = mysql_fetch_array($res1)) { $lastreply = $row1['MBR_ID']; $lastdate = $row1['MBR_Date']; $last = twitter_time_format($row1['MBR_Date']) . " by {$row1['US_Username']}"; } } } $icon = ""; if (is_file("images/avatars/{$row['US_ID']}.gif")) $avatar = ""; else $avatar = ""; # $data .= "
  • {$row['MBT_Subject']}
    {$row['US_Username']} at " . twitter_time_format($row['MBT_Date1']) . "
    $minitext
    $last
    $posts
    {$row['MBT_Views']}
  • "; $data .= "
  • $avatar
    {$row['MBT_Subject']}
    {$row['US_Username']} at " . twitter_time_format($row['MBT_Date1']) . " with {$row['MBT_Views']} views
    $minitext
    $posts
    $last
  • "; $lastdate = $row['MBT_Date2']; } setcookie("lastdate", $lastdate); $JAVASCRIPT = " "; require("fb_top.php"); print "
      $data
    "; require("fb_bottom.php"); exit; } if ($PARAMETER1 == "x-load") { # Load new data $data = "
      "; $sql = "select MBT_ID, MBT_Subject, MBT_Date1, MBT_Views, MBT_Text, US_Username, US_ID from MB_Threads, US_Users where MBT_User = US_ID and MBT_Date2 >= '" . mysql_real_escape_string(urldecode($PARAMETER2)) . "' order by MBT_Date2 desc"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = {$row['MBT_ID']} and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; $minitext = str_replace("\n", "", substr(strip_tags($row['MBT_Text']), 0, 70)); $minitext = str_replace("\r", " ", $minitext); $minitext = stripslashes($minitext); $date = twitter_time_format($row['MBT_Date1']); $last = ""; $lastreply = 0; if ($posts > 0) { $sql1 = "select * from MB_Replies, US_Users where MBR_Thread = {$row['MBT_ID']} and MBR_User = US_ID order by MBR_Date desc limit 1"; $res1 = mysql_query($sql1); if ($row1 = mysql_fetch_array($res1)) { $lastreply = $row1['MBR_ID']; $lastdate = $row1['MBR_Date']; $last = twitter_time_format($row1['MBR_Date']) . "by {$row1['US_Username']}"; } } if (is_file("images/avatars/{$row['US_ID']}.gif")) $avatar = ""; else $avatar = ""; $icon = ""; $data .= "
    • $avatar{$row['MBT_Subject']}
      {$row['US_Username']} at " . twitter_time_format($row['MBT_Date1']) . " with {$row['MBT_Views']} views
      $minitext
      $posts
      $last
    • "; } $data .= "
    • $PARAMETER2 [{$_COOKIE['name']}]
    "; print $data; exit; } if (is_numeric($PARAMETER1) and ($INPUT_v == "bc" or $INPUT_v == "be")) { # view post in table view ##################################################################################### if (!isset($PARM_PAGE)) $PARM_PAGE = 1; $sql_thread = "select US_Username, MBT_Subject, MBT_Text from MB_Threads, US_Users where MBT_ID = $PARAMETER1 and MBT_User = US_ID"; $res_thread = mysql_query($sql_thread); if (mysql_num_rows($res_thread) == 0) { http_response_code(404); header("Location: $PATH/forum/"); die(); } $row_thread = mysql_fetch_array($res_thread); $PAGE_TITLE = "Forum | " . stripslashes($row_thread[1]) . " by " . $row_thread[0]; $PAGE_DESCRIPTION = str_replace("'", "",shortenString($row_thread[2], 200)); if (stripos($row_thread[1], "nsfw") !== false) $NSFW = "Y"; $JAVASCRIPT = ""; if (isset($US_ID)) $JAVASCRIPT .= ""; $JAVASCRIPT .= ""; if (isset($TWTD)) $CANONICAL = "\n"; else $CANONICAL = "\n"; include("fb_top.php"); print "
    "; $sql_count = "select count(*) from MB_Replies where MBR_Thread = $PARAMETER1 and MBR_Initial = 0"; $res_count = mysql_query($sql_count); $row_count = mysql_fetch_array($res_count); $replies = $row_count[0]; $pagecount = ceil($replies / $pagerecs); if ($pagecount == 0) $pagecount = 1; $navbar = "
    "; if ($FORUM_FORMAT == "S") { $navbar .= "Forums | "; if ($PARM_CATEGORY == "0") $navbar .= "All posts"; else if ($PARM_CATEGORY == "z") $navbar .= "My posts"; else { $sql = "select MBC_Title from MB_Categories where MBC_ID = $PARM_CATEGORY"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $navbar .= "" . stripslashes($row['MBC_Title']) . ""; } $navbar .= ""; } else $navbar .= "Forum index | Previous Thread | Next thread"; $navbar .= "
    • Page:
    • "; if ($PARM_PAGE == 1) $navbar.= "
    • < previous
    • "; else $navbar .= "
    • < previous
    • "; # for ($x=1; $x <= $pagecount; $x++) { # #if ($PARM_PAGE == $x) $navbar .= "
    • $x
    • "; # #else $navbar .= "
    • $x
    • "; # } if (($PARM_PAGE - 5) > 1) $navbar.= "
    • 1
    • "; if (($PARM_PAGE - 5) > 2) $navbar.= " ..."; for ($x = ($PARM_PAGE - 5); $x <= $pagecount; $x++) { if ($PARM_PAGE == $x) $navbar .= "
    • $x
    • "; else if ($x < 1) $navbar.= ''; else $navbar.= "
    • $x
    • "; if ($x == ($PARM_PAGE + 5)) $x = $pagecount + 1; } if (($pagecount - $PARM_PAGE - 5) > 2 ) $navbar.= " ..."; if (($pagecount - $PARM_PAGE - 5) > 1 ) $navbar.= "
    • $pagecount
    • "; if ($PARM_PAGE == $pagecount) $navbar.= "
    • next >
    • "; else $navbar.= "
    • next >
    • "; $navbar .= "
    "; print $navbar; $displayed = 0; # used to work out if a second skyscraper to be displayed $lock = mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_ID = $PARAMETER1 and MBT_Text like '%%' limit 1")); ###########Top post # if ($page == 1) { $displayed++; $sql_thread = "select * from MB_Threads, US_Users where MBT_ID = $PARAMETER1 and MBT_User = US_ID"; $res_thread = mysql_query($sql_thread); $row_thread = mysql_fetch_array($res_thread); $ig = stripos($US_IGNORED, "," . $row_thread['MBT_User'] . ";"); if ($ig === false) { if (isset($US_ID) and ($US_ID == $row_thread['MBT_User'] or $US_TYPE == "A") and $lock == 0) $editpost = "

    "; else $editpost = ""; if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; if ($row_thread['MBT_Sticky'] == 0) $abuse .= " "; else $abuse .= " "; if ($lock == 1) $abuse .= " "; else $abuse .= " "; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = " "; $pos = strpos($row_thread["MBT_Text"], ""); if ($pos > -1) $abuse = " Abuse reported"; } else $abuse = ""; if ($lock == 0) $add = " "; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_thread['MBT_GoodPost'], '[')) - (substr_count($row_thread['MBT_BadPost'], '['))) . "
    "; print ""; echo ''; echo '
    " . stripslashes($row_thread["MBT_Subject"]) . " " . date("H:i - M j", strtotime($row_thread['MBT_Date1'])) . " with " . $row_thread['MBT_Views'] . " views{$row_thread['US_Username']}

    ' . processText($row_thread["MBT_Text"]) . $editpost . '
    '; userPanel($row_thread["US_ID"]); echo '
    '; userSignature($row_thread['MBT_User']); print "
    $add$thumbs$abuse
    "; $upd_views = "update MB_Threads set MBT_Views = MBT_Views + 1 where MBT_ID = $PARAMETER1"; mysql_query($upd_views); } else { print ""; $pagerecs = $pagerecs - 1; } # print "
    "; # print "
    "; if ($TOP == "top960") { $adtype = "Forum_Post"; include ("adserver.php"); } else { $adtype = "Forum_Post_Ext"; include ("adserver.php"); } # $last_viewed = 0; # print "

    "; if (isset($TWTD)) $addtotopic = ""; else $addtotopic = " "; $replycounter = 0; ########### Reply, unquoted $sql_replies = "select * from MB_Replies, US_Users where MBR_Thread = $PARAMETER1 and MBR_Initial = 0 and MBR_User = US_ID order by MBR_Date limit " . (($PARM_PAGE - 1) * $pagerecs) . "," . $pagerecs; $res_replies = mysql_query($sql_replies); while ($row_replies = mysql_fetch_array($res_replies)) { if (!strpos($US_IGNORED, "," . $row_replies['US_ID'] . ";")) { if (isset($US_ID) and ($US_ID == $row_replies['MBR_User'] or $US_TYPE == "A" or $US_TYPE == "S") and $lock == 0) $editpost = "

    "; else $editpost = ""; $displayed++; if ($displayed == 10 and !isset($US_ID)) { print "
    "; print "Login to get fewer ads

    "; } if ($displayed == 5 and isset($US_ID) and ($US_ID == 1)) { #$adtype = "inforum"; include ("adserver.php"); } if ($row_replies["MBR_ReplyTo"] == "0") { if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = ""; $pos = strpos($row_replies["MBR_Text"], ""); if ($pos > -1) $abuse = "Abuse reported"; } print ""; echo ''; echo '
    " . stripslashes($row_replies["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_replies['MBR_Date'])) . " with " . $row_replies['MBR_Views'] . " views{$row_replies['US_Username']}

    ' . processText($row_replies["MBR_Text"]) . $editpost . '
    '; userPanel($row_replies["US_ID"]); echo '
    '; userSignature($row_replies['US_ID']); if ($lock == 0) $add = $addtotopic . ""; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_replies['MBR_GoodPost'], '[')) - (substr_count($row_replies['MBR_BadPost'], '['))) . "
    "; print "
    $add$thumbs$abuse
    "; $upd_views = "update MB_Replies set MBR_Views = MBR_Views + 1 where MBR_ID = " . $row_replies['MBR_ID']; mysql_query($upd_views); $last_viewed = $row_replies['MBR_ID']; ########## Reply, quoted } else { # if (strpos($US_IGNORED, "," . $row_quote['US_ID'] . ";")) { # if this is a response to a hidden post, don't display it print ""; # } else { if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = ""; $pos = strpos($row_replies["MBR_Text"], ""); if ($pos > -1) $abuse = "Abuse reported"; } $sql_quote = "select * from MB_Replies, US_Users where MBR_ID = {$row_replies['MBR_ReplyTo']} and MBR_Initial = 0 and MBR_User = US_ID"; $res_quote = mysql_query($sql_quote); $row_quote = mysql_fetch_array($res_quote); print "'; echo '
    " . stripslashes($row_replies["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_replies['MBR_Date'])) . " with " . $row_replies['MBR_Views'] . " views{$row_replies['US_Username']}

    "; if (strpos($US_IGNORED, "," . $row_quote['US_ID'] . ";")) { print "
    Post from {$row_quote["US_Username"]} ignored

    "; } else { print "
    " . stripslashes($row_quote["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_quote['MBR_Date'])) . " by {$row_quote["US_Username"]}

    " . processText($row_quote["MBR_Text"]) . "

    "; } echo '
    ' . processText($row_replies["MBR_Text"]) . $editpost .'
    '; userPanel ($row_replies["US_ID"]); echo '
    '; userSignature($row_replies['US_ID']); if ($lock == 0) $add = $addtotopic . ""; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_replies['MBR_GoodPost'], '[')) - (substr_count($row_replies['MBR_BadPost'], '['))) . "
    "; print "
    $add$thumbs$abuse
    "; $upd_views = "update MB_Replies set MBR_Views = MBR_Views + 1 where MBR_ID = " . $row_replies['MBR_ID']; mysql_query($upd_views); $last_viewed = $row_replies['MBR_ID']; } # } } } if (isset($US_ID)) { # save last read point $sql = "select * from MB_LastRead where LR_User = $US_ID and LR_Thread = $PARAMETER1 order by LR_DateTime"; $res = mysql_query($sql); $LR_Reply = 0; while ($row = mysql_fetch_array($res)) $LR_Reply = $row['LR_Reply']; if ($LR_Reply == 0) { $sql_upd = "delete from MB_LastRead where LR_User = $US_ID and LR_Thread = $PARAMETER1"; $result = mysql_query($sql_upd); $sql_upd = "insert into MB_LastRead values($US_ID, $PARAMETER1, $last_viewed, now())"; $result = mysql_query($sql_upd); } else if ($LS_Reply < $last_viewed) { # $sql_upd = "update MB_LastRead set LR_DateTime = now(), LR_Reply = $last_viewed where LR_User = $US_ID and LR_Thread = $PARAMETER1 and LR_Reply < $last_viewed"; # $res = mysql_query($sql_upd); $sql_upd = "delete from MB_LastRead where LR_User = $US_ID and LR_Thread = $PARAMETER1"; $result = mysql_query($sql_upd); $sql_upd = "insert into MB_LastRead values($US_ID, $PARAMETER1, $last_viewed, now())"; $result = mysql_query($sql_upd); } } echo "
    "; echo $navbar; echo "
    "; echo '
    '; $adtype = "Skyscraper"; include ("adserver.php"); if ($displayed > 4) { #if ($PARAMETER1 == 307312) { print "
    "; } if ($PARAMETER1 == 307312) { print "
    "; } else { print "
    "; $adtype = "Skyscraper_Forum1"; include ("adserver.php"); print "
    "; } } echo '
    '; $adtype = "Forum_Footer"; include ("adserver.php"); # if (!isset($US_ID) and isset($TWTD)) print "
    Please log in or register. Registered visitors get fewer ads.
    "; # if (!isset($US_ID) and isset($FANSNETWORK)) print "
    Please log in or register. Registered visitors get fewer ads.
    "; include("fb_bottom.php"); exit; } if (is_numeric($PARAMETER1) and $INPUT_v == "bs") { # view post in simple view ##################################################################################### if (!isset($PARM_PAGE)) $PARM_PAGE = 1; $bgcolouralt = "rgb(235,235,235)"; $bgcolour = ""; $sql_thread = "select US_Username, MBT_Subject, MBT_Text from MB_Threads, US_Users where MBT_ID = $PARAMETER1 and MBT_User = US_ID"; $res_thread = mysql_query($sql_thread); $row_thread = mysql_fetch_array($res_thread); $PAGE_TITLE = "Forum | " . stripslashes($row_thread[1]) . " by " . $row_thread[0]; $PAGE_DESCRIPTION = str_replace("'", "",shortenString($row_thread[2], 200)); if (stripos($row_thread[1], "nsfw") !== false) $NSFW = "Y"; $JAVASCRIPT = ""; if (isset($US_ID)) $JAVASCRIPT .= ""; $JAVASCRIPT .= ""; include("fb_top.php"); print "
    "; $sql_count = "select count(*) from MB_Replies where MBR_Thread = $PARAMETER1 and MBR_Initial = 0"; $res_count = mysql_query($sql_count); $row_count = mysql_fetch_array($res_count); $replies = $row_count[0]; $pagecount = ceil($replies / $pagerecs); if ($pagecount == 0) $pagecount = 1; $navbar = "
    "; if ($FORUM_FORMAT == "S") { $navbar .= "Forums | "; if ($PARM_CATEGORY == "0") $navbar .= "All posts"; else if ($PARM_CATEGORY == "z") $navbar .= "My posts"; else { $sql = "select MBC_Title from MB_Categories where MBC_ID = $PARM_CATEGORY"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $navbar .= "" . stripslashes($row['MBC_Title']) . ""; } $navbar .= ""; } else $navbar .= "Forum index | Previous Thread | Next thread"; $navbar .= "
    • Page:
    • "; if ($PARM_PAGE == 1) $navbar.= "
    • < previous
    • "; else $navbar .= "
    • < previous
    • "; # for ($x=1; $x <= $pagecount; $x++) { # #if ($PARM_PAGE == $x) $navbar .= "
    • $x
    • "; # #else $navbar .= "
    • $x
    • "; # } if (($PARM_PAGE - 5) > 1) $navbar.= "
    • 1
    • "; if (($PARM_PAGE - 5) > 2) $navbar.= " ..."; for ($x = ($PARM_PAGE - 5); $x <= $pagecount; $x++) { if ($PARM_PAGE == $x) $navbar .= "
    • $x
    • "; else if ($x < 1) $navbar.= ''; else $navbar.= "
    • $x
    • "; if ($x == ($PARM_PAGE + 5)) $x = $pagecount + 1; } if (($pagecount - $PARM_PAGE - 5) > 2 ) $navbar.= " ..."; if (($pagecount - $PARM_PAGE - 5) > 1 ) $navbar.= "
    • $pagecount
    • "; if ($PARM_PAGE == $pagecount) $navbar.= "
    • next >
    • "; else $navbar.= "
    • next >
    • "; $navbar .= "
    "; #$navbar .= "
    "; print $navbar; $displayed = 0; # used to work out if a second skyscraper to be displayed $lock = mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_ID = $PARAMETER1 and MBT_Text like '%%' limit 1")); ###########Top post # if ($page == 1) { $displayed++; $sql_thread = "select * from MB_Threads, US_Users where MBT_ID = $PARAMETER1 and MBT_User = US_ID"; $res_thread = mysql_query($sql_thread); $row_thread = mysql_fetch_array($res_thread); $ig = stripos($US_IGNORED, "," . $row_thread['MBT_User'] . ";"); if ($ig === false) { if (isset($US_ID) and ($US_ID == $row_thread['MBT_User'] or $US_TYPE == "A") and $lock == 0) $editpost = "

    "; else $editpost = ""; if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; if ($row_thread['MBT_Sticky'] == 0) $abuse .= " "; else $abuse .= " "; if ($lock == 1) $abuse .= " "; else $abuse .= " "; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = " "; $pos = strpos($row_thread["MBT_Text"], ""); if ($pos > -1) $abuse = " Abuse reported"; } else $abuse = ""; if ($lock == 0) $add = " "; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_thread['MBT_GoodPost'], '[')) - (substr_count($row_thread['MBT_BadPost'], '['))) . "
    "; print ""; echo ''; echo '
    " . stripslashes($row_thread["MBT_Subject"]) . " " . date("H:i - M j", strtotime($row_thread['MBT_Date1'])) . " with " . $row_thread['MBT_Views'] . " views{$row_thread['US_Username']}

    ' . processText($row_thread["MBT_Text"]) . $editpost . '
    '; #userPanel($row_thread["US_ID"]); echo '
    '; userSignature($row_thread['MBT_User']); print "
    $add$thumbs$abuse

    "; $upd_views = "update MB_Threads set MBT_Views = MBT_Views + 1 where MBT_ID = $PARAMETER1"; mysql_query($upd_views); } else { print ""; $pagerecs = $pagerecs - 1; } print "
    "; if ($PARAMETER1 == 307312) { print "
    "; } else if ($TOP == "top960") { $adtype = "Banner"; include ("adserver.php"); } else { $adtype = "Leaderboard"; include ("adserver.php"); } $last_viewed = 0; print "

    "; ########### Reply, unquoted #$sql_replies = "select * from MB_Replies, US_Users where MBR_Thread = $PARAMETER1 and MBR_Initial = 0 and MBR_User = US_ID order by MBR_Date"; $sql_replies = "select * from MB_Replies, US_Users where MBR_Thread = $PARAMETER1 and MBR_Initial = 0 and MBR_User = US_ID order by MBR_Date limit " . (($PARM_PAGE - 1) * $pagerecs) . "," . $pagerecs; $res_replies = mysql_query($sql_replies); while ($row_replies = mysql_fetch_array($res_replies)) { if (!strpos($US_IGNORED, "," . $row_replies['US_ID'] . ";")) { if (isset($US_ID) and ($US_ID == $row_replies['MBR_User'] or $US_TYPE == "A" or $US_TYPE == "S") and $lock == 0) $editpost = "

    "; else $editpost = ""; $displayed++; if (1 == 1) { #if ($row_replies["MBR_ReplyTo"] == "0") { if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = ""; $pos = strpos($row_replies["MBR_Text"], ""); if ($pos > -1) $abuse = "Abuse reported"; } if ($bgcolour == $bgcolouralt) $bgcolour = "rgb(255,255,255)"; else $bgcolour = $bgcolouralt; print "
    "; echo ''; echo '
    " . stripslashes($row_replies["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_replies['MBR_Date'])) . " with " . $row_replies['MBR_Views'] . " views{$row_replies['US_Username']}

    ' . processText($row_replies["MBR_Text"]) . $editpost . '
    '; #userPanel($row_replies["US_ID"]); echo '
    '; userSignature($row_replies['US_ID']); #if ($lock == 0) $add = " "; else $add = ""; if ($lock == 0) $add = ""; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_replies['MBR_GoodPost'], '[')) - (substr_count($row_replies['MBR_BadPost'], '['))) . "
    "; print "
    $add$thumbs$abuse
    "; $upd_views = "update MB_Replies set MBR_Views = MBR_Views + 1 where MBR_ID = " . $row_replies['MBR_ID']; mysql_query($upd_views); $last_viewed = $row_replies['MBR_ID']; ########## Reply, quoted } else { if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = ""; $pos = strpos($row_replies["MBR_Text"], ""); if ($pos > -1) $abuse = "Abuse reported"; } $sql_quote = "select * from MB_Replies, US_Users where MBR_ID = {$row_replies['MBR_ReplyTo']} and MBR_Initial = 0 and MBR_User = US_ID"; $res_quote = mysql_query($sql_quote); $row_quote = mysql_fetch_array($res_quote); print "
    '; echo '
    " . stripslashes($row_replies["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_replies['MBR_Date'])) . " with " . $row_replies['MBR_Views'] . " views{$row_replies['US_Username']}

    "; if (strpos($US_IGNORED, "," . $row_quote['US_ID'] . ";")) { print "
    Post from {$row_quote["US_Username"]} ignored

    "; } else { print "
    " . stripslashes($row_quote["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_quote['MBR_Date'])) . " by {$row_quote["US_Username"]}

    " . processText($row_quote["MBR_Text"]) . "

    "; } echo '
    ' . processText($row_replies["MBR_Text"]) . $editpost .'
    '; userPanel ($row_replies["US_ID"]); echo '
    '; userSignature($row_replies['US_ID']); if ($lock == 0) $add = " "; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_replies['MBR_GoodPost'], '[')) - (substr_count($row_replies['MBR_BadPost'], '['))) . "
    "; print "
    $add$thumbs$abuse
    "; $upd_views = "update MB_Replies set MBR_Views = MBR_Views + 1 where MBR_ID = " . $row_replies['MBR_ID']; mysql_query($upd_views); $last_viewed = $row_replies['MBR_ID']; } }} if (isset($US_ID)) { # save last read point $sql = "select * from MB_LastRead where LR_User = $US_ID and LR_Thread = $PARAMETER1 order by LR_DateTime"; $res = mysql_query($sql); $LR_Reply = 0; while ($row = mysql_fetch_array($res)) $LR_Reply = $row['LR_Reply']; if ($LR_Reply == 0) { $sql_upd = "delete from MB_LastRead where LR_User = $US_ID and LR_Thread = $PARAMETER1"; $result = mysql_query($sql_upd); $sql_upd = "insert into MB_LastRead values($US_ID, $PARAMETER1, $last_viewed, now())"; $result = mysql_query($sql_upd); } else if ($LS_Reply < $last_viewed) { # $sql_upd = "update MB_LastRead set LR_DateTime = now(), LR_Reply = $last_viewed where LR_User = $US_ID and LR_Thread = $PARAMETER1 and LR_Reply < $last_viewed"; # $res = mysql_query($sql_upd); $sql_upd = "delete from MB_LastRead where LR_User = $US_ID and LR_Thread = $PARAMETER1"; $result = mysql_query($sql_upd); $sql_upd = "insert into MB_LastRead values($US_ID, $PARAMETER1, $last_viewed, now())"; $result = mysql_query($sql_upd); } } echo "
    "; echo $navbar; echo "
    "; echo '
    '; $adtype = "Skyscraper"; include ("adserver.php"); if ($displayed > 4) { if ($PARAMETER1 == 307312) { print "
    "; } else { print "
    "; $adtype = "Skyscraper_Forum1"; include ("adserver.php"); print "
    "; } } echo '
    '; include("fb_bottom.php"); exit; } if (is_numeric($PARAMETER1) and ($INPUT_v == "td" or $INPUT_v == "tu")) { # view post in thread view #################################################################################### if (is_numeric($PARAMETER1) and ($PARAMETER1 > 0)) $INPUT_t = $PARAMETER1; if (is_numeric($PARAMETER2) and ($PARAMETER2 > 0)) $INPUT_r = $PARAMETER2; if (isset($INPUT_r)) { $sql_thread = "select US_Username, MBR_Subject from MB_Replies, US_Users where MBR_ID = " . $INPUT_r . " and MBR_User = US_ID"; $res_thread = mysql_query($sql_thread); if (mysql_num_rows($res_thread) == 0) { http_response_code(404); header("Location: $PATH/forum/"); die(); } $row_thread = mysql_fetch_array($res_thread); $PAGE_TITLE = "Forum | " . stripslashes($row_thread[1]) . " by " . $row_thread[0] . " "; } else { $sql_thread = "select US_Username, MBT_Subject from MB_Threads, US_Users where MBT_ID = " . $INPUT_t . " and MBT_User = US_ID"; $res_thread = mysql_query($sql_thread); if (mysql_num_rows($res_thread) == 0) { http_response_code(404); header("Location: $PATH/forum/"); die(); } $row_thread = mysql_fetch_array($res_thread); $PAGE_TITLE = "Forum | " . stripslashes($row_thread[1]) . " by " . $row_thread[0] . " "; } if (stripos($row_thread[1], "nsfw") !== false) $NSFW = "Y"; $JAVASCRIPT = ""; $JAVASCRIPT .= ""; #$JAVASCRIPT .= ""; include("fb_top.php"); echo '
    '; $lock = mysql_num_rows(mysql_query("select MBT_ID from MB_Threads where MBT_ID = $INPUT_t and MBT_Text like '%%' limit 1")); ########## Top thread message if (!isset($INPUT_r)) { $sql_thread = "select * from MB_Threads, US_Users where MBT_ID = $PARAMETER1 and MBT_User = US_ID"; $res_thread = mysql_query($sql_thread); if (mysql_num_rows($res_thread)) { echo '
    Forum index | Previous Thread | Next thread
    '; $row_thread = mysql_fetch_array($res_thread); if (isset($US_ID) and ($US_ID == $row_thread['MBT_User'] or $US_TYPE == "A") and $lock == 0) $editpost = "

    "; else $editpost = ""; if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; if ($row_thread['MBT_Sticky'] == 0) $abuse .= " "; else $abuse .= " "; if ($lock == 1) $abuse .= " "; else $abuse .= " "; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = " "; $pos = strpos($row_thread["MBT_Text"], ""); if ($pos > -1) $abuse = " Abuse reported"; } else $abuse = ""; if ($lock == 0) $add = ""; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_thread['MBT_GoodPost'], '[')) - (substr_count($row_thread['MBT_BadPost'], '['))) . "
    "; print ""; echo ''; echo '
    " . stripslashes($row_thread["MBT_Subject"]) . " " . date("H:i - M j", strtotime($row_thread['MBT_Date1'])) . " with " . $row_thread['MBT_Views'] . " views{$row_thread['US_Username']}

    ' . processText($row_thread["MBT_Text"]) . $editpost . '
    '; userPanel($row_thread["MBT_User"]); echo '
    '; userSignature($row_thread['MBT_User']); print "
    $add$thumbs$abuse

    "; $upd_views = "update MB_Threads set MBT_Views = MBT_Views + 1 where MBT_ID = " . $INPUT_t; mysql_query($upd_views); } } else { $sql_replies = "select * from MB_Replies, US_Users where MBR_ID = $INPUT_r and MBR_User = US_ID limit 1"; $res_replies = mysql_query($sql_replies); if (mysql_num_rows($res_replies)) { $row_replies = mysql_fetch_array($res_replies); $prevnext = ""; $sql = "select * from MB_Replies where MBR_Thread = $INPUT_t and MBR_Date < '{$row_replies['MBR_Date']}' and MBR_Initial = 0 order by MBR_Date desc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $prevnext = "Prev post"; $sql = "select * from MB_Replies where MBR_Thread = $INPUT_t and MBR_Date > '{$row_replies['MBR_Date']}' order by MBR_Date asc limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($prevnext != "") $prevnext .= " | "; $prevnext .= "Next post"; } print "
    Forum index | Previous Thread | Next thread$prevnext
    "; if (isset($US_ID) and ($US_ID == $row_replies['MBR_User'] or $US_TYPE == "A") and $lock == 0) $editpost = "

    "; else $editpost = ""; if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "F") { $abuse = ""; } elseif (isset($US_TYPE) and $US_TYPE == "U") { $abuse = ""; $pos = strpos($row_replies["MBR_Text"], ""); if ($pos > -1) $abuse = "Abuse reported"; } print ""; echo ''; echo '
    " . stripslashes($row_replies["MBR_Subject"]) . " on " . date("H:i - M j", strtotime($row_replies['MBR_Date'])) . " with " . $row_replies['MBR_Views'] . " views{$row_replies['US_Username']}

    ' . processText($row_replies["MBR_Text"]) . $editpost . '
    '; userPanel($row_replies["US_ID"]); echo '
    '; userSignature($row_replies['US_ID']); if ($lock == 0) $add = ""; else $add = ""; if (isset($US_ID)) $us = $US_ID; else $us = ""; if (isset($US_ID)) $thumbs = ""; else $thumbs = "
    " . ((substr_count($row_replies['MBR_GoodPost'], '[')) - (substr_count($row_replies['MBR_BadPost'], '['))) . "
    "; print "
    $add$thumbs$abuse

    "; $upd_views = "update MB_Replies set MBR_Views = MBR_Views + 1 where MBR_ID = " . $INPUT_r; mysql_query($upd_views); } } # print "
    "; if ($TOP == "top960") $adtype = "Forum_Post"; else $adtype = "Forum_Post"; include ("adserver.php"); print "
    "; #print "

    "; print "

    "; #print "
    "; $sql_threadmain = "select * from MB_Threads where MBT_ID = " . $INPUT_t; $res_threadmain = mysql_query($sql_threadmain); if (mysql_num_rows($res_threadmain)) { $row_threadmain = mysql_fetch_array($res_threadmain); echo "Back to the forum
      "; $sql_user = "select US_Username from US_Users where US_ID = " . $row_threadmain["MBT_User"]; $res_user = mysql_query($sql_user); $row_user = mysql_fetch_row($res_user); $minitext = $row_threadmain['MBT_Text']; $pos = strpos($minitext, "<"); if ($pos !== false) $minitext = substr($minitext, 0, $pos); $minitext = str_replace("\n", "", shortenString(stripslashes($minitext), 100, true, true)); $minitext = str_replace("\r", " ", $minitext); $minitext = str_replace("", "", $minitext); $minitext = str_replace("\"", "", $minitext); $minitext = "$minitext"; if (!isset($INPUT_r)) { echo "
    • " . stripslashes($row_threadmain["MBT_Subject"]) . " by {$row_user[0]} - " . date("H:i - M j", strtotime($row_threadmain["MBT_Date1"])) . " - ({$row_threadmain['MBT_Views']} views)
      $minitext
    • "; } else { echo "
    • " . stripslashes($row_threadmain["MBT_Subject"]) . " by {$row_user[0]} " . date("H:i - M j", strtotime($row_threadmain["MBT_Date1"])) . " - ({$row_threadmain['MBT_Views']} views)
      $minitext
    • "; } $sql_replies = "select * from MB_Replies where MBR_Thread = " . $INPUT_t . " and MBR_Initial = 0 order by MBR_Date desc"; $res_replies = mysql_query($sql_replies); if (mysql_num_rows($res_replies)) { $row_replies = mysql_fetch_row($res_replies); if (isset($row_replies["MBR_ReplyTo"]) and $row_replies["MBR_ReplyTo"] == "0") { $var = true; } else { $var = false; } displayThreads(0,$var,$INPUT_t,$selected); } echo ""; print '
    '; print ''; } echo ''; $adtype = "Skyscraper"; include("adserver.php"); echo '

    '; $adtype = "Forum_Footer"; include ("adserver.php"); include("fb_bottom.php"); exit ; } if ($FORUM_FORMAT == "S" and $PARM_CATEGORY == 0 and $PARAMETER1 == "" and (!isset($_REQUEST['search']))) { # Category index require("fb_top.php"); print "

    $SITE_NAME Forums

    "; if (isset($US_ID)) { $sql = "select US_Stats_BoardPosts from US_Users where US_ID = $US_ID limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print ""; } else print ""; $sql = "select * from MB_MainCategories where MBM_Domain = $SITE_ID order by MBM_Order"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print "
    {$row['MBM_Title']}
    "; $sql1 = "select * from MB_Categories where MBC_MainCategory = {$row['MBM_ID']} order by MBC_Order"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_array($res1)) { $sel_count1 = "select count(*) from MB_Threads where MBT_Domain = $SITE_ID and MBT_Category = " . $row1['MBC_ID']; $res_count1 = mysql_query($sel_count1); $row_count1 = mysql_fetch_row($res_count1); $sel_count2 = "select count(*) from MB_Replies, MB_Threads where MBR_Thread = MBT_ID and MBT_Category = " . $row1['MBC_ID']; $res_count2 = mysql_query($sel_count2); $row_count2 = mysql_fetch_row($res_count2); print ""; else print "" . stripslashes($row2['MBR_Subject']) . "
    by {$row2['US_Username']} $date"; } print ""; } print ""; } print "
    ForumTopicsPostsLast Post
    {$row1['MBC_Title']}
    {$row1['MBC_Description']}
    {$row_count1[0]}{$row_count2[0]}"; $sql_threads = "select * from MB_Threads where MBT_Category = {$row1['MBC_ID']} and MBT_Domain = $SITE_ID order by MBT_Date2 desc limit 1"; $res_threads = mysql_query($sql_threads); while ($row_threads = mysql_fetch_array($res_threads)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; $sql2 = "select * from US_Users, MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_User = US_ID order by MBR_Date desc limit 1"; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) { $date = twitter_time_format($row2['MBR_Date']); if ($row2['MBR_Initial'] == "1") print "" . stripslashes($row_threads['MBT_Subject']) . "
    by {$row2['US_Username']} $date
    "; } print "
    "; $adtype = "Skyscraper"; include ("adserver.php"); print "
    "; require("fb_bottom.php"); exit; } if ($INPUT_v == "bc" or $FORUM_FORMAT == "S" ) { # table mode, collapsed ######################################################################################################################################### if (!isset($PARM_PAGE)) $PARM_PAGE = 1; if (isset($_COOKIE['REF'])) { if ($_COOKIE['REF'] == "1" and $PARM_PAGE == 1) $META = ""; if ($_COOKIE['REF'] == "5" and $PARM_PAGE == 1) $META = ""; } # if (isset($_REQUEST['search'])) $PARM_SEARCH = htmlspecialchars($_REQUEST['search']); include("fb_top.php"); $ADMIN_ONLY = "N"; $forum_desc = ""; $addthreadbutton = ""; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY != "") and ($PARM_CATEGORY != "0") and ($PARM_CATEGORY != "z")) { # is the category admin only? get desc too $sql = "select * from MB_Categories where MBC_ID = " . mysql_real_escape_string($PARM_CATEGORY) . " limit 1"; $res = mysql_query($sql); while($row = mysql_fetch_array($res)) { $ADMIN_ONLY = $row['MBC_AdminOnly']; $forum_desc = $row['MBC_Title']; } } $LASTREADDATETIME = 0; if (isset($US_ID)) { # get forum-wide last read time $sql = "select * from MB_LastRead where LR_User = $US_ID and (LR_Thread = 0 or LR_Thread = $PARM_CATEGORY) order by LR_DateTime desc limit 1"; $res = mysql_query($sql); while($row = mysql_fetch_array($res)) $LASTREADDATETIME = $row['LR_DateTime']; } if ($US_TYPE == "S" or $US_TYPE == "A" or $ADMIN_ONLY != "Y") $addthreadbutton = " New thread New poll"; if ($FORUM_FORMAT == "S" and ($PARM_CATEGORY == "z" or $PARM_CATEGORY == 0)) $addthreadbutton = ""; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY != "") and ($PARM_CATEGORY != "0") and ($PARM_CATEGORY != "z")) $sqlselect = " where MBT_Category = $PARM_CATEGORY and MBT_Domain = $SITE_ID "; else $sqlselect = " where MBT_Domain = $SITE_ID "; if (isset($US_ID)) { print ""; $markasread = "";} else print ""; #print "
    "; print "
     Search:  
    "; if ($FORUM_FORMAT != "S") print "
    " . forumCategories($PARM_CATEGORY) . "
    "; else { if ($PARM_CATEGORY == "0" and !isset($_REQUEST['search'])) print ""; else if ($PARM_CATEGORY == "0" and isset($_REQUEST['search'])) print "
    $SITE_NAME Forums / Searching all posts for \"$PARM_SEARCH\"
    "; else { $sql = "select MBC_Title from MB_Categories where MBC_ID = $PARM_CATEGORY limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "$markasread"; } } if (!isset($US_ID)) print "
    You are not currently logged in which will enable you to customise the board including hiding posts or ignoring users. Log in or register a new account.
    "; # if (isset($SITE_ID) and ($SITE_ID == "1087")) print "Welcome to the Lord_Bony Stand

    The Planet Swans football forum is dedicated to Paul, aka Lord_Bony, a long-time, hugely respected poster and moderator of the site who has always acted with dignity and pride.

    "; print "
    "; print ""; $bgcolouralt = "rgb(235,235,235)"; $bgcolour = ""; $ignoredcount = 0; $ignoredtext = ""; $displayed = 0; $sql_threads = "select * from MB_Threads $sqlselect order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $indexrecs) - $indexrecs) . "," . $indexrecs; # if (isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $indexrecs) - $indexrecs) . "," . $indexrecs; # if (isset($PARM_CATEGORY) and $PARM_CATEGORY == "z" and $PARM_CATEGORY != "0" and isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $indexrecs) - $indexrecs) . "," . $indexrecs; if (isset($PARM_CATEGORY) and $PARM_CATEGORY == "z" and $PARM_CATEGORY != "0") $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $indexrecs) - $indexrecs) . "," . $indexrecs; $res_threads = mysql_query($sql_threads); if (mysql_num_rows($res_threads)) { $displayed++; while ($row_threads = mysql_fetch_array($res_threads)) { if ((!strpos($US_IGNORED, "," . $row_threads['MBT_User'] . ";")) and (!isset($US_ID) or strpos($row_threads['MBT_BadPost'], "<$US_ID>") === false)) { if ($bgcolour == $bgcolouralt) $bgcolour = "rgb(255,255,255)"; else $bgcolour = $bgcolouralt; $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; $pagecount = ceil($posts / $pagerecs); $pagedets = ""; $lastpage = 0; for ($x=2; $x <= $pagecount; $x++) $pagedets .= " $x "; if ($pagedets != "") { $pagedets = "[" . $pagedets . "]"; $lastpage = $pagecount; } if ($row_threads['MBT_Sticky']==1) $sticky = " "; else $sticky = ''; if (strpos($row_threads['MBT_Text'], "[poll_") !== false) $poll = "y"; else $poll = "n"; $records_per_pg = 10; $no_pg = ceil($posts / $records_per_pg); $sel_user = "select US_Username from US_Users where US_ID = " . $row_threads["MBT_User"]; $res_user = mysql_query($sel_user); $row_user = mysql_fetch_array($res_user); $pos = strpos($row_threads["MBT_Text"], "<"); if ($pos !== false) $row_threads["MBT_Text"] = substr($row_threads["MBT_Text"], 0, $pos); $minitext = str_replace("\n", "", substr(strip_tags($row_threads["MBT_Text"]), 0, 70)); $minitext = str_replace("\r", " ", $minitext); $minitext = str_replace("", "", $minitext); $minitext = str_replace("<", "<", $minitext); $minitext = str_replace(">", ">", $minitext); $minitext = str_replace("\"", "", $minitext); $minitext = stripslashes($minitext); $icon = ""; $score = ((substr_count($row_threads['MBT_GoodPost'], '[')) - (substr_count($row_threads['MBT_BadPost'], '['))); if ($score > 0) $icon = " "; if ($score < 0) $icon = " "; if ($poll == "y") $icon .= " "; $mypost = "n"; if (isset($US_ID)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_User = $US_ID"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); if ($row_count_posts[0] > 0) $icon .= " "; } $date = twitter_time_format($row_threads['MBT_Date1']); $last = ""; $lastreply = 0; if ($posts > 0) { $sql_last = "select * from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." order by MBR_Date desc"; $res_last = mysql_query($sql_last); if ($row_last = mysql_fetch_array($res_last)) { $lastreply = $row_last['MBR_ID']; $lastdate = $row_last['MBR_Date']; if ($lastpage > 1) $last = "" . twitter_time_format($row_last['MBR_Date']) . ' '; else $last = "" . twitter_time_format($row_last['MBR_Date']) . ' '; $sel_users = "select * from US_Users where US_ID = {$row_last['MBR_User']}"; $res_users = mysql_query($sel_users) or die (mysql_error()); $row_users = mysql_fetch_array($res_users) or die (mysql_error()); $last .= "
    by {$row_users['US_Username']}"; } } if (isset($US_ID) and $lastreply > 0) { $sqlR = "select LR_Reply from MB_LastRead where LR_User = $US_ID and LR_Thread = {$row_threads['MBT_ID']} and LR_Reply <= $lastreply"; $resR = mysql_query($sqlR); while ($rowR = mysql_fetch_array($resR)) { if ($rowR['LR_Reply'] < $lastreply) $icon .= " "; } } print "
    "; print ""; } else $ignoredtext = "Some threads have been hidden"; } } print "
    SubjectRepliesViewsLast Reply
    $sticky$icon" . stripslashes($row_threads['MBT_Subject']) . " $pagedets by {$row_user['US_Username']} $date
    $minitext
    $posts{$row_threads['MBT_Views']}$last
    $ignoredtext
    "; print "
    • "; # if (isset($PARM_SEARCH)) $sql_count = "select count(*) from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\")"; else $sql_count = "select count(*) from MB_Threads $sqlselect "; $res_count = mysql_query($sql_count); $row_count = mysql_fetch_array($res_count); $threads = $row_count[0]; $pagecount = ceil($threads / $indexrecs); if ($FORUM_FORMAT == "S") { if ($PARM_PAGE == 1) print "
    • < previous
    • "; else print "
    • < previous
    • "; for ($x = ($PARM_PAGE - 7); $x <= $pagecount; $x++) { if ($PARM_PAGE == $x) print "
    • $x
    • "; else if ($x < 1) print ''; else if ($x == 1) print "
    • $x
    • "; else print "
    • $x
    • "; if ($x == ($PARM_PAGE + 7)) $x = $pagecount + 1; } if ($PARM_PAGE == $pagecount) print "
    • next >
    • "; else print "
    • next >
    • "; } else { if ($PARM_PAGE == 1) print "
    • < previous
    • "; else print "
    • < previous
    • "; for ($x = ($PARM_PAGE - 7); $x <= $pagecount; $x++) { if ($PARM_PAGE == $x) print "
    • $x
    • "; else if ($x < 1) print ''; else if ($x == 1) print "
    • $x
    • "; else print "
    • $x
    • "; if ($x == ($PARM_PAGE + 7)) $x = $pagecount + 1; } if ($PARM_PAGE == $pagecount) print "
    • next >
    • "; else print "
    • next >
    • "; } print "
    "; echo '
    '; $adtype = "Match"; include ("adserver.php"); if ($SITE_ID == 1073) print ""; #$adtype = "localad_forum"; include ("adserver.php"); if ($SITE_ID == 1) { # TWTD podcasts print ""; print ""; $sql = "select * from PF_PodcastFiles, PH_PodcastHeader where PH_ID = PF_Feed and PH_Category like '%[$TEAM_NAME]%' order by PF_DateTime desc limit 2;"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; } #$sql = "select * from PF_PodcastFiles, PH_PodcastHeader where PH_ID = PF_Feed and PF_Feed = 23 order by PF_DateTime desc limit 1;"; $sql = "select * from PF_PodcastFiles, PH_PodcastHeader where PH_ID = PF_Feed and PH_Category like '%[General Football]%' order by PF_DateTime desc limit 1;"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; } print "

    Latest Podcasts

    {$row['PH_Title']}
    " . date('jS F Y G:i', strtotime($row['PF_DateTime'])) . "
    {$row['PH_Title']}
    " . date('jS F Y G:i', strtotime($row['PF_DateTime'])) . "
    More Podcasts

    "; } else if ($SITE_ID == 1073) { # QPR podcasts print ""; print ""; $sql = "select * from PF_PodcastFiles, PH_PodcastHeader where PH_ID = PF_Feed and PH_ID = 33 order by PF_DateTime desc limit 2;"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; } $sql = "select * from PF_PodcastFiles, PH_PodcastHeader where PH_ID = PF_Feed and PH_Category like '%[$TEAM_NAME]%' order by PF_DateTime desc limit 1;"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; } $sql = "select * from PF_PodcastFiles, PH_PodcastHeader where PH_ID = PF_Feed and PF_Feed = 23 order by PF_DateTime desc limit 1;"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print ""; } print "

    Latest Podcasts

    {$row['PH_Title']}
    " . date('jS F Y G:i', strtotime($row['PF_DateTime'])) . "
    {$row['PH_Title']}
    " . date('jS F Y G:i', strtotime($row['PF_DateTime'])) . "
    Second Tier. The Championship Football Podcast
    " . date('jS F Y G:i', strtotime($row['PF_DateTime'])) . "
    More Podcasts

    "; } $adtype = "SuperMPU"; include ("adserver.php"); #if ($TOP == "top960") $adtype = "MPU"; else $adtype = "SuperMPU"; include ("adserver.php"); # $adtype = "SuperMPU"; include ("adserver.php"); boardContent(); print "
    ";$adtype = "MPU_Forum1"; include ("adserver.php"); print "
    "; # print "
    ";$adtype = "MPU_Forum2"; include ("adserver.php"); print "
    "; echo '
    '; #advert at foot # print "
    "; $adtype = "Banner"; include ("adserver.php"); print "

    "; # mods and users online print "
    Moderators: "; $sql = "select * from US_Users where (US_Type = 'A' and US_Domain = $SITE_ID) or US_Type = 'S' order by US_Username"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "{$row['US_Username']} "; print "
    Online now: "; $earlier = mktime(date("G"), (date("i") - 10), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; $sql = "select * from US_Users where US_Domain = $SITE_ID and US_LastOnline >= '$earlier' order by US_Username"; $res = mysql_query($sql); $x = 0; while ($row = mysql_fetch_array($res)) { print "{$row['US_Username']} "; $x++; } $sql = "select count(*) as cnt from OU_OnlineUsers where OU_Domain = $SITE_ID and OU_DateTime > (now()- interval 10 minute)"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print " and " . ($row['cnt'] - $x) . " guests have all visited the site in the last ten minutes."; print "

    "; #advert at foot print "
    "; $adtype = "Forum_Footer"; include ("adserver.php"); print "

    "; include("fb_bottom.php"); exit; } if ($INPUT_v == "bs") { # simple mode ######################################################################################################################################### if (!isset($PARM_PAGE)) $PARM_PAGE = 1; if (isset($_COOKIE['REF'])) { if ($_COOKIE['REF'] == "1" and $PARM_PAGE == 1) $META = ""; if ($_COOKIE['REF'] == "5" and $PARM_PAGE == 1) $META = ""; } if (isset($_REQUEST['search'])) $PARM_SEARCH = htmlspecialchars($_REQUEST['search']); include("fb_top.php"); $ADMIN_ONLY = "N"; $forum_desc = ""; $addthreadbutton = ""; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY != "") and ($PARM_CATEGORY != "0") and ($PARM_CATEGORY != "z")) { # is the category admin only? get desc too $sql = "select * from MB_Categories where MBC_ID = " . mysql_real_escape_string($PARM_CATEGORY) . " limit 1"; $res = mysql_query($sql); while($row = mysql_fetch_array($res)) { $ADMIN_ONLY = $row['MBC_AdminOnly']; $forum_desc = $row['MBC_Title']; } } $LASTREADDATETIME = 0; if (isset($US_ID)) { # get forum-wide last read time $sql = "select * from MB_LastRead where LR_User = $US_ID and (LR_Thread = 0 or LR_Thread = $PARM_CATEGORY) order by LR_DateTime desc limit 1"; $res = mysql_query($sql); while($row = mysql_fetch_array($res)) $LASTREADDATETIME = $row['LR_DateTime']; } if ($US_TYPE == "S" or $US_TYPE == "A" or $ADMIN_ONLY != "Y") $addthreadbutton = " New thread New poll"; if ($FORUM_FORMAT == "S" and ($PARM_CATEGORY == "z" or $PARM_CATEGORY == 0)) $addthreadbutton = ""; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY != "") and ($PARM_CATEGORY != "0") and ($PARM_CATEGORY != "z")) $sqlselect = " where MBT_Category = $PARM_CATEGORY and MBT_Domain = $SITE_ID "; else $sqlselect = " where MBT_Domain = $SITE_ID "; if (isset($US_ID)) { print ""; $markasread = "";} else print ""; print "
     Search:  
    "; # print " #
    #
    # # #
    #
    print "
    "; if ($FORUM_FORMAT != "S") print "
    " . forumCategories($PARM_CATEGORY) . "
    "; else { if ($PARM_CATEGORY == "0" and !isset($_REQUEST['search'])) print ""; else if ($PARM_CATEGORY == "0" and isset($_REQUEST['search'])) print "
    $SITE_NAME Forums / Searching all posts for \"$PARM_SEARCH\"
    "; else { $sql = "select MBC_Title from MB_Categories where MBC_ID = $PARM_CATEGORY limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "$markasread"; } } if (!isset($US_ID)) print "
    You are not currently logged in which will enable you to customise the board including hiding posts or ignoring users. Log in or register a new account.
    "; print "
    "; print ""; $bgcolouralt = "rgb(235,235,235)"; $bgcolour = ""; $ignoredcount = 0; $ignoredtext = ""; $displayed = 0; $sql_threads = "select * from MB_Threads $sqlselect order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; if (isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; if (isset($PARM_CATEGORY) and $PARM_CATEGORY == "z" and $PARM_CATEGORY != "0" and isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; if (isset($PARM_CATEGORY) and $PARM_CATEGORY == "z" and $PARM_CATEGORY != "0" and !isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; $res_threads = mysql_query($sql_threads); if (mysql_num_rows($res_threads)) { $displayed++; while ($row_threads = mysql_fetch_array($res_threads)) { if ((!strpos($US_IGNORED, "," . $row_threads['MBT_User'] . ";")) and (!isset($US_ID) or strpos($row_threads['MBT_BadPost'], "<$US_ID>") === false)) { if ($bgcolour == $bgcolouralt) $bgcolour = "rgb(255,255,255)"; else $bgcolour = $bgcolouralt; $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; $pagecount = ceil($posts / $pagerecs); $pagedets = ""; $lastpage = 0; for ($x=2; $x <= $pagecount; $x++) $pagedets .= " $x "; if ($pagedets != "") { $pagedets = "[" . $pagedets . "]"; $lastpage = $pagecount; } if ($row_threads['MBT_Sticky']==1) $sticky = " "; else $sticky = ''; if (strpos($row_threads['MBT_Text'], "[poll_") !== false) $poll = "y"; else $poll = "n"; $records_per_pg = 10; $no_pg = ceil($posts / $records_per_pg); $sel_user = "select US_Username from US_Users where US_ID = " . $row_threads["MBT_User"]; $res_user = mysql_query($sel_user); $row_user = mysql_fetch_array($res_user); $pos = strpos($row_threads["MBT_Text"], "<"); if ($pos !== false) $row_threads["MBT_Text"] = substr($row_threads["MBT_Text"], 0, $pos); $minitext = str_replace("\n", "", substr(strip_tags($row_threads["MBT_Text"]), 0, 70)); $minitext = str_replace("\r", " ", $minitext); $minitext = str_replace("", "", $minitext); $minitext = str_replace("<", "<", $minitext); $minitext = str_replace(">", ">", $minitext); $minitext = str_replace("\"", "", $minitext); $minitext = stripslashes($minitext); $icon = ""; $score = ((substr_count($row_threads['MBT_GoodPost'], '[')) - (substr_count($row_threads['MBT_BadPost'], '['))); if ($score > 0) $icon = " "; if ($score < 0) $icon = " "; if ($poll == "y") $icon .= " "; $mypost = "n"; if (isset($US_ID)) { $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_User = $US_ID"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); if ($row_count_posts[0] > 0) $icon .= " "; } $date = twitter_time_format($row_threads['MBT_Date1']); $last = ""; $lastreply = 0; if ($posts > 0) { $sql_last = "select * from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." order by MBR_Date desc"; $res_last = mysql_query($sql_last); if ($row_last = mysql_fetch_array($res_last)) { $lastreply = $row_last['MBR_ID']; $lastdate = $row_last['MBR_Date']; if ($lastpage > 1) $last = "" . twitter_time_format($row_last['MBR_Date']) . ' '; else $last = "" . twitter_time_format($row_last['MBR_Date']) . ' '; $sel_users = "select * from US_Users where US_ID = {$row_last['MBR_User']}"; $res_users = mysql_query($sel_users) or die (mysql_error()); $row_users = mysql_fetch_array($res_users) or die (mysql_error()); $last .= "
    by {$row_users['US_Username']}"; } } if (isset($US_ID) and $lastreply > 0) { $sqlR = "select LR_Reply from MB_LastRead where LR_User = $US_ID and LR_Thread = {$row_threads['MBT_ID']} and LR_Reply <= $lastreply"; $resR = mysql_query($sqlR); while ($rowR = mysql_fetch_array($resR)) { if ($rowR['LR_Reply'] < $lastreply) $icon .= " "; } } print "
    "; print ""; } else $ignoredtext = "Some threads have been hidden"; } } print "
    SubjectRepliesViewsLast Reply
    $sticky$icon" . stripslashes($row_threads['MBT_Subject']) . " $pagedets by {$row_user['US_Username']} $date $pagedets$posts{$row_threads['MBT_Views']}$last
    $ignoredtext
    "; print "
    • "; if (isset($PARM_SEARCH)) $sql_count = "select count(*) from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\")"; else $sql_count = "select count(*) from MB_Threads $sqlselect "; $res_count = mysql_query($sql_count); $row_count = mysql_fetch_array($res_count); $threads = $row_count[0]; $pagecount = ceil($threads / $pagerecs); if ($FORUM_FORMAT == "S") { if ($PARM_PAGE == 1) print "
    • < previous
    • "; else print "
    • < previous
    • "; for ($x = ($PARM_PAGE - 7); $x <= $pagecount; $x++) { if ($PARM_PAGE == $x) print "
    • $x
    • "; else if ($x < 1) print ''; else if ($x == 1) print "
    • $x
    • "; else print "
    • $x
    • "; if ($x == ($PARM_PAGE + 7)) $x = $pagecount + 1; } if ($PARM_PAGE == $pagecount) print "
    • next >
    • "; else print "
    • next >
    • "; } else { if ($PARM_PAGE == 1) print "
    • < previous
    • "; else print "
    • < previous
    • "; for ($x = ($PARM_PAGE - 7); $x <= $pagecount; $x++) { if ($PARM_PAGE == $x) print "
    • $x
    • "; else if ($x < 1) print ''; else if ($x == 1) print "
    • $x
    • "; else print "
    • $x
    • "; if ($x == ($PARM_PAGE + 7)) $x = $pagecount + 1; } if ($PARM_PAGE == $pagecount) print "
    • next >
    • "; else print "
    • next >
    • "; } print "
    "; echo '
    '; if ($SITE_ID == 1073) print ""; $adtype = "localad_forum"; include ("adserver.php"); if ($TOP == "top960") $adtype = "MPU"; else $adtype = "SuperMPU"; include ("adserver.php"); boardContent(); print "
    ";$adtype = "MPU_Forum1"; include ("adserver.php"); print "
    "; print "
    ";$adtype = "MPU_Forum2"; include ("adserver.php"); print "
    "; echo '
    '; #advert at foot print "
    "; $adtype = "Banner"; include ("adserver.php"); print "

    "; # mods and users online print "
    Moderators: "; $sql = "select * from US_Users where (US_Type = 'A' and US_Domain = $SITE_ID) or US_Type = 'S' order by US_Username"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "{$row['US_Username']} "; print "
    Online now: "; $earlier = mktime(date("G"), (date("i") - 10), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; $sql = "select * from US_Users where US_Domain = $SITE_ID and US_LastOnline >= '$earlier' order by US_Username"; $res = mysql_query($sql); $x = 0; while ($row = mysql_fetch_array($res)) { print "{$row['US_Username']} "; $x++; } $sql = "select count(*) as cnt from OU_OnlineUsers where OU_Domain = $SITE_ID and OU_DateTime > (now()- interval 10 minute)"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print " and " . ($row['cnt'] - $x) . " guests have all visited the site in the last ten minutes."; print "

    "; include("fb_bottom.php"); exit; } if ($INPUT_v == "be") { # table mode, expanded ####################################################################################################################################### if (isset($PARM_PAGE)) { $page = $PARM_PAGE; } else { $page = 1;} if ($_COOKIE['REF'] == "1") $META = ""; if ($_COOKIE['REF'] == "5") $META = ""; #$STYLESHEET .= "a.button:link, a.button:visited, .button { border:1px solid rgba(255, 255, 255, 0.5); background:black url('$CUSTOMISATION_H1') repeat center center; padding:5px 15px 5px 10px; color: white; text-decoration: none; vertical-align:middle;} a.button:hover { black; border:1px solid rgba(0, 0, 0, 0.5);}"; include("fb_top.php"); if (isset($_REQUEST['search'])) $PARM_SEARCH = htmlspecialchars($_REQUEST['search']); if (!isset($PARM_PAGE)) $PARM_PAGE = 1; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY != "") and ($PARM_CATEGORY != "0")) $sqlselect = " where MBT_Category = $PARM_CATEGORY and MBT_Domain = $SITE_ID "; else $sqlselect = " where MBT_Domain = $SITE_ID "; if (isset($US_ID)) print ""; else print ""; print "
     Search:  
    "; print "
    " . forumCategories($PARM_CATEGORY) . "

    "; if (!isset($US_ID)) print "
    You are not currently logged in which will enable you to customise the board including hiding posts or ignoring users. Log in or register a new account.
    "; echo '
    '; echo ''; $bgcolour = "rgb(240,240,240)"; if (isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; else $sql_threads = "select * from MB_Threads $sqlselect order by MBT_Sticky desc, MBT_Date2 desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; $res_threads = mysql_query($sql_threads) or die(mysql_error()); if (mysql_num_rows($res_threads)) { while ($row_threads = mysql_fetch_array($res_threads)) { $ig = stripos($US_IGNORED, "," . $row_threads['MBT_User'] . ";"); if ($ig === false) { if ($bgcolour == "rgb(240,240,240)") $bgcolour = "rgb(255,255,255)"; else $bgcolour = "rgb(240,240,240)"; $sel_count_posts = "select count(*) from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." and MBR_Initial = 0"; $res_count_posts = mysql_query($sel_count_posts); $row_count_posts = mysql_fetch_row($res_count_posts); $posts = $row_count_posts[0]; if ($row_threads['MBT_Sticky']==1) $sticky = ' '; else $sticky = ''; $records_per_pg = 10; $no_pg = ceil($posts / $records_per_pg); $sel_user = "select US_Username from US_Users where US_ID = " . $row_threads["MBT_User"]; $res_user = mysql_query($sel_user); $row_user = mysql_fetch_array($res_user); $poster = $row_user["US_Username"]; print "'; echo ''; } else { $ignoredcount++; $ignoredtext = $ignoredcount . " threads have been hidden"; } } } echo ''; echo '
    SubjectRepliesViewsLast Reply
    • $sticky" . stripslashes($row_threads["MBT_Subject"]) . " by $poster - " . date("H:i - M j", strtotime($row_threads['MBT_Date1'])) . " - ({$row_threads['MBT_Views']} views)
    • "; $sql_replies = "select * from MB_Replies where MBR_Thread = " . $row_threads['MBT_ID'] . " and MBR_Initial = 0 and MBR_ReplyTo = 0 order by MBR_Date desc"; $res_replies = mysql_query($sql_replies) or die(mysql_error()); if (mysql_num_rows($res_replies)) { $row_replies = mysql_fetch_row($res_replies); if ($res_replies[0]=="0") { $var = true; } else { $var = false; } displayThreads($res_replies['MBR_ID'],$var,$row_threads[0]); }; echo '
    ' . $posts . '' . $row_threads["MBT_Views"] . ""; if ($posts > 0) { $sql_last = "select * from MB_Replies where MBR_Thread = " . $row_threads["MBT_ID"] ." order by MBR_Date desc"; $res_last = mysql_query($sql_last); if ($row_last = mysql_fetch_array($res_last)) { echo date("H:i - M j", strtotime($row_last['MBR_Date'])) . '
    '; $sel_users = "select * from US_Users where US_ID = " . $row_last["MBR_User"]; $res_users = mysql_query($sel_users) or die (mysql_error()); $row_users = mysql_fetch_array($res_users) or die (mysql_error()); print "by {$row_users['US_Username']}"; } } echo '
    Pages: '; $sql_count = "select count(*) from MB_Threads where MBT_Domain = $SITE_ID"; $res_count = mysql_query($sql_count); $row_count = mysql_fetch_array($res_count); $threads = $row_count[0]; $pagecount = ceil($threads / $pagerecs); for ($x = ($page - 5); $x <= $pagecount; $x++) { if ($page == $x) print $x . ' '; else if ($x < 1) print ''; else if ($x == 1) print "$x "; else print "$x "; if ($x == ($page + 5)) $x = $pagecount + 1; } echo "" . $ignoredtext . '
    '; $adtype = "Skyscraper"; include ("adserver.php"); echo '
    '; include("fb_bottom.php"); exit; } if ($INPUT_v == "td" or $INPUT_v == "tu" or $INPUT_v = "be") { # thread mode date/update orders ######################################################################################### if (!isset($PARM_PAGE)) $PARM_PAGE = 1; if (isset($_COOKIE['REF'])) { if ($_COOKIE['REF'] == "1" and $PARM_PAGE == 1) $META = ""; if ($_COOKIE['REF'] == "5" and $PARM_PAGE == 1) $META = ""; } if (isset($PARM_PAGE)) { $page = $PARM_PAGE; } else { $page = 1;} if (isset($_REQUEST['search'])) $PARM_SEARCH = htmlspecialchars($_REQUEST['search']); $STYLESHEET .= "hr {border: none; border-top: dotted 1px #ccc; margin: 10px 0 10px 0;}"; #$STYLESHEET .= "a.button:link, a.button:visited, .button { border:1px solid rgba(255, 255, 255, 0.5); background:black url('$CUSTOMISATION_H1') repeat center center; padding:5px 15px 5px 10px; color: white; text-decoration: none; vertical-align:middle;} a.button:hover { black; border:1px solid rgba(0, 0, 0, 0.5);} "; include("fb_top.php"); if (isset($PARM_CATEGORY) and $PARM_CATEGORY != "z" and $PARM_CATEGORY != "" and $PARM_CATEGORY != "0") $sqlselect = " where MBT_Category = $PARM_CATEGORY and MBT_Domain = $SITE_ID "; else $sqlselect = " where MBT_Domain = $SITE_ID "; if (isset($US_ID)) print ""; else print ""; print "
     Search:  
    "; print "
    " . forumCategories($PARM_CATEGORY) . "

    "; if (!isset($US_ID)) print "
    You are not currently logged in which will enable you to customise the board including hiding posts or ignoring users. Log in or register a new account.
    "; else print "
    "; print "
    "; if ($SITE_ID == 1073) print ""; #$adtype = "localad_forum"; #include ("adserver.php"); #if ($TOP == "top960") $adtype = "MPU"; else $adtype = "SuperMPU"; $adtype = "MPU"; include ("adserver.php"); boardContent(); print "
    "; $pagerecs = 20; $ignoredtext = ""; if ($INPUT_v == "td") $ORDER = "MBT_Date1"; else $ORDER = "MBT_Date2"; if (isset($PARM_CATEGORY) and $PARM_CATEGORY == "z" and $PARM_CATEGORY != "0" and isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, $ORDER desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; else if (isset($PARM_CATEGORY) and $PARM_CATEGORY == "z" and $PARM_CATEGORY != "0" and !isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID group BY MBT_ID order by MBT_Sticky desc, $ORDER desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; else if (isset($PARM_SEARCH)) $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID order by MBT_Sticky desc, $ORDER desc limit " . (($PARM_PAGE * $pagerecs) - $pagerecs) . "," . $pagerecs; else $sql_threads = "select * from MB_Threads $sqlselect order by MBT_Sticky desc, $ORDER desc limit " . (($page * $pagerecs) - $pagerecs) . "," . $pagerecs; $res_threads = mysql_query($sql_threads); if (mysql_num_rows($res_threads)) { echo '
      '; while ($row_threads = mysql_fetch_array($res_threads)) { $sql_user = "select US_Username from US_Users where US_ID = " . $row_threads["MBT_User"]; $res_user = mysql_query($sql_user); $row_user = mysql_fetch_row($res_user); $icon = ""; if ($row_threads['MBT_Sticky'] == 1) { $sticky = " "; } else { $sticky = ''; } $score = ((substr_count($row_threads['MBT_GoodPost'], '[')) - (substr_count($row_threads['MBT_BadPost'], '['))); if ($score > 0) $icon = " "; if ($score < 0) $icon = " "; if (strpos($row_threads['MBT_Text'], "[poll_") !== false) $icon .= " "; $minitext = $row_threads['MBT_Text']; $pos = strpos($minitext, "<"); if ($pos !== false) $minitext = substr($minitext, 0, $pos); $minitext = str_replace("\n", " ", shortenString(stripslashes($minitext), 100, true, true)); $minitext = str_replace("\r", " ", $minitext); $minitext = str_replace("", "", $minitext); $minitext = str_replace("\"", "", $minitext); $minitext = "$minitext"; $ig = stripos($US_IGNORED, "," . $row_threads['MBT_User'] . ";"); if (($ig === false) and (isset($US_ID) and strpos($row_threads['MBT_BadPost'], "<$US_ID>") !== false)) $ig = true; if ($ig === false) print "
    • $sticky $icon" . stripslashes($row_threads['MBT_Subject']) . " by {$row_user[0]} - " . date("H:i - M j", strtotime($row_threads['MBT_Date1'])) . " - ({$row_threads['MBT_Views']} views)
      $minitext
    • "; else $ignoredtext = "Some threads have been hidden"; $sql_replies = "select * from MB_Replies where MBR_Thread = {$row_threads['MBT_ID']} and MBR_Initial = 0 and MBR_ReplyTo = 0 order by MBR_Date desc"; $res_replies = mysql_query($sql_replies); if (mysql_num_rows($res_replies) and $row_threads['MBT_Sticky'] == 0) { $row_replies = mysql_fetch_row($res_replies); if ($res_replies[0]=="0") { $var = true; } else { $var = false; } if ($ig === false) { displayThreads($res_replies['MBR_ID'],$var,$row_threads[0]); } } else echo '
      '; } } print "
    "; print "
    $ignoredtext
    "; print "
      "; if (isset($PARM_CATEGORY) and ($PARM_CATEGORY == "z") and ($PARM_CATEGORY != "0") and (isset($PARM_SEARCH))) { $G = 1; $sql_threads = "select MBT_ID, MBT_Domain, MBT_Category, MBT_Subject, MBT_Text, MBT_Date1, MBT_Date2, MBT_User, MBT_Sticky, MBT_Views, MBT_GoodPost, MBT_BadPost from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID"; $res_count = mysql_query($sql_threads); $threads = mysql_num_rows($res_count); } else if (isset($PARM_CATEGORY) and ($PARM_CATEGORY == "z") and ($PARM_CATEGORY != "0") and (!isset($PARM_SEARCH))) { $G = 2; $sql_threads = "select count(*) from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and MBR_User = $US_ID group BY MBT_ID"; $res_count = mysql_query($sql_threads); $threads = mysql_num_rows($res_count); } else if (isset($PARM_SEARCH)) { $G = 3; $sql_threads = "select count(*) from MB_Threads, MB_Replies $sqlselect and MBR_Thread = MBT_ID and (MBR_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Subject like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\" or MBT_Text like \"%" . mysql_real_escape_string($PARM_SEARCH) . "%\") group BY MBT_ID";$res_count = mysql_query($sql_threads); $row_count = mysql_fetch_array($res_count); $threads = $row_count[0]; } else { $G = 4; $sql_threads = "select count(*) from MB_Threads $sqlselect"; $res_count = mysql_query($sql_threads); $row_count = mysql_fetch_array($res_count); $threads = $row_count[0]; } # $sql_count = "select count(*) from MB_Threads $sqlselect "; #$res_count = mysql_query($sql_threads); $row_count = mysql_fetch_array($res_count); $threads = $row_count[0]; $pagecount = ceil($threads / $pagerecs); if ($page == 1) print "
    • < previous
    • "; else print "
    • < previous
    • "; for ($x = ($page - 9); $x <= $pagecount; $x++) { if ($page == $x) print "
    • $x
    • "; else if ($x < 1) print ''; else if ($x == 1) print "
    • $x
    • "; else print "
    • $x
    • "; if ($x == ($page + 9)) $x = $pagecount + 1; } if ($page == $pagecount) print "
    • next >
    • "; else print "
    • next >
    • "; print "
    "; #advert at foot print "
    "; $adtype = "Banner"; include ("adserver.php"); print "

    "; # mods and users online print "
    Moderators: "; $sql = "select * from US_Users where (US_Type = 'A' and US_Domain = $SITE_ID) or US_Type = 'S' order by US_Username"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print "{$row['US_Username']} "; print "
    Online now: "; $earlier = mktime(date("G"), (date("i") - 10), 0, date("m"), date("d"), date("Y")); $date2 = date("Y-m-d", $earlier); $time2 = date("G:i:s", $earlier); $earlier = "$date2 $time2"; $sql = "select * from US_Users where US_Domain = $SITE_ID and US_LastOnline >= '$earlier' order by US_Username"; $res = mysql_query($sql); $x = 0; while ($row = mysql_fetch_array($res)) { print "{$row['US_Username']} "; $x++; } $sql = "select count(*) as cnt from OU_OnlineUsers where OU_Domain = $SITE_ID and OU_DateTime > (now()- interval 10 minute)"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) print " and " . ($row['cnt'] - $x) . " guests have all visited the site in the last ten minutes."; print "

    "; include("fb_bottom.php"); exit; } ?>