Вот функция
CODE:FUNCTION savereplace($a) {
$a = str_replace("<", "{<}", $a);
$a = str_replace(">", "{>}", $a);
$a = str_replace(":", "{:}", $a);
$a = str_replace("\r\n", "{nl}", $a);
$a = str_replace(" ", "{sp}", $a);
$a = str_replace("<script>", "<s>", $a);
$a = str_replace("</script>", "</s>", $a);
$a = str_replace("@import", "'@import'", $a);
$a = str_replace("javascript", "'javascript'", $a);
$a = str_replace("style", "'style'", $a);
$a = bbcodessave($a);
return $a;
}
CODE:FUNCTION check_email($a){return preg_match('/^[a-z0-9]{1}[a-z0-9\-_]+@[a-z0-9\-_]+\.[a-z]{2,4}$/i', $a);} |