authentification.inc.php from Gulus at Krugle
Show authentification.inc.php syntax highlighted
<?php
function authentification()
{
Header("WWW-Authenticate: Basic realm=\"Section administrative du GULUS\"");
Header("HTTP/1.0 401 Unauthorized");
// si l'usager presse "annuler"
die("<html><br><br><br><br><H1 align=\"center\">Accès invalide.</H1></html>");
}
if($est_module_prive)
{
// procédons à l'authentification
if(!isset($PHP_AUTH_USER)) {
authentification();
} else {
// validation du mot de passe
//require_once("includes/passwd_section_privee.inc.php"); PHP4
require("includes/passwd_section_privee.inc.php");
if($PHP_AUTH_USER != $USER_SECTION_PRIVEE or $PHP_AUTH_PW != $PASSWD_SECTION_PRIVEE)
{
authentification();
}
else { // accès valide. Rien à faire.
}
}
}
?>
See more files for this project here