[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/ -> account_prof_edit_page.php (source)

   1  <?php
   2  # MantisBT - A PHP based bugtracking system
   3  
   4  # MantisBT is free software: you can redistribute it and/or modify
   5  # it under the terms of the GNU General Public License as published by
   6  # the Free Software Foundation, either version 2 of the License, or
   7  # (at your option) any later version.
   8  #
   9  # MantisBT is distributed in the hope that it will be useful,
  10  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  # GNU General Public License for more details.
  13  #
  14  # You should have received a copy of the GNU General Public License
  15  # along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * This page allows the user to edit his/her profile
  19   * Changes get POSTed to account_prof_update.php
  20   *
  21   * @package MantisBT
  22   * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
  23   * @copyright Copyright (C) 2002 - 2010  MantisBT Team - mantisbt-dev@lists.sourceforge.net
  24   * @link http://www.mantisbt.org
  25   *
  26   * @uses core.php
  27   * @uses access_api.php
  28   * @uses authentication_api.php
  29   * @uses config_api.php
  30   * @uses constant_inc.php
  31   * @uses current_user_api.php
  32   * @uses form_api.php
  33   * @uses gpc_api.php
  34   * @uses html_api.php
  35   * @uses lang_api.php
  36   * @uses profile_api.php
  37   * @uses string_api.php
  38   */
  39  
  40  require_once ( 'core.php' );
  41  require_api( 'access_api.php' );
  42  require_api( 'authentication_api.php' );
  43  require_api( 'config_api.php' );
  44  require_api( 'constant_inc.php' );
  45  require_api( 'current_user_api.php' );
  46  require_api( 'form_api.php' );
  47  require_api( 'gpc_api.php' );
  48  require_api( 'html_api.php' );
  49  require_api( 'lang_api.php' );
  50  require_api( 'profile_api.php' );
  51  require_api( 'string_api.php' );
  52  
  53  if ( !config_get( 'enable_profiles' ) ) {
  54      trigger_error( ERROR_ACCESS_DENIED, ERROR );
  55  }
  56  
  57  auth_ensure_user_authenticated();
  58  
  59  current_user_ensure_unprotected();
  60  
  61  $f_profile_id    = gpc_get_int( 'profile_id' );
  62  
  63  if ( profile_is_global( $f_profile_id ) ) {
  64      access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
  65  
  66      $row = profile_get_row( ALL_USERS, $f_profile_id );
  67  } else {
  68      $row = profile_get_row( auth_get_current_user_id(), $f_profile_id );
  69  }
  70  
  71  extract( $row, EXTR_PREFIX_ALL, 'v' );
  72  
  73  html_page_top();
  74  
  75  if ( profile_is_global( $f_profile_id ) ) {
  76      print_manage_menu();
  77  }
  78  ?>
  79  
  80  <?php # Edit Profile Form BEGIN ?>
  81  <br />
  82  <div align="center">
  83  <form method="post" action="account_prof_update.php">
  84  <?php  echo form_security_field( 'profile_update' )?>
  85  <input type="hidden" name="action" value="update" />
  86  <table class="width75" cellspacing="1">
  87  <tr>
  88      <td class="form-title">
  89          <input type="hidden" name="profile_id" value="<?php echo $v_id ?>" />
  90          <?php echo lang_get( 'edit_profile_title' ) ?>
  91      </td>
  92      <td class="right">
  93          <?php
  94              if ( !profile_is_global( $f_profile_id ) ) {
  95                  print_account_menu();
  96              }
  97          ?>
  98      </td>
  99  </tr>
 100  <tr class="row-1">
 101      <td class="category" width="25%">
 102          <span class="required">*</span><?php echo lang_get( 'platform' ) ?>
 103      </td>
 104      <td width="75%">
 105          <input type="text" name="platform" size="32" maxlength="32" value="<?php echo string_attribute( $v_platform ) ?>" />
 106      </td>
 107  </tr>
 108  <tr class="row-2">
 109      <td class="category">
 110          <span class="required">*</span><?php echo lang_get( 'operating_system' ) ?>
 111      </td>
 112      <td>
 113          <input type="text" name="os" size="32" maxlength="32" value="<?php echo string_attribute( $v_os ) ?>" />
 114      </td>
 115  </tr>
 116  <tr class="row-1">
 117      <td class="category">
 118          <span class="required">*</span><?php echo lang_get( 'os_version' ) ?>
 119      </td>
 120      <td>
 121          <input type="text" name="os_build" size="16" maxlength="16" value="<?php echo string_attribute( $v_os_build ) ?>" />
 122      </td>
 123  </tr>
 124  <tr class="row-2">
 125      <td class="category">
 126          <?php echo lang_get( 'additional_description' ) ?>
 127      </td>
 128      <td>
 129          <textarea name="description" cols="60" rows="8"><?php echo string_textarea( $v_description ) ?></textarea>
 130      </td>
 131  </tr>
 132  <tr>
 133      <td class="center" colspan="2">
 134          <input type="submit" class="button" value="<?php echo lang_get( 'update_profile_button' ) ?>" />
 135      </td>
 136  </tr>
 137  </table>
 138  </form>
 139  </div>
 140  <?php
 141  html_page_bottom();


Generated: Sat Mar 6 17:17:35 2010 Cross-referenced by PHPXref 0.7