1 <%include("/elements/header.html",'Broadband Service View', menubar(
3 ? ( "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
5 : ( "Cancel this (unaudited) website" =>
6 "${p}misc/cancel-unaudited.cgi?$svcnum" )
11 <% include('/elements/init_overlib.html') %>
13 <A HREF="<%$p%>edit/svc_broadband.cgi?<%$svcnum%>">Edit this information</A>
18 <%ntable("#cccccc",2)%>
20 <TD ALIGN="right">Service number</TD>
21 <TD BGCOLOR="#ffffff"><%$svcnum%></TD>
24 <TD ALIGN="right">Description</TD>
25 <TD BGCOLOR="#ffffff"><%$description%></TD>
30 <TD ALIGN="right">Router</TD>
31 <TD BGCOLOR="#ffffff"><%$router->routernum%>: <%$router->routername%></TD>
36 <TD ALIGN="right">Download Speed</TD>
37 <TD BGCOLOR="#ffffff"><%$speed_down%></TD>
40 <TD ALIGN="right">Upload Speed</TD>
41 <TD BGCOLOR="#ffffff"><%$speed_up%></TD>
46 <TD ALIGN="right">IP Address</TD>
47 <TD BGCOLOR="#ffffff">
49 (<% include('/elements/popup_link-ping.html', 'ip'=>$ip_addr ) %>)
53 <TD ALIGN="right">IP Netmask</TD>
54 <TD BGCOLOR="#ffffff"><%$addr_block->NetAddr->mask%></TD>
57 <TD ALIGN="right">IP Gateway</TD>
58 <TD BGCOLOR="#ffffff"><%$addr_block->ip_gateway%></TD>
63 <TD ALIGN="right">MAC Address</TD>
64 <TD BGCOLOR="#ffffff"><%$mac_addr%></TD>
67 <TD ALIGN="right">Latitude</TD>
68 <TD BGCOLOR="#ffffff"><%$latitude%></TD>
71 <TD ALIGN="right">Longitude</TD>
72 <TD BGCOLOR="#ffffff"><%$longitude%></TD>
75 <TD ALIGN="right">Altitude</TD>
76 <TD BGCOLOR="#ffffff"><%$altitude%></TD>
79 <TD ALIGN="right">VLAN Profile</TD>
80 <TD BGCOLOR="#ffffff"><%$vlan_profile%></TD>
83 <TD ALIGN="right">Authentication Key</TD>
84 <TD BGCOLOR="#ffffff"><%$auth_key%></TD>
86 <TR COLSPAN="2"><TD></TD></TR>
88 %foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
89 % print $svc_broadband->pvf($_)->widget('HTML', 'view',
90 % $svc_broadband->getfield($_)), "\n";
101 <%ntable("#cccccc", 2)%>
103 % my $sb_router = qsearchs('router', { svcnum => $svcnum });
107 <B>Router associated: <%$sb_router->routername%> </B>
108 <A HREF="<%popurl(2)%>edit/router.cgi?<%$sb_router->routernum%>">
113 % if (@sb_addr_block = $sb_router->addr_block) {
116 <B>Address space </B>
117 <A HREF="<%popurl(2)%>browse/addr_block.cgi">
121 % print ntable("#cccccc", 1);
122 % foreach (@sb_addr_block) {
125 <TD><%$_->ip_gateway%>/<%$_->ip_netmask%></TD>
132 <B>No address space allocated.</B>
141 <FORM METHOD="GET" ACTION="<%popurl(2)%>edit/router.cgi">
142 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
144 <INPUT TYPE="text" NAME="routername" SIZE="32" VALUE="Broadband router (<%$svcnum%>)">
145 <INPUT TYPE="submit" VALUE="Add router">
153 <%joblisting({'svcnum'=>$svcnum}, 1)%>
155 <% include('/elements/footer.html') %>
159 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
161 my($query) = $cgi->keywords;
164 my $svc_broadband = qsearchs({
165 'select' => 'svc_broadband.*',
166 'table' => 'svc_broadband',
167 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
168 ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
169 ' LEFT JOIN cust_main USING ( custnum ) ',
170 'hashref' => { 'svcnum' => $svcnum },
171 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
172 'null_right' => 'View/link unlinked services'
174 }) or die "svc_broadband: Unknown svcnum $svcnum";
176 #false laziness w/all svc_*.cgi
177 my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
178 my $pkgnum = $cust_svc->getfield('pkgnum');
179 my($cust_pkg, $custnum, $display_custnum);
181 $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
182 $custnum = $cust_pkg->custnum;
183 $display_custnum = $cust_pkg->cust_main->display_custnum;
190 my $addr_block = $svc_broadband->addr_block;
191 my $router = $addr_block->router if $addr_block;
193 #if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
207 $svc_broadband->getfield('speed_down'),
208 $svc_broadband->getfield('speed_up'),
209 $svc_broadband->getfield('ip_addr'),
210 $svc_broadband->mac_addr,
211 $svc_broadband->latitude,
212 $svc_broadband->longitude,
213 $svc_broadband->altitude,
214 $svc_broadband->vlan_profile,
215 $svc_broadband->auth_key,
216 $svc_broadband->description,