Warning: Unknown modifier ' ' in /usr/home/chesteral/public_html/simplenews/includes/functions.php on line 57
Código PHP:
<?PHP
/************************************************************************
Function: emoticons
Updated: 06/02/2003
Action: 1. Parses text string and replaces some text with images
Notes:
To Do: Nothing
************************************************************************/
function emoticons($text) {
$search = array_keys($GLOBALS['smiles']);
$text = str_replace($search, $GLOBALS['smiles'], $text);
return $text;
}
/************************************************************************
Function: strip_html
Updated: 07/09/2003
Action: 1. Replaces HTML brackets (<>) with the & code.
Notes:
To Do: Nothing
************************************************************************/
function strip_html($text) {
$search = array_keys($GLOBALS['strip_html']);
$text = str_replace($search, $GLOBALS['strip_html'], $text);
return $text;
}
/************************************************************************
Function: word_filter
Updated: 07/29/2003
Action 1. Replaces any word placed in words.txt with #$@&!.
Notes:
To Do: Nothing
************************************************************************/
function word_filter($text) {
$filename = "simplenews/includes/badwords.txt";
$fp = fopen($filename, 'r');
if ($fp) {
$badwords = explode("\n", fread($fp, filesize($filename)));
}
$query = "SELECT filter_replace FROM news_settings";
$result = mysql_query($query);
$data = mysql_fetch_assoc($result);
$filter_replace = $data['filter_replace'];
$text = preg_replace($badwords, $filter_replace, $text); /********esta es la linea 57**********/
return $text;
}
?>