16 |
|
|
17 |
my $desc = shift || return ''; |
my $desc = shift || return ''; |
18 |
$desc = substr($desc,0,$max_desc) if (length($desc) > $max_desc); |
$desc = substr($desc,0,$max_desc) if (length($desc) > $max_desc); |
19 |
|
$desc = e($desc); |
20 |
# test if $desc contains any of our query words |
# test if $desc contains any of our query words |
21 |
my @snips; |
my @snips; |
22 |
|
|
196 |
# default format for output |
# default format for output |
197 |
my $hit_fmt = "<a href=\"%s\">%s</a> [%s]<br>\n"; |
my $hit_fmt = "<a href=\"%s\">%s</a> [%s]<br>\n"; |
198 |
|
|
|
# output start of table |
|
|
print qq{ |
|
|
<table border="0"> |
|
|
}; |
|
|
# html before and after each hit |
|
|
my $tr_pre = qq{ |
|
|
<tr><td> |
|
|
}; |
|
|
my $tr_post = qq{ |
|
|
</td></tr> |
|
|
}; |
|
|
|
|
199 |
if (@properties) { |
if (@properties) { |
200 |
$hit_fmt = x($config->{hit}) if (! param('no_properties')); |
$hit_fmt = x($config->{hit}) if (! param('no_properties')); |
201 |
$params{properties} = \@properties; |
$params{properties} = \@properties; |
232 |
} |
} |
233 |
|
|
234 |
my %path2title; |
my %path2title; |
|
use Data::Dumper; |
|
235 |
foreach my $p (@{$config->{path2title}->{path}}) { |
foreach my $p (@{$config->{path2title}->{path}}) { |
236 |
$path2title{$p->{dir}} = $p->{content}; |
$path2title{$p->{dir}} = $p->{content}; |
237 |
} |
} |
238 |
|
|
239 |
|
# output start of table |
240 |
|
print qq{ |
241 |
|
<table border="0"> |
242 |
|
}; |
243 |
|
# html before and after each hit |
244 |
|
my $tr_pre = qq{ |
245 |
|
<tr><td> |
246 |
|
}; |
247 |
|
my $tr_post = qq{ |
248 |
|
</td></tr> |
249 |
|
}; |
250 |
|
|
251 |
for(my $i=$pager->first; $i<=$pager->last; $i++) { |
for(my $i=$pager->first; $i<=$pager->last; $i++) { |
252 |
|
|
253 |
my $result = $results->NextResult; |
my $result = $results->NextResult; |