13 my $dbh = C4::Context->dbh();
15 my $branchcode = $input->param('showBranchName');
16 my $weekday = $input->param('showWeekday');
17 my $day = $input->param('showDay');
18 my $month = $input->param('showMonth');
19 my $year = $input->param('showYear');
20 my $title = $input->param('showTitle');
21 my $description = $input->param('showDescription');
23 my $calendar = C4::Calendar->new(branchcode => $branchcode);
25 $title || ($title = '');
27 $description =~ s/\r/\\r/g;
28 $description =~ s/\n/\\n/g;
33 if ($input->param('showOperation') eq 'exception') {
34 $calendar->insert_exception_holiday(day => $day,
38 description => $description);
39 } elsif ($input->param('showOperation') eq 'delete') {
40 $calendar->delete_holiday(weekday => $weekday,
45 print $input->redirect("/cgi-bin/koha/tools/holidays.pl?branch=$branchcode");