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 <% include('/view/elements/svc_edit_link.html', 'svc'=>$svc_broadband) %>
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>
87 <TD ALIGN="right">Service Plan Id</TD>
88 <TD BGCOLOR="#ffffff"><%$plan_id%></TD>
90 <TR COLSPAN="2"><TD></TD></TR>
92 %foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
93 % print $svc_broadband->pvf($_)->widget('HTML', 'view',
94 % $svc_broadband->getfield($_)), "\n";
105 <%ntable("#cccccc", 2)%>
107 % my $sb_router = qsearchs('router', { svcnum => $svcnum });
111 <B>Router associated: <%$sb_router->routername%> </B>
112 <A HREF="<%popurl(2)%>edit/router.cgi?<%$sb_router->routernum%>">
117 % if (@sb_addr_block = $sb_router->addr_block) {
120 <B>Address space </B>
121 <A HREF="<%popurl(2)%>browse/addr_block.cgi">
125 % print ntable("#cccccc", 1);
126 % foreach (@sb_addr_block) {
129 <TD><%$_->ip_gateway%>/<%$_->ip_netmask%></TD>
136 <B>No address space allocated.</B>
145 <FORM METHOD="GET" ACTION="<%popurl(2)%>edit/router.cgi">
146 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
148 <INPUT TYPE="text" NAME="routername" SIZE="32" VALUE="Broadband router (<%$svcnum%>)">
149 <INPUT TYPE="submit" VALUE="Add router">
157 <%joblisting({'svcnum'=>$svcnum}, 1)%>
159 <% include('/elements/footer.html') %>
163 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
165 my($query) = $cgi->keywords;
168 my $svc_broadband = qsearchs({
169 'select' => 'svc_broadband.*',
170 'table' => 'svc_broadband',
171 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
172 ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
173 ' LEFT JOIN cust_main USING ( custnum ) ',
174 'hashref' => { 'svcnum' => $svcnum },
175 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
176 'null_right' => 'View/link unlinked services'
178 }) or die "svc_broadband: Unknown svcnum $svcnum";
180 #false laziness w/all svc_*.cgi
181 my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
182 my $pkgnum = $cust_svc->getfield('pkgnum');
183 my($cust_pkg, $custnum, $display_custnum);
185 $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
186 $custnum = $cust_pkg->custnum;
187 $display_custnum = $cust_pkg->cust_main->display_custnum;
194 my $addr_block = $svc_broadband->addr_block;
195 my $router = $addr_block->router if $addr_block;
197 #if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
212 $svc_broadband->getfield('speed_down'),
213 $svc_broadband->getfield('speed_up'),
214 $svc_broadband->getfield('ip_addr'),
215 $svc_broadband->mac_addr,
216 $svc_broadband->latitude,
217 $svc_broadband->longitude,
218 $svc_broadband->altitude,
219 $svc_broadband->vlan_profile,
220 $svc_broadband->auth_key,
221 $svc_broadband->description,
222 $svc_broadband->plan_id,