[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> account_prof_menu_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: account_prof_menu_page.php,v 1.39.2.1 2007-10-13 22:32:18 giallu Exp $
  22      # --------------------------------------------------------
  23  ?>
  24  <?php
  25      # This page allows users to add a new profile which is POSTed to
  26      # account_prof_add.php
  27  
  28      # Users can also manage their profiles
  29  ?>
  30  <?php
  31      if ( isset( $g_global_profiles ) ) {
  32          $g_global_profiles = true;
  33      } else {
  34          $g_global_profiles = false;
  35      }
  36  ?>
  37  <?php
  38      require_once ( 'core.php' );
  39  
  40      $t_core_path = config_get( 'core_path' );
  41  
  42      require_once( $t_core_path.'current_user_api.php' );
  43  ?>
  44  <?php
  45      auth_ensure_user_authenticated();
  46  
  47      current_user_ensure_unprotected();
  48  ?>
  49  <?php
  50      if ( $g_global_profiles ) {
  51          access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
  52      } else {
  53          access_ensure_global_level( config_get( 'add_profile_threshold' ) );
  54      }
  55  ?>
  56  <?php html_page_top1( lang_get( 'manage_profiles_link' ) ) ?>
  57  <?php html_page_top2() ?>
  58  
  59  <?php
  60      if ( $g_global_profiles ) {
  61          print_manage_menu( 'manage_prof_menu_page.php' );
  62      }
  63  ?>
  64  
  65  <?php
  66      if ( $g_global_profiles ) {
  67          $t_user_id = ALL_USERS;
  68      } else {
  69          $t_user_id = auth_get_current_user_id();
  70      }
  71  ?>
  72  
  73  <?php # Add Profile Form BEGIN ?>
  74  <br />
  75  <div align="center">
  76  <form method="post" action="account_prof_add.php">
  77  <table class="width75" cellspacing="1">
  78  <tr>
  79      <td class="form-title">
  80          <input type="hidden" name="user_id" value="<?php echo $t_user_id ?>" />
  81          <?php echo lang_get( 'add_profile_title' ) ?>
  82      </td>
  83      <td class="right">
  84      <?php
  85          if ( !$g_global_profiles ) {
  86              print_account_menu( 'account_prof_menu_page.php' );
  87          }
  88      ?>
  89      </td>
  90  </tr>
  91  <tr class="row-1">
  92      <td class="category" width="25%">
  93          <span class="required">*</span><?php echo lang_get( 'platform' ) ?>
  94      </td>
  95      <td width="75%">
  96          <input type="text" name="platform" size="32" maxlength="32" />
  97      </td>
  98  </tr>
  99  <tr class="row-2">
 100      <td class="category">
 101          <span class="required">*</span><?php echo lang_get( 'operating_system' ) ?>
 102      </td>
 103      <td>
 104          <input type="text" name="os" size="32" maxlength="32" />
 105      </td>
 106  </tr>
 107  <tr class="row-1">
 108      <td class="category">
 109          <span class="required">*</span><?php echo lang_get( 'version' ) ?>
 110      </td>
 111      <td>
 112          <input type="text" name="os_build" size="16" maxlength="16" />
 113      </td>
 114  </tr>
 115  <tr class="row-2">
 116      <td class="category">
 117          <?php echo lang_get( 'additional_description' ) ?>
 118      </td>
 119      <td>
 120          <textarea name="description" cols="60" rows="8"></textarea>
 121      </td>
 122  </tr>
 123  <tr>
 124      <td class="left">
 125          <span class="required"> * <?php echo lang_get( 'required' ) ?></span>
 126      </td>
 127      <td class="center">
 128          <input type="submit" class="button" value="<?php echo lang_get( 'add_profile_button' ) ?>" />
 129      </td>
 130  </tr>
 131  </table>
 132  </form>
 133  </div>
 134  <?php # Add Profile Form END ?>
 135  
 136  <?php # Edit or Delete Profile Form BEGIN ?>
 137  <?php 
 138      $t_profiles = profile_get_all_for_user( $t_user_id );
 139      if( $t_profiles ) { 
 140  ?>
 141  <br />
 142  <div align="center">
 143  <form method="post" action="account_prof_edit_page.php">
 144  <table class="width75" cellspacing="1">
 145  <tr>
 146      <td class="form-title" colspan="2">
 147          <?php echo lang_get( 'edit_or_delete_profiles_title' ) ?>
 148      </td>
 149  </tr>
 150  <tr class="row-1">
 151      <td class="center" colspan="2">
 152          <input type="radio" name="action" value="edit" checked="checked" /> <?php echo lang_get( 'edit_profile' ) ?>
 153  <?php
 154      if ( !$g_global_profiles ) {
 155  ?>
 156          <input type="radio" name="action" value="default" /> <?php echo lang_get( 'make_default' ) ?>
 157  <?php
 158      }
 159  ?>
 160          <input type="radio" name="action" value="delete" /> <?php echo lang_get( 'delete_profile' ) ?>
 161      </td>
 162  </tr>
 163  <tr class="row-2">
 164      <td class="category" width="25%">
 165          <?php echo lang_get( 'select_profile' ) ?>
 166      </td>
 167      <td width="75%">
 168          <select name="profile_id">
 169              <?php print_profile_option_list( $t_user_id, '', $t_profiles ) ?>
 170          </select>
 171      </td>
 172  </tr>
 173  <tr>
 174      <td class="center" colspan="2">
 175          <input type="submit" class="button" value="<?php echo lang_get( 'submit_button' ) ?>" />
 176      </td>
 177  </tr>
 178  </table>
 179  </form>
 180  </div>
 181  <?php } ?>
 182  <?php # Edit or Delete Profile Form END ?>
 183  
 184  <?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