X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;ds=sidebyside;f=yarrg%2Fweb%2Flookup;h=365ed58129407277626411e60f96b8bc8fe2ba1e;hb=59316f0dcddd4e5d15e47dfde36f513e1685c4ae;hp=8fb3bb142a077ce644fd37a3efb1be25046f7390;hpb=38888dbd9221f97b1886ee545d0113c88432556a;p=ypp-sc-tools.db-live.git
diff --git a/yarrg/web/lookup b/yarrg/web/lookup
index 8fb3bb1..365ed58 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,11 +147,18 @@ tr.datarow1 { background: #e3e3e3; }
&script>
+% if (!printable($m)) {
+
YARRG -
Yet Another Revenue Research Gatherer
|
+
introduction
+|
documentation
+|
+
development
+% }
<%perl>
foreach my $var (@vars) {
@@ -153,7 +169,8 @@ foreach my $var (@vars) {
foreach my $var (keys %ARGS) {
next unless $var =~
- m/^(?: (?:route|commod)string |
+ m/^(?: (?:route|commod|capacity|capital|island)string |
+ lossperleague | distance |
commodid |
islandid \d |
archipelago \d |
@@ -173,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};
@@ -238,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 {
@@ -253,15 +275,14 @@ $debug => 0
}
&>
-
-
%#---------- debugging and epilogue ----------
% if ($debug) {
-
+
% }
<&| script &>