blob: a94c0320f529fd3d8d502b1b4cfcfe23f9139594 (
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
25
26
|
%
%my $error = '';
%my $blocknum = $cgi->param('blocknum');
%my $routernum = $cgi->param('routernum');
%
%my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
%my $router = qsearchs('router', { routernum => $routernum });
%
%if($addr_block) {
% if ($router) {
% $error = $addr_block->allocate($router);
% } else {
% $error = "Cannot find router with routernum $routernum";
% }
%} 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");
%}
%
|