blob: 0b985faa7fb983b2dc228a520c355f2c77b5ddab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
% if ( $error ) {
% errorpage($error);
% } else {
<% $cgi->redirect($p. "view/svc_dsl.cgi?". $svcnum) %>
% }
<%init>
# :/ needs agent-virt so you can't futz with arbitrary devices
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
#untaint devicenum
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal devicenum";
my $devicenum = $1;
my $dsl_device = qsearchs('dsl_device', { 'devicenum' => $devicenum } );
my $svcnum = $dsl_device->svcnum;
my $error = $dsl_device->delete;
</%init>
|