$template->param(liblibrarian => $data->{'liblibrarian'},
libopac => $data->{'libopac'},
repeatable => CGI::checkbox(-name=>'repeatable',
$template->param(liblibrarian => $data->{'liblibrarian'},
libopac => $data->{'libopac'},
repeatable => CGI::checkbox(-name=>'repeatable',
my $repeatable = $input->param('repeatable') ? 1 : 0;
my $mandatory = $input->param('mandatory') ? 1 : 0;
my $authorised_value = $input->param('authorised_value');
my $repeatable = $input->param('repeatable') ? 1 : 0;
my $mandatory = $input->param('mandatory') ? 1 : 0;
my $authorised_value = $input->param('authorised_value');
if ($input->param('modif')) {
$sth = $dbh->prepare(
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=? WHERE frameworkcode=? AND tagfield=?"
if ($input->param('modif')) {
$sth = $dbh->prepare(
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=? WHERE frameworkcode=? AND tagfield=?"
################## DELETE_CONFIRMED ##################################
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
################## DELETE_CONFIRMED ##################################
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
my $sth1 = $dbh->prepare("DELETE FROM marc_tag_structure WHERE tagfield=? AND frameworkcode=?");
my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?");
$sth1->execute($searchfield, $frameworkcode);
my $sth1 = $dbh->prepare("DELETE FROM marc_tag_structure WHERE tagfield=? AND frameworkcode=?");
my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?");
$sth1->execute($searchfield, $frameworkcode);
my %subfield_data;
$subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'};
$subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'};
my %subfield_data;
$subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'};
$subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'};
#
sub duplicate_framework {
my ($newframeworkcode,$oldframeworkcode) = @_;
#
sub duplicate_framework {
my ($newframeworkcode,$oldframeworkcode) = @_;
my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where frameworkcode=?");
$sth->execute($oldframeworkcode);
my $sth_insert = $dbh->prepare("insert into marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) values (?,?,?,?,?,?,?)");
my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where frameworkcode=?");
$sth->execute($oldframeworkcode);
my $sth_insert = $dbh->prepare("insert into marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) values (?,?,?,?,?,?,?)");