From ac1c39dff69b630907bb75cb87accfe67e484128 Mon Sep 17 00:00:00 2001 From: khoff Date: Wed, 15 Oct 2003 22:48:41 +0000 Subject: [PATCH] File got munged during svc_broadband merge. Added ability to create a 'customer router'. --- httemplate/view/svc_broadband.cgi | 112 ++++++++++++++++++++++++++++++-------- 1 file 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!Edit this information
!. - ntable("#cccccc"). ''. ntable("#cccccc",2). - qq!Service number!. - qq!$svcnum!. - qq!Router!. - qq!$routernum: $routername!. - qq!Download Speed!. - qq!$speed_down!. - qq!Upload Speed!. - qq!$speed_up!. - qq!IP Address!. - qq!$ip_addr!. - ''; +)) +%> +Edit this information +
+<%=ntable("#cccccc")%> + + + <%=ntable("#cccccc",2)%> + + Service number + <%=$svcnum%> + + + Router + <%=$routernum%>: <%=$routername%> + + + Download Speed + <%=$speed_down%> + + + Upload Speed + <%=$speed_up%> + + + IP Address + <%=$ip_addr%> + + + +<% 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 ''; +%> + + + + -print '
'. joblisting({'svcnum'=>$svcnum}, 1). - '' -; +
+<%=ntable("#cccccc", 2)%> +<% + my $sb_router = qsearchs('router', { svcnum => $svcnum }); + if ($sb_router) { + %> + Router associated: <%=$sb_router->routername%> + + (details) + +
+ <% my @addr_block; + if (@addr_block = $sb_router->addr_block) { + %> + Address space + + (edit) + +
+ <% print ntable("#cccccc", 1); + foreach (@addr_block) { %> + + <%=$_->ip_gateway%>/<%=$_->ip_netmask%> + + <% } %> + + <% } else { %> + No address space allocated. + <% } %> +
+ <% + } else { %> + +
+ +Add router named + + +
+ +<% +} +%> + +
+<%=joblisting({'svcnum'=>$svcnum}, 1)%> + + + -- 2.11.0