2 # MantisBT - A PHP based bugtracking system
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.
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.
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/>.
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
20 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
24 * @uses access_api.php
25 * @uses config_api.php
30 * @uses utility_api.php
36 require_once( 'core.php' );
37 require_api( 'access_api.php' );
38 require_api( 'config_api.php' );
39 require_api( 'file_api.php' );
40 require_api( 'form_api.php' );
41 require_api( 'html_api.php' );
42 require_api( 'lang_api.php' );
43 require_api( 'utility_api.php' );
45 # Check if project documentation feature is enabled.
46 if ( OFF
== config_get( 'enable_project_documentation' ) ||
47 !file_is_uploading_enabled() ||
48 !file_allow_project_upload() ) {
52 access_ensure_project_level( config_get( 'upload_project_file_threshold' ) );
54 $t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
61 <form method
="post" enctype
="multipart/form-data" action
="proj_doc_add.php">
62 <?php
echo form_security_field( 'proj_doc_add' ) ?
>
63 <table
class="width75" cellspacing
="1">
65 <td
class="form-title">
66 <?php
echo lang_get( 'upload_file_title' ) ?
>
69 <?php
print_doc_menu( 'proj_doc_add_page.php' ) ?
>
73 <th
class="category" width
="25%">
74 <span
class="required">*</span
><?php
echo lang_get( 'title' ) ?
>
77 <input type
="text" name
="title" size
="70" maxlength
="250" />
82 <?php
echo lang_get( 'description' ) ?
>
85 <textarea name
="description" cols
="60" rows
="7"></textarea
>
90 <span
class="required">*</span
><?php
echo lang_get( 'select_file' ); ?
><br
/>
91 <?php
// FIXME: hard coded "k" in here. ?>
92 <span
class="small"><?php
echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?
>k
</span
>
95 <input type
="hidden" name
="max_file_size" value
="<?php echo $t_max_file_size ?>" />
96 <input name
="file" type
="file" size
="70" />
101 <span
class="required"> * <?php
echo lang_get( 'required' ) ?
></span
>
104 <input type
="submit" class="button" value
="<?php echo lang_get( 'upload_file_button' ) ?>" />