X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Flookup;h=a2ccc8de0a80df6b3659fafc95bdc41976888deb;hb=c444da554d8b434492399eaf81574c081dad7141;hp=ec72a6ee5c37e974efb7286d4537f05404ab120e;hpb=db998ff5d636967de9de9218ff0b940a4feb9a6d;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/lookup b/yarrg/web/lookup index ec72a6e..a2ccc8d 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) { @@ -139,15 +146,17 @@ tr.datarow1 { background: #ffffff; } +% if (!printable($m)) { YARRG - Yet Another Revenue Research Gatherer | -development -| introduction | documentation +| +development

+% } <%perl> foreach my $var (@vars) { @@ -158,8 +167,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 +188,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 +254,12 @@ my $someresults= sub { $debug => 0 +% if (!printable($m)) {


+% } <& "query_$styles{Query}", %baseqf, %queryqf, %styles, - quri => $quri, dbh => $dbh, + quri => $quri, dbh => $dbh, queryqf => \%queryqf, allargs => \%ARGS, prselector => $prselector, someresults => $someresults, emsgokorprint => sub {