[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This is the template that displays the user profile form. It gets POSTed to /htsrv/profile_update.php. 4 * 5 * This file is not meant to be called directly. 6 * It is meant to be called by an include in the main.page.php template. 7 * To display a feedback, you should call a stub AND pass the right parameters 8 * For example: /blogs/index.php?disp=profile 9 * Note: don't code this URL by hand, use the template functions to generate it! 10 * 11 * 12 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. 13 * See also {@link http://sourceforge.net/projects/evocms/}. 14 * 15 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}. 16 * 17 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL) 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 * PROGIDISTRI grants Francois PLANQUE the right to license 25 * PROGIDISTRI's contributions to this file and the b2evolution project 26 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 27 * }} 28 * 29 * @package evoskins 30 * 31 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 32 * @author blueyed: Daniel HAHLER 33 * @author fplanque: Francois PLANQUE. 34 * 35 * @version $Id: _profile.php,v 1.39 2007/04/26 00:11:04 fplanque Exp $ 36 */ 37 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 38 39 40 if( ! is_logged_in() ) 41 { // must be logged in! 42 echo '<p class="error">'.T_( 'You are not logged in.' ).'</p>'; 43 return; 44 } 45 // --- // 46 $redirect_to = param( 'redirect_to', 'string', '' ); 47 48 49 /** 50 * form to update the profile 51 * @var Form 52 */ 53 $ProfileForm = & new Form( $htsrv_url_sensitive.'profile_update.php', 'ProfileForm' ); 54 55 $ProfileForm->begin_form( 'bComment' ); 56 $ProfileForm->hidden( 'checkuser_id', $current_User->ID ); 57 $ProfileForm->hidden( 'redirect_to', url_rel_to_same_host($redirect_to, $htsrv_url_sensitive) ); 58 59 $ProfileForm->begin_fieldset( T_('Email communications') ); 60 61 $ProfileForm->text_input( 'newuser_email', $current_User->get( 'email' ), 40, T_('Email'), '', array( 'maxlength' => 100, 'class' => 'bComment' ) ); 62 $ProfileForm->checkbox( 'newuser_allow_msgform', $current_User->get('allow_msgform'), T_('Message form'), T_('Check this to allow receiving emails through a message form.') ); 63 $ProfileForm->checkbox( 'newuser_notify', $current_User->get( 'notify' ), T_('Notifications'), T_('Check this to receive a notification whenever one of <strong>your</strong> posts receives comments, trackbacks, etc.') ); 64 65 $ProfileForm->end_fieldset(); 66 67 $ProfileForm->begin_fieldset( T_('Identity') ); 68 69 $ProfileForm->info( T_('Login'), $current_User->get('login') ); 70 $ProfileForm->text_input( 'newuser_firstname', $current_User->get( 'firstname' ), 40, T_('First name'), '', array( 'maxlength' => 50, 'class' => 'bComment' ) ); 71 $ProfileForm->text_input( 'newuser_lastname', $current_User->get( 'lastname' ), 40, T_('Last name'), '', array( 'maxlength' => 50, 'class' => 'bComment' ) ); 72 $ProfileForm->text_input( 'newuser_nickname', $current_User->get( 'nickname' ), 40, T_('Nickname'), '', array( 'maxlength' => 50, 'class' => 'bComment' ) ); 73 $ProfileForm->select( 'newuser_idmode', $current_User->get('idmode'), array( &$current_User, 'callback_optionsForIdMode' ), T_('Identity shown'), '', 'bComment' ); 74 $ProfileForm->checkbox( 'newuser_showonline', $current_User->get( 'showonline' ), T_('Show online'), T_('Check this to be displayed as online when visiting the site.') ); 75 76 $ProfileForm->end_fieldset(); 77 78 $ProfileForm->begin_fieldset( T_('Password') ); 79 80 $ProfileForm->password_input( 'pass1', '', 16, T_('New pass'), array( 'note' => T_('Leave blank to leave the password unchanged.'), 'maxlength' => 50, 'class' => 'bComment' ) ); 81 $ProfileForm->password_input( 'pass2', '', 16, T_('Confirm'), array( 'note' => T_('Confirm new password by typing it again.') 82 .' '.sprintf( T_('Minimum length: %d characters.'), $Settings->get('user_minpwdlen') ), 'maxlength' => 50, 'class' => 'bComment' ) ); 83 84 $ProfileForm->end_fieldset(); 85 86 87 $ProfileForm->begin_fieldset( T_('Preferences') ); 88 89 $ProfileForm->select( 'newuser_locale', $current_User->get( 'locale' ), 'locale_options_return', T_('Preferred locale'), '', 'bComment' ); 90 91 $ProfileForm->end_fieldset(); 92 93 $ProfileForm->begin_fieldset( T_('Additional info') ); 94 95 $ProfileForm->info( T_('Level'), $current_User->get('level') ); 96 $ProfileForm->info( T_('Posts'), $current_User->get('num_posts') ); 97 $ProfileForm->text_input( 'newuser_url', $current_User->get( 'url' ), 40, T_('URL'), '', array( 'maxlength' => 100, 'class' => 'bComment' ) ); 98 $ProfileForm->text_input( 'newuser_icq', $current_User->get( 'icq' ), 40, T_('ICQ'), '', array( 'maxlength' => 10, 'class' => 'bComment' ) ); 99 $ProfileForm->text_input( 'newuser_aim', $current_User->get( 'aim' ), 40, T_('AOL I.M.'), '', array( 'maxlength' => 50, 'class' => 'bComment' ) ); 100 $ProfileForm->text_input( 'newuser_msn', $current_User->get( 'msn' ), 40, T_('MSN I.M.'), '', array( 'maxlength' => 100, 'class' => 'bComment' ) ); 101 $ProfileForm->text_input( 'newuser_yim', $current_User->get( 'yim' ), 40, T_('Yahoo I.M.'), '', array( 'maxlength' => 50, 'class' => 'bComment' ) ); 102 103 $ProfileForm->end_fieldset(); 104 105 $ProfileForm->buttons( array( array( '', '', T_('Update'), 'SaveButton' ), 106 array( 'reset', '', T_('Reset'), 'ResetButton' ) ) ); 107 108 $ProfileForm->end_form(); 109 110 111 /* 112 * $Log: _profile.php,v $ 113 * Revision 1.39 2007/04/26 00:11:04 fplanque 114 * (c) 2007 115 * 116 * Revision 1.38 2007/03/18 01:39:55 fplanque 117 * renamed _main.php to main.page.php to comply with 2.0 naming scheme. 118 * (more to come) 119 * 120 * Revision 1.37 2006/12/16 00:15:51 fplanque 121 * reorganized user profile page/form 122 * 123 * Revision 1.36 2006/12/16 00:12:21 fplanque 124 * reorganized user profile page/form 125 * 126 * Revision 1.35 2006/12/09 01:55:37 fplanque 127 * feel free to fill in some missing notes 128 * hint: "login" does not need a note! :P 129 * 130 * Revision 1.34 2006/12/07 23:13:14 fplanque 131 * @var needs to have only one argument: the variable type 132 * Otherwise, I can't code! 133 * 134 * Revision 1.33 2006/10/15 21:30:46 blueyed 135 * Use url_rel_to_same_host() for redirect_to params. 136 * 137 * Revision 1.32 2006/07/06 19:56:29 fplanque 138 * no message 139 * 140 * Revision 1.31 2006/06/25 23:34:15 blueyed 141 * wording pt2 142 * 143 * Revision 1.30 2006/06/25 23:23:38 blueyed 144 * wording 145 * 146 * Revision 1.29 2006/06/22 22:30:04 blueyed 147 * htsrv url for password related scripts (login, register and profile update) 148 * 149 * Revision 1.28 2006/04/11 21:22:26 fplanque 150 * partial cleanup 151 * 152 */ 153 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |