Fixed issue #78
This commit is contained in:
parent
0168d5d7ec
commit
1eb68bf135
@ -1034,35 +1034,41 @@ public function formLectureQaptcha()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* recupere les fils d'un noeud depuis le noeud principal
|
||||
* @access public
|
||||
*/
|
||||
private function getObjectSon($nodeId)
|
||||
{
|
||||
$tab=$GLOBALS["SYSTEM_CONTROL"]->getListObjectForNavigation($nodeId);
|
||||
return $tab;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function permettant de verifié la validité d'un mail saisi
|
||||
* @access public
|
||||
* @return chaine chaine code message
|
||||
*/
|
||||
|
||||
function verifie_email($email){
|
||||
$email = strtolower($email);
|
||||
|
||||
if (strlen($email) < 6){ return "$email : Email trop court";}
|
||||
if (strlen($email) > 255) {return "$email : Email trop long";}
|
||||
if (!ereg("@", $email)){ return "$email : Le email n'a pas d'arobase
|
||||
(@)";}
|
||||
if (preg_match_all("/([^a-zA-Z0-9_\@\.\-])/i", $email, $trouve))
|
||||
{
|
||||
return "$email : caractère(s) interdit(s) dans un email
|
||||
(".implode(", ", $trouve[0]).").";
|
||||
}
|
||||
if (!preg_match("/^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,
|
||||
4}\$/i", $email))
|
||||
{
|
||||
return "$email : ce n'est pas un la forme d'un email.";
|
||||
}
|
||||
list($compte, $domaine)=split("@", $email, 2);
|
||||
if (!checkdnsrr($domaine, "MX")){
|
||||
return "$email : Ce domaine ($domaine) n'accepte pas les
|
||||
emails";
|
||||
}
|
||||
return "$email : Valide !";
|
||||
}
|
||||
function verifie_email($email){
|
||||
$email = strtolower($email);
|
||||
|
||||
if (strlen($email) < 6){ return "$email : Email trop court";}
|
||||
if (strlen($email) > 255) {return "$email : Email trop long";}
|
||||
if (!ereg("@", $email)){ return "$email : Le email n'a pas d'arobase (@)";}
|
||||
if (preg_match_all("/([^a-zA-Z0-9_\@\.\-])/i", $email, $trouve))
|
||||
{
|
||||
return "$email : caractère(s) interdit(s) dans un email (".implode(", ", $trouve[0]).").";
|
||||
}
|
||||
if (!preg_match("/^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}\$/i", $email))
|
||||
{
|
||||
return "$email : ce n'est pas un la forme d'un email.";
|
||||
}
|
||||
list($compte, $domaine)=split("@", $email, 2);
|
||||
if (!checkdnsrr($domaine, "MX")){
|
||||
return "$email : Ce domaine ($domaine) n'accepte pas les emails";
|
||||
}
|
||||
return "$email : Valide !";
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user