",$text); $text = str_replace("[B]","",$text); $text = str_replace("[/b]","",$text); $text = str_replace("[/B]","",$text); //ITALIC: $text = str_replace("[i]","",$text); $text = str_replace("[I]","",$text); $text = str_replace("[/i]","",$text); $text = str_replace("[/I]","",$text); //UNDERLINE: $text = str_replace("[u]","",$text); $text = str_replace("[U]","",$text); $text = str_replace("[/u]","",$text); $text = str_replace("[/U]","",$text); //IMAGE: $text = preg_replace("/\[img\](.*?)\[\/img\]/si","",$text); $text = preg_replace("/\[thumb\](.*?)\[\/thumb\]/si","",$text); /* This code shamelessly ripped off the phpBB source. It's free and it works :) Work your magic baby *slap* YEEHAA :P -Tricord */ /* **SLAP** Tri, get yourself together! - Garner */ /* Hey, if *I* slap, doesn't mean that *you* can slap too!!! */ // [url]xxxx://www.phpbb.com[/url] code.. $patterns[0] = "#\[url\]([a-z]+?://){1}(.*?)\[/url\]#si"; $replacements[0] = '\1\2'; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). $patterns[1] = "#\[url\](.*?)\[/url\]#si"; $replacements[1] = '\1'; // [url=xxxx://www.phpbb.com]phpBB[/url] code.. $patterns[2] = "#\[url=([a-z]+?://){1}(.*?)\](.*?)\[/url\]#si"; $replacements[2] = '\3'; // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). $patterns[3] = "#\[url=(.*?)\](.*?)\[/url\]#si"; $replacements[3] = '\2'; // [email]user@domain.tld[/email] code.. $patterns[4] = "#\[email\](.*?)\[/email\]#si"; $replacements[4] = '\1'; $text = preg_replace($patterns, $replacements, $text); $tot = 0; do { $tot++; $textbefore = $text; $pattern[0] = "#\[quote\](.*?)\[/quote\]#si"; $replace[0] = '
Quote:
\1
'; //with name $pattern[1] = "#\[quote=(.*?)\](.*?)\[/quote\]#si"; $replace[1] = '
\1 wrote:
\2
'; $text = preg_replace($pattern,$replace,$text); } while ($textbefore != $text && $tot < 10); return $text; } //End function mysql_query("UPDATE forum SET views = views + 1 WHERE id = '$view'"); $query = mysql_query("SELECT * FROM forum WHERE id = '$view'"); $row = mysql_fetch_array($query); $forum = $row[forum]; //Slight post rearangement if ($forum == 3 || $forum == 4) { $special = "1"; $postingbuttons = " "; } else { $postingbuttons = " "; } //Do some valitity checkup. if ($forum == "0") { if ($row[project] != 0) { //Show project logo and author $qry = mysql_query("SELECT data FROM cdcdata WHERE type = 'logo' && project = '$row[project]'"); $qry2 = mysql_query("SELECT project,name,author FROM cdcprojects WHERE id = '$row[project]'"); $pro = mysql_fetch_array($qry2); $qry2 = mysql_query("SELECT user FROM unified WHERE id = '$pro[author]'"); $authy = mysql_fetch_array($qry2); if ($logo = mysql_fetch_array($qry)) { if (!strrpos($logo[data],"/")) { $temp = CNSsiteurl."$pro[project]/$logo[data]"; $logo[data] = $temp; } $data .= "

Click to view project details for '$pro[name]'

Thread Moderator: $authy[user]

"; } else { $data .= "CDC Forum"; } } } elseif ($forum == "3") { //$data = $postingbuttons; $qry = mysql_query("SELECT * FROM news WHERE newsid = '$row[content]'"); $newsrow = mysql_fetch_array($qry); $dude = User::get_member($newsrow[author]); $curdate = date("l jS F Y",timezone($newsrow[timestamp])); $data .= "
News for $curdate
$newsrow[title] - $dude
".date("g:ia",timezone($newsrow[timestamp]))." - $newsrow[category] - Viewing Replies - Post reply

".stripslashes(dosmilies($newsrow[story]))."


"; } elseif ($forum == "4") { $qry = mysql_query("SELECT * FROM registry WHERE id = '$row[content]'"); $reg = mysql_fetch_array($qry); $data .= "
View details
Post comment




Images
"; if ($reg[images] != "none") { $qr = mysql_query("SELECT directory FROM members WHERE user_id = '$reg[owner]'"); $dir = mysql_fetch_array($qr); $array = explode(":",$reg[images]); foreach($array as $key => $val) { $data .= " "; } } else { $data .= "
No image available"; } $data .= "
$reg[car]
Owner: ".User::get_member($reg[owner])."
In registry since: ".date("l, M jS g:ia",timezone($reg[timestamp])).".
Year: $reg[year]
Location: $reg[location]

"; //

User comments
"; /* $data .= "
$souperow[title] - $dude
". nl2br(stripslashes(dosmilies($souperow[content]))) ."
Post Comment  

";*/ } $title = stripslashes($row[thread]); $query = mysql_query("SELECT * FROM forum WHERE thread = '$view' ORDER BY id ASC"); if ($forum != 2 && $forum != 1) { //$data .= "$postingbuttons"; } $data .= "
"; do { //ugly fix for newpost and soupe replies bug if($special != "1"){ $row[content] = dosmilies(nl2br(forumcode(stripslashes($row[content])))); $qry = mysql_query("SELECT id,rank,email,user,cars,location,icontype FROM unified WHERE id = '$row[author]'"); $id = mysql_fetch_array($qry); if ($id[icontype] != "") $iconout = "
   "; else $iconout = "
"; $date = date("l, M jS g:ia",timezone($row[timestamp])); if ($PHP_AUTH_USER != "") { $email = "[Email]"; } $data = $data." "; } else { $special++; } } while ($row = mysql_fetch_array($query)); $data = $data."
$id[user]   Posted $date [Edit] [Quote] $email [IMS] [View car]
$id[rank]$row[rank]$iconout
$id[location]
$id[cars]
$row[content]

$postingbuttons
Thread Administration"; $treeview = "
$postingbuttons- ".CNSsitename."
   - $forumname[$forum]
      - ".stripslashes($title)."
"; if ($forum == 4) $data .= ""; html("$forumname[$forum] : ".stripslashes($title),$treeview.$data,"html"); ?>