From 1eb68bf1359b7633d173725fde0317291faac9cc Mon Sep 17 00:00:00 2001 From: "tristan.champomier" Date: Wed, 28 Apr 2021 03:08:57 +0200 Subject: [PATCH] Fixed issue #78 --- lib/object_coordination/home/home.php | 56 +++++++++++++++------------ 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/lib/object_coordination/home/home.php b/lib/object_coordination/home/home.php index b73aaff..eadbf8e 100755 --- a/lib/object_coordination/home/home.php +++ b/lib/object_coordination/home/home.php @@ -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 !"; + } ?>