|
Lines 1-16
Link Here
|
| 1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
| 2 |
|
2 |
|
|
|
3 |
# Copyright Chris Nighswonger 2009 |
| 4 |
# |
| 5 |
# This file is part of Koha. |
| 6 |
# |
| 7 |
# Koha is free software; you can redistribute it and/or modify it under the |
| 8 |
# terms of the GNU General Public License as published by the Free Software |
| 9 |
# Foundation; either version 2 of the License, or (at your option) any later |
| 10 |
# version. |
| 11 |
# |
| 12 |
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY |
| 13 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 14 |
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License along |
| 17 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
| 18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 |
|
| 20 |
|
| 3 |
use strict; |
21 |
use strict; |
| 4 |
use warnings; |
22 |
use warnings; |
| 5 |
|
23 |
|
| 6 |
use CGI; |
24 |
use CGI; |
| 7 |
|
25 |
use C4::Auth; |
| 8 |
use C4::Debug; |
26 |
use C4::Debug; |
| 9 |
use C4::Creators 1.000000; |
27 |
use C4::Creators 1.000000; |
| 10 |
use C4::Labels 1.000000; |
28 |
use C4::Labels 1.000000; |
| 11 |
|
29 |
|
| 12 |
my $cgi = new CGI; |
30 |
my $cgi = new CGI; |
| 13 |
|
31 |
|
|
|
32 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ |
| 33 |
template_name => "labels/label-home.tt", |
| 34 |
query => $cgi, |
| 35 |
type => "intranet", |
| 36 |
authnotrequired => 0, |
| 37 |
flagsrequired => { tools => 'label_creator' }, |
| 38 |
debug => 1, |
| 39 |
}); |
| 40 |
|
| 41 |
|
| 14 |
my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id'); |
42 |
my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id'); |
| 15 |
my $template_id = $cgi->param('template_id') || undef; |
43 |
my $template_id = $cgi->param('template_id') || undef; |
| 16 |
my $layout_id = $cgi->param('layout_id') || undef; |
44 |
my $layout_id = $cgi->param('layout_id') || undef; |
|
Lines 20-25
my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
Link Here
|
| 20 |
|
48 |
|
| 21 |
my $items = undef; |
49 |
my $items = undef; |
| 22 |
|
50 |
|
|
|
51 |
|
| 52 |
|
| 23 |
my $pdf_file = (@label_ids || @item_numbers ? "label_single_" . scalar(@label_ids || @item_numbers) : "label_batch_$batch_id"); |
53 |
my $pdf_file = (@label_ids || @item_numbers ? "label_single_" . scalar(@label_ids || @item_numbers) : "label_batch_$batch_id"); |
| 24 |
print $cgi->header( -type => 'application/pdf', |
54 |
print $cgi->header( -type => 'application/pdf', |
| 25 |
-encoding => 'utf-8', |
55 |
-encoding => 'utf-8', |
| 26 |
- |
|
|