9 use C4::Output; # contains picktemplate
14 my $language='french';
18 open (KC, "/etc/koha.conf");
22 if (/(.*)\s*=\s*(.*)/) {
25 # Clean up white space at beginning and end
30 $configfile{$variable}=$value;
34 my $includes=$configfile{'includes'};
35 ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
36 my $templatebase="catalogue/moredetail.tmpl";
37 my $startfrom=$query->param('startfrom');
38 ($startfrom) || ($startfrom=0);
39 my $theme=picktemplate($includes, $templatebase);
41 my $subject=$query->param('subject');
42 # if its a subject we need to use the subject.tmpl
44 $templatebase=~ s/searchresults\.tmpl/subject\.tmpl/;
46 my $template = HTML::Template->new(filename => "$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path => [$includes]);
50 my $biblionumber=$query->param('bib');
51 my $title=$query->param('title');
52 my $bi=$query->param('bi');
54 my $data=bibitemdata($bi);
55 my $dewey = $data->{'dewey'};
57 if ($dewey eq "000.") { $dewey = "";};
58 if ($dewey < 10){$dewey='00'.$dewey;}
59 if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
64 $data->{'dewey'}=$dewey;
68 my (@items)=itemissues($bi);
70 $data->{'count'}=$count;
71 my ($order,$ordernum)=getorder($bi,$biblionumber);
78 $template->param(includesdir => $includes);
79 $template->param(BIBITEM_DATA => \@results);
80 $template->param(ITEM_DATA => \@items);
81 print "Content-Type: text/html\n\n", $template->output;