[ 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: my_view_page.php,v 1.17.2.1 2007-10-13 22:33:59 giallu Exp $ 22 # -------------------------------------------------------- 23 ?> 24 <?php 25 require_once ( 'core.php' ); 26 27 $t_core_path = config_get( 'core_path' ); 28 29 require_once( $t_core_path . 'compress_api.php' ); 30 require_once( $t_core_path . 'filter_api.php' ); 31 require_once( $t_core_path . 'last_visited_api.php' ); 32 33 auth_ensure_user_authenticated(); 34 35 $t_current_user_id = auth_get_current_user_id(); 36 37 compress_enable(); 38 39 html_page_top1( lang_get( 'my_view_link' ) ); 40 41 if ( current_user_get_pref( 'refresh_delay' ) > 0 ) { 42 html_meta_redirect( 'my_view_page.php', current_user_get_pref( 'refresh_delay' )*60 ); 43 } 44 45 html_page_top2(); 46 47 print_recently_visited(); 48 49 $f_page_number = gpc_get_int( 'page_number', 1 ); 50 51 $t_per_page = config_get( 'my_view_bug_count' ); 52 $t_bug_count = null; 53 $t_page_count = null; 54 55 $t_boxes = config_get( 'my_view_boxes' ); 56 asort ($t_boxes); 57 reset ($t_boxes); 58 #print_r ($t_boxes); 59 60 $t_project_id = helper_get_current_project(); 61 ?> 62 63 <div align="center"> 64 <table class="hide" border="0" cellspacing="3" cellpadding="0"> 65 66 <?php 67 $t_status_legend_position = config_get( 'status_legend_position' ); 68 69 if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) { 70 echo '<tr>'; 71 echo '<td colspan="2">'; 72 html_status_legend(); 73 echo '</td>'; 74 echo '</tr>'; 75 } 76 ?> 77 78 <?php 79 $t_number_of_boxes = count ( $t_boxes ); 80 $t_boxes_position = config_get( 'my_view_boxes_fixed_position' ); 81 $t_counter = 0; 82 83 while (list ($t_box_title, $t_box_display) = each ($t_boxes)) { 84 # don't display bugs that are set as 0 85 if ($t_box_display == 0) { 86 $t_number_of_boxes = $t_number_of_boxes - 1; 87 } 88 89 # don't display "Assigned to Me" bugs to users that bugs can't be assigned to 90 else if ( $t_box_title == 'assigned' && ( current_user_is_anonymous() OR user_get_assigned_open_bug_count( $t_current_user_id, $t_project_id ) == 0 ) ) { 91 $t_number_of_boxes = $t_number_of_boxes - 1; 92 } 93 94 # don't display "Monitored by Me" bugs to users that can't monitor bugs 95 else if ( $t_box_title == 'monitored' && ( current_user_is_anonymous() OR !access_has_project_level( config_get( 'monitor_bug_threshold' ), $t_project_id, $t_current_user_id ) ) ) { 96 $t_number_of_boxes = $t_number_of_boxes - 1; 97 } 98 99 # don't display "Reported by Me" bugs to users that can't report bugs 100 else if ( in_array( $t_box_title, array( 'reported', 'feedback', 'verify' ) ) && 101 ( current_user_is_anonymous() OR !access_has_project_level( config_get( 'report_bug_threshold' ), $t_project_id, $t_current_user_id ) ) ) { 102 $t_number_of_boxes = $t_number_of_boxes - 1; 103 } 104 105 # display the box 106 else { 107 $t_counter++; 108 109 # check the style of displaying boxes - fixed (ie. each box in a separate table cell) or not 110 if ( ON == $t_boxes_position ) { 111 # for even box number start new row and column 112 if ( 1 == $t_counter%2 ) { 113 echo '<tr><td valign="top" width="50%">'; 114 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); 115 echo '</td>'; 116 } 117 118 # for odd box number only start new column 119 elseif ( 0 == $t_counter%2 ) { 120 echo '<td valign="top" width="50%">'; 121 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); 122 echo '</td></tr>'; 123 } 124 125 # for odd number of box display one empty table cell in second column 126 if ( ( $t_counter == $t_number_of_boxes ) && 1 == $t_counter%2 ) { 127 echo '<td valign="top" width="50%"></td></tr>'; 128 } 129 } 130 else if ( OFF == $t_boxes_position ) { 131 # start new table row and column for first box 132 if ( 1 == $t_counter ) { 133 echo '<tr><td valign="top" width="50%">'; 134 } 135 136 # start new table column for the second half of boxes 137 if ( $t_counter == ceil ($t_number_of_boxes/2) + 1 ) { 138 echo '<td valign="top" width="50%">'; 139 } 140 141 # display the required box 142 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); 143 echo '<br />'; 144 145 # close the first column for first half of boxes 146 if ( $t_counter == ceil ($t_number_of_boxes/2) ) { 147 echo '</td>'; 148 } 149 150 # close the table row after all of the boxes 151 if ( $t_counter == $t_number_of_boxes ) { 152 echo '</td></tr>'; 153 } 154 } 155 } 156 } 157 158 ?> 159 160 <?php 161 if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) { 162 echo '<tr>'; 163 echo '<td colspan="2">'; 164 html_status_legend(); 165 echo '</td>'; 166 echo '</tr>'; 167 } 168 ?> 169 170 </table> 171 </div> 172 173 <?php 174 html_page_bottom1( __FILE__ ); 175 ?>
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 |
![]() |