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 <& /elements/tr-input-date-field.html, {
33 'label' => 'As of date',
36 'format' => '%m/%d/%Y'
39 <% include( '/elements/tr-select-pkg_class.html',
41 'empty_label' => '(empty class)',
45 <SCRIPT type="text/javascript">
46 function partchange(what) {
47 var id = 'part' + what.value;
48 var element = document.getElementById(id);
50 element.style.display = '';
52 element.style.display = 'none';
56 document.getElementById('enableV').disabled =
57 ! (document.getElementById('enableIIA').checked ||
58 document.getElementById('enableIIB').checked);
61 document.getElementById('enableVI').disabled =
62 ! document.getElementById('enableIA').checked;
66 <% include( '/elements/tr-checkbox.html',
67 'label' => 'Enable part IA?',
71 'onchange' => 'partchange(this); toggleVI();',
75 <TR id='partIA' style="display:none"><TD>Part IA</TD><TD><TABLE>
76 <TR><TD>Download speeds</TD><TD>
79 % foreach my $speed ( @FS::Report::FCC_477::download ) {
83 <% include( '/elements/select-table.html',
84 'table' => 'part_pkg_report_option',
86 'hashref' => { 'disabled' => '' },
87 'element_name' => 'part1_column_option',
90 FS::Report::FCC_477::restore_fcc477map("part1_column_option_$i"),
98 <TD>Upload speeds</TD><TD>
101 % foreach my $speed ( @FS::Report::FCC_477::upload ) {
103 <TH><% $speed %></TH>
105 <% include( '/elements/select-table.html',
106 'table' => 'part_pkg_report_option',
107 'name_col' => 'name',
108 'hashref' => { 'disabled' => '' },
109 'element_name' => 'part1_row_option',
110 'disable_empty' => 1,
112 FS::Report::FCC_477::restore_fcc477map("part1_row_option_$i"),
120 <TR><TD>Technologies</TD><TD>
123 % foreach my $tech ( @FS::Report::FCC_477::technology ) {
127 <% include( '/elements/select-table.html',
128 'table' => 'part_pkg_report_option',
129 'name_col' => 'name',
130 'hashref' => { 'disabled' => '' },
131 'element_name' => "part1_technology_option_$i",
132 'empty_label' => '(omit)',
134 FS::Report::FCC_477::restore_fcc477map("part1_technology_option_$i"),
144 <% include( '/elements/tr-checkbox.html',
145 'label' => 'Enable part IIA?',
149 'onchange' => 'partchange(this); toggleV();',
153 <TR id='partIIA' style="display:none"><TD>Part IIA</TD><TD><TABLE>
155 % foreach my $option ( @FS::Report::FCC_477::part2aoption ) {
157 <TH><% $option %></TH>
159 <% include( '/elements/select-table.html',
160 'table' => 'part_pkg_report_option',
161 'name_col' => 'name',
162 'hashref' => { 'disabled' => '' },
163 'element_name' => 'part2a_row_option',
165 FS::Report::FCC_477::restore_fcc477map("part2a_row_option_$i"),
174 <% include( '/elements/tr-checkbox.html',
175 'label' => 'Enable part IIB?',
179 'onchange' => 'partchange(this); toggleV();',
183 <TR id='partIIB' style="display:none"><TD>Part IIB</TD><TD><TABLE>
185 % foreach my $option ( @FS::Report::FCC_477::part2boption ) {
187 <TH><% $option %></TH>
189 <% include( '/elements/select-table.html',
190 'table' => 'part_pkg_report_option',
191 'name_col' => 'name',
192 'hashref' => { 'disabled' => '' },
193 'element_name' => 'part2b_row_option',
195 FS::Report::FCC_477::restore_fcc477map("part2b_row_option_$i"),
204 <% include( '/elements/tr-checkbox.html',
205 'label' => 'Enable part IV?',
207 'id' => 'enableIV', #unused
209 'onchange' => 'partchange(this)',
213 <TR id='partIV' style="display:none"><TD>Part IV</TD><TD><TABLE>
214 <% include( '/elements/tr-textarea.html',
215 'label' => 'Explanatory notes',
224 <% include( '/elements/tr-checkbox.html',
225 'label' => 'Enable part V?',
229 'onchange' => 'partchange(this)',
231 ' <FONT SIZE="-1">(requires Part IIA or IIB)</FONT>',
234 <TR id='partV' style="display:none">
237 <% include( '/elements/select-table.html',
238 'table' => 'part_pkg_report_option',
239 'name_col' => 'name',
240 'hashref' => { 'disabled' => '' },
241 'element_name' => 'part5_report_option',
243 FS::Report::FCC_477::restore_fcc477map("part5_report_option"),
250 <% include( '/elements/tr-checkbox.html',
251 'label' => 'Enable part VI?',
254 'value' => 'VI_census',
256 ' <FONT SIZE="-1">(requires part IA)</FONT>',
259 <SCRIPT TYPE="text/javascript">
266 <INPUT TYPE="submit" VALUE="Get Report">
270 <% include('/elements/footer.html') %>
274 unless $FS::CurrentUser::CurrentUser->access_right('List packages');
276 my @states = qsearch({
277 'table' => 'cust_location',
278 'select' => 'DISTINCT(state)',
279 'hashref' => { 'country' => 'US' }, # 477 report isn't relevant elsewhere