[ 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: bugnote_stats_inc.php,v 1.11.2.2 2007-10-13 22:33:09 giallu Exp $ 22 # -------------------------------------------------------- 23 ?> 24 <?php 25 # This include file prints out the bug bugnote_stats 26 27 # $f_bug_id must already be defined 28 29 $t_core_path = config_get( 'core_path' ); 30 31 require_once( $t_core_path.'bugnote_api.php' ); 32 33 if ( ON != config_get('time_tracking_enabled') ) { 34 return; 35 } 36 ?> 37 38 <a name="bugnotestats" id="bugnotestats" /><br /> 39 40 <?php 41 collapse_open( 'bugnotestats' ); 42 ?> 43 <table class="width100" cellspacing="0"> 44 <tr> 45 <td class="form-title" colspan="4"> 46 <?php 47 collapse_icon( 'bugnotestats' ); 48 echo lang_get( 'time_tracking' ) ?> 49 </td> 50 </tr> 51 </table> 52 <?php 53 collapse_closed( 'bugnotestats' ); 54 ?> 55 <?php 56 $t_bugnote_stats_from_def = date( "d:m:Y", $t_bug->date_submitted ); 57 $t_bugnote_stats_from_def_ar = explode ( ":", $t_bugnote_stats_from_def ); 58 $t_bugnote_stats_from_def_d = $t_bugnote_stats_from_def_ar[0]; 59 $t_bugnote_stats_from_def_m = $t_bugnote_stats_from_def_ar[1]; 60 $t_bugnote_stats_from_def_y = $t_bugnote_stats_from_def_ar[2]; 61 62 $t_bugnote_stats_from_d = gpc_get_string('start_day', $t_bugnote_stats_from_def_d); 63 $t_bugnote_stats_from_m = gpc_get_string('start_month', $t_bugnote_stats_from_def_m); 64 $t_bugnote_stats_from_y = gpc_get_string('start_year', $t_bugnote_stats_from_def_y); 65 66 $t_bugnote_stats_to_def = date( "d:m:Y" ); 67 $t_bugnote_stats_to_def_ar = explode ( ":", $t_bugnote_stats_to_def ); 68 $t_bugnote_stats_to_def_d = $t_bugnote_stats_to_def_ar[0]; 69 $t_bugnote_stats_to_def_m = $t_bugnote_stats_to_def_ar[1]; 70 $t_bugnote_stats_to_def_y = $t_bugnote_stats_to_def_ar[2]; 71 72 $t_bugnote_stats_to_d = gpc_get_string('end_day', $t_bugnote_stats_to_def_d); 73 $t_bugnote_stats_to_m = gpc_get_string('end_month', $t_bugnote_stats_to_def_m); 74 $t_bugnote_stats_to_y = gpc_get_string('end_year', $t_bugnote_stats_to_def_y); 75 76 $f_get_bugnote_stats_button = gpc_get_string('get_bugnote_stats_button', ''); 77 ?> 78 <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> 79 <input type="hidden" name="id" value="<?php echo $f_bug_id ?>" /> 80 <table border=0 class="width100" cellspacing="0"> 81 <tr> 82 <td class="form-title" colspan="4"> 83 <?php 84 collapse_icon( 'bugnotestats' ); 85 echo lang_get( 'time_tracking' ) ?> 86 </td> 87 </tr> 88 <tr class="row-2"> 89 <td class="category" width="25%"> 90 <?php 91 $t_filter = array(); 92 $t_filter['do_filter_by_date'] = 'on'; 93 $t_filter['start_day'] = $t_bugnote_stats_from_d; 94 $t_filter['start_month'] = $t_bugnote_stats_from_m; 95 $t_filter['start_year'] = $t_bugnote_stats_from_y; 96 $t_filter['end_day'] = $t_bugnote_stats_to_d; 97 $t_filter['end_month'] = $t_bugnote_stats_to_m; 98 $t_filter['end_year'] = $t_bugnote_stats_to_y; 99 print_filter_do_filter_by_date(true); 100 ?> 101 </td> 102 </tr> 103 <tr> 104 <td class="center" colspan="2"> 105 <input type="submit" class="button" name="get_bugnote_stats_button" value="<?php echo lang_get( 'time_tracking_get_info_button' ) ?>" /> 106 </td> 107 </tr> 108 109 </table> 110 </form> 111 <?php 112 if ( !is_blank( $f_get_bugnote_stats_button ) ) { 113 $t_from = "$t_bugnote_stats_from_y-$t_bugnote_stats_from_m-$t_bugnote_stats_from_d"; 114 $t_to = "$t_bugnote_stats_to_y-$t_bugnote_stats_to_m-$t_bugnote_stats_to_d"; 115 $t_bugnote_stats = bugnote_stats_get_events_array( $f_bug_id, $t_from, $t_to ); 116 ?> 117 <br /> 118 <table border=0 class="width100" cellspacing="0"> 119 <tr class="row-category-history"> 120 <td class="small-caption"> 121 <?php echo lang_get( 'username' ) ?> 122 </td> 123 <td class="small-caption"> 124 <?php echo lang_get( 'time_tracking' ) ?> 125 </td> 126 </tr> 127 <?php 128 $t_sum_in_minutes = 0; 129 foreach ( $t_bugnote_stats as $t_item ) { 130 $t_sum_in_minutes += $t_item['sum_time_tracking']; 131 $t_item['sum_time_tracking'] = db_minutes_to_hhmm ( $t_item['sum_time_tracking'] ); 132 ?> 133 134 <tr <?php echo helper_alternate_class() ?>> 135 <td class="small-caption"> 136 <?php echo $t_item['username'] ?> 137 </td> 138 <td class="small-caption"> 139 <?php echo $t_item['sum_time_tracking'] ?> 140 </td> 141 </tr> 142 <?php } # end for loop ?> 143 <tr <?php echo helper_alternate_class() ?>> 144 <td class="small-caption"> 145 <?php echo lang_get( 'total_time' ) ?> 146 </td> 147 <td class="small-caption"> 148 <?php echo db_minutes_to_hhmm ( $t_sum_in_minutes ) ?> 149 </td> 150 </tr> 151 </table> 152 <?php } # end if ?> 153 <?php 154 collapse_end( 'bugnotestats' ); 155 ?>
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 |
![]() |