FORM_CONNEXION_MAX_TENTATIVES)||(empty($_SESSION["timeS"]))||((time()-intval($_SESSION["timeS"]))erreurs))) { if(empty($_POST["passe_nok"])) $conn=$user->test_connexion($persistence_ok); else $conn=$user->get_lien_connexion($persistence_ok); } $Bd=null; if(!empty($user->erreurs)) $msg_form=array_merge($user->erreurs,$msg_form); elseif($conn===false) $msg_form[]=ERREUR_IMPREVUE; if(empty($msg_form)) { unset($_SESSION["Nb_tentatives"]); if((empty($_POST["passe_nok"]))&&(!$ajax_on)) { // si l'utilisateur connecté et a un cookie de redirection // je le redirige vers la page qui l'intéressait avant connexion $redirige=PAGE_ACCUEIL; if(!empty($_COOKIE["rdg"])) { if(strpos($_COOKIE["rdg"],SITE_COOKIES_DOMAINE)===false) $redirige=$_COOKIE["rdg"]; //dans tous les cas, je mange mon cookie :-) setcookie("rdg","",-1600,"/",SITE_COOKIES_DOMAINE); } header("location:".$redirige); exit(); } elseif(!empty($_POST["passe_nok"])) $msg_form[]=MSG_UTILISA_GET_LIEN_CONNEXION_OK; } } } if((!empty($msg_form))&&($ajax_on)) { if($msg_form[0]==MSG_UTILISA_GET_LIEN_CONNEXION_OK) echo get_html_alerte_msg($msg_form,"alert-success"); else echo get_html_alerte_msg($msg_form); }