X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Flookup;h=6fc1cd76e0cafa0d93da1ce9c8d3037f1254616b;hb=eb4dd353926d8d5f38ea442ee172ce0b2bb5925e;hp=7b3100ee17b28b541416d63f2fe4aed1506d9207;hpb=e088a29c1c037880074b5893831e6701273396d6;p=ypp-sc-tools.main.git
diff --git a/yarrg/web/lookup b/yarrg/web/lookup
index 7b3100e..6fc1cd7 100755
--- a/yarrg/web/lookup
+++ b/yarrg/web/lookup
@@ -57,6 +57,8 @@ my %styles;
Before => 'Query: ',
Values => [ [ 'route', 'Trades for route' ],
[ 'commod', 'Prices for commodity' ],
+ [ 'offers', 'Offers at location' ],
+ [ 'routesearch', 'Find profitable route' ],
[ 'age', 'Data age' ] ]
}, { Name => 'BuySell',
Before => '',
@@ -78,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) {
@@ -118,14 +126,15 @@ $ours
% }
%method>
-
<% ucfirst $ahtml{Query} %> - YARRG
+<% ucfirst $ahtml{Query} %> - YARRG
<&| script &>
function register_onload(f) {
@@ -138,15 +147,11 @@ tr.datarow1 { background: #ffffff; }
&script>
-YARRG -
- Yet Another Revenue Research Gatherer
-|
-development
-|
-introduction
-|
-documentation
+% if (!printable($m)) {
+
+<& navbar &>
+% }
<%perl>
foreach my $var (@vars) {
@@ -157,8 +162,8 @@ foreach my $var (@vars) {
foreach my $var (keys %ARGS) {
next unless $var =~
- m/^(?: (?:route|commod|capacity)string |
- lossperleague |
+ m/^(?: (?:route|commod|capacity|capital|island)string |
+ lossperleague | distance |
commodid |
islandid \d |
archipelago \d |
@@ -178,6 +183,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};
@@ -243,10 +249,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 {
@@ -258,15 +268,14 @@ $debug => 0
}
&>
-
-
%#---------- debugging and epilogue ----------
% if ($debug) {
-
+
% }
<&| script &>