#!/usr/bin/perl #script to place reserves/requests #writen 2/1/00 by chris@katipo.oc.nz use strict; #use DBI; use C4::Search; use CGI; use C4::Output; use C4::Reserves2; use C4::Acquisitions; my $input = new CGI; print $input->header; #setup colours print startpage(); print startmenu(); my $blah; my $bib=$input->param('bib'); my $dat=bibdata($bib); my ($count,$reserves)=FindReserves($bib); #print $count; #print $input->dump; print < Requesting: $dat->{'title'} ($dat->{'author'})

Rank Member Number Notes Date Pickup Request
$date Next Available,
(or choose from list below)

printend ; my $blah; my ($count2,@data)=bibitems($bib); for ($i=0;$i<$count2;$i++){ my @barcodes=barcodes($data[$i]->{'biblioitemnumber'}); if ($data[$i]->{'dewey'} == 0){ $data[$i]->{'dewey'}=""; } $data[$i]->{'dewey'}=~ s/\.0000$//; $data[$i]->{'dewey'}=~ s/00$//; my $class="$data[$i]->{'classification'}$data[$i]->{'dewey'}$data[$i]->{'subclass'}"; print ""; } print <

 

Request Item Type Classification Volume ISBN Copyright Pubdate Copies
{'biblioitemnumber'}> {'biblioitemnumber'}> $data[$i]->{'description'} $class $data[$i]->{'volumeddesc'} $data[$i]->{'isbn'} $dat->{'copyrightdate'} $data[$i]->{'publicationyear'} @barcodes
printend ; $count--; for ($i=0;$i<$count;$i++){ print "[$i]{'borrowernumber'}>"; print "[$i]{'biblionumber'}>"; #my $bor=$reserves->[$i]{'firstname'}."%20".$reserves->[$i]{'surname'}; #$bor=~ s/ /%20/g; my $bor=$reserves->[$i]{'borrowernumber'}; my @temp=split('-',$reserves->[$i]{'reservedate'}); $date="$temp[2]/$temp[1]/$temp[0]"; my $type=$reserves->[$i]{'constrainttype'}; #print "test"; if ($type eq 'a'){ $type='Next Available'; } elsif ($type eq 'o'){ # print "test"; my $res=getreservetitle($reserves->[$i]{'biblionumber'},$reserves->[$i]{'borrowernumber'},$reserves->[$i]{'reservedate'},$reserves->[$i]{'timestamp'}); $type="This type only $res->{'volumeddesc'} $res->{'itemtype'}"; # my @data=ItemInfo(\$blah,$reserves->[$i]{'borrowernumber'}); } print " "; } print <
MODIFY EXISTING REQUESTS
Rank Member Notes Date Pickup Request Change To
$reserves->[$i]{'firstname'} $reserves->[$i]{'surname'} $reserves->[$i]{'reservenotes'} $date $type
Delete a request by selecting "del" from the rank list.


printend ; print endmenu(); print endpage();