X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partVI_census.html;h=9134baccaec546fa5b6bf72dd0cd4ebede8023d2;hb=783eefa4a70dd88dd13ffd73c4e23361288628f0;hp=5f3039d1af3fbf059a14b20e068b9b73ef91b806;hpb=51add281a0ca46ffa75bfa5e2aa45c0da9bb9643;p=freeside.git diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html index 5f3039d1a..9134bacca 100755 --- a/httemplate/search/477partVI_census.html +++ b/httemplate/search/477partVI_census.html @@ -1,5 +1,13 @@ <% include( 'elements/search.html', 'html_init' => $html_init, + 'html_foot' => sub { if (scalar(keys %state_hash) > 1) { + '
'. + 'WARNING: multiple states found'. + '
'; + } else { + ''; + } + }, 'name' => 'regions', 'query' => [ @sql_query ], 'count_query' => $count_query, @@ -28,7 +36,10 @@ 'percentage', ], 'fields' => [ - sub { my $row = shift; substr($row->censustract, 2, 3) }, + sub { my $row = shift; + $state_hash{substr($row->censustract, 0, 2)} = 1; + substr($row->censustract, 2, 3) + }, sub { my $row = shift; substr($row->censustract, 5) }, 'upload', 'download', @@ -64,10 +75,12 @@ my $html_init = '

Part VI

'; my %search_hash = (); my @sql_query = (); +my %state_hash = (); -for ( qw(agentnum magic classnum) ) { +for ( qw(agentnum magic) ) { $search_hash{$_} = $cgi->param($_) if $cgi->param($_); } +$search_hash{'classnum'} = [ $cgi->param('classnum') ]; my @column_option = grep { /^\d+$/ } $cgi->param('part1_column_option') if $cgi->param('part1_column_option');