. # -------------------------------------------------------- # $Id: account_sponsor_page.php,v 1.5.2.1 2007-10-13 22:32:20 giallu Exp $ # -------------------------------------------------------- # CALLERS # This page is called from: # - print_menu() # - print_account_menu() # EXPECTED BEHAVIOUR # - Display the user's current sponsorships # - Allow the user to edit the payment flag # CALLS # This page calls the following pages: # - account_sponsor_update.php (to save changes) # RESTRICTIONS & PERMISSIONS # - User must be authenticated, and not anonymous # - sponsorship must be enabled require_once( 'core.php' ); $t_core_path = config_get( 'core_path' ); require_once( $t_core_path.'current_user_api.php' ); if ( config_get( 'enable_sponsorship' ) == OFF ) { trigger_error( ERROR_SPONSORSHIP_NOT_ENABLED, ERROR ); } # anonymous users are not allowed to sponsor issues if ( current_user_is_anonymous() ) { access_denied(); } $t_show_all = gpc_get_bool( 'show_all', false ); # start the page html_page_top1( lang_get( 'my_sponsorship' ) ); html_page_top2(); $t_project = helper_get_current_project(); ?>
' . lang_get( 'no_own_sponsored' ) . '

'; } else { ?>
status ) ); $t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) ); $t_version_id = version_get_id( $t_bug->fixed_in_version, $t_project ); if ( ( false !== $t_version_id ) && ( VERSION_RELEASED == version_get_field( $t_version_id, 'released' ) ) ) { $t_released_label = '' . $t_bug->fixed_in_version . ''; } else { $t_released_label = $t_bug->fixed_in_version; } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; # summary echo ''; echo ''; if ( SPONSORSHIP_PAID == $t_sponsor->paid ) { $t_total_paid += $t_sponsor->amount; } else { $t_total_owing += $t_sponsor->amount; } echo ''; echo ''; } ?>
 
' . bug_format_id( $row['bug'] ) . '' . project_get_field( $t_bug->project_id, 'name' ) . ' ' . $t_released_label . ' ' . $t_status . ''; print_user( $t_bug->handler_id ); echo '' . string_display_line( $t_bug->summary ); if ( VS_PRIVATE == $t_bug->view_state ) { printf( ' (%s)', $t_icon_path . 'protected.gif', lang_get( 'private' ), lang_get( 'private' ) ); } # describe sponsorship amount echo '' . sponsorship_format_amount( $t_sponsor->amount ) . '' . get_enum_element( 'sponsorship', $t_sponsor->paid ) . ''; if ( $t_payment ) { echo '(paypal button)'; } else { echo ' '; } echo '
' . lang_get( 'no_sponsored' ) . '

'; } else { ?>
status ) ); $t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) ); $t_version_id = version_get_id( $t_bug->fixed_in_version, $t_project ); if ( ( false !== $t_version_id ) && ( VERSION_RELEASED == version_get_field( $t_version_id, 'released' ) ) ) { $t_released_label = '' . $t_bug->fixed_in_version . ''; } else { $t_released_label = $t_bug->fixed_in_version; } echo ''; echo ''; echo ''; echo ''; echo ''; # summary echo ''; echo ''; echo ''; echo ''; if ( SPONSORSHIP_PAID == $t_sponsor->paid ) { $t_total_paid += $t_sponsor->amount; } else { $t_total_owing += $t_sponsor->amount; } } $t_hidden_bug_list = implode( ',', $t_buglist ); ?>
' . bug_format_id( $row['bug'] ) . '' . project_get_field( $t_bug->project_id, 'name' ) . ' ' . $t_released_label . ' ' . $t_status . ' ' . string_display_line( $t_bug->summary ); if ( VS_PRIVATE == $t_bug->view_state ) { printf( ' (%s)', $t_icon_path . 'protected.gif', lang_get( 'private' ), lang_get( 'private' ) ); } # describe sponsorship amount echo ''; print_user( $t_sponsor->user_id ); echo '' . sponsorship_format_amount( $t_sponsor->amount ) . '
 

( $t_show_all ? 0 : 1 ) ) ); ?>