9 use HTML
::Template
::Pro
;
15 my $dbh = C4
::Context
->dbh;
19 my $tmpl_code = $query->param('tmpl_code');
20 my $tmpl_desc = $query->param('tmpl_desc');
21 my $page_height = $query->param('page_height');
22 my $page_width = $query->param('page_width');
23 my $label_height = $query->param('label_height');
24 my $label_width = $query->param('label_width');
25 my $topmargin = $query->param('topmargin');
26 my $leftmargin = $query->param('leftmargin');
27 my $cols = $query->param('cols');
28 my $rows = $query->param('rows');
29 my $colgap = $query->param('colgap');
30 my $rowgap = $query->param('rowgap');
31 my $units = $query->param('units');
32 my $fontsize = $query->param('fontsize');
34 my $batch_id = $query->param('batch_id');
37 my $op = $query->param('op');
40 my ( $template, $loggedinuser, $cookie );
42 if ( $op eq 'blank' ) {
45 { unit
=> 'INCH', desc
=> 'Inches' },
46 { unit
=> 'CM', desc
=> 'Centimeters' },
47 { unit
=> 'MM', desc
=> 'Millimeters' },
48 { unit
=> 'POINT', desc
=> 'Postscript Points' },
51 ( $template, $loggedinuser, $cookie ) = get_template_and_user
(
53 template_name
=> "labels/label-create-template.tmpl",
57 flagsrequired
=> { catalogue
=> 1 },
68 elsif ( $op eq 'create' ) {
71 $tmpl_code, $tmpl_desc, $page_width,
72 $page_height, $label_width, $label_height, $topmargin,
73 $leftmargin, $cols, $rows, $colgap,
74 $rowgap, $fontsize, $units );
76 print $query->redirect("./label-templates.pl");
81 output_html_with_http_headers
$query, $cookie, $template->output;