[ PHPXref.com ] [ Generated: Sun Jul 20 16:22:48 2008 ] [ 4images 1.7.4 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> login.php (source)

   1  <?php
   2  /**************************************************************************

   3   *                                                                        *

   4   *    4images - A Web Based Image Gallery Management System               *

   5   *    ----------------------------------------------------------------    *

   6   *                                                                        *

   7   *             File: login.php                                            *

   8   *        Copyright: (C) 2002 Jan Sorgalla                                *

   9   *            Email: jan@4homepages.de                                    *

  10   *              Web: http://www.4homepages.de                             *

  11   *    Scriptversion: 1.7.4                                                *

  12   *                                                                        *

  13   *    Never released without support from: Nicky (http://www.nicky.net)   *

  14   *                                                                        *

  15   **************************************************************************

  16   *                                                                        *

  17   *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *

  18   *    bedingungen (Lizenz.txt) für weitere Informationen.                 *

  19   *    ---------------------------------------------------------------     *

  20   *    This script is NOT freeware! Please read the Copyright Notice       *

  21   *    (Licence.txt) for further information.                              *

  22   *                                                                        *

  23   *************************************************************************/
  24  
  25  $main_template = 0;
  26  
  27  $nozip = 1;
  28  define('ROOT_PATH', './');
  29  include (ROOT_PATH.'global.php');
  30  require (ROOT_PATH.'includes/sessions.php');
  31  
  32  $error = 0;
  33  if ($user_info['user_level'] != GUEST || empty($HTTP_POST_VARS['user_name']) || empty($HTTP_POST_VARS['user_password'])) {
  34    if (!ereg("index.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url)) {
  35      redirect($url);
  36    }
  37    else {
  38      redirect("index.php");
  39    }
  40  }
  41  else {
  42    $user_name = trim($HTTP_POST_VARS['user_name']);
  43    $user_password = trim($HTTP_POST_VARS['user_password']);
  44    $auto_login = (isset($HTTP_POST_VARS['auto_login']) && $HTTP_POST_VARS['auto_login'] == 1) ? 1 : 0;
  45  
  46    if ($site_sess->login($user_name, $user_password, $auto_login)) {
  47      if (!ereg("index.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url)) {
  48        redirect($url);
  49      }
  50      else {
  51        redirect("index.php");
  52      }
  53    }
  54    else {
  55      $error = $lang['invalid_login'];
  56    }
  57  }
  58  if ($error) {
  59    $main_template = "error";
  60    include (ROOT_PATH.'includes/page_header.php');
  61    show_error_page($error);
  62  }
  63  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]