|
Lines 88-115
if($op && ($op eq 'cud-savenew' || $op eq 'cud-savemod')) {
Link Here
|
| 88 |
} else { |
88 |
} else { |
| 89 |
AddSubscriptionFrequency($frequency); |
89 |
AddSubscriptionFrequency($frequency); |
| 90 |
} |
90 |
} |
| 91 |
} elsif($op && $op eq 'cud-del') { |
91 |
} elsif($op && $op eq 'del') { |
| 92 |
my $frequencyid = $input->param('frequencyid'); |
92 |
my $frequencyid = $input->param('frequencyid'); |
| 93 |
|
93 |
|
| 94 |
if ($frequencyid) { |
94 |
if ($frequencyid) { |
| 95 |
my $confirm = $input->param('confirm'); |
95 |
my @subs = GetSubscriptionsWithFrequency($frequencyid); |
| 96 |
if ($confirm) { |
96 |
if (@subs) { |
| 97 |
DelSubscriptionFrequency($frequencyid); |
97 |
$template->param( |
|
|
98 |
frequencyid => $frequencyid, |
| 99 |
still_used => 1, |
| 100 |
subscriptions => \@subs |
| 101 |
); |
| 98 |
} else { |
102 |
} else { |
| 99 |
my @subs = GetSubscriptionsWithFrequency($frequencyid); |
103 |
$template->param( |
| 100 |
if (@subs) { |
104 |
frequencyid => $frequencyid, |
| 101 |
$template->param( |
105 |
still_used => 0 |
| 102 |
frequencyid => $frequencyid, |
106 |
); |
| 103 |
still_used => 1, |
107 |
DelSubscriptionFrequency($frequencyid); |
| 104 |
subscriptions => \@subs |
|
|
| 105 |
); |
| 106 |
} else { |
| 107 |
DelSubscriptionFrequency($frequencyid); |
| 108 |
} |
| 109 |
} |
108 |
} |
| 110 |
} |
109 |
} |
| 111 |
} |
110 |
} |
| 112 |
|
111 |
|
|
|
112 |
elsif($op && $op eq 'cud-del') { |
| 113 |
my $frequencyid = $input->param('frequencyid'); |
| 114 |
DelSubscriptionFrequency($frequencyid); |
| 115 |
} |
| 113 |
|
116 |
|
| 114 |
my @frequencies = GetSubscriptionFrequencies(); |
117 |
my @frequencies = GetSubscriptionFrequencies(); |
| 115 |
|
118 |
|
| 116 |
- |
|
|