[ Index ]

PHP Cross Reference of E107 v0.7.22 code documentation

title

Body

[close]

/ -> login.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     �Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvs_backup/e107_0.7/login.php,v $
  14  |     $Revision: 11346 $
  15  |     $Date: 2010-02-17 13:56:14 -0500 (Wed, 17 Feb 2010) $
  16  |     $Author: secretr $
  17  +----------------------------------------------------------------------------+
  18  */
  19  
  20  require_once ("class2.php");
  21  if (USER)
  22  {
  23      header('location:'.e_BASE.'index.php');
  24      exit();
  25  }
  26  
  27  $HEADER = "";
  28  require_once(HEADERF);
  29  $use_imagecode = ($pref['logcode'] && extension_loaded("gd"));
  30  if ($use_imagecode)
  31  {
  32      require_once(e_HANDLER."secure_img_handler.php");
  33      $sec_img = new secure_image;
  34  }
  35  
  36  if (!USER)
  37  {
  38      require_once(e_HANDLER."form_handler.php");
  39      $rs = new form;
  40      $text = "";
  41  
  42      $LOGIN_TABLE_LOGINMESSAGE = LOGINMESSAGE;
  43      $LOGIN_TABLE_USERNAME = "<input class='tbox' type='text' name='username' size='40' maxlength='100' />";
  44      $LOGIN_TABLE_PASSWORD = "<input class='tbox' type='password' name='userpass' size='40' maxlength='100' />";
  45      if ($use_imagecode)
  46      {
  47          $LOGIN_TABLE_SECIMG_LAN = LAN_LOGIN_13;
  48          $LOGIN_TABLE_SECIMG_HIDDEN = "<input type='hidden' name='rand_num' value='".$sec_img->random_number."' />";
  49          $LOGIN_TABLE_SECIMG_SECIMG = $sec_img->r_image();
  50          $LOGIN_TABLE_SECIMG_TEXTBOC = "<input class='tbox' type='text' name='code_verify' size='15' maxlength='20' />";
  51      }
  52      $LOGIN_TABLE_AUTOLOGIN = "<input type='checkbox' name='autologin' value='1' />";
  53      $LOGIN_TABLE_AUTOLOGIN_LAN = LAN_LOGIN_8;
  54      $LOGIN_TABLE_SUBMIT = "<input class='button' type='submit' name='userlogin' value=\"".LAN_LOGIN_9."\" />";
  55  
  56      $login_message = LAN_LOGIN_3." | ".SITENAME;
  57      if (!isset($LOGIN_TABLE) || !$LOGIN_TABLE)
  58      {
  59          if (file_exists(THEME.'login_template.php'))
  60          {
  61              require_once(THEME.'login_template.php');
  62          }
  63          else
  64          {
  65              require_once(e_BASE.$THEMES_DIRECTORY."templates/login_template.php");
  66          }
  67      }
  68  //    $text = preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE);
  69      $tVars = false;
  70      $text = $tp->simpleParse($LOGIN_TABLE, $tVars, false);
  71      
  72  //    echo preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_HEADER);
  73      echo $tp->simpleParse($LOGIN_TABLE_HEADER, $tVars, false);
  74      
  75      $ns->tablerender($login_message, $text, 'login_page');
  76  
  77      $LOGIN_TABLE_FOOTER_USERREG = '&nbsp;';        // In case no registration system enabled
  78      if ($pref['user_reg'])
  79      {
  80          $LOGIN_TABLE_FOOTER_USERREG = "<a href='".e_SIGNUP."'>".LAN_LOGIN_11."</a>";
  81      }
  82  //    echo preg_replace("/\{([^ ]*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_FOOTER);
  83      echo $tp->simpleParse($LOGIN_TABLE_FOOTER, $tVars, false);
  84  }
  85  
  86  echo "</body></html>";
  87  
  88  $sql->db_Close();
  89  
  90  ?>


Generated: Tue Aug 3 00:19:13 2010
Open Source related documentation for developers.