Lines 335-396
sub plugin {
Link Here
|
335 |
} |
335 |
} |
336 |
); |
336 |
); |
337 |
|
337 |
|
338 |
my $sth = $dbh->prepare( |
338 |
my @itemtypes = C4::ItemType->all; |
339 |
"Select itemtype,description from itemtypes order by description"); |
|
|
340 |
$sth->execute; |
341 |
my @itemtype; |
342 |
my %itemtypes; |
343 |
push @itemtype, ""; |
344 |
$itemtypes{''} = ""; |
345 |
while ( my ( $value, $lib ) = $sth->fetchrow_array ) { |
346 |
push @itemtype, $value; |
347 |
$itemtypes{$value} = $lib; |
348 |
} |
349 |
|
339 |
|
350 |
my $CGIitemtype = CGI::scrolling_list( |
340 |
$template->param( |
351 |
-name => 'value', |
341 |
itypeloop => \@itemtypes, |
352 |
-values => \@itemtype, |
342 |
index => $query->param('index'), |
353 |
-labels => \%itemtypes, |
|
|
354 |
-size => 1, |
355 |
-multiple => 0 |
356 |
); |
357 |
$sth->finish; |
358 |
|
359 |
# To show list of branches please use GetBranchesLoop() and modify template |
360 |
|
361 |
my $req = $dbh->prepare( |
362 |
"select distinctrow left(publishercode,45) from biblioitems order by publishercode" |
363 |
); |
364 |
$req->execute; |
365 |
my @select; |
366 |
push @select, ""; |
367 |
while ( my ($value) = $req->fetchrow ) { |
368 |
push @select, $value; |
369 |
} |
370 |
my $CGIpublisher = CGI::scrolling_list( |
371 |
-name => 'value', |
372 |
-id => 'publisher', |
373 |
-values => \@select, |
374 |
-size => 1, |
375 |
-multiple => 0 |
376 |
); |
377 |
|
378 |
# my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description"); |
379 |
# $sth->execute; |
380 |
# while (my ($description,$itemtype) = $sth->fetchrow) { |
381 |
# $classlist.="<option value=\"$itemtype\">$description</option>\n"; |
382 |
# } |
383 |
# $sth->finish; |
384 |
|
385 |
my @itemtypes = C4::ItemType->all; |
386 |
|
387 |
$template->param( #classlist => $classlist, |
388 |
CGIitemtype => $CGIitemtype, |
389 |
CGIPublisher => $CGIpublisher, |
390 |
itypeloop => \@itemtypes, |
391 |
index => $query->param('index'), |
392 |
Search => 1, |
343 |
Search => 1, |
393 |
); |
344 |
); |
394 |
} |
345 |
} |
395 |
output_html_with_http_headers $query, $cookie, $template->output; |
346 |
output_html_with_http_headers $query, $cookie, $template->output; |
396 |
} |
347 |
} |
397 |
- |
|
|