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 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
24 * @uses access_api.php
25 * @uses authentication_api.php
26 * @uses config_api.php
27 * @uses current_user_api.php
36 require_once( 'core.php' );
37 require_api( 'access_api.php' );
38 require_api( 'authentication_api.php' );
39 require_api( 'config_api.php' );
40 require_api( 'current_user_api.php' );
41 require_api( 'event_api.php' );
42 require_api( 'form_api.php' );
43 require_api( 'gpc_api.php' );
44 require_api( 'html_api.php' );
45 require_api( 'lang_api.php' );
46 require_api( 'print_api.php' );
48 auth_reauthenticate();
50 access_ensure_global_level( config_get( 'create_project_threshold' ) );
54 print_manage_menu( 'manage_proj_create_page.php' );
56 $f_parent_id = gpc_get( 'parent_id', null );
61 <form method
="post" action
="manage_proj_create.php">
63 echo form_security_field( 'manage_proj_create' );
64 if ( null !== $f_parent_id ) {
65 $f_parent_id = (int) $f_parent_id;
67 <input type
="hidden" name
="parent_id" value
="<?php echo $f_parent_id ?>">
69 <table
class="width75" cellspacing
="1">
71 <td
class="form-title" colspan
="2">
73 if ( null !== $f_parent_id ) {
74 echo lang_get( 'add_subproject_title' );
76 echo lang_get( 'add_project_title' );
82 <td
class="category" width
="25%">
83 <span
class="required">*</span
><?php
echo lang_get( 'project_name' )?
>
86 <input type
="text" name
="name" size
="64" maxlength
="128" />
91 <?php
echo lang_get( 'status' ) ?
>
94 <select name
="status">
95 <?php
print_enum_string_option_list( 'project_status' ) ?
>
100 <td
class="category">
101 <?php
echo lang_get( 'view_status' ) ?
>
104 <select name
="view_state">
105 <?php
print_enum_string_option_list( 'view_state' ) ?
>
110 <td
class="category">
111 <?php
echo lang_get( 'inherit_global' ) ?
>
114 <input type
="checkbox" name
="inherit_global" checked
="checked" />
117 <?php
if ( !is_null( $f_parent_id ) ) { ?
>
119 <td
class="category">
120 <?php
echo lang_get( 'inherit_parent' ) ?
>
123 <input type
="checkbox" name
="inherit_parent" checked
="checked" />
129 if ( config_get( 'allow_file_upload' ) ) {
130 $t_default_upload_path = '';
131 # Don't reveal the absolute path to non-administrators for security reasons
132 if ( current_user_is_administrator() ) {
133 $t_default_upload_path = config_get( 'absolute_path_default_upload_folder' );
137 <td
class="category">
138 <?php
echo lang_get( 'upload_file_path' ) ?
>
141 <input type
="text" name
="file_path" size
="70" maxlength
="250" value
="<?php echo $t_default_upload_path ?>" />
148 <td
class="category">
149 <?php
echo lang_get( 'description' ) ?
>
152 <textarea name
="description" cols
="60" rows
="5"></textarea
>
156 <?php
event_signal( 'EVENT_MANAGE_PROJECT_CREATE_FORM' ) ?
>
159 <td
class="center" colspan
="2">
160 <input type
="submit" class="button" value
="<?php echo lang_get( 'add_project_button' ) ?>" />