| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <?php 2 # MantisBT - A PHP based bugtracking system 3 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. 8 # 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. 13 # 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/>. 16 17 /** 18 * This include file prints out the list of users monitoring the current 19 * bug. $f_bug_id must be set and be set to the bug id 20 * 21 * @package MantisBT 22 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 23 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 24 * @link http://www.mantisbt.org 25 * 26 * @uses access_api.php 27 * @uses collapse_api.php 28 * @uses config_api.php 29 * @uses database_api.php 30 * @uses form_api.php 31 * @uses helper_api.php 32 * @uses lang_api.php 33 * @uses print_api.php 34 * @uses user_api.php 35 */ 36 37 if ( !defined( 'BUG_MONITOR_LIST_VIEW_INC_ALLOW' ) ) { 38 return; 39 } 40 41 require_api( 'access_api.php' ); 42 require_api( 'collapse_api.php' ); 43 require_api( 'config_api.php' ); 44 require_api( 'database_api.php' ); 45 require_api( 'form_api.php' ); 46 require_api( 'helper_api.php' ); 47 require_api( 'lang_api.php' ); 48 require_api( 'print_api.php' ); 49 require_api( 'user_api.php' ); 50 51 if ( access_has_bug_level( config_get( 'show_monitor_list_threshold' ), $f_bug_id ) ) { 52 53 $t_users = bug_get_monitors( $f_bug_id ); 54 $num_users = sizeof ( $t_users ); 55 56 echo '<a id="monitors"></a><br />'; 57 58 collapse_open( 'monitoring' ); 59 ?> 60 <table class="width100" cellspacing="1"> 61 <tr> 62 <td class="form-title" colspan="2"> 63 <?php 64 collapse_icon( 'monitoring' ); 65 ?> 66 <?php echo lang_get( 'users_monitoring_bug' ); ?> 67 </td> 68 </tr> 69 <tr class="row-1"> 70 <th class="category" width="15%"> 71 <?php echo lang_get( 'monitoring_user_list' ); ?> 72 </th> 73 <td> 74 <?php 75 if ( 0 == $num_users ) { 76 echo lang_get( 'no_users_monitoring_bug' ); 77 } else { 78 $t_can_delete_others = access_has_bug_level( config_get( 'monitor_delete_others_bug_threshold' ), $f_bug_id ); 79 for ( $i = 0; $i < $num_users; $i++ ) { 80 echo ($i > 0) ? ', ' : ''; 81 echo print_user( $t_users[$i] ); 82 if ( $t_can_delete_others ) { 83 echo ' [<a class="small" href="' . helper_mantis_url( 'bug_monitor_delete.php' ) . '?bug_id=' . $f_bug_id . '&user_id=' . $t_users[$i] . htmlspecialchars(form_security_param( 'bug_monitor_delete' )) . '">' . lang_get( 'delete_link' ) . '</a>]'; 84 } 85 } 86 } 87 88 if ( access_has_bug_level( config_get( 'monitor_add_others_bug_threshold' ), $f_bug_id ) ) { 89 ?> 90 <br /><br /> 91 <form method="get" action="bug_monitor_add.php"> 92 <?php echo form_security_field( 'bug_monitor_add' ) ?> 93 <input type="hidden" name="bug_id" value="<?php echo (integer)$f_bug_id; ?>" /> 94 <label for="bug_monitor_list_username"><?php echo lang_get( 'username' ) ?></label> 95 <input type="text" id="bug_monitor_list_username" name="username" /> 96 <input type="submit" class="button" value="<?php echo lang_get( 'add_user_to_monitor' ) ?>" /> 97 </form> 98 <?php } ?> 99 </td> 100 </tr> 101 </table> 102 <?php 103 collapse_closed( 'monitoring' ); 104 ?> 105 <table class="width100" cellspacing="1"> 106 <tr> 107 <td class="form-title" colspan="2"><?php collapse_icon( 'monitoring' ); ?> 108 <?php echo lang_get( 'users_monitoring_bug' ); ?> 109 </td> 110 </tr> 111 </table> 112 <?php 113 collapse_end( 'monitoring' ); 114 ?> 115 116 <?php 117 } # show monitor list 118
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |