"); addnav("","badword.php?op=test"); output("`7Test a word:`0"); rawoutput(""); if ($op=="test"){ $word = httppost("word"); $return = soap($word,true); if ($return == $word) output("`7\"%s\" does not trip any filters.`0`n`n", $word); else output("`7%s`0`n`n", $return); } output_notl("", true); output("`7`bGood Words`b`0"); rawoutput(""); output("`7 (bad word exceptions)`0`n"); $add = translate_inline("Add"); $remove = translate_inline("Remove"); rawoutput("
"); rawoutput(""); $sql = "SELECT * FROM ".db_prefix("nastywords")." WHERE type='good'"; $result = db_query($sql); $row = db_fetch_assoc($result); $words = explode(" ",$row['words']); if ($op=="addgood"){ $newregexp = stripslashes(httppost('word')); // not sure if the line below should appear, as the strings in the good // word list have different behaviour than those in the nasty word list, // and strings with single quotes in them currently have odd and // unreliable behaviour, both under the good word list and the nasty // word list // $newregexp = preg_replace('/(?"); output("`7`bNasty Words`b`0"); rawoutput(""); output_notl("`n"); rawoutput(""); rawoutput(""); $sql = "SELECT * FROM " . db_prefix("nastywords") . " WHERE type='nasty'"; $result = db_query($sql); $row = db_fetch_assoc($result); $words = explode(" ",$row['words']); reset($words); if ($op=="add"){ $newregexp = stripslashes(httppost('word')); // automagically escapes all unescaped single quote characters $newregexp = preg_replace('/(?