1 <% include('/elements/header.html', 'FCC Form 477 Report' ) %>
3 <FORM ACTION="477.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="active">
6 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
9 <TH CLASS="background" COLSPAN=2 ALIGN="left">
10 <FONT SIZE="+1">Search options</FONT>
14 <% include( '/elements/tr-select-agent.html',
15 'curr_value' => scalar( $cgi->param('agentnum') ),
20 % # not tr-select-state, we only want to choose from among those that
22 <& /elements/tr-select-table.html,
25 'table' => 'cust_location',
26 'name_col' => 'state',
27 'value_col' => 'state',
29 'records' => \@states,
32 <% include( '/elements/tr-select-pkg_class.html',
34 'empty_label' => '(empty class)',
38 <SCRIPT type="text/javascript">
39 function partchange(what) {
40 var id = 'part' + what.value;
41 var element = document.getElementById(id);
43 element.style.display = '';
45 element.style.display = 'none';
49 document.getElementById('enableV').disabled =
50 ! (document.getElementById('enableIIA').checked ||
51 document.getElementById('enableIIB').checked);
54 document.getElementById('enableVI').disabled =
55 ! document.getElementById('enableIA').checked;
59 <% include( '/elements/tr-checkbox.html',
60 'label' => 'Enable part IA?',
64 'onchange' => 'partchange(this); toggleVI();',
68 <TR id='partIA' style="display:none"><TD>Part IA</TD><TD><TABLE>
69 <TR><TD>Download speeds</TD><TD>
72 % foreach my $speed ( @FS::Report::FCC_477::download ) {
76 <% include( '/elements/select-table.html',
77 'table' => 'part_pkg_report_option',
79 'hashref' => { 'disabled' => '' },
80 'element_name' => 'part1_column_option',
83 FS::Report::FCC_477::restore_fcc477map("part1_column_option_$i"),
91 <TD>Upload speeds</TD><TD>
94 % foreach my $speed ( @FS::Report::FCC_477::upload ) {
98 <% include( '/elements/select-table.html',
99 'table' => 'part_pkg_report_option',
100 'name_col' => 'name',
101 'hashref' => { 'disabled' => '' },
102 'element_name' => 'part1_row_option',
103 'disable_empty' => 1,
105 FS::Report::FCC_477::restore_fcc477map("part1_row_option_$i"),
113 <TR><TD>Technologies</TD><TD>
116 % foreach my $tech ( @FS::Report::FCC_477::technology ) {
120 <% include( '/elements/select-table.html',
121 'table' => 'part_pkg_report_option',
122 'name_col' => 'name',
123 'hashref' => { 'disabled' => '' },
124 'element_name' => "part1_technology_option_$i",
125 'empty_label' => '(omit)',
127 FS::Report::FCC_477::restore_fcc477map("part1_technology_option_$i"),
137 <% include( '/elements/tr-checkbox.html',
138 'label' => 'Enable part IIA?',
142 'onchange' => 'partchange(this); toggleV();',
146 <TR id='partIIA' style="display:none"><TD>Part IIA</TD><TD><TABLE>
148 % foreach my $option ( @FS::Report::FCC_477::part2aoption ) {
150 <TH><% $option %></TH>
152 <% include( '/elements/select-table.html',
153 'table' => 'part_pkg_report_option',
154 'name_col' => 'name',
155 'hashref' => { 'disabled' => '' },
156 'element_name' => 'part2a_row_option',
158 FS::Report::FCC_477::restore_fcc477map("part2a_row_option_$i"),
167 <% include( '/elements/tr-checkbox.html',
168 'label' => 'Enable part IIB?',
172 'onchange' => 'partchange(this); toggleV();',
176 <TR id='partIIB' style="display:none"><TD>Part IIB</TD><TD><TABLE>
178 % foreach my $option ( @FS::Report::FCC_477::part2boption ) {
180 <TH><% $option %></TH>
182 <% include( '/elements/select-table.html',
183 'table' => 'part_pkg_report_option',
184 'name_col' => 'name',
185 'hashref' => { 'disabled' => '' },
186 'element_name' => 'part2b_row_option',
188 FS::Report::FCC_477::restore_fcc477map("part2b_row_option_$i"),
197 <% include( '/elements/tr-checkbox.html',
198 'label' => 'Enable part IV?',
200 'id' => 'enableIV', #unused
202 'onchange' => 'partchange(this)',
206 <TR id='partIV' style="display:none"><TD>Part IV</TD><TD><TABLE>
207 <% include( '/elements/tr-textarea.html',
208 'label' => 'Explanatory notes',
217 <% include( '/elements/tr-checkbox.html',
218 'label' => 'Enable part V?',
222 'onchange' => 'partchange(this)',
224 ' <FONT SIZE="-1">(requires Part IIA or IIB)</FONT>',
227 <TR id='partV' style="display:none">
230 <% include( '/elements/select-table.html',
231 'table' => 'part_pkg_report_option',
232 'name_col' => 'name',
233 'hashref' => { 'disabled' => '' },
234 'element_name' => 'part5_report_option',
236 FS::Report::FCC_477::restore_fcc477map("part5_report_option"),
243 <% include( '/elements/tr-checkbox.html',
244 'label' => 'Enable part VI?',
247 'value' => 'VI_census',
249 ' <FONT SIZE="-1">(requires part IA)</FONT>',
252 <SCRIPT TYPE="text/javascript">
259 <INPUT TYPE="submit" VALUE="Get Report">
263 <% include('/elements/footer.html') %>
267 unless $FS::CurrentUser::CurrentUser->access_right('List packages');
269 my @states = qsearch({
270 'table' => 'cust_location',
271 'select' => 'DISTINCT(state)',
272 'hashref' => { 'country' => 'US' }, # 477 report isn't relevant elsewhere