[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/skins_adm/login/ -> _validate_form.main.php (source)

   1  <?php
   2  /**

   3   * This is the account validation form. It gets included if the user needs to validate his account.

   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-2007 by Francois PLANQUE - {@link http://fplanque.net/}

   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  /**

  34   * Include page header:

  35   */
  36  $page_title = T_('Email address validation');
  37  $page_icon = 'icon_register.gif';
  38  require dirname(__FILE__).'/_html_header.inc.php';
  39  
  40  $Form = & new Form( $htsrv_url_sensitive.'login.php', 'form_validatemail', 'post', 'fieldset' );
  41  
  42  $Form->begin_form( 'fform' );
  43  
  44  $Form->hidden( 'action', 'req_validatemail');
  45  $Form->hidden( 'redirect_to', url_rel_to_same_host($redirect_to, $htsrv_url_sensitive) );
  46  $Form->hidden( 'req_validatemail_submit', 1 ); // to know if the form has been submitted

  47  
  48  $Form->begin_fieldset( T_('Email address validation') );
  49  
  50      echo '<ol>';
  51      echo '<li>'.T_('Please confirm your email address below.').'</li>';
  52      echo '<li>'.T_('An email will be sent to this address immediately.').'</li>';
  53      echo '<li>'.T_('As soon as you receive the email, click on the link therein to activate your account.').'</li>';
  54      echo '</ol>';
  55  
  56      $Form->text_input( 'email', $email, 16, T_('Email'), '', array( 'maxlength'=>255, 'class'=>'input_text', 'required'=>true ) );
  57  
  58      $Plugins->trigger_event( 'DisplayValidateAccountFormFieldset', array( 'Form' => & $Form ) );
  59  
  60  // TODO: the form submit value is too wide (in Konqueror and most probably in IE!)

  61  $Form->end_form( array(array( 'name'=>'form_validatemail_submit', 'value'=>T_('Send me an email now!'), 'class'=>'ActionButton' )) ); // display hidden fields etc

  62  
  63  
  64  if( $current_User->group_ID == 1 )
  65  { // allow admin users to validate themselves by a single click:
  66      $Form = & new Form( $htsrv_url_sensitive.'login.php', 'form_validatemail', 'post', 'fieldset' );
  67      $Form->begin_form( 'fform' );
  68  
  69      $Form->hidden( 'action', 'validatemail');
  70      $Form->hidden( 'redirect_to', url_rel_to_same_host($redirect_to, $htsrv_url_sensitive) );
  71      $Form->hidden( 'reqID', 1 );
  72      $Form->hidden( 'sessID', $Session->ID );
  73  
  74      $Form->begin_fieldset();
  75      echo '<p>'.sprintf( T_('Since you are an admin user, you can validate your email address (%s) by a single click.' ), $current_User->email ).'</p>';
  76      // TODO: the form submit value is too wide (in Konqueror and most probably in IE!)

  77      $Form->end_form( array(array( 'name'=>'form_validatemail_admin_submit', 'value'=>T_('Activate my account!'), 'class'=>'ActionButton' )) ); // display hidden fields etc

  78  }
  79  ?>
  80  
  81  <div style="text-align:right">
  82      <?php
  83      user_logout_link();
  84      ?>
  85  </div>
  86  
  87  <?php
  88  require dirname(__FILE__).'/_html_footer.inc.php';
  89  
  90  
  91  /*

  92   * $Log: _validate_form.main.php,v $

  93   * Revision 1.1  2007/06/25 11:02:40  fplanque

  94   * MODULES (refactored MVC)

  95   *

  96   * Revision 1.14  2007/04/26 00:11:10  fplanque

  97   * (c) 2007

  98   *

  99   * Revision 1.13  2007/01/19 03:06:56  fplanque

 100   * Changed many little thinsg in the login procedure.

 101   * There may be new bugs, sorry. I tested this for several hours though.

 102   * More refactoring to be done.

 103   *

 104   * Revision 1.12  2006/12/09 01:55:36  fplanque

 105   * feel free to fill in some missing notes

 106   * hint: "login" does not need a note! :P

 107   *

 108   * Revision 1.11  2006/11/24 18:27:26  blueyed

 109   * Fixed link to b2evo CVS browsing interface in file docblocks

 110   *

 111   * Revision 1.10  2006/10/15 21:30:46  blueyed

 112   * Use url_rel_to_same_host() for redirect_to params.

 113   *

 114   * Revision 1.9  2006/07/08 17:04:18  fplanque

 115   * minor

 116   *

 117   * Revision 1.8  2006/07/08 13:33:54  blueyed

 118   * Autovalidate admin group instead of primary admin user only.

 119   * Also delegate to req_validatemail action on failure directly instead of providing a link.

 120   *

 121   * Revision 1.7  2006/07/04 23:38:11  blueyed

 122   * Validate email: admin user (#1) has an extra button to validate him/herself through the form; store multiple req_validatemail keys in the user's session.

 123   *

 124   * Revision 1.6  2006/06/25 23:34:15  blueyed

 125   * wording pt2

 126   *

 127   * Revision 1.5  2006/06/25 23:23:38  blueyed

 128   * wording

 129   *

 130   * Revision 1.4  2006/06/22 22:30:04  blueyed

 131   * htsrv url for password related scripts (login, register and profile update)

 132   *

 133   * Revision 1.3  2006/04/27 21:49:55  blueyed

 134   * todo

 135   *

 136   * Revision 1.2  2006/04/24 20:52:31  fplanque

 137   * no message

 138   *

 139   * Revision 1.1  2006/04/22 02:36:38  blueyed

 140   * Validate users on registration through email link (+cleanup around it)

 141   *

 142   */
 143  ?>


Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics