7 use C4::Auth; # get_template_and_user
8 use C4::Interface::CGI::Output;
11 my $dbh = C4::Context->dbh;
12 my $query="Select itemtype,description from itemtypes order by description";
13 my $sth=$dbh->prepare($query);
17 while (my ($value,$lib) = $sth->fetchrow_array) {
18 push @itemtype, $value;
19 $itemtypes{$value}=$lib;
22 my $CGIitemtype=CGI::scrolling_list( -name => 'itemtype',
23 -values => \@itemtype,
24 -labels => \%itemtypes,
28 my ($template, $borrowernumber, $cookie)
29 = get_template_and_user({template_name => "opac-main.tmpl",
33 flagsrequired => {borrow => 1},
36 $template->param(CGIitemtype => $CGIitemtype,
37 LibraryName => C4::Context->preference("LibraryName"),
39 output_html_with_http_headers $input, $cookie, $template->output;