$output = "Mot de passe invalide pour $login !"; authlog("BadPasswd - $login"); $auth = FALSE; } else { $authflag = @mysql_result($result,0,"flag"); if ($authflag < 1) { $output = "Désolé.<bR><br>\nVotre Login n'a pas encore été activé.\n"; $output.= "<br><br>\n<a href=javascript:history.go(-1) style=color:#FFFFFF><- retour</a>"; $output.= "<br><br>\n$query"; authlog("NoRight - $login"); $showform = FALSE; } else { $auth = TRUE; $me = $login; session_register('me','flag'); authlog("Login - $login"); } } } mysql_close($db_link); } } else { $auth = TRUE; } if (($closed and !$auth) or $identify) { ?> <html><head><title>Authentification required</title></head> <body bgcolor=#336699 text=#FFFFFF onLoad="document.authform.login.focus()" AUTOCOMPLETE="off"> <table width=100% height=100% border=0><tr><td align=center valign=middle> <? // displays output message if it exists if ($showform) {
$oou = @ldap_get_values($conn,$ii,'ou'); $cn = $ccn[0]; $ou = $oou[0]; $auth = TRUE; $me = $login; session_register('me','cn','ou'); authlog("Login - $login"); } else { $auth = FALSE; $output = "Désolé vous n'avez pas accès a cet espace."; authlog("BadRight - $login"); } } else { $auth = FALSE; $output = "Mot de passe invalide pour $login !"; authlog("BadPasswd - $login"); } @ldap_unbind($conn); @ldap_close($conn); } } else { $auth = TRUE; } if (($closed and !$auth) or $identify) { ?> <html><head><title>Authentification required</title></head> <body bgcolor=#336699 text=#FFFFFF onLoad="document.authform.login.focus()" AUTOCOMPLETE="off"> <table width=100% height=100% border=0><tr><td align=center valign=middle> <? // displays output message if it exists if ($showform) { echo "<FORM NAME=authform ACTION=$PHP_SELF METHOD=post>\n" ?>