.
/**
* This include file prints out the list of users sponsoring the current
* bug. $f_bug_id must be set to the bug id
*
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
require_once( 'sponsorship_api.php' );
require_once( 'collapse_api.php' );
#
# Determine whether the sponsorship section should be shown.
#
if ( ( config_get( 'enable_sponsorship' ) == ON ) && ( access_has_bug_level( config_get( 'view_sponsorship_total_threshold' ), $f_bug_id ) ) ) {
$t_sponsorship_ids = sponsorship_get_all_ids( $f_bug_id );
$t_sponsorships_exist = count( $t_sponsorship_ids ) > 0;
$t_can_sponsor = !bug_is_readonly( $f_bug_id ) && !current_user_is_anonymous();
$t_show_sponsorships = $t_sponsorships_exist || $t_can_sponsor;
} else {
$t_show_sponsorships = false;
}
#
# Sponsorship Box
#
if ( $t_show_sponsorships ) {
?>
' . lang_get( 'sponsorship_more_info' ) . ']'; } ?> | ||
'; $i = 0; foreach ( $t_sponsorship_ids as $id ) { $t_sponsorship = sponsorship_get( $id ); $t_date_added = date( config_get( 'normal_date_format' ) , $t_sponsorship->date_submitted ); echo ($i > 0) ? ' ' : ''; $i++; echo $t_date_added . ': '; print_user( $t_sponsorship->user_id ); echo ' (' . sponsorship_format_amount( $t_sponsorship->amount ) . ')'; if ( access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id ) ) { echo ' ' . get_enum_element( 'sponsorship', $t_sponsorship->paid ); } } } ?> |
' . lang_get( 'sponsorship_more_info' ) . ']'; } $t_total_sponsorship = bug_get_field( $f_bug_id, 'sponsorship_total' ); if ( $t_total_sponsorship > 0 ) { echo ' ('; echo sprintf( lang_get( 'total_sponsorship_amount' ), sponsorship_format_amount( $t_total_sponsorship ) ); echo ')'; } ?> |