use strict;
use C4::Output;
+use C4::Charset;
+use C4::Auth;
use CGI;
use C4::Search;
use C4::Context;
my $input = new CGI;
my $tablename=$input->param('tablename');
-$tablename="biblio." unless ($tablename);
+$tablename="biblio" unless ($tablename);
my $kohafield = $input->param('kohafield');
my $op=$input->param('op');
my $script_name = 'koha2marclinks.pl';
-my $template = gettemplate("parameters/koha2marclinks.tmpl",0);
+my ($template, $borrowernumber, $cookie)
+ = get_template_and_user({template_name => "parameters/koha2marclinks.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {parameters => 1},
+ debug => 1,
+ });
if ($op) {
$template->param(script_name => $script_name,
$template->param(script_name => $script_name,
else => 1); # we show only the TMPL_VAR names $op
}
-
+
my $dbh = C4::Context->dbh;
################## ADD_FORM ##################################
my @marcarray;
push @marcarray," ";
while (my ($field, $tagsubfield, $liblibrarian) = $sth2->fetchrow_array) {
- # warn "$field$tagsubfield - $liblibrarian";
push @marcarray, "$field $tagsubfield - $liblibrarian";
}
my $marclist = CGI::scrolling_list(-name=>"marc",
);
} #---- END $OP eq DEFAULT
-print "Content-Type: text/html\n\n", $template->output;
+print $input->header(
+ -type => guesstype($template->output),
+ -cookie => $cookie
+), $template->output;