summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_broadband.cgi
diff options
context:
space:
mode:
authorivan <ivan>2006-08-23 22:25:39 +0000
committerivan <ivan>2006-08-23 22:25:39 +0000
commit3ce7691203a7737406bf2d4442f7fd84b81f847e (patch)
tree90658b097da96772224f04771888ac6ca1a940aa /httemplate/view/svc_broadband.cgi
parent15e561850b61b10a92a46d8f3e316d53d4970087 (diff)
Will things ever be the same again?
It's the final masonize
Diffstat (limited to 'httemplate/view/svc_broadband.cgi')
-rw-r--r--httemplate/view/svc_broadband.cgi186
1 files changed, 97 insertions, 89 deletions
diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi
index 263fd70f5..1800541f0 100644
--- a/httemplate/view/svc_broadband.cgi
+++ b/httemplate/view/svc_broadband.cgi
@@ -1,50 +1,51 @@
<!-- mason kludge -->
-<%
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_broadband = qsearchs( 'svc_broadband', { 'svcnum' => $svcnum } )
- or die "svc_broadband: Unknown svcnum $svcnum";
-
-#false laziness w/all svc_*.cgi
-my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
- $custnum = $cust_pkg->custnum;
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-#eofalse
-
-my $addr_block = $svc_broadband->addr_block;
-my $router = $addr_block->router;
-
-if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
-
-my (
- $routername,
- $routernum,
- $speed_down,
- $speed_up,
- $ip_addr,
- $ip_gateway,
- $ip_netmask,
- ) = (
- $router->getfield('routername'),
- $router->getfield('routernum'),
- $svc_broadband->getfield('speed_down'),
- $svc_broadband->getfield('speed_up'),
- $svc_broadband->getfield('ip_addr'),
- $addr_block->ip_gateway,
- $addr_block->NetAddr->mask,
- );
-%>
+%
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_broadband = qsearchs( 'svc_broadband', { 'svcnum' => $svcnum } )
+% or die "svc_broadband: Unknown svcnum $svcnum";
+%
+%#false laziness w/all svc_*.cgi
+%my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
+% $custnum = $cust_pkg->custnum;
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%#eofalse
+%
+%my $addr_block = $svc_broadband->addr_block;
+%my $router = $addr_block->router;
+%
+%if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
+%
+%my (
+% $routername,
+% $routernum,
+% $speed_down,
+% $speed_up,
+% $ip_addr,
+% $ip_gateway,
+% $ip_netmask,
+% ) = (
+% $router->getfield('routername'),
+% $router->getfield('routernum'),
+% $svc_broadband->getfield('speed_down'),
+% $svc_broadband->getfield('speed_up'),
+% $svc_broadband->getfield('ip_addr'),
+% $addr_block->ip_gateway,
+% $addr_block->NetAddr->mask,
+% );
+%
+
-<%=include("/elements/header.html",'Broadband Service View', menubar(
+<%include("/elements/header.html",'Broadband Service View', menubar(
( ( $custnum )
? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
@@ -55,101 +56,108 @@ my (
))
%>
-<A HREF="<%=${p}%>edit/svc_broadband.cgi?<%=$svcnum%>">Edit this information</A>
+<A HREF="<%${p}%>edit/svc_broadband.cgi?<%$svcnum%>">Edit this information</A>
<BR>
-<%=ntable("#cccccc")%>
+<%ntable("#cccccc")%>
<TR>
<TD>
- <%=ntable("#cccccc",2)%>
+ <%ntable("#cccccc",2)%>
<TR>
<TD ALIGN="right">Service number</TD>
- <TD BGCOLOR="#ffffff"><%=$svcnum%></TD>
+ <TD BGCOLOR="#ffffff"><%$svcnum%></TD>
</TR>
<TR>
<TD ALIGN="right">Router</TD>
- <TD BGCOLOR="#ffffff"><%=$routernum%>: <%=$routername%></TD>
+ <TD BGCOLOR="#ffffff"><%$routernum%>: <%$routername%></TD>
</TR>
<TR>
<TD ALIGN="right">Download Speed</TD>
- <TD BGCOLOR="#ffffff"><%=$speed_down%></TD>
+ <TD BGCOLOR="#ffffff"><%$speed_down%></TD>
</TR>
<TR>
<TD ALIGN="right">Upload Speed</TD>
- <TD BGCOLOR="#ffffff"><%=$speed_up%></TD>
+ <TD BGCOLOR="#ffffff"><%$speed_up%></TD>
</TR>
<TR>
<TD ALIGN="right">IP Address</TD>
- <TD BGCOLOR="#ffffff"><%=$ip_addr%></TD>
+ <TD BGCOLOR="#ffffff"><%$ip_addr%></TD>
</TR>
<TR>
<TD ALIGN="right">IP Netmask</TD>
- <TD BGCOLOR="#ffffff"><%=$ip_netmask%></TD>
+ <TD BGCOLOR="#ffffff"><%$ip_netmask%></TD>
</TR>
<TR>
<TD ALIGN="right">IP Gateway</TD>
- <TD BGCOLOR="#ffffff"><%=$ip_gateway%></TD>
+ <TD BGCOLOR="#ffffff"><%$ip_gateway%></TD>
</TR>
<TR COLSPAN="2"><TD></TD></TR>
+%
+%foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
+% print $svc_broadband->pvf($_)->widget('HTML', 'view',
+% $svc_broadband->getfield($_)), "\n";
+%}
+%
+%
-<%
-foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
- print $svc_broadband->pvf($_)->widget('HTML', 'view',
- $svc_broadband->getfield($_)), "\n";
-}
-
-%>
</TABLE>
</TD>
</TR>
</TABLE>
<BR>
-<%=ntable("#cccccc", 2)%>
-<%
- my $sb_router = qsearchs('router', { svcnum => $svcnum });
- if ($sb_router) {
- %>
- <B>Router associated: <%=$sb_router->routername%> </B>
- <A HREF="<%=popurl(2)%>edit/router.cgi?<%=$sb_router->routernum%>">
+<%ntable("#cccccc", 2)%>
+%
+% my $sb_router = qsearchs('router', { svcnum => $svcnum });
+% if ($sb_router) {
+%
+
+ <B>Router associated: <%$sb_router->routername%> </B>
+ <A HREF="<%popurl(2)%>edit/router.cgi?<%$sb_router->routernum%>">
(details)
</A>
<BR>
- <% my @sb_addr_block;
- if (@sb_addr_block = $sb_router->addr_block) {
- %>
+% my @sb_addr_block;
+% if (@sb_addr_block = $sb_router->addr_block) {
+%
+
<B>Address space </B>
- <A HREF="<%=popurl(2)%>browse/addr_block.cgi">
+ <A HREF="<%popurl(2)%>browse/addr_block.cgi">
(edit)
</A>
<BR>
- <% print ntable("#cccccc", 1);
- foreach (@sb_addr_block) { %>
+% print ntable("#cccccc", 1);
+% foreach (@sb_addr_block) {
+
<TR>
- <TD><%=$_->ip_gateway%>/<%=$_->ip_netmask%></TD>
+ <TD><%$_->ip_gateway%>/<%$_->ip_netmask%></TD>
</TR>
- <% } %>
+% }
+
</TABLE>
- <% } else { %>
+% } else {
+
<B>No address space allocated.</B>
- <% } %>
+% }
+
<BR>
- <%
- } else {
-%>
+%
+% } else {
+%
+
-<FORM METHOD="GET" ACTION="<%=popurl(2)%>edit/router.cgi">
- <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
+<FORM METHOD="GET" ACTION="<%popurl(2)%>edit/router.cgi">
+ <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
Add router named
- <INPUT TYPE="text" NAME="routername" SIZE="32" VALUE="Broadband router (<%=$svcnum%>)">
+ <INPUT TYPE="text" NAME="routername" SIZE="32" VALUE="Broadband router (<%$svcnum%>)">
<INPUT TYPE="submit" VALUE="Add router">
</FORM>
+%
+%}
+%
-<%
-}
-%>
<BR>
-<%=joblisting({'svcnum'=>$svcnum}, 1)%>
+<%joblisting({'svcnum'=>$svcnum}, 1)%>
</BODY>
</HTML>