blob: 7309388c660610edac85470f40d2d1f396077527 (
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
|
<% include("/elements/header.html",'Routers', menubar('Main Menu' => $p)) %>
%
%
%my @router = qsearch('router', {});
%my $p2 = popurl(2);
%
%
% if ($cgi->param('error')) {
<FONT SIZE="+1" COLOR="#ff0000">Error: <%$cgi->param('error')%></FONT>
<BR><BR>
% }
%
%my $hidecustomerrouters = 0;
%my $hideurl = '';
%if ($cgi->param('hidecustomerrouters') eq '1') {
% $hidecustomerrouters = 1;
% $cgi->param('hidecustomerrouters', 0);
% $hideurl = '<A HREF="' . $cgi->self_url() . '">Show customer routers</A>';
%} else {
% $hidecustomerrouters = 0;
% $cgi->param('hidecustomerrouters', 1);
% $hideurl = '<A HREF="' . $cgi->self_url() . '">Hide customer routers</A>';
%}
%
<A HREF="<%$p2%>edit/router.cgi">Add a new router</A> | <%$hideurl%>
<%table()%>
<TR>
<TD><B>Router name</B></TD>
<TD><B>Address block(s)</B></TD>
</TR>
% foreach my $router (sort {$a->routernum <=> $b->routernum} @router) {
% next if $hidecustomerrouters && $router->svcnum;
% my @addr_block = $router->addr_block;
% if (scalar(@addr_block) == 0) {
% push @addr_block, ' ';
% }
%
<TR>
<TD ROWSPAN="<%scalar(@addr_block)+1%>">
<A HREF="<%$p2%>edit/router.cgi?<%$router->routernum%>"><%$router->routername%></A>
</TD>
</TR>
% foreach my $block ( @addr_block ) {
<TR>
<TD><%UNIVERSAL::isa($block, 'FS::addr_block') ? $block->NetAddr : ' '%></TD>
</TR>
% }
</TR>
% }
</TABLE>
</BODY>
</HTML>
|