blob: cfb7ed04db25ceecb41dbf27d43678b012c8e49f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<%
my $error = '';
my $blocknum = $cgi->param('blocknum');
my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
if($addr_block) {
my $router = $addr_block->router;
if ($router) {
$error = $addr_block->deallocate($router);
} else {
$error = "Block is not allocated to a router";
}
} else {
$error = "Cannot find block with blocknum $blocknum";
}
if ( $error ) {
$cgi->param('error', $error);
print $cgi->redirect(popurl(4). "browse/addr_block.cgi?" . $cgi->query_string);
} else {
print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
}
%>
|