b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: evoskins ] [ index: evoskins ] [ all elements ]

Source for file _profile.php

Documentation is available at _profile.php

  1. <?php
  2.     /**
  3.      * This is the template that displays the user profile form
  4.      *
  5.      * This file is not meant to be called directly.
  6.      * It is meant to be called by an include in the _main.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.      * b2evolution - {@link http://b2evolution.net/}
  12.      * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  13.      * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  14.      *
  15.      * @package evoskins
  16.      */
  17.     if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  18.  
  19.     ifis_logged_in() )
  20.     {    // must be logged in!
  21.         echo '<p>'T_'You are not logged in.' )'</p>';
  22.         return;
  23.     }
  24.     // --- //
  25.     param'redirect_to''string''');
  26. ?>
  27.  
  28.     <!-- form to add a comment -->
  29.     <?php form_formstart$htsrv_url.'/profile_update.php''bComment''''post' )?>
  30.         <input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
  31.         <input type="hidden" name="redirect_to" value="<?php echo $redirect_to ?>" />
  32.  
  33.         <?php
  34.             form_infoT_('Login')$current_User->dget('login')T_('ID').': '.$current_User->ID );
  35.  
  36.             form_infoT_('Level')$current_User->dget('level') );
  37.  
  38.             form_infoT_('Posts')$current_User->dget('num_posts') );
  39.         
  40.             form_text'newuser_firstname'get_user_info'firstname' )40T_('First name')''50'bComment' );
  41.             form_text'newuser_lastname'get_user_info'lastname' )40T_('Last name')''50'bComment' );
  42.             form_text'newuser_nickname'get_user_info'nickname' )40T_('Nickname')''50'bComment' );
  43.         ?>
  44.  
  45.         <fieldset>
  46.             <div class="label"><label for="newuser_idmode"><?php echo T_('Identity shown'?>:</label></div>
  47.             <div class="input">
  48.                 <?php $idmode get_user_info'idmode' )?>
  49.                 <select name="newuser_idmode" id="newuser_idmode" class="bComment">
  50.                     <option value="nickname"<?php if $idmode == 'nickname' echo ' selected="selected"'?>><?php ifuser_info'nickname''raw'false != '' user_info'nickname''htmlhead' )else echo '['.T_('Nickname').']' ?></option>
  51.                     <option value="login"<?php if $idmode == 'login' echo ' selected="selected"'?>><?php ifuser_info'login''raw'false != '' user_info'login''htmlhead' )else echo '['.T_('Login').']' ?></option>
  52.                     <option value="firstname"<?php if $idmode == 'firstname' echo ' selected="selected"'?>><?php ifuser_info'firstname''raw'false != '' user_info'firstname''htmlhead' )else echo '['.T_('First name').']' ?></option>
  53.                     <option value="lastname"<?php if $idmode == 'lastname' echo ' selected="selected"'?>><?php ifuser_info'lastname''raw'false != '' user_info'lastname''htmlhead' )else echo '['.T_('Last name').']' ?></option>
  54.                     <option value="namefl"<?php if $idmode == 'namefl' echo ' selected="selected"'?>><?php ifuser_info'firstname''raw'false != '' user_info'firstname''htmlhead' )else echo '['.T_('First name').']';  echo ' 'ifuser_info'lastname''raw'false != '' user_info'lastname''htmlhead' )else echo '['.T_('Last name').']' ?></option>
  55.                     <option value="namelf"<?php if $idmode == 'namelf' echo ' selected="selected"'?>><?php ifuser_info'lastname''raw'false != '' user_info'lastname''htmlhead' )else echo '['.T_('Last name').']';  echo ' 'ifuser_info'firstname''raw'false != '' user_info'firstname''htmlhead' )else echo '['.T_('First name').']' ?></option>
  56.                 </select>
  57.         </div>
  58.         </fieldset>
  59.  
  60.         <?php
  61.             form_select'newuser_locale'get_user_info'locale' )'locale_options'T_('Locale')'''bComment' );
  62.             form_text'newuser_email'get_user_info'email' )40T_('Email')''100'bComment' );
  63.             form_text'newuser_url'get_user_info'url' )40T_('URL')''100'bComment' );
  64.             form_text'newuser_icq'get_user_info'icq' )40T_('ICQ')''10'bComment' );
  65.             form_text'newuser_aim'get_user_info'aim' )40T_('AOL I.M.')''50'bComment' );
  66.             form_text'newuser_msn'get_user_info'msn' )40T_('MSN I.M.')''100'bComment' );
  67.             form_text'newuser_yim'get_user_info'yim' )40T_('Yahoo I.M.')''50'bComment' );
  68.  
  69.             form_checkbox'newuser_notify'get_user_info'notify' )T_('Notifications')T_('Check this to receive notification whenever one of your posts receives comments, trackbacks, etc.') );
  70.         ?>
  71.  
  72.         <fieldset>
  73.             <div class="label"><label for="pass1"><?php echo T_('New password'?>:</label></div>
  74.             <div class="input"><input type="password" name="pass1" id="pass1" value="" size="16" class="bComment" /></div>
  75.         </fieldset>
  76.  
  77.         <fieldset>
  78.             <div class="label"><label for="pass2"><?php echo T_('Confirm new password'?>:</label></div>
  79.             <div class="input"><input type="password" name="pass2" id="pass2" value="" size="16" class="bComment" /></div>
  80.         </fieldset>
  81.  
  82.         <fieldset>
  83.             <div class="input">
  84.                 <input type="submit" class="submit" name="submit" value="<?php echo T_('Update'?>" />
  85.                 <input type="reset" class="reset" value="<?php echo T_('Reset'?>" />
  86.             </div>
  87.         </fieldset>
  88.  
  89.         <div class="clear"></div>
  90.  
  91.     </form>

Documentation generated on Tue, 20 May 2008 01:55:38 +0200 by phpDocumentor 1.4.2