747a71aa67
Need "use HTML::Template" at the beginning of every script. Note : opac-reserve does not work at all. Could katipo/finlay check why ?
34 lines
875 B
Perl
Executable file
34 lines
875 B
Perl
Executable file
#!/usr/bin/perl
|
|
use strict;
|
|
require Exporter;
|
|
use CGI;
|
|
|
|
use C4::Auth;
|
|
use C4::Koha;
|
|
use C4::Circulation::Circ2;
|
|
use C4::Search;
|
|
use HTML::Template;
|
|
|
|
my $query = new CGI;
|
|
my ($template, $borrowernumber, $cookie)
|
|
= get_template_and_user({template_name => "opac-userdetails.tmpl",
|
|
query => $query,
|
|
type => "opac",
|
|
authnotrequired => 0,
|
|
flagsrequired => {borrow => 1},
|
|
debug => 1,
|
|
});
|
|
|
|
# get borrower information ....
|
|
my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
|
|
|
|
$borr->{'dateenrolled'} = slashifyDate($borr->{'dateenrolled'});
|
|
$borr->{'expiry'} = slashifyDate($borr->{'expiry'});
|
|
$borr->{'dateofbirth'} = slashifyDate($borr->{'dateofbirth'});
|
|
$borr->{'ethnicity'} = fixEthnicity($borr->{'ethnicity'});
|
|
|
|
|
|
$template->param($borr);
|
|
|
|
print $query->header(-cookie => $cookie), $template->output;
|
|
|