= MAX_LOGON_ATTEMPTS) { header("Location: access_denied.php"); } //********************************************************************* $mess = ""; $val_auth = 99; if ($self == "logon") { //cryptage du password $password = md5($password); $rs = getrs(msp_check_admin($login, $password) ); if ($rs) { while ($enreg = mysql_fetch_array($rs) ) { $id = $enreg ["id_fdc"]; } } else{ die("Impossible d'effectuer la requete."); } if ($id != 0) { //First we delete all the expire session : $rs = getrs(msp_session_cleaning() ); //we check if the session id does not exist. $rs = getrs(msp_count_adminID_bySession(session_id()) ); if ($rs) { $enreg = mysql_fetch_array($rs); $num = $enreg['num']; if ($num == 0) { //on créé la session //we record the id session in tblSession with the value we want to save and the time to live for the session. getrs(msp_session_record_id(session_id(), $id, TIMESESSION) ); } else { //On update la session getrs(msp_session_update_id(session_id(), $id, TIMESESSION) ); } header("Location: accueil.php"); exit(); } } else{ $mess="La connexion a échoué !"; $failed_logon = $failed_logon + 1; if ($failed_logon < MAX_LOGON_ATTEMPTS) { $log = 1; } else { header("Location: access_denied.php"); } } } //session_destroy(); //************************************************************************* ?>