| [ Index ] |
|
Code source de Mantis 1.1.0rc3 |
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: manage_proj_page.php,v 1.21.2.1 2007-10-13 22:33:39 giallu Exp $ 22 # -------------------------------------------------------- 23 24 require_once ( 'core.php' ); 25 26 $t_core_path = config_get( 'core_path' ); 27 28 require_once ( $t_core_path . 'icon_api.php' ); 29 30 auth_reauthenticate(); 31 32 $f_sort = gpc_get_string( 'sort', 'name' ); 33 $f_dir = gpc_get_string( 'dir', 'ASC' ); 34 35 if ( 'ASC' == $f_dir ) { 36 $t_direction = ASCENDING; 37 } else { 38 $t_direction = DESCENDING; 39 } 40 41 html_page_top1( lang_get( 'manage_projects_link' ) ); 42 html_page_top2(); 43 44 print_manage_menu( 'manage_proj_page.php' ); 45 46 # Project Menu Form BEGIN ?> 47 <br /> 48 <table class="width100" cellspacing="1"> 49 <tr> 50 <td class="form-title" colspan="5"> 51 <?php echo lang_get( 'projects_title' ) ?> 52 <?php 53 # Check the user's global access level before allowing project creation 54 if ( access_has_global_level ( config_get( 'create_project_threshold' ) ) ) { 55 print_button( 'manage_proj_create_page.php', lang_get( 'create_new_project_link' ) ); 56 } 57 ?> 58 </td> 59 </tr> 60 <tr class="row-category"> 61 <td width="20%"> 62 <?php print_manage_project_sort_link( 'manage_proj_page.php', lang_get( 'name' ), 'name', $t_direction, $f_sort ) ?> 63 <?php print_sort_icon( $t_direction, $f_sort, 'name' ) ?> 64 </td> 65 <td width="10%"> 66 <?php print_manage_project_sort_link( 'manage_proj_page.php', lang_get( 'status' ), 'status', $t_direction, $f_sort ) ?> 67 <?php print_sort_icon( $t_direction, $f_sort, 'status' ) ?> 68 </td> 69 <td width="10%"> 70 <?php print_manage_project_sort_link( 'manage_proj_page.php', lang_get( 'enabled' ), 'enabled', $t_direction, $f_sort ) ?> 71 <?php print_sort_icon( $t_direction, $f_sort, 'enabled' ) ?> 72 </td> 73 <td width="10%"> 74 <?php print_manage_project_sort_link( 'manage_proj_page.php', lang_get( 'view_status' ), 'view_state', $t_direction, $f_sort ) ?> 75 <?php print_sort_icon( $t_direction, $f_sort, 'view_state' ) ?> 76 </td> 77 <td width="40%"> 78 <?php print_manage_project_sort_link( 'manage_proj_page.php', lang_get( 'description' ), 'description', $t_direction, $f_sort ) ?> 79 <?php print_sort_icon( $t_direction, $f_sort, 'description' ) ?> 80 </td> 81 </tr> 82 <?php 83 $t_manage_project_threshold = config_get( 'manage_project_threshold' ); 84 $t_projects = user_get_accessible_projects( auth_get_current_user_id(), true ); 85 $t_full_projects = array(); 86 foreach ( $t_projects as $t_project_id ) { 87 $t_full_projects[] = project_get_row( $t_project_id ); 88 } 89 $t_projects = multi_sort( $t_full_projects, $f_sort, $t_direction ); 90 $t_stack = array( $t_projects ); 91 92 while ( 0 < count( $t_stack ) ) { 93 $t_projects = array_shift( $t_stack ); 94 95 if ( 0 == count( $t_projects ) ) { 96 continue; 97 } 98 99 $t_project = array_shift( $t_projects ); 100 $t_project_id = $t_project['id']; 101 $t_level = count( $t_stack ); 102 103 # only print row if user has project management privileges 104 if (access_has_project_level( $t_manage_project_threshold, $t_project_id, auth_get_current_user_id() ) ) { 105 106 ?> 107 <tr <?php echo helper_alternate_class() ?>> 108 <td> 109 <a href="manage_proj_edit_page.php?project_id=<?php echo $t_project['id'] ?>"><?php echo str_repeat( "» ", $t_level ) . string_display( $t_project['name'] ) ?></a> 110 </td> 111 <td> 112 <?php echo get_enum_element( 'project_status', $t_project['status'] ) ?> 113 </td> 114 <td> 115 <?php echo trans_bool( $t_project['enabled'] ) ?> 116 </td> 117 <td> 118 <?php echo get_enum_element( 'project_view_state', $t_project['view_state'] ) ?> 119 </td> 120 <td> 121 <?php echo string_display_links( $t_project['description'] ) ?> 122 </td> 123 </tr> 124 <?php 125 } 126 $t_subprojects = project_hierarchy_get_subprojects( $t_project_id, true ); 127 128 if ( 0 < count( $t_projects ) || 0 < count( $t_subprojects ) ) { 129 array_unshift( $t_stack, $t_projects ); 130 } 131 132 if ( 0 < count( $t_subprojects ) ) { 133 $t_full_projects = array(); 134 foreach ( $t_subprojects as $t_project_id ) { 135 $t_full_projects[] = project_get_row( $t_project_id ); 136 } 137 $t_subprojects = multi_sort( $t_full_projects, $f_sort, $t_direction ); 138 array_unshift( $t_stack, $t_subprojects ); 139 } 140 } 141 ?> 142 </table> 143 144 <?php html_page_bottom1( __FILE__ ) ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
|