[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> manage_user_edit_page.php (source)

   1  <?php
   2  # Mantis - a php based bugtracking system
   3  
   4  # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
   5  # Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
   6  
   7  # Mantis is free software: you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation, either version 2 of the License, or
  10  # (at your option) any later version.
  11  #
  12  # Mantis is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  #
  17  # You should have received a copy of the GNU General Public License
  18  # along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
  19  
  20      # --------------------------------------------------------
  21      # $Id: manage_user_edit_page.php,v 1.18.2.1 2007-10-13 22:33:54 giallu Exp $
  22      # --------------------------------------------------------
  23  
  24      require_once ( 'core.php' );
  25  
  26      auth_reauthenticate();
  27  
  28      access_ensure_global_level( config_get( 'manage_user_threshold' ) );
  29  
  30      $f_user_id = gpc_get_int( 'user_id' );
  31      $c_user_id = $f_user_id;
  32  
  33      $t_user = user_get_row( $f_user_id );
  34  
  35      html_page_top1();
  36      html_page_top2();
  37  
  38      print_manage_menu();
  39  ?>
  40  
  41  <br />
  42  
  43  
  44  <!-- USER INFO -->
  45  <div align="center">
  46  <form method="post" action="manage_user_update.php">
  47  <table class="width75" cellspacing="1">
  48  <!-- Title -->
  49  <tr>
  50      <td class="form-title" colspan="2">
  51          <input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
  52          <?php echo lang_get( 'edit_user_title' ) ?>
  53      </td>
  54  </tr>
  55  
  56  <!-- Username -->
  57  <tr <?php echo helper_alternate_class( 1 ) ?>>
  58      <td class="category" width="30%">
  59          <?php echo lang_get( 'username' ) ?>:
  60      </td>
  61      <td width="70%">
  62          <input type="text" size="16" maxlength="32" name="username" value="<?php echo $t_user['username'] ?>" />
  63      </td>
  64  </tr>
  65  
  66  <!-- Realname -->
  67  <tr <?php echo helper_alternate_class( 1 ) ?>>
  68      <td class="category" width="30%">
  69          <?php echo lang_get( 'realname' ) ?>:
  70      </td>
  71      <td width="70%">
  72          <input type="text" size="16" maxlength="100" name="realname" value="<?php echo string_attribute( $t_user['realname'] ) ?>" />
  73      </td>
  74  </tr>
  75  
  76  <!-- Email -->
  77  <tr <?php echo helper_alternate_class() ?>>
  78      <td class="category">
  79          <?php echo lang_get( 'email' ) ?>:
  80      </td>
  81      <td>
  82          <?php print_email_input( 'email', $t_user['email'] ) ?>
  83      </td>
  84  </tr>
  85  
  86  <!-- Access Level -->
  87  <tr <?php echo helper_alternate_class() ?>>
  88      <td class="category">
  89          <?php echo lang_get( 'access_level' ) ?>:
  90      </td>
  91      <td>
  92          <select name="access_level">
  93              <?php print_enum_string_option_list( 'access_levels', $t_user['access_level'] ) ?>
  94          </select>
  95      </td>
  96  </tr>
  97  
  98  <!-- Enabled Checkbox -->
  99  <tr <?php echo helper_alternate_class() ?>>
 100      <td class="category">
 101          <?php echo lang_get( 'enabled' ) ?>:
 102      </td>
 103      <td>
 104          <input type="checkbox" name="enabled" <?php check_checked( $t_user['enabled'], ON ); ?> />
 105      </td>
 106  </tr>
 107  
 108  <!-- Protected Checkbox -->
 109  <tr <?php echo helper_alternate_class() ?>>
 110      <td class="category">
 111          <?php echo lang_get( 'protected' ) ?>:
 112      </td>
 113      <td>
 114          <input type="checkbox" name="protected" <?php check_checked( $t_user['protected'], ON ); ?> />
 115      </td>
 116  </tr>
 117  
 118  <!-- Submit Button -->
 119  <tr>
 120      <td colspan="2" class="center">
 121          <input type="submit" class="button" value="<?php echo lang_get( 'update_user_button' ) ?>" />
 122      </td>
 123  </tr>
 124  </table>
 125  </form>
 126  </div>
 127  
 128  <br />
 129  
 130  <!-- RESET AND DELETE -->
 131  <div class="border-center">
 132  <!-- Reset Button -->
 133      <form method="post" action="manage_user_reset.php">
 134          <input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
 135          <input type="submit" class="button" value="<?php echo lang_get( 'reset_password_button' ) ?>" />
 136      </form>
 137  
 138  <!-- Delete Button -->
 139  <?php if ( !( ( ADMINISTRATOR <= $t_user['access_level'] ) && ( 1 >= user_count_level( ADMINISTRATOR ) ) ) ) { ?>
 140      <form method="post" action="manage_user_delete.php">
 141          <input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
 142          <input type="submit" class="button" value="<?php echo lang_get( 'delete_user_button' ) ?>" />
 143      </form>
 144  <?php } ?>
 145  </div>
 146  <br />
 147  <div align="center">
 148  <?php
 149      if ( ( ON == config_get( 'send_reset_password' ) ) && ( ON == config_get( 'enable_email_notification' ) ) ) {
 150          echo lang_get( 'reset_password_msg' );
 151      } else {
 152          echo lang_get( 'reset_password_msg2' );
 153      }
 154  ?>
 155  </div>
 156  
 157  
 158  <!-- PROJECT ACCESS (if permissions allow) and user is not ADMINISTRATOR -->
 159  <?php if ( access_has_global_level( config_get( 'manage_user_threshold' ) ) &&
 160      !access_has_global_level( ADMINISTRATOR, $t_user['id'] ) ){
 161  ?>
 162  <br />
 163  <div align="center">
 164  <form method="post" action="manage_user_proj_add.php">
 165  <table class="width75" cellspacing="1">
 166  <!-- Title -->
 167  <tr>
 168      <td class="form-title" colspan="2">
 169          <input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
 170          <?php echo lang_get( 'add_user_title' ) ?>
 171      </td>
 172  </tr>
 173  
 174  <!-- Assigned Projects -->
 175  <tr <?php echo helper_alternate_class( 1 ) ?> valign="top">
 176      <td class="category" width="30%">
 177          <?php echo lang_get( 'assigned_projects' ) ?>:
 178      </td>
 179      <td width="70%">
 180          <?php print_project_user_list( $t_user['id'] ) ?>
 181      </td>
 182  </tr>
 183  
 184  <!-- Unassigend Project Selection -->
 185  <tr <?php echo helper_alternate_class() ?> valign="top">
 186      <td class="category">
 187          <?php echo lang_get( 'unassigned_projects' ) ?>:
 188      </td>
 189      <td>
 190          <select name="project_id[]" multiple="multiple" size="5">
 191              <?php print_project_user_list_option_list2( $t_user['id'] ) ?>
 192          </select>
 193      </td>
 194  </tr>
 195  
 196  <!-- New Access Level -->
 197  <tr <?php echo helper_alternate_class() ?> valign="top">
 198      <td class="category">
 199          <?php echo lang_get( 'access_level' ) ?>:
 200      </td>
 201      <td>
 202          <select name="access_level">
 203          <?php
 204              # No administrator choice
 205              print_project_access_levels_option_list( config_get( 'default_new_account_access_level' ) )
 206          ?>
 207          </select>
 208      </td>
 209  </tr>
 210  
 211  <!-- Submit Buttom -->
 212  <tr>
 213      <td class="center" colspan="2">
 214          <input type="submit" class="button" value="<?php echo lang_get( 'add_user_button' ) ?>" />
 215      </td>
 216  </tr>
 217  </table>
 218  </form>
 219  </div>
 220  <?php
 221      } # End of PROJECT ACCESS conditional section
 222  ?>
 223  
 224  
 225  
 226  <!-- ACCOUNT PREFERENCES -->
 227  <?php
 228      include ( 'account_prefs_inc.php' );
 229      edit_account_prefs( $t_user['id'], false, false, 'manage_user_edit_page.php?user_id=' . $c_user_id );
 230  ?>
 231  
 232  <?php html_page_bottom1( __FILE__ ) ?>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics