4images PHP Cross Reference Image Galleries

Source: /login.php - 63 lines - 2879 bytes - Summary - Text - Print

   1  <?php
   2  /**************************************************************************
   3   *                                                                        *
   4   *    4images - A Web Based Image Gallery Management System               *
   5   *    ----------------------------------------------------------------    *
   6   *                                                                        *
   7   *             File: login.php                                            *
   8   *        Copyright: (C) 2002-2012 Jan Sorgalla                           *
   9   *            Email: jan@4homepages.de                                    * 
  10   *              Web: http://www.4homepages.de                             * 
  11   *    Scriptversion: 1.7.11                                               *
  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 (!preg_match("/index\.php/", $url) && !preg_match("/login\.php/", $url) && !preg_match("/register\.php/", $url) && !preg_match("/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 (!preg_match("/index\.php/", $url) && !preg_match("/login\.php/", $url) && !preg_match("/register\.php/", $url) && !preg_match("/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  ?>

title

Description

title

Description

title

Description

title

title

Body