function processStoryText($txt) { global $editno, $US_ID, $PATH, $US_TYPE, $TWITTERWIDGET, $POLLS, $TP_BORDER1, $NEWS, $PREFIX, $TWTD; $txt = stripslashes($txt); if ((stripos($txt, "
", $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) . "| ";
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'], " 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 "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("</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 = "
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 .= ""; } 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(" ";
}
print "", stripslashes($row_res['BL_Story']));
print " "; $adtype = "MPU_Remnant"; include ("adserver.php"); print " |