summaryrefslogtreecommitdiff
path: root/httemplate/misc/delete-ftp_target.html
blob: c8bd29701fe3845e7e5aa902bc8d95d97d61bd39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% if ( $error ) {
%   errorpage($error);
% } else {
<% $cgi->redirect("${p}browse/ftp_target.html") %>
% }
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal targetnum";
my $targetnum = $1;

my $target = qsearchs('ftp_target',{'targetnum'=>$targetnum});
my $error = $target->delete;

</%init>