enable CardFortress in test database, #71513
[freeside.git] / httemplate / view / svc_acct / hosting.html
1 % if ( @svc_www || $opt{'showall'} ) {
2   Hosting
3   <% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
4 %   foreach my $svc_www (@svc_www) {
5 %     my($label, $value) = $svc_www->cust_svc->label;
6 %     my $link = $p. 'view/svc_www.cgi?'. $svc_www->svcnum;
7       <TR>
8         <TD BGCOLOR="#ffffff">
9           <A HREF="<% $link %>"><% "$label: $value" %></A>
10         </TD>
11       </TR>
12 %   }
13   </TABLE></TD></TR></TABLE>
14   <BR><BR>
15 % }
16 <%init>
17
18 my %opt = @_;
19
20 #false laziness w/view_svc_acct.cgi and a zillion other places
21 my $addl_from = ' LEFT JOIN cust_svc  USING ( svcnum  ) '.
22                 ' LEFT JOIN cust_pkg  USING ( pkgnum  ) '.
23                 ' LEFT JOIN cust_main USING ( custnum ) ';
24
25 my @svc_www = qsearch({
26   'select'    => 'svc_www.*',
27   'table'     => 'svc_www',
28   'addl_from' => $addl_from,
29   'hashref'   => { 'usersvc' => $opt{'svcnum'} },
30   #XXX shit outta luck if you somehow got them linked across agents
31   # maybe we should show but not link to them?  kinda makes sense...
32   # (maybe a specific ACL for this situation???)
33   'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
34                             'null_right' => 'View/link unlinked services'
35                           ),
36 });
37
38 </%init>