X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477.html;h=ecf21cfb115a235934bb5e985acac0b64e569cb6;hb=b3cecd1976e92c32740c3e2e1227a7d718e07b57;hp=eed3df9468175fae7e24eae5ab79b9cd63db2857;hpb=54a357b171aa44f9399b4c146acd2afd3b686075;p=freeside.git diff --git a/httemplate/search/477.html b/httemplate/search/477.html index eed3df946..ecf21cfb1 100755 --- a/httemplate/search/477.html +++ b/httemplate/search/477.html @@ -1,4 +1,7 @@ % if ( $type eq 'xml' ) { +% $filename = "fcc_477_$state" . '_' . time2str('%Y%m%d', $date) . '.xml'; +% http_header('Content-Type' => 'application/XML' ); # So saith RFC 4180 +% http_header('Content-Disposition' => 'attachment;filename="'.$filename.'"'); % } else { #html @@ -49,18 +52,23 @@ <& "477part${part}.html", 'tech_code' => $tech, 'url' => $url, - 'type' => $type + 'type' => $type, + 'date' => $date, &> % if ( $type eq 'xml' ) { > % } % } -% } else { +% } else { # not part IA % if ( $type eq 'xml' ) { <<% 'Part_'. $part %>> % } % my $url = &{$url_mangler}($part); -<& "477part${part}.html", 'url' => $url &> +<& "477part${part}.html", + 'url' => $url, + 'date' => $date, + 'filename' => $filename, +&> % if ( $type eq 'xml' ) { > % } @@ -80,12 +88,15 @@ my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('List packages'); +my $date = $cgi->param('date') ? parse_datetime($cgi->param('date')) + : time; + my $state = uc($cgi->param('state')); $state =~ /^[A-Z]{2}$/ or die "illegal state: $state"; my %part = map { $_ => 1 } grep { /^\w+$/ } $cgi->param('part'); my $type = $cgi->param('_type') || 'html'; -my $xlsname = '477report'; +my $filename; my @technology_option = &FS::Report::FCC_477::parse_technology_option($cgi,1); # save upload and download mappings