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

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
  || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');

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

my $router = qsearchs('router',{'routernum'=>$routernum});
my $error = $router->delete;

</%init>