- if ( $duplicate_entry ) {
- $template->param(duplicate_category => $new_category,
- duplicate_value => $new_authorised_value,
- else => 1);
- default_form();
- }
-
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
- my $sth=$dbh->prepare("select category,authorised_value,lib,lib_opac from authorised_values where id=?");
- $sth->execute($id);
- my $data=$sth->fetchrow_hashref;
- $id = $input->param('id') unless $id;
- $template->param(searchfield => $searchfield,
- Tlib => $data->{'lib'},
- Tlib_opac => $data->{'lib_opac'},
- Tvalue => $data->{'authorised_value'},
- id =>$id,
- );
-
- # END $OP eq DELETE_CONFIRM
-################## DELETE_CONFIRMED ##################################
-# called by delete_confirm, used to effectively confirm deletion of data in DB
-} elsif ($op eq 'delete_confirmed') {
- my $id = $input->param('id');
- my $sth=$dbh->prepare("delete from authorised_values where id=?");
- $sth->execute($id);
- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=$searchfield&offset=$offset\"></html>";
- exit;
- # END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
- default_form();
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;