#!/usr/bin/perl
+# $Id$
+
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
use C4::Koha;
use CGI;
use C4::Search;
-use C4::Acquisitions;
-use C4::Output; # contains picktemplate
+use C4::Catalogue;
+use C4::Output; # contains gettemplate
+use C4::Auth;
my $query=new CGI;
"/usr/local/www/hdl/htdocs/includes";
my $startfrom=$query->param('startfrom') || 0;
-
-my $template = gettemplate("catalogue/moredetail.tmpl");
+my $subject=$query->param('subject');
+# if its a subject we need to use the subject.tmpl
+my $template;
+if ($subject){
+ $template = gettemplate("catalogue/subject.tmpl");
+} else {
+ $template = gettemplate("catalogue/moredetail.tmpl");
+}
+my $flagsrequired;
+$flagsrequired->{catalogue}=1;
+my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, $flagsrequired);
# get variables
$data->{'count'}=$count;
my ($order,$ordernum)=getorder($bi,$biblionumber);
-
my $env;
$env->{itemcount}=1;
$item->{'ordernumber'} = $ordernum;
$item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
- # FIXME - This should be "==", not "=", right?
- if ($item->{'date_due'} = 'Available'){
+ if ($item->{'date_due'} eq 'Available'){
$item->{'issue'}="<b>Available</b><br>";
} else {
$item->{'issue'}="<b>Currently on issue to:</b> <a href=/cgi-bin/koha/moremember.pl?bornum=$item->{'borrower0'}>$item->{'card'}</a><br>";
}
-
}
$template->param(includesdir => $includes);
$template->param(BIBITEM_DATA => \@results);
$template->param(ITEM_DATA => \@items);
+$template->param(loggedinuser => $loggedinuser);
print "Content-Type: text/html\n\n", $template->output;