<hr>
<& "query_$styles{Query}", %baseqf, %queryqf, %styles,
- quri => $quri, dbh => $dbh,
+ quri => $quri, dbh => $dbh, queryqf => \%queryqf,
prselector => $prselector,
someresults => $someresults,
emsgokorprint => sub {
<%args>
$quri
$dbh
+$queryqf
$islandstring => '';
$capacitystring => '';
$lossperleague => '';
$capitalstring => '';
$distance => '';
-$someresults
$emsgokorprint
</%args>
my $row= $islandname_stmt->fetchrow_hashref();
local $_= $row->{'islandname'};
s/ Island$//;
- return $_, $row->{'archipelago'};
+ return $_, $row->{'islandname'}, $row->{'archipelago'};
};
#---------- compute the results ----------
my ($ap,$isles) = (uc $1,$5);
next if $results{$ap} && %{$results{$ap}} >= $maxcountea;
my $item= { A => $3, P => $4, Leagues => $2 };
- my (@i, @a);
+ my (@i, @fi, @a);
foreach (split / /, $isles) {
- my ($name,$arch)= $isleinfo->($_);
+ my ($name,$fullname,$arch)= $isleinfo->($_);
push @i, $name;
+ push @fi, $fullname;
push @a, $arch unless @a && $a[-1] eq $arch;
}
$item->{Isles}= [ @i ];
for ($i=1; $i < @i-1; $i++) {
push @{ $item->{Vias} }, $i[$i];
}
+ my %linkqf= %$queryqf;
+ delete $linkqf{'query'};
+ $linkqf{'routestring'}= join ', ', @fi;
+ $item->{Url}= $quri->(%linkqf);
$results{$ap}{$isles}= $item;
}
<td align=right><% $item->{A} |h %>
<td align=right><% $item->{P} |h %>
<td align=right><% $item->{Leagues} |h %>
-<td align=left><% join ', ', @{ $item->{Archs} } |h %>
+<td align=left><a href="<% $item->{Url} |h %>"><% join ', ', @{ $item->{Archs} } |h %></a>
<td align=left><% $item->{Start} |h %>,
<td align=left><% join ' ', map { $_.',' } @{ $item->{Vias} } |h %>
<td align=left><% $item->{Finish} |h %>