fixes missing
[koha.git] / opac / opac-userdetails.pl
1 #!/usr/bin/perl
2 use strict;
3 require Exporter;
4 use CGI;
5
6 use C4::Auth;
7 use C4::Koha;
8 use C4::Circulation::Circ2;
9 use C4::Search;
10 use HTML::Template;
11 use C4::Interface::CGI::Output;
12
13 my $query = new CGI;
14 my ($template, $borrowernumber, $cookie) 
15     = get_template_and_user({template_name => "opac-userdetails.tmpl",
16                              query => $query,
17                              type => "opac",
18                              authnotrequired => 0,
19                              flagsrequired => {borrow => 1},
20                              debug => 1,
21                              });
22
23 # get borrower information ....
24 my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
25
26 $borr->{'dateenrolled'} = slashifyDate($borr->{'dateenrolled'});
27 $borr->{'expiry'}       = slashifyDate($borr->{'expiry'});
28 $borr->{'dateofbirth'}  = slashifyDate($borr->{'dateofbirth'});
29 $borr->{'ethnicity'}    = fixEthnicity($borr->{'ethnicity'});
30
31
32 $template->param($borr);
33
34 output_html_with_http_headers $query, $cookie, $template->output;
35