#!/usr/bin/perl
-# $Id$
# Copyright 2000-2002 Katipo Communications
#
use C4::Auth;
use CGI;
use C4::Context;
-use HTML::Template;
-use C4::Search;
+use C4::Branch; # GetBranches
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
-use C4::Circulation::Circ2;
+use C4::Circulation;
=head1 NAME
=head1 DESCRIPTION
-
-=over2
+=over 2
=cut
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {editcatalogue => 1},
+ flagsrequired => {reports => 1},
debug => 1,
});
$template->param(do_it => $do_it);
exit(1);
} else {
print $input->header(-type => 'application/vnd.sun.xml.calc',
+ -encoding => 'utf-8',
-attachment=>"$basename.csv",
-name=>"$basename.csv" );
my $cols = @$results[0]->{loopcol};
# warn "highlightLOC ".$hglghtLOC;
- $req = $dbh->prepare("select distinctrow itemtype from biblioitems order by itemtype");
+ $req = $dbh->prepare("select itemtype from itemtypes order by itemtype");
$req->execute;
undef @select;
push @select,"";
undef @select;
push @select,"";
- my $branches=getbranches();
+ my $branches=GetBranches();
my %select_branches;
$select_branches{""} = "";
foreach my $branch (keys %$branches) {
-size => 1,
-multiple => 0 );
- $req = $dbh->prepare("select distinctrow holdingbranch from items order by holdingbranch");
+ $req = $dbh->prepare("select distinctrow location from items order by location");
$req->execute;
undef @select;
push @select,"";
- my $CGIholdingbranch=CGI::scrolling_list( -name => 'Filter',
- -id => 'holdingbranch',
+ while (my ($value) =$req->fetchrow) {
+ push @select, $value;
+ }
+ my $CGIlocation=CGI::scrolling_list( -name => 'Filter',
+ -id => 'location',
-values => \@select,
-size => 1,
-multiple => 0 );
# CGIToPublicationYear => $CGIpublicationyear,
# CGIPublisher => $CGIpublisher,
CGIBranch => $CGIbranch,
- CGILocation => $CGIholdingbranch,
+ CGILocation => $CGIlocation,
CGIextChoice => $CGIextChoice,
CGIsepChoice => $CGIsepChoice
);
$linefilter[0] = @$filters[8] if ($line =~ /publicationyear/ ) ;
$linefilter[1] = @$filters[9] if ($line =~ /publicationyear/ ) ;
$linefilter[0] = @$filters[10] if ($line =~ /items.homebranch/ ) ;
- $linefilter[0] = @$filters[11] if ($line =~ /items.holdingbranch/ ) ;
+ $linefilter[0] = @$filters[11] if ($line =~ /items.location/ ) ;
#
my @colfilter ;
$colfilter[0] = @$filters[0] if ($column =~ /dewey/ ) ;
$colfilter[0] = @$filters[8] if ($column =~ /publicationyear/ ) ;
$colfilter[1] = @$filters[9] if ($column =~ /publicationyear/ ) ;
$colfilter[0] = @$filters[10] if ($column =~ /items.homebranch/ ) ;
- $colfilter[0] = @$filters[11] if ($column =~ /items.holdingbranch/ ) ;
+ $colfilter[0] = @$filters[11] if ($column =~ /items.location/ ) ;
# 1st, loop rows.
my $linefield;
}
if (@$filters[11]){
@$filters[11]=~ s/\*/%/g;
- $strcalc .= " AND items.holdingbranch like '" . @$filters[11] ."'" if ( @$filters[11] );
+ $strcalc .= " AND items.location like '" . @$filters[11] ."'" if ( @$filters[11] );
}
$strcalc .= " group by $linefield, $colfield order by $linefield,$colfield";
return \@mainloop;
}
-1;
\ No newline at end of file
+1;