Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / proj_doc_add_page.php
blob1591a007cb3339483d7c2d6529da6b4a505fd35a
1 <?php
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/>.
17 /**
18 * @package MantisBT
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
20 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
23 * @uses core.php
24 * @uses access_api.php
25 * @uses config_api.php
26 * @uses file_api.php
27 * @uses form_api.php
28 * @uses html_api.php
29 * @uses lang_api.php
30 * @uses utility_api.php
33 require_once( 'core.php' );
34 require_api( 'access_api.php' );
35 require_api( 'config_api.php' );
36 require_api( 'file_api.php' );
37 require_api( 'form_api.php' );
38 require_api( 'html_api.php' );
39 require_api( 'lang_api.php' );
40 require_api( 'utility_api.php' );
42 # Check if project documentation feature is enabled.
43 if ( OFF == config_get( 'enable_project_documentation' ) ||
44 !file_is_uploading_enabled() ||
45 !file_allow_project_upload() ) {
46 access_denied();
49 access_ensure_project_level( config_get( 'upload_project_file_threshold' ) );
51 $t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
53 html_page_top();
56 <br />
57 <div align="center">
58 <form method="post" enctype="multipart/form-data" action="proj_doc_add.php">
59 <?php echo form_security_field( 'proj_doc_add' ) ?>
60 <table class="width75" cellspacing="1">
61 <tr>
62 <td class="form-title">
63 <?php echo lang_get( 'upload_file_title' ) ?>
64 </td>
65 <td class="right">
66 <?php print_doc_menu( 'proj_doc_add_page.php' ) ?>
67 </td>
68 </tr>
69 <tr class="row-1">
70 <td class="category" width="25%">
71 <span class="required">*</span><?php echo lang_get( 'title' ) ?>
72 </td>
73 <td width="75%">
74 <input type="text" name="title" size="70" maxlength="250" />
75 </td>
76 </tr>
77 <tr class="row-2">
78 <td class="category">
79 <?php echo lang_get( 'description' ) ?>
80 </td>
81 <td>
82 <textarea name="description" cols="60" rows="7"></textarea>
83 </td>
84 </tr>
85 <tr class="row-1">
86 <td class="category">
87 <span class="required">*</span><?php echo lang_get( 'select_file' ); ?><br />
88 <?php // FIXME: hard coded "k" in here. ?>
89 <span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?>k</span>
90 </td>
91 <td>
92 <input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
93 <input name="file" type="file" size="70" />
94 </td>
95 </tr>
96 <tr>
97 <td class="left">
98 <span class="required"> * <?php echo lang_get( 'required' ) ?></span>
99 </td>
100 <td class="center">
101 <input type="submit" class="button" value="<?php echo lang_get( 'upload_file_button' ) ?>" />
102 </td>
103 </tr>
104 </table>
105 </form>
106 </div>
108 <?php
109 html_page_bottom();