[freeside-commits] freeside/httemplate/search 477partVI_census.html, 1.1, 1.2
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Sep 1 13:25:02 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv10390
Modified Files:
477partVI_census.html
Log Message:
warn about multiple states
Index: 477partVI_census.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/477partVI_census.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- 477partVI_census.html 24 Aug 2010 17:30:34 -0000 1.1
+++ 477partVI_census.html 1 Sep 2010 20:25:00 -0000 1.2
@@ -1,5 +1,13 @@
<% include( 'elements/search.html',
'html_init' => $html_init,
+ 'html_foot' => sub { if (scalar(keys %state_hash) > 1) {
+ '<BR><B>'.
+ 'WARNING: multiple states found'.
+ '</B><BR>';
+ } 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,6 +75,7 @@
my %search_hash = ();
my @sql_query = ();
+my %state_hash = ();
for ( qw(agentnum magic classnum) ) {
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
More information about the freeside-commits
mailing list