[ 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_edit_page.php,v 1.104.2.2 2007-10-19 07:25:59 vboctor Exp $ 22 # -------------------------------------------------------- 23 24 require_once ( 'core.php' ); 25 26 $t_core_path = config_get( 'core_path' ); 27 28 require_once( $t_core_path . 'category_api.php' ); 29 require_once( $t_core_path . 'version_api.php' ); 30 require_once( $t_core_path . 'custom_field_api.php' ); 31 require_once ( $t_core_path . 'icon_api.php' ); 32 33 auth_reauthenticate(); 34 35 $f_project_id = gpc_get_int( 'project_id' ); 36 37 access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id ); 38 39 $row = project_get_row( $f_project_id ); 40 41 html_page_top1( project_get_field( $f_project_id, 'name' ) ); 42 html_page_top2(); 43 44 print_manage_menu( 'manage_proj_edit_page.php' ); 45 ?> 46 <br /> 47 48 49 <!-- PROJECT PROPERTIES --> 50 <div align="center"> 51 <form method="post" action="manage_proj_update.php"> 52 <table class="width75" cellspacing="1"> 53 54 <!-- Title --> 55 <tr> 56 <td class="form-title" colspan="2"> 57 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 58 <?php echo lang_get( 'edit_project_title' ) ?> 59 </td> 60 </tr> 61 62 <!-- Name --> 63 <tr <?php echo helper_alternate_class() ?>> 64 <td class="category" width="25%"> 65 <?php echo lang_get( 'project_name' ) ?> 66 </td> 67 <td width="75%"> 68 <input type="text" name="name" size="50" maxlength="128" value="<?php echo string_attribute( $row['name'] ) ?>" /> 69 </td> 70 </tr> 71 72 <!-- Status --> 73 <tr <?php echo helper_alternate_class() ?>> 74 <td class="category"> 75 <?php echo lang_get( 'status' ) ?> 76 </td> 77 <td> 78 <select name="status"> 79 <?php print_enum_string_option_list( 'project_status', $row['status'] ) ?> 80 </select> 81 </td> 82 </tr> 83 84 <!-- Enabled --> 85 <tr <?php echo helper_alternate_class() ?>> 86 <td class="category"> 87 <?php echo lang_get( 'enabled' ) ?> 88 </td> 89 <td> 90 <input type="checkbox" name="enabled" <?php check_checked( $row['enabled'], ON ); ?> /> 91 </td> 92 </tr> 93 94 <!-- View Status (public/private) --> 95 <tr <?php echo helper_alternate_class() ?>> 96 <td class="category"> 97 <?php echo lang_get( 'view_status' ) ?> 98 </td> 99 <td> 100 <select name="view_state"> 101 <?php print_enum_string_option_list( 'view_state', $row['view_state']) ?> 102 </select> 103 </td> 104 </tr> 105 106 <!-- File upload path (if uploading is enabled) --> 107 <?php if ( file_is_uploading_enabled() ) { ?> 108 <tr <?php echo helper_alternate_class() ?>> 109 <td class="category"> 110 <?php echo lang_get( 'upload_file_path' ) ?> 111 </td> 112 <td> 113 <input type="text" name="file_path" size="50" maxlength="250" value="<?php echo string_attribute( $row['file_path'] ) ?>" /> 114 </td> 115 </tr> 116 <?php } ?> 117 118 <!-- Description --> 119 <tr <?php echo helper_alternate_class() ?>> 120 <td class="category"> 121 <?php echo lang_get( 'description' ) ?> 122 </td> 123 <td> 124 <textarea name="description" cols="60" rows="5"><?php echo string_textarea( $row['description'] ) ?></textarea> 125 </td> 126 </tr> 127 128 <!-- Submit Button --> 129 <tr> 130 <td> </td> 131 <td> 132 <input type="submit" class="button" value="<?php echo lang_get( 'update_project_button' ) ?>" /> 133 </td> 134 </tr> 135 </table> 136 </form> 137 </div> 138 139 <br /> 140 141 <!-- PROJECT DELETE --> 142 <?php 143 # You must have global permissions to delete projects 144 if ( access_has_global_level ( config_get( 'delete_project_threshold' ) ) ) { ?> 145 <div class="border-center"> 146 <form method="post" action="manage_proj_delete.php"> 147 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 148 <input type="submit" class="button" value="<?php echo lang_get( 'delete_project_button' ) ?>" /> 149 </form> 150 </div> 151 <?php } ?> 152 153 <br /> 154 155 <?php 156 # reset the class counter 157 helper_alternate_class( 0 ); 158 ?> 159 160 <!-- SUBPROJECTS --> 161 <div align="center"> 162 <table class="width75" cellspacing="1"> 163 164 <!-- Title --> 165 <tr> 166 <td class="form-title" colspan="6"> 167 <?php echo lang_get( 'subprojects' ) ?> 168 <?php 169 # Check the user's global access level before allowing project creation 170 if ( access_has_global_level ( config_get( 'create_project_threshold' ) ) ) { 171 print_button( 'manage_proj_create_page.php?parent_id=' . $f_project_id, lang_get( 'create_new_subproject_link' ) ); 172 } 173 ?> 174 </td> 175 </tr> 176 177 <!-- Subprojects --> 178 <?php 179 $t_subproject_ids = current_user_get_accessible_subprojects( $f_project_id, /* show_disabled */ true ); 180 181 if ( Array() != $t_subproject_ids ) { 182 ?> 183 <tr class="row-category"> 184 <td width="20%"> 185 <?php echo lang_get( 'name' ) ?> 186 </td> 187 <td width="10%"> 188 <?php echo lang_get( 'status' ) ?> 189 </td> 190 <td width="10%"> 191 <?php echo lang_get( 'enabled' ) ?> 192 </td> 193 <td width="10%"> 194 <?php echo lang_get( 'view_status' ) ?> 195 </td> 196 <td width="30%"> 197 <?php echo lang_get( 'description' ) ?> 198 </td> 199 <td width="20%"> 200 <?php echo lang_get( 'actions' ) ?> 201 </td> 202 </tr> 203 204 <?php 205 foreach ( $t_subproject_ids as $t_subproject_id ) { 206 $t_subproject = project_get_row( $t_subproject_id ); 207 ?> 208 <tr <?php echo helper_alternate_class() ?>> 209 <td> 210 <a href="manage_proj_edit_page.php?project_id=<?php echo $t_subproject['id'] ?>"><?php echo string_display( $t_subproject['name'] ) ?></a> 211 </td> 212 <td> 213 <?php echo get_enum_element( 'project_status', $t_subproject['status'] ) ?> 214 </td> 215 <td> 216 <?php echo trans_bool( $t_subproject['enabled'] ) ?> 217 </td> 218 <td> 219 <?php echo get_enum_element( 'project_view_state', $t_subproject['view_state'] ) ?> 220 </td> 221 <td> 222 <?php echo string_display_links( $t_subproject['description'] ) ?> 223 </td> 224 <td class="center"> 225 <?php 226 print_button( 'manage_proj_edit_page.php?project_id=' . $t_subproject['id'], lang_get( 'edit_link' ) ); 227 echo ' '; 228 print_button( 'manage_proj_subproj_delete.php?project_id=' . $f_project_id . '&subproject_id=' . $t_subproject['id'], lang_get( 'unlink_link' ) ); 229 ?> 230 </td> 231 </tr> 232 <?php 233 } # End of foreach loop over subprojects 234 } # End of hiding subproject listing if there are no subprojects 235 ?> 236 237 <!-- Add subproject --> 238 <tr> 239 <td class="left" colspan="2"> 240 <form method="post" action="manage_proj_subproj_add.php"> 241 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 242 <select name="subproject_id"> 243 <?php 244 $t_all_subprojects = project_hierarchy_get_subprojects( $f_project_id, /* $p_show_disabled */ true ); 245 $t_all_subprojects[] = $f_project_id; 246 $t_manage_access = config_get( 'manage_project_threshold' ); 247 248 $t_projects = project_get_all_rows(); 249 250 $t_projects = multi_sort( $t_projects, 'name', ASCENDING ); 251 252 foreach ( $t_projects as $t_project ) { 253 if ( in_array( $t_project['id'], $t_all_subprojects ) || 254 in_array( $f_project_id, project_hierarchy_get_all_subprojects( $t_project['id'] ) ) || 255 ! access_has_project_level( $t_manage_access, $t_project['id'] ) ) { 256 continue; 257 } 258 ?> 259 <option value="<?php echo $t_project['id'] ?>"><?php echo string_attribute( $t_project['name'] ) ?></option> 260 <?php 261 } # End looping over projects 262 ?> 263 </select> 264 <input type="submit" value="<?php echo lang_get('add_subproject'); ?>"> 265 </form> 266 </td> 267 </tr> 268 269 </table> 270 </div> 271 272 <br /> 273 274 <!-- PROJECT CATEGORIES --> 275 <a name="categories" /> 276 <div align="center"> 277 <table class="width75" cellspacing="1"> 278 279 <!-- Title --> 280 <tr> 281 <td class="form-title" colspan="3"> 282 <?php echo lang_get( 'categories' ) ?> 283 </td> 284 </tr> 285 <?php 286 $t_categories = category_get_all_rows( $f_project_id ); 287 288 if ( count( $t_categories ) > 0 ) { 289 ?> 290 <tr class="row-category"> 291 <td> 292 <?php echo lang_get( 'category' ) ?> 293 </td> 294 <td> 295 <?php echo lang_get( 'assign_to' ) ?> 296 </td> 297 <td class="center"> 298 <?php echo lang_get( 'actions' ) ?> 299 </td> 300 </tr> 301 <?php 302 } 303 304 foreach ( $t_categories as $t_category ) { 305 $t_name = $t_category['category']; 306 307 if ( NO_USER != $t_category['user_id'] && user_exists( $t_category['user_id'] )) { 308 $t_user_name = user_get_name( $t_category['user_id'] ); 309 } else { 310 $t_user_name = ''; 311 } 312 ?> 313 <!-- Repeated Info Row --> 314 <tr <?php echo helper_alternate_class() ?>> 315 <td> 316 <?php echo string_display( $t_name ) ?> 317 </td> 318 <td> 319 <?php echo $t_user_name ?> 320 </td> 321 <td class="center"> 322 <?php 323 $t_name = urlencode( $t_name ); 324 325 print_button( 'manage_proj_cat_edit_page.php?project_id=' . $f_project_id . '&category=' . $t_name, lang_get( 'edit_link' ) ); 326 echo ' '; 327 print_button( 'manage_proj_cat_delete.php?project_id=' . $f_project_id . '&category=' . $t_name, lang_get( 'delete_link' ) ); 328 ?> 329 </td> 330 </tr> 331 <?php 332 } # end for loop 333 ?> 334 335 <!-- Add Category Form --> 336 <tr> 337 <td class="left" colspan="3"> 338 <form method="post" action="manage_proj_cat_add.php"> 339 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 340 <input type="text" name="category" size="32" maxlength="64" /> 341 <input type="submit" class="button" value="<?php echo lang_get( 'add_category_button' ) ?>" /> 342 </form> 343 </td> 344 </tr> 345 346 <!-- Copy Categories Form --> 347 <tr> 348 <td class="left" colspan="3"> 349 <form method="post" action="manage_proj_cat_copy.php"> 350 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 351 <select name="other_project_id"> 352 <?php print_project_option_list( null, false, $f_project_id ); ?> 353 </select> 354 <input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_categories_from' ) ?>" /> 355 <input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_categories_to' ) ?>" /> 356 </form> 357 </td> 358 </tr> 359 </table> 360 361 <br /> 362 363 <?php 364 # reset the class counter 365 helper_alternate_class( 0 ); 366 ?> 367 368 <!-- PROJECT VERSIONS --> 369 <a name="versions" /> 370 <table class="width75" cellspacing="1"> 371 372 <!-- Title --> 373 <tr> 374 <td class="form-title" colspan="3"> 375 <?php echo lang_get( 'versions' ) ?> 376 </td> 377 </tr> 378 <?php 379 $t_versions = version_get_all_rows( $f_project_id ); 380 381 if ( count( $t_versions ) > 0 ) { 382 ?> 383 <tr class="row-category"> 384 <td> 385 <?php echo lang_get( 'version' ) ?> 386 </td> 387 <td class="center"> 388 <?php echo lang_get( 'released' ) ?> 389 </td> 390 <td class="center"> 391 <?php echo lang_get( 'timestamp' ) ?> 392 </td> 393 <td class="center"> 394 <?php echo lang_get( 'actions' ) ?> 395 </td> 396 </tr> 397 <?php 398 } 399 400 foreach ( $t_versions as $t_version ) { 401 $t_name = $t_version['version']; 402 $t_released = $t_version['released']; 403 $t_date_order = $t_version['date_order']; 404 $t_date_formatted = string_format_complete_date( $t_version['date_order'] ); 405 ?> 406 <!-- Repeated Info Rows --> 407 <tr <?php echo helper_alternate_class() ?>> 408 <td> 409 <?php echo string_display( $t_name ) ?> 410 </td> 411 <td class="center"> 412 <?php echo trans_bool( $t_released ) ?> 413 </td> 414 <td class="center"> 415 <?php echo $t_date_formatted ?> 416 </td> 417 <td class="center"> 418 <?php 419 $t_version_id = version_get_id( $t_name, $f_project_id ); 420 421 print_button( 'manage_proj_ver_edit_page.php?version_id=' . $t_version_id, lang_get( 'edit_link' ) ); 422 echo ' '; 423 print_button( 'manage_proj_ver_delete.php?version_id=' . $t_version_id, lang_get( 'delete_link' ) ); 424 ?> 425 </td> 426 </tr> 427 <?php 428 } # end for loop 429 ?> 430 431 <!-- Version Add Form --> 432 <tr> 433 <td class="left" colspan="3"> 434 <form method="post" action="manage_proj_ver_add.php"> 435 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 436 <input type="text" name="version" size="32" maxlength="64" /> 437 <input type="submit" name="add_version" class="button" value="<?php echo lang_get( 'add_version_button' ) ?>" /> 438 <input type="submit" name="add_and_edit_version" class="button" value="<?php echo lang_get( 'add_and_edit_version_button' ) ?>" /> 439 </form> 440 </td> 441 </tr> 442 <tr> 443 <td class="left" colspan="3"> 444 <form method="post" action="manage_proj_ver_copy.php"> 445 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 446 <select name="other_project_id"> 447 <?php print_project_option_list( null, false, $f_project_id ); ?> 448 </select> 449 <input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_versions_from' ) ?>" /> 450 <input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_versions_to' ) ?>" /> 451 </form> 452 </td> 453 </tr> 454 </table> 455 </div> 456 457 458 <?php 459 # reset the class counter 460 helper_alternate_class( 0 ); 461 ?> 462 463 <!-- PROJECT CUSTOM FIELD --> 464 <a name="customfields" /> 465 466 <?php 467 # You need either global permissions or project-specific permissions to link 468 # custom fields 469 if ( access_has_project_level( config_get( 'custom_field_link_threshold' ), $f_project_id ) && 470 ( count( custom_field_get_ids() ) > 0 ) ) { 471 ?> 472 <br /> 473 <div align="center"> 474 <table class="width75" cellspacing="1"> 475 <tr> 476 <td class="form-title" colspan="3"> 477 <?php echo lang_get( 'custom_fields_setup' ) ?> 478 </td> 479 </tr> 480 <?php 481 $t_custom_fields = custom_field_get_linked_ids( $f_project_id ); 482 483 if ( count( $t_custom_fields ) > 0 ) { 484 ?> 485 <tr class="row-category"> 486 <td width="50%"> 487 <?php echo lang_get( 'custom_field' ) ?> 488 </td> 489 <td width="25%"> 490 <?php echo lang_get( 'custom_field_sequence' ) ?> 491 </td> 492 <td class="center" width="25%"> 493 <?php echo lang_get( 'actions' ); ?> 494 </td> 495 </tr> 496 <?php 497 $t_index = 0; 498 499 foreach( $t_custom_fields as $t_field_id ) { 500 $t_desc = custom_field_get_definition( $t_field_id ); 501 ?> 502 <tr <?php echo helper_alternate_class() ?>> 503 <td> 504 <?php echo string_display( $t_desc['name'] ) ?> 505 </td> 506 <td> 507 <form method="post" action="manage_proj_custom_field_update.php"> 508 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 509 <input type="hidden" name="field_id" value="<?php echo $t_field_id ?>" /> 510 <input type="text" name="sequence" value="<?php echo custom_field_get_sequence( $t_field_id, $f_project_id ) ?>" size="2" /> 511 <input type="submit" class="button-small" value="<?php echo lang_get( 'update' ) ?>" /> 512 </form> 513 <?php 514 $t_index++; 515 ?> 516 </td> 517 <td class="center"> 518 <?php 519 # You need global permissions to edit custom field defs 520 print_button( "manage_proj_custom_field_remove.php?field_id={$t_field_id}&project_id={$f_project_id}", lang_get( 'remove_link' ) ); 521 ?> 522 </td> 523 </tr> 524 <?php 525 } # end for loop 526 } 527 ?> 528 <tr> 529 <td class="left" colspan="3"> 530 <form method="post" action="manage_proj_custom_field_add_existing.php"> 531 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 532 <select name="field_id"> 533 <?php 534 $t_custom_fields = custom_field_get_ids(); 535 536 foreach( $t_custom_fields as $t_field_id ) 537 { 538 if( !custom_field_is_linked( $t_field_id, $f_project_id ) ) { 539 $t_desc = custom_field_get_definition( $t_field_id ); 540 echo "<option value=\"$t_field_id\">" . string_attribute( $t_desc['name'] ) . '</option>' ; 541 } 542 } 543 ?> 544 </select> 545 <input type="submit" class="button" value="<?php echo lang_get( 'add_existing_custom_field' ) ?>" /> 546 </form> 547 </td> 548 </tr> 549 <tr> 550 <td class="left" colspan="3"> 551 <form method="post" action="manage_proj_custom_field_copy.php"> 552 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 553 <select name="other_project_id"> 554 <?php print_project_option_list( null, false, $f_project_id ); ?> 555 </select> 556 <input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_from' ) ?>" /> 557 <input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_to' ) ?>" /> 558 </form> 559 </td> 560 </tr> 561 </table> 562 </div> 563 <?php 564 } 565 ?> 566 567 568 <!-- PROJECT VIEW STATUS --> 569 <br /> 570 <div align="center"> 571 <table class="width75" cellspacing="1"> 572 <tr> 573 <td class="center"> 574 <?php 575 if ( VS_PUBLIC == project_get_field( $f_project_id, 'view_state' ) ) { 576 echo lang_get( 'public_project_msg' ); 577 } else { 578 echo lang_get( 'private_project_msg' ); 579 } 580 ?> 581 </td> 582 </tr> 583 </table> 584 </div> 585 586 587 <!-- USER MANAGEMENT (ADD) --> 588 <?php 589 # We want to allow people with global permissions and people with high enough 590 # permissions on the project we are editing 591 if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) { 592 ?> 593 <br /> 594 <div align="center"> 595 <table class="width75" cellspacing="1"> 596 <form method="post" action="manage_proj_user_add.php"> 597 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 598 <tr> 599 <td class="form-title" colspan="5"> 600 <?php echo lang_get( 'add_user_title' ) ?> 601 </td> 602 </tr> 603 <tr class="row-1" valign="top"> 604 <td class="category"> 605 <?php echo lang_get( 'username' ) ?> 606 </td> 607 <td class="category"> 608 <?php echo lang_get( 'access_level' ) ?> 609 </td> 610 <td class="category"> </td> 611 </tr> 612 <tr class="row-1" valign="top"> 613 <td> 614 <select name="user_id[]" multiple="multiple" size="10"> 615 <?php print_project_user_list_option_list( $f_project_id ) ?> 616 </select> 617 </td> 618 <td> 619 <select name="access_level"> 620 <?php # only access levels that are less than or equal current user access level for current project ?> 621 <?php print_project_access_levels_option_list( config_get( 'default_new_account_access_level' ), $f_project_id ) ?> 622 </select> 623 </td> 624 <td> 625 <input type="submit" class="button" value="<?php echo lang_get( 'add_user_button' ) ?>" /> 626 </td> 627 </tr> 628 </form> 629 <!-- Copy Users Form --> 630 <form method="post" action="manage_proj_user_copy.php"> 631 <tr> 632 <td class="left" colspan="3"> 633 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" /> 634 <select name="other_project_id"> 635 <?php print_project_option_list( null, false, $f_project_id ); ?> 636 </select> 637 <input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_users_from' ) ?>" /> 638 <input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_users_to' ) ?>" /> 639 </td> 640 </tr> 641 </form> 642 </table> 643 </div> 644 <?php 645 } 646 ?> 647 648 649 <!-- LIST OF USERS --> 650 <br /> 651 <div align="center"> 652 <table class="width75" cellspacing="1"> 653 <tr> 654 <td class="form-title" colspan="4"> 655 <?php echo lang_get( 'manage_accounts_title' ) ?> 656 </td> 657 </tr> 658 <tr class="row-category"> 659 <td> 660 <?php echo lang_get( 'username' ) ?> 661 </td> 662 <td> 663 <?php echo lang_get( 'email' ) ?> 664 </td> 665 <td> 666 <?php echo lang_get( 'access_level' ) ?> 667 </td> 668 <td class="center"> 669 <?php echo lang_get( 'actions' ) ?> 670 </td> 671 </tr> 672 <?php 673 $t_users = project_get_all_user_rows( $f_project_id ); 674 $t_display = array(); 675 $t_sort = array(); 676 foreach ( $t_users as $t_user ) { 677 $t_user_name = string_attribute( $t_user['username'] ); 678 $t_sort_name = strtolower( $t_user_name ); 679 if ( ( isset( $t_user['realname'] ) ) && ( $t_user['realname'] > "" ) && ( ON == config_get( 'show_realname' ) ) ){ 680 $t_user_name = string_attribute( $t_user['realname'] ) . " (" . $t_user_name . ")"; 681 if ( ON == config_get( 'sort_by_last_name') ) { 682 $t_sort_name_bits = split( ' ', strtolower( $t_user_name ), 2 ); 683 $t_sort_name = $t_sort_name_bits[1] . ', ' . $t_sort_name_bits[1]; 684 } else { 685 $t_sort_name = strtolower( $t_user_name ); 686 } 687 } 688 $t_display[] = $t_user_name; 689 $t_sort[] = $t_sort_name; 690 } 691 array_multisort( $t_sort, SORT_ASC, SORT_STRING, $t_users, $t_display ); 692 693 # reset the class counter 694 helper_alternate_class( 0 ); 695 696 for ($i = 0; $i < count( $t_sort ); $i++ ) { 697 $t_user = $t_users[$i]; 698 ?> 699 <tr <?php echo helper_alternate_class() ?>> 700 <td> 701 <?php echo $t_display[$i] ?> 702 </td> 703 <td> 704 <?php 705 $t_email = user_get_email( $t_user['id'] ); 706 print_email_link( $t_email, $t_email ); 707 ?> 708 </td> 709 <td> 710 <?php echo get_enum_element( 'access_levels', $t_user['access_level'] ) ?> 711 </td> 712 <td class="center"> 713 <?php 714 # You need global or project-specific permissions to remove users 715 # from this project 716 if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) { 717 if ( project_includes_user( $f_project_id, $t_user['id'] ) ) { 718 print_button( 'manage_proj_user_remove.php?project_id=' . $f_project_id . '&user_id=' . $t_user['id'], lang_get( 'remove_link' ) ); 719 } 720 } 721 ?> 722 </td> 723 </tr> 724 <?php 725 } # end for 726 ?> 727 <tr> 728 <td> </td> 729 <td> </td> 730 <td> </td> 731 <td class="center"> 732 <?php 733 # You need global or project-specific permissions to remove users 734 # from this project 735 if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) { 736 print_button( 'manage_proj_user_remove.php?project_id=' . $f_project_id, lang_get( 'remove_all_link' ) ); 737 } 738 ?> 739 </td> 740 </tr> 741 </table> 742 </div> 743 744 <?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 |
![]() |