1 <% include("/elements/header.html",'Domain View', menubar(
2 ( ( $pkgnum || $custnum )
3 ? ( "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
5 : ( "Delete this (unaudited) domain" =>
6 "javascript:areyousure('${p}misc/cancel-unaudited.cgi?$svcnum', 'Delete $domain and all records?' )" )
10 Service #<% $svcnum %>
11 <BR>Service: <B><% $part_svc->svc %></B>
12 <BR>Domain name: <B><% $domain %></B>
13 % if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain catchall') ) {
14 <BR>Catch all email <A HREF="<% ${p} %>misc/catchall.cgi?<% $svcnum %>">(change)</A>:
19 <% $email ? "<B>$email</B>" : "<I>(none)<I>" %>
20 <BR><BR><A HREF="<% ${p} %>misc/whois.cgi?custnum=<%$custnum%>;svcnum=<%$svcnum%>;domain=<%$domain%>">View whois information.</A>
23 function areyousure(href, message) {
24 if ( confirm(message) == true )
25 window.location.href = href;
27 function slave_areyousure() {
28 return confirm("Remove all records and slave from " + document.SlaveForm.recdata.value + "?");
32 % my @records; if ( @records = $svc_domain->domain_record ) {
34 <% include('/elements/table-grid.html') %>
36 % my $bgcolor1 = '#eeeeee';
37 % my $bgcolor2 = '#ffffff';
38 % my $bgcolor = $bgcolor2;
41 <th CLASS="grid" BGCOLOR="#cccccc">Zone</th>
42 <th CLASS="grid" BGCOLOR="#cccccc">Type</th>
43 <th CLASS="grid" BGCOLOR="#cccccc">Data</th>
46 % foreach my $domain_record ( @records ) {
47 % my $type = $domain_record->rectype eq '_mstr'
49 % : $domain_record->recaf. ' '. $domain_record->rectype;
53 <td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $domain_record->reczone %></td>
54 <td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $type %></td>
55 <td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $domain_record->recdata %>
57 % unless ( $domain_record->rectype eq 'SOA'
58 % || ! $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice')
60 % ( my $recdata = $domain_record->recdata ) =~ s/"/\\'\\'/g;
61 (<A HREF="javascript:areyousure('<%$p%>misc/delete-domain_record.cgi?<%$domain_record->recnum%>', 'Delete \'<% $domain_record->reczone %> <% $type %> <% $recdata %>\' ?' )">delete</A>)
67 % if ( $bgcolor eq $bgcolor1 ) {
68 % $bgcolor = $bgcolor2;
70 % $bgcolor = $bgcolor1;
78 % if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') ) {
80 <FORM METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
81 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
82 <INPUT TYPE="text" NAME="reczone">
83 <INPUT TYPE="hidden" NAME="recaf" VALUE="IN"> IN
84 <SELECT NAME="rectype">
85 % foreach (qw( A NS CNAME MX PTR TXT) ) {
86 <OPTION VALUE="<%$_%>"><%$_%></OPTION>
89 <INPUT TYPE="text" NAME="recdata">
90 <INPUT TYPE="submit" VALUE="Add record">
97 <FORM NAME="SlaveForm" METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
98 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
100 Delete all records and
102 Slave from nameserver IP
103 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
104 <INPUT TYPE="hidden" NAME="reczone" VALUE="@">
105 <INPUT TYPE="hidden" NAME="recaf" VALUE="IN">
106 <INPUT TYPE="hidden" NAME="rectype" VALUE="_mstr">
107 <INPUT TYPE="text" NAME="recdata">
108 <INPUT TYPE="submit" VALUE="Slave domain" onClick="return slave_areyousure()">
115 <% joblisting({'svcnum'=>$svcnum}, 1) %>
117 <% include('/elements/footer.html') %>
121 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
123 my($query) = $cgi->keywords;
126 my $svc_domain = qsearchs({
127 'select' => 'svc_domain.*',
128 'table' => 'svc_domain',
129 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
130 ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
131 ' LEFT JOIN cust_main USING ( custnum ) ',
132 'hashref' => {'svcnum'=>$svcnum},
133 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
135 die "Unknown svcnum" unless $svc_domain;
137 my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
138 my $pkgnum = $cust_svc->getfield('pkgnum');
139 my($cust_pkg, $custnum, $display_custnum);
141 $cust_pkg =qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
142 $custnum = $cust_pkg->custnum;
143 $custnum = $cust_pkg->cust_main->display_custnum;
149 my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
150 die "Unknown svcpart" unless $part_svc;
153 if ($svc_domain->catchall) {
154 my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
155 die "Unknown svcpart" unless $svc_acct;
156 $email = $svc_acct->email;
159 my $domain = $svc_domain->domain;