b2evolution PHP Cross Reference Blogging Systems

Source: /skins_adm/login/_reg_form.main.php - 116 lines - 5023 bytes - Text - Print

Description: This is the registration form This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This is the registration form
   4   *
   5   * This file is part of the evoCore framework - {@link http://evocore.net/}
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
   9   *
  10   * {@internal License choice
  11   * - If you have received this file as part of a package, please find the license.txt file in
  12   *   the same folder or the closest folder above for complete license terms.
  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  14   *   then you must choose one of the following licenses before using the file:
  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  17   * }}
  18   *
  19   * {@internal Open Source relicensing agreement:
  20   * Daniel HAHLER grants Francois PLANQUE the right to license
  21   * Daniel HAHLER's contributions to this file and the b2evolution project
  22   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  23   * }}
  24   *
  25   * @package htsrv
  26   *
  27   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  28   * @author blueyed: Daniel HAHLER
  29   * @author fplanque: Francois PLANQUE.
  30   */
  31  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  32  
  33  load_class( 'regional/model/_country.class.php', 'Country' );
  34  
  35  /**
  36   * Include page header:
  37   */
  38  $page_title = T_('New account creation');
  39  $page_icon = 'register';
  40  require dirname(__FILE__).'/_html_header.inc.php';
  41  
  42  // set secure htsrv url with the same domain as the request has
  43  $secure_htsrv_url = get_secure_htsrv_url();
  44  
  45  $Form = new Form( $secure_htsrv_url.'register.php', 'register_form', 'post', 'fieldset' );
  46  
  47  $Form->begin_form( 'fform' );
  48  
  49  $Plugins->trigger_event( 'DisplayRegisterFormBefore', array( 'Form' => & $Form, 'inskin' => false ) );
  50  
  51  $Form->add_crumb( 'regform' );
  52  $Form->hidden( 'action', 'register' );
  53  $source = param( 'source', 'string', '' );
  54  $Form->hidden( 'source', $source );
  55  $Form->hidden( 'redirect_to', url_rel_to_same_host($redirect_to, $secure_htsrv_url) );
  56  
  57  $Form->begin_fieldset();
  58  
  59      $Form->text_input( $dummy_fields[ 'login' ], $login, 22, T_('Login'), T_('Choose an username.'), array( 'maxlength' => 20, 'class' => 'input_text', 'required' => true, 'input_suffix' => ' <span id="login_status"></span>' ) );
  60  
  61      $Form->password_input( $dummy_fields[ 'pass1' ], '', 18, T_('Password'), array( 'note'=>T_('Choose a password.'), 'maxlength' => 70, 'class' => 'input_text', 'required'=>true ) );
  62      $Form->password_input( $dummy_fields[ 'pass2' ], '', 18, '', array( 'note'=>T_('Please type your password again.'), 'maxlength' => 70, 'class' => 'input_text', 'required'=>true ) );
  63  
  64      $Form->text_input( $dummy_fields[ 'email' ], $email, 55, T_('Email'), '<br />'.T_('We respect your privacy. Your email will remain strictly confidential.'), array( 'maxlength'=>255, 'class'=>'input_text', 'required'=>true ) );
  65  
  66      $registration_require_country = (bool)$Settings->get('registration_require_country');
  67  
  68      if( $registration_require_country )
  69      {
  70          $CountryCache = & get_CountryCache();
  71          $Form->select_country( 'country', param( 'country', 'integer', 0 ), $CountryCache, T_('Country'), array('allow_none'=>true, 'required'=>true) );
  72      }
  73  
  74      $registration_require_firstname = (bool)$Settings->get('registration_require_firstname');
  75  
  76      if( $registration_require_firstname )
  77      {
  78          $Form->text_input( 'firstname', $firstname, 18, T_('First name'), T_('Your real first name.'), array( 'maxlength' => 50, 'class' => 'input_text', 'required' => true ) );
  79      }
  80  
  81      $registration_require_gender = $Settings->get( 'registration_require_gender' );
  82      if( $registration_require_gender != 'hidden' )
  83      { // Display a gender field if it is not hidden
  84          $Form->radio_input( 'gender', $gender, array(
  85                      array( 'value' => 'M', 'label' => T_('A man') ),
  86                      array( 'value' => 'F', 'label' => T_('A woman') ),
  87                  ), T_('I am'), array( 'required' => $registration_require_gender == 'required' ) );
  88      }
  89  
  90      if( $Settings->get( 'registration_ask_locale' ) )
  91      {
  92          $Form->select( 'locale', $locale, 'locale_options_return', T_('Locale'), T_('Preferred language') );
  93      }
  94  
  95      $Plugins->trigger_event( 'DisplayRegisterFormFieldset', array( 'Form' => & $Form, 'inskin' => false ) );
  96  
  97      $Form->buttons_input( array( array('name'=>'submit', 'value'=>T_('Register my account now!'), 'class'=>'ActionInput', 'style'=>'font-size: 120%' ) ) );
  98  
  99  $Form->end_fieldset();
 100  $Form->end_form(); // display hidden fields etc
 101  
 102  // Display javascript password strength indicator bar
 103  display_password_indicator();
 104  
 105  // Display javascript login validator
 106  display_login_validator();
 107  ?>
 108  
 109  <div style="margin-top: 1em">
 110      <a href="<?php echo $secure_htsrv_url.'login.php?redirect_to='.rawurlencode(url_rel_to_same_host($redirect_to, $secure_htsrv_url)) ?>">&laquo; <?php echo T_('Already have an account... ?') ?></a>
 111  </div>
 112  
 113  <?php
 114  require dirname(__FILE__).'/_html_footer.inc.php';
 115  
 116  ?>

title

Description

title

Description

title

Description

title

title

Body