% unless ( $type eq 'xml' ) { <% include( '/elements/header.html', 'FCC Form 477 Results') %> %}else{ %} % if ( $type eq 'html' || $type eq 'html-print' ) { %}elsif ( $type eq 'xml' ) { %} % unless ( $type eq 'html-print' || $type eq 'xml' ) { % $cgi->param('_type', $type ); % } % if ( $type eq 'html' || $type eq 'html-print' ) {
Download full results
% $cgi->param('_type', 'xml'); as XML file
% $cgi->param('_type', 'html-print'); as printable copy
%}elsif ( $type eq 'xml' ) { %} % foreach my $part ( @parts ) { % if ( $part{$part} ) { % % if ( $part eq 'V' ) { % next unless ( $part{'IIA'} || $part{'IIB'} ); % } % % if ( $part eq 'VI_census' ) { % next unless $part{'IA'}; % } % % my @reports = (); % if ( $part eq 'IA' ) { % for ( my $tech = 0; $tech < scalar(@technology_option); $tech++ ) { % next unless $technology_option[$tech]; % my $url = &{$url_mangler}($part); % if ( $type eq 'xml' ) { <<% 'Part_IA_'. chr(65 + $tech) %>> % } <% include( "477part${part}_summary.html", 'tech_code' => $tech, 'url' => $url ) %> <% include( "477part${part}_detail.html", 'tech_code' => $tech, 'url' => $url ) %> % if ( $type eq 'xml' ) { > % } % } % } else { % if ( $type eq 'xml' ) { <<% 'Part_'. $part %>> % } % my $url = &{$url_mangler}($part); <% include( "477part${part}.html", 'url' => $url ) %> % if ( $type eq 'xml' ) { > % } % } % } % } % % if ( $type eq 'html' || $type eq 'html-print' ) { <% include( '/elements/footer.html') %> %}elsif ( $type eq 'xml' ) {
%} <%init> my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('List packages'); my %part = map { $_ => 1 } grep { /^\w+$/ } $cgi->param('part'); my $type = $cgi->param('_type') || 'html'; my $xlsname = '477report'; my @technology_option = &FS::Report::FCC_477::parse_technology_option($cgi,1); # save upload and download mappings my @download = $cgi->param('part1_column_option'); my @upload = $cgi->param('part1_row_option'); for(my $i=0; $i < scalar(@download); $i++) { &FS::Report::FCC_477::save_fcc477map("part1_column_option_$i",$download[$i]); } for(my $i=0; $i < scalar(@upload); $i++) { &FS::Report::FCC_477::save_fcc477map("part1_row_option_$i",$upload[$i]); } my @part2a_row_option = $cgi->param('part2a_row_option'); for(my $i=0; $i < scalar(@part2a_row_option); $i++) { &FS::Report::FCC_477::save_fcc477map("part2a_row_option_$i",$part2a_row_option[$i]); } my @part2b_row_option = $cgi->param('part2b_row_option'); for(my $i=0; $i < scalar(@part2b_row_option); $i++) { &FS::Report::FCC_477::save_fcc477map("part2b_row_option_$i",$part2b_row_option[$i]); } my $url_mangler = sub { my $part = shift; my $url = $cgi->url('-path_info' => 1, '-full' => 1); $url =~ s/477\./477part$part./; $url; }; my @parts = qw( IA IIA IIB IV V VI_census );