SOAP API: do not try to unserialize an invalid filter
[mantis.git] / proj_doc_add_page.php
blobe5ee8e415d36b164eeb5eeb33f3f639d92a6ae9a
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 - 2011 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 /**
34 * MantisBT Core API's
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() ) {
49 access_denied();
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' ) );
56 html_page_top();
59 <br />
60 <div>
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">
64 <tr>
65 <td class="form-title">
66 <?php echo lang_get( 'upload_file_title' ) ?>
67 </td>
68 <td class="right">
69 <?php print_doc_menu( 'proj_doc_add_page.php' ) ?>
70 </td>
71 </tr>
72 <tr class="row-1">
73 <th class="category" width="25%">
74 <span class="required">*</span><?php echo lang_get( 'title' ) ?>
75 </th>
76 <td width="75%">
77 <input type="text" name="title" size="70" maxlength="250" />
78 </td>
79 </tr>
80 <tr class="row-2">
81 <th class="category">
82 <?php echo lang_get( 'description' ) ?>
83 </th>
84 <td>
85 <textarea name="description" cols="60" rows="7"></textarea>
86 </td>
87 </tr>
88 <tr class="row-1">
89 <td class="category">
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>
93 </td>
94 <td>
95 <input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
96 <input name="file" type="file" size="70" />
97 </td>
98 </tr>
99 <tr>
100 <td class="left">
101 <span class="required"> * <?php echo lang_get( 'required' ) ?></span>
102 </td>
103 <td class="center">
104 <input type="submit" class="button" value="<?php echo lang_get( 'upload_file_button' ) ?>" />
105 </td>
106 </tr>
107 </table>
108 </form>
109 </div>
111 <?php
112 html_page_bottom();