1 <% include("/elements/header.html", "Website 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 <A HREF="<% $p %>edit/svc_www.cgi?<% $svcnum %>">Edit this information</A><BR>
13 <% ntable("#cccccc", 2) %>
16 <TD ALIGN="right">Service number</TD>
17 <TD BGCOLOR="#ffffff"><% $svcnum %></TD>
20 <TD ALIGN="right">Website name</TD>
21 <TD BGCOLOR="#ffffff"><A HREF="http://<% $www %>"><% $www %></A></TD>
24 % if ( $part_svc->part_svc_column('usersvc')->columnflag ne 'F'
25 % || $part_svc->part_svc_column('usersvc')->columnvalue !~ /^\s*$/) {
28 <TD ALIGN="right">Account</TD>
29 <TD BGCOLOR="#ffffff">
31 <A HREF="<% $p %>view/svc_acct.cgi?<% $usersvc %>"><% $email %></A>
41 <TD ALIGN="right">Config lines</TD>
42 <TD BGCOLOR="#ffffff"><PRE><% join("\n", $svc_www->config) |h %></PRE></TD>
45 % foreach (sort { $a cmp $b } $svc_www->virtual_fields) {
46 <% $svc_www->pvf($_)->widget('HTML', 'view', $svc_www->getfield($_)) %>
52 <& /elements/table-tickets.html, object => $cust_svc &>
54 <% joblisting({'svcnum'=>$svcnum}, 1) %>
56 <% include('/elements/footer.html') %>
60 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
62 my($query) = $cgi->keywords;
65 my $svc_www = qsearchs({
66 'select' => 'svc_www.*',
68 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
69 ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
70 ' LEFT JOIN cust_main USING ( custnum ) ',
71 'hashref' => { 'svcnum' => $svcnum },
72 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
73 'null_right' => 'View/link unlinked services'
75 }) or die "svc_www: Unknown svcnum $svcnum";
77 #false laziness w/all svc_*.cgi
78 my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
79 my $pkgnum = $cust_svc->getfield('pkgnum');
80 my($cust_pkg, $custnum, $display_custnum);
82 $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
83 $custnum = $cust_pkg->custnum;
84 $display_custnum = $cust_pkg->cust_main->display_custnum;
91 my $part_svc=qsearchs('part_svc',{'svcpart'=>$cust_svc->svcpart})
92 or die "svc_www: Unknown svcpart" . $cust_svc->svcpart;
94 my $usersvc = $svc_www->usersvc;
98 $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } )
99 or die "svc_www: Unknown usersvc $usersvc";
100 $email = $svc_acct->email;
103 my $domain_record = qsearchs('domain_record', { 'recnum' => $svc_www->recnum } )
104 or die "svc_www: Unknown recnum ". $svc_www->recnum;
106 my $www = $domain_record->zone;