function CheckEmailAddr($sEmail)
{
$sEmail = trim($sEmail);
if($sEmail == "")
return false;
return ereg("[a-zA-Z0-9_+\-\.]+[@][a-zA-Z0-9][a-zA-Z0-9_+\-\.]+[\.][a-zA-Z]{2,}", $sEmail);
}
function NoSpam($Campo,$msg_spam,$err_msg2,$pulsx)
{
/* parole da ricercare e bloccare */
$no01 ='www.';
$no02 ='http:';
$no03 ='<';
$pos01 = strpos($Campo, $no01);
$pos02 = strpos($Campo, $no02);
$pos03 = strpos($Campo, $no03);
if ($pos01 === false && $pos02 === false && $pos03 === false) {
return false;
} else {
Err_Msg($msg_spam,$err_msg2,$pulsx);
}
}
function ctrl_vuoto($Campo,$Tp_err,$Des_err,$pulsx)
{
if(trim($Campo) == "" )
{
Err_Msg($Tp_err,$Des_err,$pulsx);
} else {
return false;
}
}
function Err_Msg($Tp_err,$Des_err,$pulsx)
{
?>
exit;
}