blob: eac7cf7b6cfbac9fc72db95099ba9fe4acae6597 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<% include('/elements/header.html', 'Address Blocks') %>
<% include('/elements/error.html') %>
<%table()%>
% foreach $block (sort {$a->NetAddr cmp $b->NetAddr} @addr_block) {
<TR>
<TD><%$block->NetAddr%></TD>
% if (my $router = $block->router) {
% if (scalar($block->svc_broadband) == 0) {
<TD>
<%$router->routername%>
</TD>
<TD>
<FORM ACTION="<%$path%>/deallocate.cgi" METHOD="POST">
<INPUT TYPE="hidden" NAME="blocknum" VALUE="<%$block->blocknum%>">
<INPUT TYPE="submit" NAME="submit" VALUE="Deallocate">
</FORM>
</TD>
% } else {
<TD COLSPAN="2">
<%$router->routername%>
</TD>
% }
% } else {
<TD>
<FORM ACTION="<%$path%>/allocate.cgi" METHOD="POST">
<INPUT TYPE="hidden" NAME="blocknum" VALUE="<%$block->blocknum%>">
<SELECT NAME="routernum" SIZE="1">
% foreach (@router) {
<OPTION VALUE="<%$_->routernum %>"><%$_->routername%></OPTION>
% }
</SELECT>
<INPUT TYPE="submit" NAME="submit" VALUE="Allocate">
</FORM>
</TD>
<TD>
<FORM ACTION="<%$path%>/split.cgi" METHOD="POST">
<INPUT TYPE="hidden" NAME="blocknum" VALUE="<%$block->blocknum%>">
<INPUT TYPE="submit" NAME="submit" VALUE="Split">
</FORM>
</TD>
</TR>
% }
% }
<TR><TD COLSPAN="3"><BR></TD></TR>
<TR>
<FORM ACTION="<%$path%>/add.cgi" METHOD="POST">
<TD>Gateway/Netmask</TD>
<TD>
<INPUT TYPE="text" NAME="ip_gateway" SIZE="15">/<INPUT TYPE="text" NAME="ip_netmask" SIZE="2">
</TD>
<TD>
<INPUT TYPE="submit" NAME="submit" VALUE="Add">
</TD>
</FORM>
</TR>
</TABLE>
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my @addr_block = qsearch('addr_block', {});
my @router = qsearch('router', {});
my $block;
my $p2 = popurl(2);
my $path = $p2 . "edit/process/addr_block";
</%init>
|