[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> bug_file_upload_inc.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: bug_file_upload_inc.php,v 1.39.2.1 2007-10-13 22:32:39 giallu Exp $
  22      # --------------------------------------------------------
  23  ?>
  24  <?php
  25      # This include file prints out the bug file upload form
  26      # It POSTs to bug_file_add.php
  27  
  28      $t_core_path = config_get( 'core_path' );
  29      require_once( $t_core_path.'file_api.php' );
  30  
  31      # check if we can allow the upload... bail out if we can't
  32      if ( ! file_allow_bug_upload( $f_bug_id ) ) {
  33          return false;
  34      }
  35  
  36      $t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
  37  ?>
  38  <br />
  39  
  40  <?php
  41      collapse_open( 'upload_form' );
  42  ?>
  43  <form method="post" enctype="multipart/form-data" action="bug_file_add.php">
  44  <table class="width100" cellspacing="1">
  45  <tr>
  46      <td class="form-title" colspan="2">
  47  <?php
  48          collapse_icon( 'upload_form' );
  49          echo lang_get( 'upload_file' ) ?>
  50      </td>
  51  </tr>
  52  <tr class="row-1">
  53      <td class="category" width="15%">
  54          <?php echo lang_get( 'select_file' ) ?><br />
  55          <?php echo '<span class="small">(' . lang_get( 'max_file_size' ) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)</span>'?>
  56      </td>
  57      <td width="85%">
  58          <input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
  59          <input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
  60          <input name="file" type="file" size="40" />
  61          <input type="submit" class="button" value="<?php echo lang_get( 'upload_file_button' ) ?>" />
  62      </td>
  63  </tr>
  64  </table>
  65  </form>
  66  <?php
  67      collapse_closed( 'upload_form' );
  68  ?>
  69  <table class="width100" cellspacing="1">
  70  <tr>
  71      <td class="form-title" colspan="2">
  72          <?php
  73              collapse_icon( 'upload_form' );
  74              echo lang_get( 'upload_file' ) ?>
  75      </td>
  76  </tr>
  77  </table>
  78  
  79  <?php
  80      collapse_end( 'upload_form' );
  81  ?>


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