Koha/labels/label-profiles.pl
Chris Nighswonger bc895d8626 Adding Printer Profiles feature to the Label Creator.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-16 11:26:38 -06:00

50 lines
1.3 KiB
Perl
Executable file

#!/usr/bin/perl
use strict;
use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
use C4::Labels;
use HTML::Template::Pro;
use POSIX;
my $dbh = C4::Context->dbh;
my $query = new CGI;
my $op = $query->param('op');
#my $prof_code = $query->param('prof_code');
my $prof_id = $query->param('prof_id');
#my $printername = $query->param('printername');
#my $tmpl_id = $query->param('tmpl_id');
#my $paper_bin = $query->param('paper_bin');
#my $offset_horz = $query->param('offset_horz');
#my $offset_vert = $query->param('offset_vert');
#my $creep_horz = $query->param('creep_horz');
#my $creep_vert = $query->param('creep_vert');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
template_name => "labels/label-profiles.tmpl",
query => $query,
type => "intranet",
authnotrequired => 1,
flagsrequired => { catalogue => 1 },
debug => 1,
}
);
my @resultsloop;
if ( $op eq 'delete' ) {
my $dberror = DeleteProfile($prof_id);
warn "DB returned error: $dberror" if $dberror;
}
@resultsloop = GetAllPrinterProfiles();
$template->param(
resultsloop => \@resultsloop,
);
output_html_with_http_headers $query, $cookie, $template->output;