[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/opac opac-renew.pl,NONE,1.1.2.1 opac-user.pl,1.1.2.
From: |
Finlay Thompson |
Subject: |
[Koha-cvs] CVS: koha/opac opac-renew.pl,NONE,1.1.2.1 opac-user.pl,1.1.2.10,1.1.2.11 |
Date: |
Thu, 28 Nov 2002 15:12:36 -0800 |
Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1:/tmp/cvs-serv12323
Modified Files:
Tag: rel-1-2
opac-user.pl
Added Files:
Tag: rel-1-2
opac-renew.pl
Log Message:
added the renew books functionality
--- NEW FILE ---
#!/usr/bin/perl
#written 18/1/2000 by address@hidden
# adapted for use in the hlt opac by address@hidden 29/11/2002
#script to renew items from the web
use CGI;
use C4::Circulation::Renewals2;
my $query = new CGI;
my $itemnumber = $query->param('item');
my $borrowernumber = $query->param("bornum");
my %env;
my $status = renewstatus(\%env,$borrowernumber,$itemnumber);
if ($status == 1){
renewbook(\%env,$borrowernumber,$itemnumber);
}
if ($query->param('from') eq 'opac_user') {
print $query->redirect("/cgi-bin/koha/opac-user.pl");
}
Index: opac-user.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-user.pl,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -r1.1.2.10 -r1.1.2.11
*** opac-user.pl 27 Nov 2002 01:46:54 -0000 1.1.2.10
--- opac-user.pl 28 Nov 2002 23:12:34 -0000 1.1.2.11
***************
*** 7,10 ****
--- 7,11 ----
use C4::Koha;
use C4::Circulation::Circ2;
+ use C4::Circulation::Renewals2;
use C4::Reserves2;
***************
*** 44,47 ****
--- 45,49 ----
$template->param(BORROWER_INFO => address@hidden);
+ $template->param(borrowernumber => $borrowernumber);
#get issued items ....
***************
*** 55,76 ****
my $issue = $issues->{$key};
$issue->{'date_due'} = slashifyDate($issue->{'date_due'});
! # check for reserves
my ($restype, $res) = CheckReserves($issue->{'itemnumber'});
if ($restype) {
! $issue->{'status'} .= " Reserved";
}
my ($charges, $itemtype) = calc_charges(undef, undef,
$issue->{'itemnumber'}, $borrowernumber);
$issue->{'charges'} = $charges;
my $publictype = $issue->{'publictype'};
$issue->{$publictype} = 1;
if ($issue->{'overdue'}) {
push @overdues, $issue;
$overdues_count++;
! $issue->{'status'} = "<font color='red'>OVERDUE</font>";
} else {
! $issue->{'status'} = "Issued";
}
push @issuedat, $issue;
--- 57,86 ----
my $issue = $issues->{$key};
$issue->{'date_due'} = slashifyDate($issue->{'date_due'});
!
! # check for reserves
my ($restype, $res) = CheckReserves($issue->{'itemnumber'});
if ($restype) {
! $issue->{'reserved'} = 1;
}
my ($charges, $itemtype) = calc_charges(undef, undef,
$issue->{'itemnumber'}, $borrowernumber);
$issue->{'charges'} = $charges;
+ # get publictype for icon
+
my $publictype = $issue->{'publictype'};
$issue->{$publictype} = 1;
+ # check if item is renewable
+ my %env;
+ my $status = renewstatus(\%env,$borrowernumber, $issue->{'itemnumber'});
+ $issue->{'renewable'} = $status;
+
if ($issue->{'overdue'}) {
push @overdues, $issue;
$overdues_count++;
! $issue->{'overdue'} = 1;
} else {
! $issue->{'issued'} = 1;
}
push @issuedat, $issue;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/opac opac-renew.pl,NONE,1.1.2.1 opac-user.pl,1.1.2.10,1.1.2.11,
Finlay Thompson <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/hlt/en loggedin.tmpl,1.1.2.2,1.1.2.3
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/hlt/en loggedin.tmpl,1.1.2.3,1.1.2.4 opac-user.tmpl,1.1.2.6,1.1.2.7
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/hlt/en loggedin.tmpl,1.1.2.2,1.1.2.3
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/hlt/en loggedin.tmpl,1.1.2.3,1.1.2.4 opac-user.tmpl,1.1.2.6,1.1.2.7
- Index(es):