Merging from trunk to rel-1-2

This commit is contained in:
tonnesen 2002-10-28 17:45:14 +00:00
parent df078a8956
commit 0f52289a5b
14 changed files with 368 additions and 137 deletions

View File

@ -5,6 +5,7 @@ package C4::BookShelves; #asummes C4/BookShelves
#
#requires DBI.pm to be installed
# $Id$
# Copyright 2000-2002 Katipo Communications
#
@ -28,56 +29,50 @@ require Exporter;
use DBI;
use C4::Database;
use C4::Circulation::Circ2;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
$VERSION = 0.01;
=head1 NAME
C4::BookShelves - Functions for manipulating Koha virtual bookshelves
=head1 SYNOPSIS
use C4::BookShelves;
=head1 DESCRIPTION
This module provides functions for manipulating virtual bookshelves,
including creating and deleting bookshelves, and adding and removing
items to and from bookshelves.
=head1 FUNCTIONS
=over 2
=cut
@ISA = qw(Exporter);
@EXPORT = qw(&GetShelfList &GetShelfContents &AddToShelf &RemoveFromShelf &AddShelf &RemoveShelf);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
# your exported package globals go here,
# as well as any optionally exported functions
@EXPORT_OK = qw($Var1 %Hashit);
# non-exported package globals go here
use vars qw(@more $stuff);
# initalize package globals, first exported ones
my $Var1 = '';
my %Hashit = ();
# then the others (which are still accessible as $Some::Module::stuff)
my $stuff = '';
my @more = ();
# all file-scoped lexicals must be created before
# the functions below that use them.
# file-private lexicals go here
my $priv_var = '';
my %secret_hash = ();
# here's a file-private function as a closure,
# callable as &$priv_func; it cannot be prototyped.
my $priv_func = sub {
# stuff goes here.
};
# make all your functions, whether exported or not;
my $dbh=C4Connect();
sub GetShelfList {
# FIXME - These two database queries can be combined into one:
# SELECT bookshelf.shelfnumber, bookshelf.shelfname,
# count(shelfcontents.itemnumber)
# FROM bookshelf
# LEFT JOIN shelfcontents
# ON bookshelf.shelfnumber = shelfcontents.shelfnumber
# GROUP BY bookshelf.shelfnumber
my $sth=$dbh->prepare("select shelfnumber,shelfname from bookshelf");
$sth->execute;
my %shelflist;
while (my ($shelfnumber, $shelfname) = $sth->fetchrow) {
my $sti=$dbh->prepare("select count(*) from shelfcontents where shelfnumber=$shelfnumber");
# FIXME - Should there be an "order by" in here somewhere?
$sti->execute;
my ($count) = $sti->fetchrow;
$shelflist{$shelfnumber}->{'shelfname'}=$shelfname;
@ -86,7 +81,20 @@ sub GetShelfList {
return(\%shelflist);
}
=item GetShelfContents
$itemlist = &GetShelfContents($env, $shelfnumber);
Looks up information about the contents of virtual bookshelf number
C<$shelfnumber>.
Returns a reference-to-array, whose elements are references-to-hash,
as returned by C<&getiteminformation>.
I don't know what C<$env> is.
=cut
#'
sub GetShelfContents {
my ($env, $shelfnumber) = @_;
my @itemlist;
@ -97,8 +105,21 @@ sub GetShelfContents {
push (@itemlist, $item);
}
return (\@itemlist);
# FIXME - Wouldn't it be more intuitive to return a list,
# rather than a reference-to-list?
}
=item AddToShelf
&AddToShelf($env, $itemnumber, $shelfnumber);
Adds item number C<$itemnumber> to virtual bookshelf number
C<$shelfnumber>, unless that item is already on that shelf.
C<$env> is ignored.
=cut
#'
sub AddToShelf {
my ($env, $itemnumber, $shelfnumber) = @_;
my $sth=$dbh->prepare("select * from shelfcontents where shelfnumber=$shelfnumber and itemnumber=$itemnumber");
@ -107,16 +128,46 @@ sub AddToShelf {
# already on shelf
} else {
$sth=$dbh->prepare("insert into shelfcontents (shelfnumber, itemnumber, flags) values ($shelfnumber, $itemnumber, 0)");
# FIXME - The default for 'flags' is NULL.
# Why set it to 0?
$sth->execute;
}
}
=item RemoveFromShelf
&RemoveFromShelf($env, $itemnumber, $shelfnumber);
Removes item number C<$itemnumber> from virtual bookshelf number
C<$shelfnumber>. If the item wasn't on that bookshelf to begin with,
nothing happens.
C<$env> is ignored.
=cut
#'
sub RemoveFromShelf {
my ($env, $itemnumber, $shelfnumber) = @_;
my $sth=$dbh->prepare("delete from shelfcontents where shelfnumber=$shelfnumber and itemnumber=$itemnumber");
$sth->execute;
}
=item AddShelf
($status, $msg) = &AddShelf($env, $shelfname);
Creates a new virtual bookshelf with name C<$shelfname>.
Returns a two-element array, where C<$status> is 0 if the operation
was successful, or non-zero otherwise. C<$msg> is "Done" in case of
success, or an error message giving the reason for failure.
C<$env> is ignored.
=cut
#'
# FIXME - Perhaps this could/should return the number of the new bookshelf
# as well?
sub AddShelf {
my ($env, $shelfname) = @_;
my $q_shelfname=$dbh->quote($shelfname);
@ -131,6 +182,21 @@ sub AddShelf {
}
}
=item RemoveShelf
($status, $msg) = &RemoveShelf($env, $shelfnumber);
Deletes virtual bookshelf number C<$shelfnumber>. The bookshelf must
be empty.
Returns a two-element array, where C<$status> is 0 if the operation
was successful, or non-zero otherwise. C<$msg> is "Done" in case of
success, or an error message giving the reason for failure.
C<$env> is ignored.
=cut
#'
sub RemoveShelf {
my ($env, $shelfnumber) = @_;
my $sth=$dbh->prepare("select count(*) from shelfcontents where shelfnumber=$shelfnumber");
@ -145,12 +211,15 @@ sub RemoveShelf {
}
}
END { } # module clean-up code here (global destructor)
1;
#
# $Log$
# Revision 1.2.2.3 2002/10/28 17:45:15 tonnesen
# Merging from trunk to rel-1-2
#
# Revision 1.2.2.2 2002/08/14 18:30:50 tonnesen
# Adding copyright statements to all .pl and .pm files in rel-1-2 branch
#
@ -158,3 +227,17 @@ END { } # module clean-up code here (global destructor)
# Inserting some changes I made locally a while ago.
#
#
__END__
=back
=head1 AUTHOR
Koha Developement team <info@koha.org>
=head1 SEE ALSO
C4::Circulation::Circ2(3)
=cut

View File

@ -5,27 +5,12 @@ use CGI;
use C4::Auth;
use C4::Output;
use C4::Database;
my $configfile=configfile();
my $intranetdir=$configfile->{'intranetdir'};
use HTML::Template;
my $query = new CGI;
my ($loggedinuser, $cookie, $sessionID) = checkauth($query);
print $query->header(-cookie => $cookie);
my $template = gettemplate("parameters/admin-home.tmpl");
$template->param(loggeninuser => $loggedinuser);
print startpage();
print startmenu('catalogue');
print "<p align=left>Logged in as: $loggedinuser [<a href=/cgi-bin/koha/logout.pl>Log Out</a>]</p>\n";
open H, "$intranetdir/htdocs/admin/index.html";
while (<H>) {
print $_;
}
close H;
print endpage();
print endmenu('catalogue');
print $query->header(-cookie => $cookie),$template->output;

View File

@ -1,10 +1,31 @@
#!/usr/bin/perl
# $Id$
#written 7/3/2002 by Finlay
#script to display reports
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use CGI;
use C4::Context;
use C4::Search;
use C4::Circulation::Circ2;
use C4::Output;
@ -39,7 +60,7 @@ if (not $lastmove) {
}
# make the page ...
# make the page ...
print $input->header;
@ -93,55 +114,51 @@ print endpage;
# This stuff should probably go into C4::Search
# database includes
use DBI;
use C4::Database;
sub itemdatanum {
my ($itemnumber)=@_;
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $itm = $dbh->quote("$itemnumber");
my $query = "select * from items where itemnumber=$itm";
my $sth=$dbh->prepare($query);
$sth->execute;
my $data=$sth->fetchrow_hashref;
$sth->finish;
$dbh->disconnect;
return($data);
}
sub lastmove {
my ($itemnumber)=@_;
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $var1 = $dbh->quote($itemnumber);
my $sth =$dbh->prepare("select max(branchtransfers.datearrived) from branchtransfers where branchtransfers.itemnumber=$var1");
$sth->execute;
my ($date) = $sth->fetchrow_array;
return(0, "Item has no branch transfers record") if not $date;
my $var2 = $dbh->quote($date);
my $var2 = $dbh->quote($date);
$sth=$dbh->prepare("Select * from branchtransfers where branchtransfers.itemnumber=$var1 and branchtransfers.datearrived=$var2");
$sth->execute;
my ($data) = $sth->fetchrow_hashref;
return(0, "Item has no branch transfers record") if not $data;
$sth->finish;
$dbh->disconnect;
return($data,"");
}
sub issuessince {
my ($itemnumber, $date)=@_;
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $itm = $dbh->quote($itemnumber);
my $dat = $dbh->quote($date);
my $sth=$dbh->prepare("Select count(*) from issues where issues.itemnumber=$itm and issues.timestamp > $dat");
$sth->execute;
my $count=$sth->fetchrow_hashref;
$sth->finish;
$dbh->disconnect;
return($count->{'count(*)'});
}
sub issuesat {
my ($itemnumber, $brcd)=@_;
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $itm = $dbh->quote($itemnumber);
my $brc = $dbh->quote($brcd);
my $query = "Select count(*) from issues where itemnumber=$itm and branchcode = $brc";
@ -149,13 +166,12 @@ sub issuesat {
$sth->execute;
my ($count)=$sth->fetchrow_array;
$sth->finish;
$dbh->disconnect;
return($count);
}
sub lastseenat {
my ($itemnumber, $brcd)=@_;
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $itm = $dbh->quote($itemnumber);
my $brc = $dbh->quote($brcd);
my $query = "Select max(timestamp) from issues where itemnumber=$itm and branchcode = $brc";
@ -164,11 +180,11 @@ sub lastseenat {
my ($date1)=$sth->fetchrow_array;
$sth->finish;
$query = "Select max(datearrived) from branchtransfers where itemnumber=$itm and tobranch = $brc";
# FIXME - There's already a $sth in this scope.
my $sth=$dbh->prepare($query);
$sth->execute;
my ($date2)=$sth->fetchrow_array;
$sth->finish;
$dbh->disconnect;
$date2 =~ s/-//g;
$date2 =~ s/://g;
$date2 =~ s/ //g;

View File

@ -5,32 +5,19 @@ use CGI;
use C4::Auth;
use C4::Output;
use C4::Database;
my $configfile=configfile();
my $intranetdir=$configfile->{'intranetdir'};
use HTML::Template;
my $query = new CGI;
my ($loggedinuser, $cookie, $sessionID) = checkauth($query);
print $query->header(-cookie => $cookie);
print startpage();
print startmenu('catalogue');
print "<p align=left>Logged in as: $loggedinuser [<a href=/cgi-bin/koha/logout.pl>Log Out</a>]</p>\n";
my $template = gettemplate("catalogue/catalogue-home.tmpl");
my $classlist='';
open C, "$intranetdir/htdocs/includes/cat-class-list.inc";
while (<C>) {
$classlist.=$_;
}
open H, "$intranetdir/htdocs/catalogue/index.html";
while (<H>) {
s/<!-- CLASSLIST -->/$classlist/;
print $_;
}
close H;
#open C, "$intranetdir/htdocs/includes/cat-class-list.inc";
#while (<C>) {
# $classlist.=$_;
#}
$template->param(loggedinuser => $loggedinuser,
classlist => $classlist,
opac => 0);
print endpage();
print endmenu('catalogue');
print $query->header(-cookie => $cookie), $template->output;

View File

@ -3,8 +3,27 @@
#script to display reports
#written 8/11/99
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use CGI;
use C4::Context;
use C4::Output;
use C4::Database;
use C4::Auth;
@ -23,7 +42,7 @@ print startmenu('issue');
print "Each box needs to be filled in with fine,time to start charging,charging cycle<br>
eg 1,7,7 = $1 fine, after 7 days, every 7 days";
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $query="Select description,categorycode from categories";
my $sth=$dbh->prepare($query);
$sth->execute;

View File

@ -1,9 +1,32 @@
#!/usr/bin/perl
# $Id$
#written by chris@katipo.co.nz
#9/10/2000
#script to display and update currency rates
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
# FIXME - There's an "admin/currency.pl", and this script never seems
# to be used. Is it obsolete?
use CGI;
use C4::Acquisitions;
use C4::Biblio;
@ -22,7 +45,7 @@ if ($type ne 'change'){
<input type=hidden name=type value=change>
<TR VALIGN=TOP>
<TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2 ><b>EXCHANGE RATES </b></TD></TR>
<TR VALIGN=TOP>
<TR VALIGN=TOP>
<TD>
printend
;
@ -34,12 +57,12 @@ printend
# print $rates->[$i]->{'currency'};
}
print <<printend
<p>
<p>
<input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42>
</TD></TR>
</form>
</table>
</TD></TR>
</form>
</table>
printend
;
} else {

View File

@ -4,6 +4,24 @@
#written 2/5/00
#by chris@katipo.co.nz
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use C4::Search;

View File

@ -1,15 +1,35 @@
#!/usr/bin/perl
#script to delete borrowers
# $Id$
#script to delete items
#written 2/5/00
#by chris@katipo.co.nz
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use C4::Search;
use CGI;
use C4::Context;
use C4::Search;
use C4::Output;
use C4::Database;
use C4::Circulation::Circ2;
#use C4::Acquisitions;
use C4::Auth;
@ -35,16 +55,15 @@ $env{'nottodayissues'}=1;
$i++;
}
my ($bor,$flags)=getpatroninformation(\%env, $member,'');
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $query="Select * from borrowers where guarantor='$member'";
my $sth=$dbh->prepare($query);
$sth->execute;
my $data=$sth->fetchrow_hashref;
$sth->finish;
$dbh->disconnect;
if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
print $input->header;
print "<table border=1>";
if ($i > 0){
@ -65,7 +84,7 @@ if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
sub delmember{
my ($member)=@_;
my $dbh=C4Connect;
my $dbh = C4::Context->dbh;
my $query="Select * from borrowers where borrowernumber='$member'";
my $sth=$dbh->prepare($query);
$sth->execute;
@ -73,20 +92,22 @@ sub delmember{
$sth->finish;
$query="Insert into deletedborrowers values (";
foreach my $temp (@data){
$query=$query."'$temp',";
$query .= "'$temp',";
}
$query=~ s/\,$/\)/;
# print $query;
# FIXME - Use $dbh->do()
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
# FIXME - Use $dbh->do()
$query = "Delete from borrowers where borrowernumber='$member'";
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
# FIXME - Use $dbh->do()
$query="Delete from reserves where borrowernumber='$member'";
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
$dbh->disconnect;
}

View File

@ -4,6 +4,24 @@
#written 2/5/00
#by chris@katipo.co.nz
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use C4::Search;

View File

@ -1,20 +1,37 @@
#!/usr/bin/perl
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use HTML::Template;
use strict;
require Exporter;
use C4::Database;
use C4::Context;
use C4::Output; # contains gettemplate
use CGI;
use C4::Search;
use C4::Auth;
my $query=new CGI;
my $type=$query->param('type');
(-e "opac") && ($type='opac');
($type) || ($type='intra');
my ($loggedinuser, $cookie, $sessionID) = checkauth($query, ($type eq 'opac') ? (1) : (0));
my $biblionumber=$query->param('bib');
# change back when ive fixed request.pl
@ -56,9 +73,6 @@ my $nextstartfrom=($startfrom+20<$count-20) ? ($startfrom+20) : ($count-20);
my $prevstartfrom=($startfrom-20>0) ? ($startfrom-20) : (0);
$template->param(nextstartfrom => $nextstartfrom);
$template->param(prevstartfrom => $prevstartfrom);
# $template->param(template => $templatename);
# $template->param(search => $search);
#$template->param(includesdir => $includes);
$template->param(BIBLIO_RESULTS => $resultsarray);
$template->param(ITEM_RESULTS => $itemsarray);
$template->param(WEB_RESULTS => $webarray);

View File

@ -1,8 +1,28 @@
#!/usr/bin/perl
# $Id$
#written 14/1/2000
#script to display reports
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use CGI qw/:standard/;
use C4::Output;
use C4::Groups;
@ -119,7 +139,7 @@ EOF
</tr></table>
</td></tr></table>
<p>
Printer:
Printer:
<select name=printer>
$printeroptions
</select>

View File

@ -1,4 +1,24 @@
#!/usr/bin/perl
# $Id$
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use HTML::Template;
use strict;
require Exporter;
@ -68,9 +88,9 @@ foreach my $item (@items){
} 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);

View File

@ -4,27 +4,13 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
use C4::Database;
my $configfile=configfile();
my $intranetdir=$configfile->{'intranetdir'};
use C4::Context;
use HTML::Template;
my $query = new CGI;
my ($loggedinuser, $cookie, $sessionID) = checkauth($query);
print $query->header(-cookie => $cookie);
my $template = gettemplate("reports/reports-home.tmpl");
$template->param(loggedinuser => $loggedinuser);
print startpage();
print startmenu('report');
print "<p align=left>Logged in as: $loggedinuser [<a href=/cgi-bin/koha/logout.pl>Log Out</a>]</p>\n";
open H, "$intranetdir/htdocs/reports/index.html";
while (<H>) {
print $_;
}
close H;
print endpage();
print endmenu('report');
print $query->header(-cookie => $cookie),$template->output;

View File

@ -4,6 +4,24 @@
# $Header$
#
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use C4::Search;
use CGI;
@ -169,6 +187,9 @@ EOF
#
# $Log$
# Revision 1.2.2.3 2002/10/28 17:45:14 tonnesen
# Merging from trunk to rel-1-2
#
# Revision 1.2.2.2 2002/07/11 18:05:28 tonnesen
# Committing changes to add authentication and opac templating to rel-1-2 branch
#