|
Lines 49-54
my $stdid = $input->param('stdid');
Link Here
|
| 49 |
my $srchany = $input->param('srchany'); |
49 |
my $srchany = $input->param('srchany'); |
| 50 |
my $random = $input->param('random') || rand(1000000000); # this var is not useful anymore just kept for rel2_2 compatibility |
50 |
my $random = $input->param('random') || rand(1000000000); # this var is not useful anymore just kept for rel2_2 compatibility |
| 51 |
my $op = $input->param('op'); |
51 |
my $op = $input->param('op'); |
|
|
52 |
|
| 53 |
my $page = $input->param('current_page') || 1; |
| 54 |
$page = $input->param('goto_page') if $input->param('changepage_goto'); |
| 55 |
my $show_next = 0; |
| 56 |
my $total_pages = 0; |
| 57 |
|
| 52 |
my $numberpending; |
58 |
my $numberpending; |
| 53 |
my $attr = ''; |
59 |
my $attr = ''; |
| 54 |
my $term; |
60 |
my $term; |
|
Lines 80-103
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
Link Here
|
| 80 |
}); |
86 |
}); |
| 81 |
|
87 |
|
| 82 |
$template->param( frameworkcode => $frameworkcode, ); |
88 |
$template->param( frameworkcode => $frameworkcode, ); |
|
|
89 |
$template->param( |
| 90 |
isbn => $isbn, |
| 91 |
issn => $issn, |
| 92 |
lccn => $lccn, |
| 93 |
lccall => $lccall, |
| 94 |
title => $title, |
| 95 |
author => $author, |
| 96 |
controlnumber=> $controlnumber, |
| 97 |
stdid => $stdid, |
| 98 |
srchany => $srchany, |
| 99 |
biblionumber => $biblionumber, |
| 100 |
dewey => $dewey, |
| 101 |
subject => $subject, |
| 102 |
); |
| 83 |
|
103 |
|
| 84 |
if ( $op ne "do_search" ) { |
104 |
if ( $op ne "do_search" ) { |
| 85 |
my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers ORDER BY rank, name"); |
105 |
my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers ORDER BY rank, name"); |
| 86 |
$sth->execute(); |
106 |
$sth->execute(); |
| 87 |
my $serverloop = $sth->fetchall_arrayref( {} ); |
107 |
my $serverloop = $sth->fetchall_arrayref( {} ); |
| 88 |
$template->param( |
108 |
$template->param( |
| 89 |
isbn => $isbn, |
|
|
| 90 |
issn => $issn, |
| 91 |
lccn => $lccn, |
| 92 |
lccall => $lccall, |
| 93 |
title => $title, |
| 94 |
author => $author, |
| 95 |
controlnumber=> $controlnumber, |
| 96 |
stdid => $stdid, |
| 97 |
srchany => $srchany, |
| 98 |
serverloop => $serverloop, |
109 |
serverloop => $serverloop, |
| 99 |
opsearch => "search", |
110 |
opsearch => "search", |
| 100 |
biblionumber => $biblionumber, |
|
|
| 101 |
); |
111 |
); |
| 102 |
output_html_with_http_headers $input, $cookie, $template->output; |
112 |
output_html_with_http_headers $input, $cookie, $template->output; |
| 103 |
} |
113 |
} |
|
Lines 231-238
warn "query ".$query if $DEBUG;
Link Here
|
| 231 |
my $numresults = $oResult[$k]->size(); |
241 |
my $numresults = $oResult[$k]->size(); |
| 232 |
my $i; |
242 |
my $i; |
| 233 |
my $result = ''; |
243 |
my $result = ''; |
| 234 |
if ( $numresults > 0 ) { |
244 |
if ( $numresults > 0 and $numresults >= (($page-1)*20)) { |
| 235 |
for ($i = 0; $i < (($numresults < 20) ? $numresults : 20); $i++) { |
245 |
$show_next = 1 if $numresults >= ($page*20); |
|
|
246 |
$total_pages = int($numresults/20)+1 if $total_pages < ($numresults/20); |
| 247 |
for ($i = ($page-1)*20; $i < (($numresults < ($page*20)) ? $numresults : ($page*20)); $i++) { |
| 236 |
my $rec = $oResult[$k]->record($i); |
248 |
my $rec = $oResult[$k]->record($i); |
| 237 |
if ($rec) { |
249 |
if ($rec) { |
| 238 |
my $marcrecord; |
250 |
my $marcrecord; |
|
Lines 280-292
warn "query ".$query if $DEBUG;
Link Here
|
| 280 |
} |
292 |
} |
| 281 |
} # if $k !=0 |
293 |
} # if $k !=0 |
| 282 |
$numberpending = $nremaining - 1; |
294 |
$numberpending = $nremaining - 1; |
|
|
295 |
|
| 296 |
my @servers = (); |
| 297 |
foreach my $id (@id) { |
| 298 |
push(@servers,{id => $id}); |
| 299 |
} |
| 300 |
|
| 283 |
$template->param( |
301 |
$template->param( |
| 284 |
breeding_loop => \@breeding_loop, |
302 |
breeding_loop => \@breeding_loop, |
| 285 |
server => $servername[$k], |
303 |
server => $servername[$k], |
| 286 |
numberpending => $numberpending, |
304 |
numberpending => $numberpending, |
| 287 |
biblionumber => $biblionumber, |
305 |
biblionumber => $biblionumber, |
| 288 |
errconn => \@errconn |
306 |
errconn => \@errconn, |
|
|
307 |
current_page => $page, |
| 308 |
servers => \@servers, |
| 309 |
total_pages => $total_pages, |
| 289 |
); |
310 |
); |
|
|
311 |
$template->param(show_nextbutton=>1) if $show_next; |
| 312 |
$template->param(show_prevbutton=>1) if $page != 1; |
| 290 |
|
313 |
|
| 291 |
output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0; |
314 |
output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0; |
| 292 |
|
315 |
|