chiark / gitweb /
Query for vessel capacity
[ypp-sc-tools.db-test.git] / yarrg / web / query_route
index 393e7a668755145d05262a56b56ed005330669c1..d4a3bd15e4c06cd362765852d3e63bcc8c6284fd 100644 (file)
@@ -38,6 +38,7 @@ $quri
 $dbh
 $prselector
 $routestring => '';
+$capacitystring => '';
 $someresults
 $emsgokorprint
 </%args>
@@ -47,6 +48,7 @@ my $emsg;
 my @archipelagoes;
 my @islandids;
 my %islandid2;
+my ($max_volume, $max_mass);
 
 my $qa= \%ARGS;
 
@@ -84,6 +86,15 @@ Enter route (islands, or archipelagoes, separated by |s or commas;
  size=80
 </&>
 
+Vessel capacity:
+<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs',
+    thingstring => 'capacitystring', emsgstore => \$emsg,
+    perresult => sub {
+        ($max_volume,$max_mass) = @_;
+    }
+ &>
+</&>
+
 % } else { #---------- dropdowns, user selects from menus ----------
 
 % $startform->(grep {
@@ -181,7 +192,9 @@ function ms_Setarch(dd) {
 % } #---------- end of dropdowns, now common middle of page code ----------
 
 <input type=submit name=submit value="<% $goupdate->() %>">
-% my $ours= sub { $_[0] =~ m/^island|^archipelago|^routestring|^[RT]/; };
+% my $ours= sub { $_[0] =~
+%      m/^island|^archipelago|^routestring|^capacitystring|^[RT]/;
+% };
 <& "lookup:formhidden", ours => $ours &>
 
 <%perl>