[ 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: adm_permissions_report.php,v 1.11.14.1 2007-10-13 22:32:28 giallu Exp $ 22 # -------------------------------------------------------- 23 24 # ====================================================================== 25 # Author: Marcello Scata' <marcelloscata at users.sourceforge.net> ITALY 26 # ====================================================================== 27 28 require_once ( 'core.php' ); 29 30 access_ensure_project_level( config_get( 'view_configuration_threshold' ) ); 31 32 $t_core_path = config_get( 'core_path' ); 33 34 html_page_top1( lang_get( 'permissions_summary_report' ) ); 35 html_page_top2(); 36 37 print_manage_menu( 'adm_permissions_report.php' ); 38 print_manage_config_menu( 'adm_permissions_report.php' ); 39 40 function get_section_begin( $p_section_name ) { 41 $t_access_levels = explode_enum_string( config_get( 'access_levels_enum_string' ) ); 42 $t_output = '<table class="width100">'; 43 $t_output .= '<tr><td class="form-title" colspan="' . ( count( $t_access_levels ) + 1 ) . '">' . strtoupper( $p_section_name ) . '</td></tr>' . "\n"; 44 $t_output .= '<tr><td class="form-title" width="40%">' . lang_get( 'perm_rpt_capability' ) . '</td>'; 45 foreach( $t_access_levels as $t_access_level ) { 46 $t_entry_array = explode_enum_arr( $t_access_level ); 47 $t_output .= '<td class="form-title" style="text-align:center"> ' . get_enum_to_string( lang_get( 'access_levels_enum_string' ), $t_entry_array[0] ) . ' </td>'; 48 } 49 $t_output .= '</tr>' . "\n"; 50 51 return $t_output; 52 } 53 54 function get_capability_row( $p_caption, $p_access_level ) { 55 $t_access_levels = explode_enum_string( config_get( 'access_levels_enum_string' ) ); 56 57 $t_output = '<tr ' . helper_alternate_class() . '><td>' . string_display( $p_caption ) . '</td>'; 58 foreach( $t_access_levels as $t_access_level ) { 59 $t_entry_array = explode_enum_arr( $t_access_level ); 60 61 if ( (int)$t_entry_array[0] >= (int)$p_access_level ) { 62 $t_value = '<img src="images/ok.gif" width="20" height="15" alt="X" title="X" />'; 63 } else { 64 $t_value = ' '; 65 } 66 67 $t_output .= '<td class="center">' . $t_value . '</td>'; 68 } 69 70 $t_output .= '</tr>' . "\n"; 71 72 return $t_output; 73 } 74 75 function get_section_end() { 76 $t_output = '</table><br />' . "\n"; 77 return $t_output; 78 } 79 80 echo '<br /><br />'; 81 82 # News 83 echo get_section_begin( lang_get( 'news' ) ); 84 echo get_capability_row( lang_get( 'view_private_news' ), config_get( 'private_news_threshold' ) ); 85 echo get_capability_row( lang_get( 'manage_news' ), config_get( 'manage_news_threshold' ) ); 86 echo get_section_end(); 87 88 # Attachments 89 if( config_get( 'allow_file_upload' ) == ON ) { 90 echo get_section_begin( lang_get( 'attachments' ) ); 91 echo get_capability_row( lang_get( 'view_list_of_attachments' ), config_get( 'view_attachments_threshold' ) ); 92 echo get_capability_row( lang_get( 'download_attachments' ), config_get( 'download_attachments_threshold' ) ); 93 echo get_capability_row( lang_get( 'delete_attachments' ), config_get( 'delete_attachments_threshold' ) ); 94 echo get_capability_row( lang_get( 'upload_issue_attachments' ), config_get( 'upload_bug_file_threshold' ) ); 95 echo get_section_end(); 96 } 97 98 # Filters 99 echo get_section_begin( lang_get( 'filters' ) ); 100 echo get_capability_row( lang_get( 'save_filters' ), config_get( 'stored_query_create_threshold' ) ); 101 echo get_capability_row( lang_get( 'save_filters_as_shared' ), config_get( 'stored_query_create_shared_threshold' ) ); 102 echo get_capability_row( lang_get( 'use_saved_filters' ), config_get( 'stored_query_use_threshold' ) ); 103 echo get_section_end(); 104 105 # Projects 106 echo get_section_begin( lang_get( 'projects_link' ) ); 107 echo get_capability_row( lang_get( 'create_project' ), config_get( 'create_project_threshold' ) ); 108 echo get_capability_row( lang_get( 'delete_project' ), config_get( 'delete_project_threshold' ) ); 109 echo get_capability_row( lang_get( 'manage_projects_link' ), config_get( 'manage_project_threshold' ) ); 110 echo get_capability_row( lang_get( 'manage_user_access_to_project' ), config_get( 'project_user_threshold' ) ); 111 echo get_capability_row( lang_get( 'automatically_included_in_private_projects' ), config_get( 'private_project_threshold' ) ); 112 echo get_section_end(); 113 114 # Project Documents 115 if( config_get( 'enable_project_documentation' ) == ON ) { 116 echo get_section_begin( lang_get( 'project_documents' ) ); 117 echo get_capability_row( lang_get( 'view_project_documents' ), config_get( 'view_proj_doc_threshold' ) ); 118 echo get_capability_row( lang_get( 'upload_project_documents' ), config_get( 'upload_project_file_threshold' ) ); 119 echo get_section_end(); 120 } 121 122 # Custom Fields 123 echo get_section_begin( lang_get( 'custom_fields_setup' ) ); 124 echo get_capability_row( lang_get( 'manage_custom_field_link' ), config_get( 'manage_custom_fields_threshold' ) ); 125 echo get_capability_row( lang_get( 'link_custom_fields_to_projects' ), config_get( 'custom_field_link_threshold' ) ); 126 echo get_section_end(); 127 128 # Sponsorships 129 if( config_get( 'enable_sponsorship' ) == ON ) { 130 echo get_section_begin( lang_get( 'sponsorships' ) ); 131 echo get_capability_row( lang_get( 'view_sponsorship_details' ), config_get( 'view_sponsorship_details_threshold' ) ); 132 echo get_capability_row( lang_get( 'view_sponsorship_total' ), config_get( 'view_sponsorship_total_threshold' ) ); 133 echo get_capability_row( lang_get( 'sponsor_issue' ), config_get( 'sponsor_threshold' ) ); 134 echo get_capability_row( lang_get( 'assign_sponsored_issue' ), config_get( 'assign_sponsored_bugs_threshold' ) ); 135 echo get_capability_row( lang_get( 'handle_sponsored_issue' ), config_get( 'handle_sponsored_bugs_threshold' ) ); 136 echo get_section_end(); 137 } 138 139 # Others 140 echo get_section_begin( lang_get('others') ); 141 echo get_capability_row( lang_get( 'view' ) . ' ' . lang_get( 'summary_link' ), config_get( 'view_summary_threshold' ) ); 142 echo get_capability_row( lang_get( 'see_email_addresses_of_other_users' ), config_get( 'show_user_email_threshold' ) ); 143 echo get_capability_row( lang_get( 'send_reminders' ), config_get( 'bug_reminder_threshold' ) ); 144 echo get_capability_row( lang_get( 'add_profiles' ), config_get( 'add_profile_threshold' ) ); 145 echo get_capability_row( lang_get( 'manage_users_link' ), config_get( 'manage_user_threshold' ) ); 146 echo get_capability_row( lang_get( 'notify_of_new_user_created' ), config_get( 'notify_new_user_created_threshold_min' ) ); 147 echo get_section_end(); 148 149 html_page_bottom1( __FILE__ ); 150 ?>
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 |
![]() |