Adding member search to patron card generation feature
[koha.git] / labels / label-profiles.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use CGI;
5 use C4::Auth;
6 use C4::Context;
7 use C4::Output;
8 use C4::Labels;
9 use HTML::Template::Pro;
10 use POSIX;
11
12
13 my $dbh         = C4::Context->dbh;
14 my $query       = new CGI;
15 my $op          = $query->param('op');
16 #my $prof_code   = $query->param('prof_code');
17 my $prof_id     = $query->param('prof_id');
18 #my $printername = $query->param('printername');
19 #my $tmpl_id     = $query->param('tmpl_id');
20 #my $paper_bin   = $query->param('paper_bin');
21 #my $offset_horz = $query->param('offset_horz');
22 #my $offset_vert = $query->param('offset_vert');
23 #my $creep_horz  = $query->param('creep_horz');
24 #my $creep_vert  = $query->param('creep_vert');
25
26 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
27     {
28         template_name   => "labels/label-profiles.tmpl",
29         query           => $query,
30         type            => "intranet",
31         authnotrequired => 1,
32         flagsrequired   => { catalogue => 1 },
33         debug           => 1,
34     }
35 );
36
37 my @resultsloop;
38
39 if ( $op eq 'delete' ) {
40     my $dberror = DeleteProfile($prof_id);
41     warn "DB returned error: $dberror" if $dberror;
42 }
43
44 @resultsloop = GetAllPrinterProfiles();
45
46 $template->param(
47     resultsloop => \@resultsloop,
48 );
49
50 output_html_with_http_headers $query, $cookie, $template->output;