", $txt); $temp = explode(" ", $txt); $txt = ""; foreach ($temp as &$value) { if (((substr($value, 0, 23) == "http://www.youtube.com/") or (substr($value, 0, 24) == "https://www.youtube.com/") or (substr($value, 0, 21) == "http://m.youtube.com/") or (substr($value, 0, 22) == "https://m.youtube.com/")) and $_COOKIE['HID'] != "1") { # embed youtube $pos = strrpos($value, "v="); if ($pos >= 0) { $pos = $pos + 2; $video = substr($value, $pos) ; $value = "
"; } } else if (((substr($value, 0, 16) == "http://youtu.be/") or (substr($value, 0, 17) == "https://youtu.be/")) and $_COOKIE['HID'] != "1") { # embed youtube $pos = strrpos($value, "youtu.be/") + 9; if ($pos >= 0) { $video = substr($value, $pos) ; $value = "
"; } } else if (((substr($value, 0, 17) == "http://vimeo.com/") or (substr($value, 0, 18) == "https://vimeo.com/")) and $_COOKIE['HID'] != "1") { # embed youtube $pos = strrpos($value, "vimeo.com/") + 10; if ($pos >= 0) { $video = substr($value, $pos) ; $value = "
"; } } else if (substr($value, 0, 22) == "http://www.ebay.co.uk/") { # affiliate link to ebay $value = "" . substr($value, 0, 50) . ""; } else if (((substr($value, 0, 20) == "https://twitter.com/") or (substr($value, 0, 19) == "http://twitter.com/")) and (strpos($value, "/status/"))) { #embed tweet $pos = strpos($value, "/status/") + 8; $status = intval(substr($value, $pos, 999)); if (!is_numeric($status)) $value = "[Error embedding tweet]"; else { $sql = "select TW_Text from TW_Twitter where TW_ID = " . mysql_real_escape_string($status); $res = mysql_query($sql); $value = ""; while ($row = mysql_fetch_array($res)) { $value = $row['TW_Text']; } if ($value == "") { $result = json_decode(file_get_contents("https://api.twitter.com/1/statuses/oembed.json?id=$status&align=center")); $value = $result->html; $author = $result->author_url; if ($value != "") { $value = str_replace("", "", $value); $sql = "insert into TW_Twitter values(" . mysql_real_escape_string($status) . ", 0, '" . mysql_real_escape_string($author) . "', '', \"" . mysql_real_escape_string($value) . "\", now())"; mysql_query($sql); } } $TWITTERWIDGET = "Y"; $value = "
$value
"; } } else if (substr($value, 0, 4) == "http") { if ((strtolower(substr($value, -4)) == ".jpg") or (strtolower(substr($value, -5)) == ".jpeg") or (strtolower(substr($value, -4) == ".gif")) or (strtolower(substr($value, -4)) == ".png")) { $value = '
'; } else { $value = '' . substr($value, 0, 80) . ''; } } else if (substr($value,0,6) == "[poll_") { $endpoll = strpos($value, "]"); $INPUT_poll = substr($value, 6, $endpoll-6); $value = str_replace("[poll_$INPUT_poll]", "", $value); $sql = "select * from PO_PollQuestions where POQ_ID = " . mysql_real_escape_string($INPUT_poll) . " and POQ_Status != 'D' limit 1"; $res = mysql_query($sql); $page = ""; while ($row = mysql_fetch_array($res)) { if (isset($POLLS)) $POLLS = "|" . $INPUT_poll; else $POLLS = $INPUT_poll; $polls = $INPUT_poll; $page .= "

{$row['POQ_Question']}

"; $answers = explode("\n", $row['POQ_Answers']); if ($row['POQ_Status'] == "P") $page .= "
The Result:
"; else $page .= "
Your Vote:
"; $a = 1; #if (!isset($US_ID)) $page .= "

You need to be logged in to vote on our site polls

"; # else { $sql2 = "select * from PO_PollAnswers where POA_Poll = {$row['POQ_ID']} and POA_User = $US_ID limit 1"; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) $user_answer = $row2['POA_Answer']; if ($US_TYPE == "A" or $US_TYPE == "S" or $row['POQ_User'] == $US_ID) $page .= "
Click here to delete this poll

"; # } if ($row['POQ_Status'] == "P") $page .= ""; foreach ($answers as &$answer) { #if (isset($US_ID)) { if ($row['POQ_Status'] == "L") { $page .= "" . stripslashes($answer) . ""; if (isset($user_answer) and $user_answer == $a) $page .= "  (Your current vote)"; $page .= "

"; } else { $sql2 = "select count(*) as cnt from PO_PollAnswers where POA_Poll = {$row['POQ_ID']} and POA_Answer = $a and POA_User not like '%.%'"; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) $ta = $row2['cnt']; $sql2 = "select count(*) as cnt from PO_PollAnswers where POA_Poll = {$row['POQ_ID']} and POA_Answer = $a and POA_User like '%.%'"; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_array($res2)) $tb = $row2['cnt']; $page .= ""; } #} $a++; } if ($row['POQ_Status'] == "P") $page .= "
MembersNon-MembersTotal
" . stripslashes($answer) . "$ta$tb" . ($ta+$tb) . "
"; $page .= "


To embed this in a blog, comment, forum post etc, use [poll_{$row['POQ_ID']}]

"; $value = $page; } } else if (substr($value, 0, 6) == "[team_") { # embed team selection $team = intval(substr($value, 6, 99)); $sql = "select * from Football_TS_TeamSelector where TS_ID = " . mysql_real_escape_string($team) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array ($res)) { $value = "
"; $coords = explode("|", $row['TS_P1']); $value .= "{$coords[0]}"; $_REQUEST['P1'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P2']); $value .= "{$coords[0]}"; $_REQUEST['P2'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P3']); $value .= "{$coords[0]}"; $_REQUEST['P3'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P4']); $value .= "{$coords[0]}"; $_REQUEST['P4'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P5']); $value .= "{$coords[0]}"; $_REQUEST['P5'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P6']); $value .= "{$coords[0]}"; $_REQUEST['P6'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P7']); $value .= "{$coords[0]}"; $_REQUEST['P7'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P8']); $value .= "{$coords[0]}"; $_REQUEST['P8'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P9']); $value .= "{$coords[0]}"; $_REQUEST['P9'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P10']); $value .= "{$coords[0]}"; $_REQUEST['P10'] = "{$coords[1]}|{$coords[2]}"; $coords = explode("|", $row['TS_P11']); $value .= "{$coords[0]}"; $_REQUEST['P11'] = "{$coords[1]}|{$coords[2]}"; $value .= "
"; if ($row['TS_S1'] != "") $value.= "Substitutes: {$row['TS_S1']}   {$row['TS_S2']}   {$row['TS_S3']}   {$row['TS_S4']}   {$row['TS_S5']}   {$row['TS_S6']}   {$row['TS_S7']}   "; if ($row['TS_Comments'] != "") $value.= "

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

"; if (isset($US_ID) and $row['TS_User'] == $US_ID) $value .= " [ edit ] "; if (isset($US_TYPE) and ($US_TYPE == "A" or $US_TYPE == "S")) $value .= " [ delete ] "; } } $txt .= $value . " "; } if (!isset($editno)) $editno = 0; return $txt; } include("fb_start.php"); $commentspagesize = 25; if ($PARAMETER1 == "add-comment") { # add post if (isset($US_ID)) { $error = ""; $swearerr = swearcheck($_POST['text']); if ($swearerr == "Y") { $error .= "Post contains unacceptable language
"; } if ($_POST['text'] == "") { $error .= "Post is empty!
"; } if ($error == "") { $sql_insert = "insert into BC_BlogComments values(0, " . mysql_real_escape_string($PARAMETER2) . ", " . $US_ID . ", now(), \"" . mysql_real_escape_string($_POST['text']) . "\", '" . $_SERVER['REMOTE_ADDR'] . "', '', '', '')"; if (mysql_query($sql_insert)) { $id = mysql_insert_id(); $update_users = "update US_Users set US_Stats_Comments = US_Stats_Comments + 1 where US_ID = " . $US_ID; mysql_query($update_users); $sql = "insert into LV_Live values($SITE_ID, 'c', now(), $US_ID, $id, '" . mysql_real_escape_string($PARAMETER2) . "', \"" . mysql_real_escape_string($_POST['text']) . "\")"; mysql_query($sql); header("location: $PATH/blogs/$PARAMETER2//?scrollto=post$id"); exit; } else { include("fb_top.php"); print "

Sorry!


There was a problem with your submission.
"; print "
$error
"; require("fb_bottom.php"); exit; } } else { include("fb_top.php"); print "

Sorry!


There was a problem with your submission.
"; print "
$error
"; require("fb_bottom.php"); exit; } } else { include("fb_top.php"); print "

Sorry!


You need to be logged in to post.
"; require("fb_bottom.php"); exit; }} if ($PARAMETER1 == "delete-blog") { # delete blog if (isset($US_ID) and ($US_TYPE == "A" or $US_TYPE == "S")) { $sql = "delete from BL_Blogs where BL_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); header("location: $PATH/members/!/blogs/"); exit; }} if ($PARAMETER1 == "remove-comment") { # remove post if (isset($US_ID) and ($US_TYPE == "A" or $US_TYPE == "S")) { $sql = "select NC_Story from BC_BlogComments where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $storyid = $row['NC_Story']; $sql = "update BC_BlogComments set NC_Status= 'D' where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); header("location: $PATH/blogs/$storyid/"); exit; } else { header("location: $PATH/members/!/blogs/"); exit; }} if ($PARAMETER1 == "report-abuse") { # report abuse $sql_abuse = "select US_ID from US_Users where US_Type = 'A' and US_Domain = $SITE_ID"; $res_abuse = mysql_query($sql_abuse); while ($row_abuse = mysql_fetch_array($res_abuse)) { $sql_news = "select * from BC_BlogComments, US_Users where NC_User = US_ID and NC_ID = " . mysql_real_escape_string($PARAMETER2); $res_news = mysql_query($sql_news); while ($row_news = mysql_fetch_array($res_news)) { $userdata = $row_news['US_Username']; $post = $row_news['NC_Comment']; $storyid = $row_news['NC_Story']; $commentid = $row_news['NC_ID']; } $subject = "Abuse reported in news comment"; $url = "The following blog comment by $userdata has been marked as being abusive:\n\n$post\n\nClick here to delete the message:\nhttp://$SITE_DOMAIN$PATH/blogs/remove-comment/$commentid"; $sql_upd = "update BC_BlogComments set NC_Comment = concat(NC_Comment,'') where NC_ID = $commentid limit 1"; mysql_query($sql_upd); sendPM($US_ID, $row_abuse['US_ID'], $subject, $url); } header("location: $PATH/blogs/$storyid"); exit; } if ($PARAMETER1 == "update-blog") { # report abuse $error = ""; $blog = intval($PARAMETER2); $story = trim(str_replace("\r", "", $_POST['text'])); $title = trim(str_replace("\r", "", $_POST['subject'])); $paras = explode("\n\n", $story); $swearerr = swearcheck($story); if ($swearerr == "Y") $error .= "Blog text contains unacceptable language
"; if ($story == "") $error .= "Blog is empty!
"; $swearerr = swearcheck($story); if ($swearerr == "Y") $error .= "Blog title contains unacceptable language
"; if ($title == "") $error .= "Blog title is empty!
"; if (($timestamp = strtotime($_POST['date'])) === false) $error .= "Date is invalid
"; if ($error == "") { $intro = ""; $mainblog = ""; foreach ($paras as &$para) { if ($intro == "") $intro = $para; else { if ($para != "") $mainblog .= $para . "\n\n"; } } $mainblog = trim($mainblog); $sql = "update BL_Blogs set BL_Title = \"" . mysql_real_escape_string($title) . "\", BL_Intro = \"" . mysql_real_escape_string($intro) . "\", BL_Story = \"" . mysql_real_escape_string($mainblog) . "\", BL_DateTime = \"" . date("Y-m-d H:i:s", strtotime($_POST['date'])) . "\" where BL_ID = $blog limit 1"; if (mysql_query($sql)) { $sql = "select BL_Author from BL_Blogs where BL_ID = $blog"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) $author = $row['BL_Author']; #$sql = "insert into LV_Live values($SITE_ID, 'B', \"" . date("Y-m-d H:i:s", strtotime($_POST['date'])) . "\", $author, $blog, \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($intro) . "\")"; #mysql_query($sql); header("location: $PATH/blogs/$blog/"); exit; } else $error = "Sorry, blog hasn't been update for some reason. Please try again and if the problem persists to contact admin."; } else $PARAMETER1 = "edit-blog"; } if ($PARAMETER1 == "edit-blog") { $blog = intval($PARAMETER2); require("fb_top.php"); print "

Edit Blog


"; print "
Delete Blog
"; if (isset($error)) { print "$error
"; print "
"; print "

"; print "

"; print "

"; print ""; print "
"; } else { $sql = "select * from BL_Blogs where BL_ID = $blog"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $blogtext = $row['BL_Intro'] . "\n\n" . $row['BL_Story']; $blogtext = str_replace("

", "\n\n", $blogtext); $blogtext = trim(str_replace("

", "", $blogtext)); print "
"; print "

"; print "

"; print "

"; print ""; print "
"; } } require("fb_bottom.php"); exit; } if ($PARAMETER1 == "insert-blog") { # report abuse $error = ""; $story = trim(str_replace("\r", "", $_POST['text'])); $title = trim(str_replace("\r", "", $_POST['subject'])); $paras = explode("\n\n", $story); $swearerr = swearcheck($story); if ($swearerr == "Y") $error .= "Blog text contains unacceptable language
"; if ($story == "") $error .= "Blog is empty!
"; $swearerr = swearcheck($story); if ($swearerr == "Y") $error .= "Blog title contains unacceptable language
"; if ($title == "") $error .= "Blog title is empty!
"; #if (($timestamp = strtotime($_POST['date'])) === false) $error .= "Date is invalid
"; if ($error == "") { $intro = ""; $mainblog = ""; foreach ($paras as &$para) { if ($intro == "") $intro = $para; else { if ($para != "") $mainblog .= $para . "\n\n"; } } $mainblog = trim($mainblog); # $sql = "insert into BL_Blogs values(0, $SITE_ID, \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($intro) . "\", \"" . mysql_real_escape_string($mainblog) . "\", \"" . date("Y-m-d H:i:s", strtotime("+1 day")) . "\", 0, $US_ID)"; $sql = "insert into BL_Blogs values(0, $SITE_ID, \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($intro) . "\", \"" . mysql_real_escape_string($mainblog) . "\", \"3000-01-01 00:00:00\", 0, $US_ID)"; if (mysql_query($sql)) { $blogid = mysql_insert_id(); require("fb_top.php"); print "

Blog Added

Thanks for adding your blog. It'll be looked over by admin before being added to the site."; $sql_abuse = "select US_ID from US_Users where US_Type = 'A' and US_Domain = $SITE_ID"; $res_abuse = mysql_query($sql_abuse); while ($row_abuse = mysql_fetch_array($res_abuse)) { $subject = "New Blog Added"; $url = "A new blog has been added and is set to go live this time tomorrow. View it here: http://$SITE_DOMAIN$PATH/blogs/$blogid"; sendPM($US_ID, $row_abuse['US_ID'], $subject, $url); } require("fb_bottom.php"); } else $error = "Sorry, blog hasn't been added for some reason. Please try again and if the problem persists contact admin."; } else $PARAMETER1 = "add-blog"; } if ($PARAMETER1 == "add-blog") { # report abuse require("fb_top.php"); if (isset($error)) { print "

"; print "
Add Blog"; print "$error
"; print "

"; print "

"; print "

"; print "

"; print ""; print "

"; } else { print "
"; print "
Add Blog"; print "

"; print "

"; print "

"; print "

"; print ""; print "

"; print "
"; } require("fb_bottom.php"); exit; } if (is_numeric($PARAMETER1)) { # display blog $PARAMETER1 = intval($PARAMETER1); # news story if (isset($PARAMETER3) and substr($PARAMETER3, 0, 5) == "page:") $INPUT_p = intval(substr($PARAMETER3, 5, 5)); # page number # get story details for meta $sql = "select * from BL_Blogs, US_Users where BL_ID = $PARAMETER1 and BL_Author = US_ID and BL_DateTime < now()"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { $PAGE_TITLE = stripslashes($row['BL_Title']) . " by {$row['US_Username']}"; $PAGE_TITLE = str_replace("\"", "", $PAGE_TITLE) . " - " . $TEAM_NAME . " Blog"; $PAGE_DESCRIPTION = stripslashes($row['BL_Intro']); $PAGE_DESCRIPTION = str_replace("\"", "", $PAGE_DESCRIPTION); $BL_DATETIME = $row['BL_DateTime']; $BL_TITLE = $row['BL_Title']; $username = $row['US_Username']; $us_id = $row['US_ID']; if (isset($TWTD)) $PAGE_URL = "https://{$_SERVER['SERVER_NAME']}/blogs/{$row['BL_ID']}/" . storyTitle($row['BL_Title']); else $PAGE_URL = "https://{$_SERVER['SERVER_NAME']}/$SPORT/$PREFIX/blogs/{$row['BL_ID']}/" . storyTitle($row['BL_Title']); } $STYLESHEET = " #blogtitle { font-family: georgia; font-size:1.4em; text-align:right } #blogpara { font-family: georgia; font-size: 1em; text-align:right} #blogtitlenorm { font-family: georgia; font-size:1.8em; font-weight: normal; } #blogparanorm { font-family: georgia; font-size: 1.2em; } #blogparaintronorm { font-family: georgia; font-size: 1.2em; font-weight: bold; }"; $JAVASCRIPT = ""; $STYLESHEET .= "#submenu{ padding: 0 5px 0 0; width: 100%; background: transparent; voice-family: inherit;} #submenu ul{ font: bold 10pt Calibri; margin:0; margin-left: 0px; padding: 0; list-style: none; } #submenu li{ display: inline; margin: 0 2px 0 0; padding: 0; } #submenu a{ float: left; display: block; color: white; margin: 0 1px 0 0; padding: 5px 10px; text-decoration: none; letter-spacing: 1px; background-color: black; border-bottom: 1px solid white; } #submenu a:hover{ background-color: #$TP_BORDER2; } #submenu #current a{ background-color: #$TP_BORDER1; border-color: #$TP_BORDER1; } #submenuline {clear:both; padding:0 5px 0 0; height:5px; line-height:5px; background:#$TP_BORDER1; margin-bottom:5px; }"; $STYLESHEET .= "a.nost:link, a.nost:visited, a.nost:hover { color: black; text-decoration: none; font-weight: normal; display: block; } a.nost:hover { background: #EEEEEE; }"; $STYLESHEET .= ".blogtable { width: 100%; text-align: center; border-style: dashed; border-width: 1px} .bold{font-weight:bold} .left{ text-align: left} .right {text-align:right}"; require("fb_top.php"); print "
"; print "
 
"; print "", $story); #$story = str_replace("</tr>", "", $story); #$story = str_replace("<td>", "", $story); #$txt = str_replace("<", "<", $txt); #$txt = str_replace(">", ">", $txt); print "

$story

"; } print "
"; #print "

"; $adtype = "Banner"; include ("adserver.php"); # if (isset($TWTD)) $outbrain = "http://www.twtd.co.uk/"; else $outbrain = "http://www.fansnetwork.co.uk/football/$PREFIX/"; # print "
"; print "

Please report offensive, libellous or inappropriate posts by using the links provided.
"; $sql_upd = "update BL_Blogs set BL_Views = BL_Views + 1 where BL_ID = $PARAMETER1 limit 1"; mysql_query($sql_upd); if ($disallowcomments === false) { $no_pages = intval(($rowComments['cnt'] - 1) / $commentspagesize) + 1; if ($no_pages == 0 ) $v2pages = 1; else $v2pages = $no_pages; #if (isset($INPUT_p) and $INPUT_p == "last") $pageno = $v2pages; if (isset($PARM_PAGE) and is_numeric($PARM_PAGE)) $pageno = $PARM_PAGE; # if ?scrollto=post1234 then find which page it's on #if (isset($_GET['scrollto']) and substr($_GET['scrollto'], 0, 4) == "post") { # $post = intval(substr($_GET['scrollto'], 4, 99)); # $sql = "select * from BC_BlogComments where BC_Story = $PARAMETER1 and BC_Status != 'D' order by BC_DateTime"; # $sql = mysql_query($sql); # $pageno = 1; # $x = 0; # while ($row = mysql_fetch_array($sql)) { # $x++; # if ($row['NC_ID'] == $post) break; # if ($x == $commentspagesize) { $pageno++; $x = 0; } # } # } $sql_info2 = "select * from BC_BlogComments, US_Users where NC_User = US_ID and NC_Story = $PARAMETER1 and NC_Status != 'D' order by NC_DateTime limit " . ($pageno - 1) * $commentspagesize . ", " . $commentspagesize; $sql_res2 = mysql_query($sql_info2) or die (mysql_error()); $noofcomments = 0; while ($row2 = mysql_fetch_array($sql_res2)) { $noofcomments++; $user = "{$row2['US_Username']}"; $user = $user . "added " . date("H:i - M j", strtotime($row2['NC_DateTime'])) . ""; if (isset($US_TYPE) and $US_TYPE == 'A') { $abuse = ""; $comment = processText($row2['NC_Comment']); } else if (isset($US_TYPE) and ($US_TYPE == 'U')) { if (stripos($row2['NC_Comment'], "") !== false) $abuse = " Abuse reported"; else $abuse = ""; $comment = processText($row2['NC_Comment']); } else { $abuse = ""; $comment = processText($row2['NC_Comment']); } $thumbs = "
" . ((substr_count($row2['NC_GoodPost'], '[')) - (substr_count($row2['NC_BadPost'], '['))) . "
"; print "
"; if (isset($US_TYPE) and $US_TYPE == "A") $sql_story = "select * from BL_Blogs, US_Users where BL_Author = US_ID and BL_ID = $PARAMETER1 limit 1"; else $sql_story = "select * from BL_Blogs, US_Users where BL_ID = " . $PARAMETER1 . " and BL_DateTime < now() and BL_Author = US_ID limit 1"; $res_story = mysql_query($sql_story); while ($row_story = mysql_fetch_array($res_story)) { $SHARETHIS_TITLE = $row_story['BL_Title']; $title = $row_story['BL_Title']; $disallowcomments = stripos($row_story['BL_Story'], ""); $allowhtml = stripos($row_story['BL_Story'], ""); $BL_AUTHOR = $row_story['BL_Author']; if ($disallowcomments === false) { $sqlComments = "select count(*) as cnt FROM BC_BlogComments WHERE NC_Story = '$PARAMETER1' and NC_Status !='D'"; $resComments = mysql_query($sqlComments); $rowComments = mysql_fetch_array($resComments); if (isset($INPUT_p)) $pageno = $INPUT_p; if (!isset($pageno)) $pageno = 1; } $story = stripslashes($row_story['BL_Story']); $y1 = stripos($story, "

This blog has been submitted by "); $y2 = stripos($story, "page.

", $y1); if ($y1 !== false) $story = substr($story, ($y2 + 13), 9999999999); #$intro = stripslashes(strip_tags($row_story['BL_Intro'])); $intro = processStoryText($row_story['BL_Intro']); $date = date('l, jS M Y', strtotime($row_story['BL_DateTime'])).' '.substr($row_story['BL_DateTime'], 10, 6); $adminedit = ""; if (isset($US_TYPE) and $US_TYPE == "A") $adminedit = "[ Edit ]"; if (is_file("images/avatars/$BL_AUTHOR.gif")) print ""; print "" . stripslashes($row_story['BL_Title']) . "
Written by {$row_story['US_Username']} on $date
"; print "

$intro $adminedit

\n"; $story = processStoryText($story); $story = str_replace("\n \n", "

", $story); $story = str_replace("

", "

", $story); $story = str_replace("<", "<", $story); $story = str_replace(">", ">", $story); #$story = str_replace("

", "", $story); #$story = str_replace("

", "\n\n", $story); #$story = processText(str_replace("

", "\n\n", $story)); # allow some html #$story = str_replace("<table>", "", $story); #$story = str_replace("</table>", "
", $story); #$story = str_replace("<tr>", "
", $story); #$story = str_replace("</td>", "
$user
$comment
"; userPanel($row2['NC_User']); echo "
$abuse
$thumbs
"; } if ($noofcomments > 0) { print '
'; } if (isset($US_USERNAME)) { if (!isset($_POST['text'])) $_POST['text'] = ""; print "

Add a comment...


Please keep blog comments on topic. To make wider points, visit the forum. Do not post bad language or libellous content.
"; print "
"; } else { print "You need to login in order to post your comments"; } } $related_info = "

Blogs by $username

"; $sql_story = "select * from BL_Blogs where BL_Author = $us_id and BL_DateTime < now() order by BL_DateTime desc limit 15"; $res_story = mysql_query($sql_story); while ($row_story = mysql_fetch_array($res_story)) { $row_story['BL_Title'] = str_replace("[Blog] ", "", $row_story['BL_Title']); $related_info .= "
" . stripslashes($row_story['BL_Title']) . "
"; } print "
"; $adtype = "Skyscraper"; include ("adserver.php"); print "
"; print "
$related_info
"; $num_rows = mysql_num_rows(mysql_query("select distinct (BL_Author) from BL_Blogs where BL_Author > 0")); print "

Blogs $num_rows bloggers

"; $sql_res = "select * from BL_Blogs, US_Users where BL_DateTime < now() and BL_Author = US_ID order by BL_DateTime desc limit 5"; $res_res = mysql_query($sql_res); while ($row_res = mysql_fetch_array($res_res)) { print "
"; #$paras = explode("

", stripslashes($row_res['BL_Story'])); print "

"; } print "
"; $adtype = "MPU_Remnant"; include ("adserver.php"); print "
"; echo ""; require "fb_bottom.php"; exit; } if (isset($PARAMETER1) and substr($PARAMETER1, 0, 4) == "rate") { # rate, rateup and ratedown /blogs/rateup/123456 if (isset($US_ID)) { if ($PARAMETER1 == "rateup") { $sql = "select * from BC_BlogComments where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($US_ID == $row['NC_User']) print "You can't vote for yourself "; else if (strpos($row['NC_GoodPost'], "[$US_ID]") === false) { $sql = "update BC_BlogComments set NC_GoodPost = concat(NC_GoodPost, \"[$US_ID]\") where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } else print "You have already voted"; } } if ($PARAMETER1 == "ratedown") { $sql = "select * from BC_BlogComments where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { if ($US_ID == $row['NC_User']) print "You can't vote for yourself "; else if (strpos($row['NC_BadPost'], "[$US_ID]") === false) { $sql = "update BC_BlogComments set NC_BadPost = concat(NC_BadPost, \"[$US_ID]\") where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; mysql_query($sql); } else print "You have already voted"; } } } else { print "Please log in to vote"; exit; } $sql = "select * from BC_BlogComments where NC_ID = " . mysql_real_escape_string($PARAMETER2) . " limit 1"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { print "
" . ((substr_count($row['NC_GoodPost'], '[')) - (substr_count($row['NC_BadPost'], '['))) . "
"; } exit; } header("location: $PATH/members/!/blogs/"); ?>