For the censor function delete it and replace it with:
Code
function censor($text, $replacement = "<b>Censored</b>"){ // they said bad thing lets import it...
if( strlen($text) > 0 ){ //if there was actually text..
$name = 'badwords.txt'; //get our bad words
$words = file($name); //make sure its a file
$text = str_replace($words, $replacement, $text); //return censored text.
} //end if
}