Location: PHPKode > projects > RosInfo > rosinfo-1.30/include/login.inc
<? 
include_once('config.inc');

function login($passwords)
{
  $valid_users = array_keys($passwords);

  $user = $_SERVER['PHP_AUTH_USER'];
  $pass = $_SERVER['PHP_AUTH_PW'];
  $validated = (in_array($user, $valid_users)) && ($pass == $passwords[$user]);
  return $validated;
}

function login_user()
{
  global $login_passwords_user;
  return login($login_passwords_user);
}

function login_admin()
{
  global $login_passwords_admin;
  return login($login_passwords_admin);
}
?>
Return current item: RosInfo