[ 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: print_bug_page.php,v 1.60.2.1 2007-10-13 22:34:18 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.'bug_api.php' ); 30 require_once( $t_core_path.'custom_field_api.php' ); 31 require_once( $t_core_path.'date_api.php' ); 32 require_once( $t_core_path.'string_api.php' ); 33 require_once( $t_core_path.'last_visited_api.php' ); 34 ?> 35 <?php 36 $f_bug_id = gpc_get_int( 'bug_id' ); 37 38 if ( SIMPLE_ONLY == $g_show_view ) { 39 print_header_redirect ( 'bug_view_page.php?bug_id='.$f_bug_id ); 40 } 41 42 access_ensure_bug_level( VIEWER, $f_bug_id ); 43 44 $c_bug_id = (integer)$f_bug_id; 45 46 $t_bug_table = config_get( 'mantis_bug_table' ); 47 $query = "SELECT * 48 FROM $t_bug_table 49 WHERE id='$c_bug_id'"; 50 $result = db_query( $query ); 51 $row = db_fetch_array( $result ); 52 extract( $row, EXTR_PREFIX_ALL, 'v' ); 53 54 $t_bug_text_table = config_get( 'mantis_bug_text_table' ); 55 $query = "SELECT * 56 FROM $t_bug_text_table 57 WHERE id='$v_bug_text_id'"; 58 $result = db_query( $query ); 59 $row = db_fetch_array( $result ); 60 extract( $row, EXTR_PREFIX_ALL, 'v2' ); 61 62 $t_history = history_get_events_array( $f_bug_id ); 63 64 $v_os = string_display( $v_os ); 65 $v_os_build = string_display( $v_os_build ); 66 $v_platform = string_display( $v_platform ); 67 $v_version = string_display( $v_version ); 68 $v_summary = string_display_links( $v_summary ); 69 $v2_description = string_display_links( $v2_description ); 70 $v2_steps_to_reproduce = string_display_links( $v2_steps_to_reproduce ); 71 $v2_additional_information = string_display_links( $v2_additional_information ); 72 ?> 73 <?php html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ) ?> 74 <?php 75 html_head_end(); 76 html_body_begin(); 77 ?> 78 79 <br /> 80 <table class="width100" cellspacing="1"> 81 <tr> 82 <td class="form-title" colspan="6"> 83 <div class="center"><?php echo config_get( 'window_title' ) . ' - ' . string_display( project_get_name( $v_project_id ) ) ?></div> 84 </td> 85 </tr> 86 <tr> 87 <td class="form-title" colspan="6"> 88 <?php echo lang_get( 'viewing_bug_advanced_details_title' ) ?> 89 </td> 90 </tr> 91 <tr> 92 <td class="print-spacer" colspan="6"> 93 <hr size="1" /> 94 </td> 95 </tr> 96 <tr class="print-category"> 97 <td class="print" width="16%"> 98 <?php echo lang_get( 'id' ) ?>: 99 </td> 100 <td class="print" width="16%"> 101 <?php echo lang_get( 'category' ) ?>: 102 </td> 103 <td class="print" width="16%"> 104 <?php echo lang_get( 'severity' ) ?>: 105 </td> 106 <td class="print" width="16%"> 107 <?php echo lang_get( 'reproducibility' ) ?>: 108 </td> 109 <td class="print" width="16%"> 110 <?php echo lang_get( 'date_submitted' ) ?>: 111 </td> 112 <td class="print" width="16%"> 113 <?php echo lang_get( 'last_update' ) ?>: 114 </td> 115 </tr> 116 <tr class="print"> 117 <td class="print"> 118 <?php echo $v_id ?> 119 </td> 120 <td class="print"> 121 <?php echo $v_category ?> 122 </td> 123 <td class="print"> 124 <?php echo get_enum_element( 'severity', $v_severity ) ?> 125 </td> 126 <td class="print"> 127 <?php echo get_enum_element( 'reproducibility', $v_reproducibility ) ?> 128 </td> 129 <td class="print"> 130 <?php print_date( config_get( 'normal_date_format' ), db_unixtimestamp( $v_date_submitted ) ) ?> 131 </td> 132 <td class="print"> 133 <?php print_date( config_get( 'normal_date_format' ), db_unixtimestamp( $v_last_updated ) ) ?> 134 </td> 135 </tr> 136 <tr> 137 <td class="print-spacer" colspan="6"> 138 <hr size="1" /> 139 </td> 140 </tr> 141 <tr class="print"> 142 <td class="print-category"> 143 <?php echo lang_get( 'reporter' ) ?>: 144 </td> 145 <td class="print"> 146 <?php print_user_with_subject( $v_reporter_id, $f_bug_id ) ?> 147 </td> 148 <td class="print-category"> 149 <?php echo lang_get( 'platform' ) ?>: 150 </td> 151 <td class="print"> 152 <?php echo $v_platform ?> 153 </td> 154 <td class="print" colspan="2"> </td> 155 </tr> 156 <tr class="print"> 157 <td class="print-category"> 158 <?php echo lang_get( 'assigned_to' ) ?>: 159 </td> 160 <td class="print"> 161 <?php 162 if ( access_has_bug_level( config_get( 'view_handler_threshold' ), $f_bug_id ) ) { 163 print_user_with_subject( $v_handler_id, $f_bug_id ); 164 } 165 ?> 166 </td> 167 <td class="print-category"> 168 <?php echo lang_get( 'os' ) ?>: 169 </td> 170 <td class="print"> 171 <?php echo $v_os ?> 172 </td> 173 <td class="print" colspan="2"> </td> 174 </tr> 175 <tr class="print"> 176 <td class="print-category"> 177 <?php echo lang_get( 'priority' ) ?>: 178 </td> 179 <td class="print"> 180 <?php echo get_enum_element( 'priority', $v_priority ) ?> 181 </td> 182 <td class="print-category"> 183 <?php echo lang_get( 'os_version' ) ?>: 184 </td> 185 <td class="print"> 186 <?php echo $v_os_build ?> 187 </td> 188 <td class="print" colspan="2"> </td> 189 </tr> 190 <tr class="print"> 191 <td class="print-category"> 192 <?php echo lang_get( 'status' ) ?>: 193 </td> 194 <td class="print"> 195 <?php echo get_enum_element( 'status', $v_status ) ?> 196 </td> 197 <td class="print-category"> 198 <?php echo lang_get( 'product_version' ) ?>: 199 </td> 200 <td class="print"> 201 <?php echo $v_version ?> 202 </td> 203 <td class="print" colspan="2"> </td> 204 </tr> 205 <tr class="print"> 206 <td class="print-category"> 207 <?php echo lang_get( 'product_build' ) ?>: 208 </td> 209 <td class="print"> 210 <?php echo $v_build?> 211 </td> 212 <td class="print-category"> 213 <?php echo lang_get( 'resolution' ) ?>: 214 </td> 215 <td class="print"> 216 <?php echo get_enum_element( 'resolution', $v_resolution ) ?> 217 </td> 218 <td class="print" colspan="2"> </td> 219 </tr> 220 <tr class="print"> 221 <td class="print-category"> 222 <?php echo lang_get( 'projection' ) ?>: 223 </td> 224 <td class="print"> 225 <?php echo get_enum_element( 'projection', $v_projection ) ?> 226 </td> 227 <td class="print-category"> 228 <?php 229 if ( !config_get( 'enable_relationship' ) ) { 230 echo lang_get( 'duplicate_id' ); 231 } # MASC RELATIONSHIP 232 ?> 233 </td> 234 <td class="print"> 235 <?php 236 if ( !config_get( 'enable_relationship' ) ) { 237 print_duplicate_id( $v_duplicate_id ); 238 } # MASC RELATIONSHIP 239 ?> 240 </td> 241 <td class="print" colspan="2"> </td> 242 </tr> 243 <tr class="print"> 244 <td class="print-category"> 245 <?php echo lang_get( 'eta' ) ?>: 246 </td> 247 <td class="print"> 248 <?php echo get_enum_element( 'eta', $v_eta ) ?> 249 </td> 250 <td class="print-category"> 251 <?php echo lang_get( 'fixed_in_version' ) ?>: 252 </td> 253 <td class="print"> 254 <?php echo $v_fixed_in_version ?> 255 </td> 256 <td class="print" colspan="2"> </td> 257 </tr> 258 259 <?php 260 $t_related_custom_field_ids = custom_field_get_linked_ids( $v_project_id ); 261 foreach( $t_related_custom_field_ids as $t_id ) { 262 $t_def = custom_field_get_definition( $t_id ); 263 ?> 264 <tr class="print"> 265 <td class="print-category"> 266 <?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?>: 267 </td> 268 <td class="print" colspan="4"> 269 <?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?> 270 </td> 271 </tr> 272 <?php 273 } // foreach 274 ?> 275 276 <tr> 277 <td class="print-spacer" colspan="6"> 278 <hr size="1" /> 279 </td> 280 </tr> 281 <tr class="print"> 282 <td class="print-category"> 283 <?php echo lang_get( 'summary' ) ?>: 284 </td> 285 <td class="print" colspan="5"> 286 <?php echo bug_format_summary( $f_bug_id, SUMMARY_FIELD ) ?> 287 </td> 288 </tr> 289 <tr class="print"> 290 <td class="print-category"> 291 <?php echo lang_get( 'description' ) ?>: 292 </td> 293 <td class="print" colspan="5"> 294 <?php echo $v2_description ?> 295 </td> 296 </tr> 297 <tr class="print"> 298 <td class="print-category"> 299 <?php echo lang_get( 'steps_to_reproduce' ) ?>: 300 </td> 301 <td class="print" colspan="5"> 302 <?php echo $v2_steps_to_reproduce ?> 303 </td> 304 </tr> 305 <tr class="print"> 306 <td class="print-category"> 307 <?php echo lang_get( 'additional_information' ) ?>: 308 </td> 309 <td class="print" colspan="5"> 310 <?php echo $v2_additional_information ?> 311 </td> 312 </tr> 313 <?php 314 # account profile description 315 if ( $v_profile_id > 0 ) { 316 $t_user_prof_table = config_get( 'mantis_user_profile_table' ); 317 $query = "SELECT description 318 FROM $t_user_prof_table 319 WHERE id='$v_profile_id'"; 320 $result = db_query( $query ); 321 $t_profile_description = ''; 322 if ( db_num_rows( $result ) > 0 ) { 323 $t_profile_description = db_result( $result, 0 ); 324 } 325 $t_profile_description = string_display_links( $t_profile_description ); 326 327 ?> 328 <tr class="print"> 329 <td class="print-category"> 330 <?php echo lang_get( 'system_profile' ) ?>: 331 </td> 332 <td class="print" colspan="5"> 333 <?php echo $t_profile_description ?> 334 </td> 335 </tr> 336 <?php 337 } 338 339 # MASC RELATIONSHIP 340 if ( ON == config_get( 'enable_relationship' ) ) { 341 echo "<tr class=\"print\">"; 342 echo "<td class=\"print-category\">" . lang_get( 'bug_relationships' ) . "</td>"; 343 echo "<td class=\"print\" colspan=\"5\">" . relationship_get_summary_html_preview( $c_bug_id ) . "</td></tr>"; 344 } 345 # MASC RELATIONSHIP 346 ?> 347 <tr class="print"> 348 <td class="print-category"> 349 <?php echo lang_get( 'attached_files' ) ?>: 350 </td> 351 <td class="print" colspan="5"> 352 <?php file_list_attachments ( $f_bug_id ); ?> 353 </td> 354 </tr> 355 <tr> 356 <td class="print-spacer" colspan="6"> 357 <hr size="1" /> 358 </td> 359 </tr> 360 <?php 361 # ISSUE HISTORY 362 ?> 363 <tr> 364 <td class="form-title"> 365 <?php echo lang_get( 'bug_history' ) ?> 366 </td> 367 </tr> 368 <tr class="print-category"> 369 <td class="row-category-history"> 370 <?php echo lang_get( 'date_modified' ) ?> 371 </td> 372 <td class="row-category-history"> 373 <?php echo lang_get( 'username' ) ?> 374 </td> 375 <td class="row-category-history"> 376 <?php echo lang_get( 'field' ) ?> 377 </td> 378 <td class="row-category-history"> 379 <?php echo lang_get( 'change' ) ?> 380 </td> 381 </tr> 382 <?php 383 foreach ( $t_history as $t_item ) { 384 ?> 385 <tr class="print"> 386 <td class="print"> 387 <?php echo $t_item['date'] ?> 388 </td> 389 <td class="print"> 390 <?php print_user( $t_item['userid'] ) ?> 391 </td> 392 <td class="print"> 393 <?php echo string_display( $t_item['note'] ) ?> 394 </td> 395 <td class="print"> 396 <?php echo string_display_line_links( $t_item['change'] ) ?> 397 </td> 398 </tr> 399 <?php 400 } 401 ?> 402 </table> 403 404 <?php 405 include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'print_bugnote_inc.php' ) ; 406 407 last_visited_issue( $f_bug_id ); 408 ?>
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 |
![]() |