diff options
author | khoff <khoff> | 2003-10-15 22:48:41 +0000 |
---|---|---|
committer | khoff <khoff> | 2003-10-15 22:48:41 +0000 |
commit | ac1c39dff69b630907bb75cb87accfe67e484128 (patch) | |
tree | 6b333a65011e760b1d3ac069e587632cea21523f | |
parent | bacea004a735c7a9c30a35e9184a63897a200e6e (diff) |
File got munged during svc_broadband merge.
Added ability to create a 'customer router'.
-rw-r--r-- | httemplate/view/svc_broadband.cgi | 112 |
1 files changed, 89 insertions, 23 deletions
diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index 677a4b058..a4ec7569e 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -37,10 +37,9 @@ my ( $svc_broadband->getfield('speed_up'), $svc_broadband->getfield('ip_addr') ); +%> - - -print header('Broadband Service View', menubar( +<%=header('Broadband Service View', menubar( ( ( $custnum ) ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", @@ -49,29 +48,96 @@ print header('Broadband Service View', menubar( "${p}misc/cancel-unaudited.cgi?$svcnum" ) ), "Main menu" => $p, -)). - qq!<A HREF="${p}edit/svc_broadband.cgi?$svcnum">Edit this information</A><BR>!. - ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2). - qq!<TR><TD ALIGN="right">Service number</TD>!. - qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!. - qq!<TR><TD ALIGN="right">Router</TD>!. - qq!<TD BGCOLOR="#ffffff">$routernum: $routername</TD></TR>!. - qq!<TR><TD ALIGN="right">Download Speed</TD>!. - qq!<TD BGCOLOR="#ffffff">$speed_down</TD></TR>!. - qq!<TR><TD ALIGN="right">Upload Speed</TD>!. - qq!<TD BGCOLOR="#ffffff">$speed_up</TD></TR>!. - qq!<TR><TD ALIGN="right">IP Address</TD>!. - qq!<TD BGCOLOR="#ffffff">$ip_addr</TD></TR>!. - '</TD></TR><TR ROWSPAN="1"><TD></TD></TR>'; +)) +%> +<A HREF="<%=${p}%>edit/svc_broadband.cgi?<%=$svcnum%>">Edit this information</A> +<BR> +<%=ntable("#cccccc")%> + <TR> + <TD> + <%=ntable("#cccccc",2)%> + <TR> + <TD ALIGN="right">Service number</TD> + <TD BGCOLOR="#ffffff"><%=$svcnum%></TD> + </TR> + <TR> + <TD ALIGN="right">Router</TD> + <TD BGCOLOR="#ffffff"><%=$routernum%>: <%=$routername%></TD> + </TR> + <TR> + <TD ALIGN="right">Download Speed</TD> + <TD BGCOLOR="#ffffff"><%=$speed_down%></TD> + </TR> + <TR> + <TD ALIGN="right">Upload Speed</TD> + <TD BGCOLOR="#ffffff"><%=$speed_up%></TD> + </TR> + <TR> + <TD ALIGN="right">IP Address</TD> + <TD BGCOLOR="#ffffff"><%=$ip_addr%></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"; + print $svc_broadband->pvf($_)->widget('HTML', 'view', + $svc_broadband->getfield($_)), "\n"; } -print '</TABLE>'; +%> + </TABLE> + </TD> + </TR> +</TABLE> -print '<BR>'. joblisting({'svcnum'=>$svcnum}, 1). - '</BODY></HTML>' -; +<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%>"> + (details) + </A> + <BR> + <% my @addr_block; + if (@addr_block = $sb_router->addr_block) { + %> + <B>Address space </B> + <A HREF="<%=popurl(2)%>browse/addr_block.cgi"> + (edit) + </A> + <BR> + <% print ntable("#cccccc", 1); + foreach (@addr_block) { %> + <TR> + <TD><%=$_->ip_gateway%>/<%=$_->ip_netmask%></TD> + </TR> + <% } %> + </TABLE> + <% } else { %> + <B>No address space allocated.</B> + <% } %> + <BR> + <% + } else { %> + +<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="submit" VALUE="Add router"> +</FORM> + +<% +} +%> + +<BR> +<%=joblisting({'svcnum'=>$svcnum}, 1)%> + </BODY> +</HTML> + |