1 % unless ( $type eq 'xml' ) {
2 <% include( '/elements/header.html', 'FCC Form 477 Results') %>
4 <?xml version="1.0" encoding="ISO-8859-1"?>
5 <Form_477_submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://specialreports.fcc.gov/wcb/Form477/XMLSchema-instance/form_477_upload_Schema.xsd" >
7 % if ( $type eq 'html' || $type eq 'html-print' ) {
10 %}elsif ( $type eq 'xml' ) {
12 % unless ( $type eq 'html-print' || $type eq 'xml' ) {
16 Download full results<BR>
17 % $cgi->param('_type', 'xml');
18 as <A HREF="<% $cgi->self_url %>">XML file</A><BR>
20 % $cgi->param('_type', 'html-print');
21 as <A HREF="<% $cgi->self_url %>">printable copy</A>
24 % $cgi->param('_type', $type );
26 % if ( $type eq 'html' || $type eq 'html-print' ) {
29 %}elsif ( $type eq 'xml' ) {
31 % foreach my $part ( @parts ) {
32 % if ( $part{$part} ) {
34 % if ( $part eq 'V' ) {
35 % next unless ( $part{'IIA'} || $part{'IIB'} );
38 % if ( $part eq 'VI_census' ) {
39 % next unless $part{'IA'};
43 % if ( $part eq 'IA' ) {
44 % for ( my $tech = 0; $tech < scalar(@technology_option); $tech++ ) {
45 % next unless $technology_option[$tech];
46 % my $url = &{$url_mangler}($part);
47 % if ( $type eq 'xml' ) {
48 <<% 'Part_IA_'. chr(65 + $tech) %>>
50 <% include( "477part${part}_summary.html", 'tech_code' => $tech, 'url' => $url ) %>
51 <% include( "477part${part}_detail.html", 'tech_code' => $tech, 'url' => $url ) %>
52 % if ( $type eq 'xml' ) {
53 </<% 'Part_IA_'. chr(65 + $tech) %>>
57 % if ( $type eq 'xml' ) {
58 <<% 'Part_'. $part %>>
60 % my $url = &{$url_mangler}($part);
61 <% include( "477part${part}.html", 'url' => $url ) %>
62 % if ( $type eq 'xml' ) {
63 </<% 'Part_'. $part %>>
69 % if ( $type eq 'html' || $type eq 'html-print' ) {
70 <% include( '/elements/footer.html') %>
71 %}elsif ( $type eq 'xml' ) {
72 </Form_477_submission>
76 my $curuser = $FS::CurrentUser::CurrentUser;
79 unless $curuser->access_right('List packages');
81 my %part = map { $_ => 1 } grep { /^\w+$/ } $cgi->param('part');
82 my $type = $cgi->param('_type') || 'html';
83 my $xlsname = '477report';
84 my @technology_option = &FS::Report::FCC_477::parse_technology_option($cgi,1);
86 # save upload and download mappings
87 my @download = $cgi->param('part1_column_option');
88 my @upload = $cgi->param('part1_row_option');
89 for(my $i=0; $i < scalar(@download); $i++) {
90 &FS::Report::FCC_477::save_fcc477map("part1_column_option_$i",$download[$i]);
92 for(my $i=0; $i < scalar(@upload); $i++) {
93 &FS::Report::FCC_477::save_fcc477map("part1_row_option_$i",$upload[$i]);
96 my @part2a_row_option = $cgi->param('part2a_row_option');
97 for(my $i=0; $i < scalar(@part2a_row_option); $i++) {
98 &FS::Report::FCC_477::save_fcc477map("part2a_row_option_$i",$part2a_row_option[$i]);
101 my @part2b_row_option = $cgi->param('part2b_row_option');
102 for(my $i=0; $i < scalar(@part2b_row_option); $i++) {
103 &FS::Report::FCC_477::save_fcc477map("part2b_row_option_$i",$part2b_row_option[$i]);
106 my $url_mangler = sub {
108 my $url = $cgi->url('-path_info' => 1, '-full' => 1);
109 $url =~ s/477\./477part$part./;
112 my @parts = qw( IA IIA IIB IV V VI_census );