updated testing
[koha.git] / delbiblio.pl
1 #!/usr/bin/perl
2
3 #script to delete biblios
4 #written 2/5/00
5 #by chris@katipo.co.nz
6
7 use strict;
8
9 use C4::Search;
10 use CGI;
11 use C4::Output;
12 use C4::Acquisitions;
13
14 my $input = new CGI;
15 #print $input->header;
16
17
18 my $biblio=$input->param('biblio');
19 #print $input->header;
20 #check no items attached
21 my $count=C4::Acquisitions::itemcount($biblio);
22
23
24 #print $count;
25 if ($count > 0){
26   print $input->header;
27   print "This biblio has $count items attached, please delete them before deleting this biblio<p>
28   ";
29 } else {
30 #delbiblio($biblio);
31 print $input->redirect("/catalogue/");
32 }