function censorwords($text) { global $settings; if ($settings['bad_words_enabled'] == "1" && $settings['bad_words'] != "" ) { $word_list = explode("\r\n", $settings['bad_words']); for ($i=0;$i < count($word_list);$i++) { if ($word_list[$i] != "") { $text = preg_replace("/".$word_list[$i]."/si", $settings['bad_word_replace'], $text, $odp = dbquery("INSERT INTO ".$db_prefix."cautions (user_id, who, why) VALUES('".$userdata['user_id']."', '6', 'Regulamin: 3.4 (Etykieta, punkt 4) ')"));} } } return $text; }