7 use C4::Auth; # get_template_and_user
8 use C4::Interface::CGI::Output;
13 my $dbh = C4::Context->dbh;
14 my $query="Select itemtype,description from itemtypes order by description";
15 my $sth=$dbh->prepare($query);
19 while (my ($value,$lib) = $sth->fetchrow_array) {
20 push @itemtype, $value;
21 $itemtypes{$value}=$lib;
24 my $CGIitemtype=CGI::scrolling_list( -name => 'itemtype',
25 -values => \@itemtype,
26 -labels => \%itemtypes,
31 my ($template, $borrowernumber, $cookie)
32 = get_template_and_user({template_name => "opac-main.tmpl",
36 flagsrequired => {borrow => 1},
40 foreach my $language (getalllanguages()) {
41 next if $language eq 'images';
43 # next if $currently_selected_languages->{$language};
44 push @options, { language => $language, counter => $counter };
48 $template->param(CGIitemtype => $CGIitemtype,
49 suggestion => C4::Context->preference("suggestion"),
50 virtualshelves => C4::Context->preference("virtualshelves"),
51 languages => \@options,
53 output_html_with_http_headers $input, $cookie, $template->output;