X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=yarrg%2Fweb%2Flookup;h=365ed58129407277626411e60f96b8bc8fe2ba1e;hp=7af431cee119f6e163439b83a08fcf84b6b8eedd;hb=3dbb2f33eae3a509123ffc99e48e35f858a8292a;hpb=872e647cac241531e4599c8b8b330d8772020253
diff --git a/yarrg/web/lookup b/yarrg/web/lookup
index 7af431c..365ed58 100755
--- a/yarrg/web/lookup
+++ b/yarrg/web/lookup
@@ -58,6 +58,7 @@ my %styles;
Values => [ [ 'route', 'Trades for route' ],
[ 'commod', 'Prices for commodity' ],
[ 'offers', 'Offers at location' ],
+ [ 'routesearch', 'Find profitable route' ],
[ 'age', 'Data age' ] ]
}, { Name => 'BuySell',
Before => '',
@@ -79,6 +80,12 @@ my %styles;
[ 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) {
@@ -121,12 +128,13 @@ $ours
<% ucfirst $ahtml{Query} %> - YARRG
<&| script &>
function register_onload(f) {
@@ -139,6 +147,8 @@ tr.datarow1 { background: #ffffff; }
&script>
+% if (!printable($m)) {
+
YARRG -
Yet Another Revenue Research Gatherer
|
@@ -148,6 +158,7 @@ tr.datarow1 { background: #ffffff; }
|
development
+% }
<%perl>
foreach my $var (@vars) {
@@ -158,8 +169,8 @@ foreach my $var (@vars) {
foreach my $var (keys %ARGS) {
next unless $var =~
- m/^(?: (?:route|commod|capacity|capital)string |
- lossperleague |
+ m/^(?: (?:route|commod|capacity|capital|island)string |
+ lossperleague | distance |
commodid |
islandid \d |
archipelago \d |
@@ -179,6 +190,7 @@ my $quri= sub {
my $prselector_core= sub {
my ($var)= @_;
+ return if printable($m);
my $name= $var->{Name};
my $lname= lc $var->{Name};
my $delim= $var->{Before};
@@ -244,10 +256,14 @@ my $someresults= sub {
$debug => 0
%args>
+% if (!printable($m)) {
+
+% }
<& "query_$styles{Query}", %baseqf, %queryqf, %styles,
quri => $quri, dbh => $dbh,
+ baseqf => \%baseqf, queryqf => \%queryqf, allargs => \%ARGS,
prselector => $prselector,
someresults => $someresults,
emsgokorprint => sub {
@@ -259,15 +275,14 @@ $debug => 0
}
&>
-
-
%#---------- debugging and epilogue ----------
% if ($debug) {
-
+
% }
<&| script &>