sorry. here ya go:
$query = mysql_query("SELECT * FROM xmb_forums WHERE fid='$news_fid'");
$forum = mysql_fetch_array($query);
$query = mysql_query("SELECT DISTINCT * FROM xmb_smilies");
while ($smiley = mysql_fetch_array($query)) {
if ($smiley_list == "") $smiley_list = "$smiley[code]||+||$smiley[url]";
else $smiley_list .= "||-||$smiley[code]||+||$smiley[url]";
}
$smiley_array = explode("||-||", $smiley_list);
$query = mysql_query("SELECT DISTINCT * FROM xmb_posts WHERE fid = '$news_fid' GROUP BY (tid) ORDER BY dateline DESC LIMIT 0,$news_list_this_many");
while ($news = mysql_fetch_array($query)) {
$readmore = "";
$author = $news['author'];
$tid = $news['tid'];
$date = $news['dateline'];
$formatdate = gmdate("$date_format",$date + ($timeoffset*3600));
$subject = $news['subject'];
$subject = stripcslashes($subject);
$news['message'] = stripslashes($news['message']);
$message = $news['message'];
$message = postify($message, $smileyoff, $bbcodeoff, $forum[allowsmilies], $forum[allowhtml], $forum[allowbbcode], $forum[allowimgcode]);
// Setup smilies
while (list($IndexValue, $smiley_sect) = each ($smiley_array))
{
$smiley_x = explode("||+||", $smiley_sect);
$code = $smiley_x[0];
$img = $smiley_x[1];
$message = str_replace("$code", "<img src=\"$smdir/$img\" border=\"0\">", $message);
}
$querynext = mysql_query("SELECT COUNT(*) FROM xmb_posts WHERE tid='$tid'")
or die(mysql_error());
$comments = mysql_result($querynext, 0);
$querynext = mysql_query("SELECT m.username FROM xmb_members m WHERE username = '$author'") or
die(mysql_error());
$comments -= 1;
if ($comments == "1") $comment_txt = "comment";
else $comment_txt = "comments";
if ($comments > 0) $comments = "<a href=\"viewthread.php?tid=$tid\">$comments $comment_txt</a> |";
else $comments = "";
if($news[icon] != "") {
$icon = "<img src=\"$smdir/$news[icon]\">";
} else {
$icon = "<img src=\"$smdir/$dgif\">";
}
$thread_query = mysql_query("SELECT * FROM xmb_threads WHERE tid='$tid'");
$thread = mysql_fetch_array($thread_query);
if($thread[closed] == "yes") {
$postcomment = "Closed |";
} else {
$postcomment = "<a href=\"post.php?action=reply&fid=$news_fid&tid=$tid\">Reply</a> |";
}
?>
thats whe whole news.php script I'm working with. This file is included in portal.php which has calls to xmb.php and headers.php which have all the other variable delcarations and functions and such. All the other functions work properly in the rest of the website except in this one file. Even stripslashes() and addslashes() work properly in functions.php and every other file that uses it.