[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/scripts/ -> http_login_refer.php (source)

   1  <?php
   2  /**
   3   * $Horde: horde/scripts/http_login_refer.php,v 1.3.12.3 2006/01/01 21:29:09 jan Exp $
   4   *
   5   * Copyright 1999-2006 Charles J. Hagenbuch <chuck@horde.org>
   6   * Copyright 1999-2006 Jon Parise <jon@horde.org>
   7   *
   8   * See the enclosed file COPYING for license information (LGPL). If you
   9   * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  10   */
  11  
  12  require_once  '../lib/base.php';
  13  
  14  $auth = &Auth::singleton($conf['auth']['driver']);
  15  
  16  // Check for HTTP auth.
  17  if (empty($_SERVER['PHP_AUTH_USER']) ||
  18      empty($_SERVER['PHP_AUTH_PW']) ||
  19      !$auth->authenticate($_SERVER['PHP_AUTH_USER'],
  20                           array('password' => $_SERVER['PHP_AUTH_PW']))) {
  21  
  22      header('WWW-Authenticate: Basic realm="' . $auth->getParam('realm') . '"');
  23      header('HTTP/1.0 401 Unauthorized');
  24      exit('Forbidden');
  25  }
  26  
  27  if ($url = Util::getFormData('url')) {
  28      header('Location: ' . $url);
  29  } else {
  30      header('Location: ' . Horde::applicationUrl('login.php'));
  31  }


Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7