-query_routesearch:
-
- circular routes
- routes ending in specific place(s)
-
-
UPLOADER
--------
printable voyage trading plan
query_routesearch should show capital for each voyage
+query_routesearch should support ending in specific place(s)
[ 1, 'Show individual stalls' ],
],
QuerySpecific => 1,
+ }, { Name => 'RouteSearchType',
+ Before => 'Type of routes to search for: ',
+ Values => [ [ 0, 'Open-ended' ],
+ [ 1, 'Circular' ],
+ ],
+ QuerySpecific => 1,
});
foreach my $var (@vars) {
<hr>
<& "query_$styles{Query}", %baseqf, %queryqf, %styles,
- quri => $quri, dbh => $dbh, queryqf => \%queryqf,
+ quri => $quri, dbh => $dbh, queryqf => \%queryqf, allargs => \%ARGS,
prselector => $prselector,
someresults => $someresults,
emsgokorprint => sub {
$lossperleague => '';
$capitalstring => '';
$distance => '';
+$prselector
$someresults
$emsgokorprint
+$allargs
</%args>
<%perl>
This feature is not available from the "drop down menus" interface.
% } else {
+% $prselector->('RouteSearchType');
+
<form action="<% $quri->() |h %>" method="get">
<& enter_route, qa=>$qa, dbh=>$dbh, emsg_r=>\$emsg, warningfs_r=>\@warningfs,
$emsgokorprint->($emsg) or return;
@islandids or return;
+$allargs->{'submit'} or return;
defined $routeparams->{MaxMass} or defined $routeparams->{MaxVolume} or return;
#---------- prepare island names ----------
push @rsargs, defined $routeparams->{LossPerLeaguePct}
? $routeparams->{LossPerLeaguePct}*0.01 : 1e-9;
push @rsargs, '0';
-push @rsargs, 'search',$maxdist, $maxcountea,$maxcountea, 'any', @islandids;
+push @rsargs, 'search',$maxdist, $maxcountea,$maxcountea;
+push @rsargs, $ARGS{RouteSearchType} ? 'circ' : 'any';
+push @rsargs, @islandids;
m/[^-.0-9a-zA-Z]/ and die "$_ $& ?" foreach @rsargs;