| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
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 * @package MantisBT 19 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 20 * @link http://www.mantisbt.org 21 * 22 * @uses core.php 23 * @uses access_api.php 24 * @uses authentication_api.php 25 * @uses config_api.php 26 * @uses constant_inc.php 27 * @uses error_api.php 28 * @uses gpc_api.php 29 * @uses helper_api.php 30 * @uses html_api.php 31 * @uses lang_api.php 32 * @uses print_api.php 33 * @uses string_api.php 34 * @uses user_api.php 35 * @uses utility_api.php 36 */ 37 38 /** 39 * MantisBT Core API's 40 */ 41 require_once ( 'core.php' ); 42 require_api( 'access_api.php' ); 43 require_api( 'authentication_api.php' ); 44 require_api( 'config_api.php' ); 45 require_api( 'constant_inc.php' ); 46 require_api( 'error_api.php' ); 47 require_api( 'gpc_api.php' ); 48 require_api( 'helper_api.php' ); 49 require_api( 'html_api.php' ); 50 require_api( 'lang_api.php' ); 51 require_api( 'print_api.php' ); 52 require_api( 'string_api.php' ); 53 require_api( 'user_api.php' ); 54 require_api( 'utility_api.php' ); 55 56 auth_ensure_user_authenticated(); 57 58 # extracts the user information for the currently logged in user 59 # and prefixes it with u_ 60 $f_user_id = gpc_get_int( 'id', auth_get_current_user_id() ); 61 $row = user_get_row( $f_user_id ); 62 63 extract( $row, EXTR_PREFIX_ALL, 'u' ); 64 65 $t_can_manage = access_has_global_level( config_get( 'manage_user_threshold' ) ) && 66 access_has_global_level( $u_access_level ); 67 $t_can_see_realname = access_has_project_level( config_get( 'show_user_realname_threshold' ) ); 68 $t_can_see_email = access_has_project_level( config_get( 'show_user_email_threshold' ) ); 69 70 # In case we're using LDAP to get the email address... this will pull out 71 # that version instead of the one in the DB 72 $u_email = user_get_email( $u_id ); 73 $u_realname = user_get_realname( $u_id ); 74 75 html_page_top(); 76 ?> 77 78 <div class="section-container"> 79 <h2><?php echo lang_get( 'view_account_title' ) ?></h2> 80 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 81 <span class="display-label"><span><?php echo lang_get( 'username' ) ?></span></span> 82 <span class="display-value"><span><?php echo string_display_line( $u_username ) ?></span></span> 83 <span class="label-style"></span> 84 </div> 85 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 86 <span class="display-label"><span><?php echo lang_get( 'email' ) ?></span></span> 87 <span class="display-value"><span> 88 <?php 89 if ( ! ( $t_can_manage || $t_can_see_email ) ) { 90 print error_string(ERROR_ACCESS_DENIED); 91 } else { 92 if ( !is_blank( $u_email ) ) { 93 print_email_link( $u_email, $u_email ); 94 } else { 95 echo " - "; 96 } 97 } ?> 98 </span></span> 99 <span class="label-style"></span> 100 </div> 101 <div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"> 102 <span class="display-label"><span><?php echo lang_get( 'realname' ) ?></span></span> 103 <span class="display-value"><span><?php 104 if ( ! ( $t_can_manage || $t_can_see_realname ) ) { 105 print error_string(ERROR_ACCESS_DENIED); 106 } else { 107 echo string_display_line( $u_realname ); 108 } ?> 109 </span></span> 110 <span class="label-style"></span> 111 </div> 112 <span class="section-links"> 113 <?php if ( $t_can_manage ) { ?> 114 <span id="manage-user-link"><a href="<?php echo string_html_specialchars( 'manage_user_edit_page.php?user_id=' . $f_user_id ); ?>"><?php echo lang_get( 'manage_user' ); ?></a></span> 115 <?php } ?> 116 </span> 117 </div><?php 118 119 html_page_bottom();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |