chiark / gitweb /
Further generalisation of text string entry; add missing copyrights
[ypp-sc-tools.web-live.git] / yarrg / web / lookup
index 38d87d6352d9b96c4a82f059e171c1a336f0d176..0106684af46e5ba515d69b9b3aa4a92be2fc9d19 100755 (executable)
@@ -56,6 +56,7 @@ my @vars;
        }, {    Name => 'Query',
                Before => 'Query: ',
                Values => [     [ 'route', 'Trades for route' ],
+                               [ 'commod', 'Prices for commodity' ],
                                [ 'age', 'Data age' ] ]
        });
 
@@ -141,6 +142,8 @@ foreach my $var (@vars) {
 
 #---------- initial checks, startup, main entry form ----------
 
+die if $a{Query} =~ m/[^a-z]/;
+
 dbw_connect($a{Ocean});
 
 </%perl>
@@ -150,17 +153,9 @@ $debug => 0
 
 <hr>
 
-%########### query `route' ##########
-% if ($a{Query} eq 'route') {
-
-<& query_route, %baseqf, %queryqf, quri => $quri, a => \%a &>
-
-% } elsif ($a{Query} eq 'age') {
-% ########### query `age' ##########
+<& "query_$a{Query}", %baseqf, %queryqf, quri => $quri, qa => \%a &>
 
-<& query_age, %baseqf, %queryqf &>
-
-% } ########## end of `age' query ##########
+<p>
 
 %#---------- debugging and epilogue ----------