4 %my($query) = $cgi->keywords;
7 %my $svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum});
8 %die "Unknown svcnum" unless $svc_domain;
10 %my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
11 %my $pkgnum = $cust_svc->getfield('pkgnum');
12 %my($cust_pkg, $custnum);
14 % $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
15 % $custnum=$cust_pkg->getfield('custnum');
21 %my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
22 %die "Unknown svcpart" unless $part_svc;
25 %if ($svc_domain->catchall) {
26 % my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
27 % die "Unknown svcpart" unless $svc_acct;
28 % $email = $svc_acct->email;
31 %my $domain = $svc_domain->domain;
36 <% include("/elements/header.html",'Domain View', menubar(
37 ( ( $pkgnum || $custnum )
38 ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
40 : ( "Delete this (unaudited) domain" =>
41 "javascript:areyousure('${p}misc/cancel-unaudited.cgi?$svcnum', 'Delete $domain and all records?' )" )
46 Service #<% $svcnum %>
47 <BR>Service: <B><% $part_svc->svc %></B>
48 <BR>Domain name: <B><% $domain %></B>
49 <BR>Catch all email <A HREF="<% ${p} %>misc/catchall.cgi?<% $svcnum %>">(change)</A>:
50 <% $email ? "<B>$email</B>" : "<I>(none)<I>" %>
51 <BR><BR><A HREF="<% ${p} %>misc/whois.cgi?custnum=<%$custnum%>;svcnum=<%$svcnum%>;domain=<%$domain%>">View whois information.</A>
54 function areyousure(href, message) {
55 if ( confirm(message) == true )
56 window.location.href = href;
58 function slave_areyousure() {
59 return confirm("Remove all records and slave from " + document.SlaveForm.recdata.value + "?");
63 % my @records; if ( @records = $svc_domain->domain_record ) {
65 <% include('/elements/table-grid.html') %>
67 % my $bgcolor1 = '#eeeeee';
68 % my $bgcolor2 = '#ffffff';
69 % my $bgcolor = $bgcolor2;
72 <th CLASS="grid" BGCOLOR="#cccccc">Zone</th>
73 <th CLASS="grid" BGCOLOR="#cccccc">Type</th>
74 <th CLASS="grid" BGCOLOR="#cccccc">Data</th>
77 % foreach my $domain_record ( @records ) {
78 % my $type = $domain_record->rectype eq '_mstr'
80 % : $domain_record->recaf. ' '. $domain_record->rectype;
84 <td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $domain_record->reczone %></td>
85 <td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $type %></td>
86 <td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $domain_record->recdata %>
88 % unless ( $domain_record->rectype eq 'SOA' ) {
89 (<A HREF="javascript:areyousure('<%$p%>misc/delete-domain_record.cgi?<%$domain_record->recnum%>', 'Delete \'<% $domain_record->reczone %> <% $type %> <% $domain_record->recdata %>\' ?' )">delete</A>)
95 % if ( $bgcolor eq $bgcolor1 ) {
96 % $bgcolor = $bgcolor2;
98 % $bgcolor = $bgcolor1;
108 <FORM METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
109 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
110 <INPUT TYPE="text" NAME="reczone">
111 <INPUT TYPE="hidden" NAME="recaf" VALUE="IN"> IN
112 <SELECT NAME="rectype">
113 % foreach (qw( A NS CNAME MX PTR TXT) ) {
115 <OPTION VALUE="<%$_%>"><%$_%></OPTION>
119 <INPUT TYPE="text" NAME="recdata"> <INPUT TYPE="submit" VALUE="Add record">
120 </FORM><BR><BR>or<BR><BR>
121 <FORM NAME="SlaveForm" METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
122 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
124 Delete all records and
127 Slave from nameserver IP
128 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
129 <INPUT TYPE="hidden" NAME="reczone" VALUE="@">
130 <INPUT TYPE="hidden" NAME="recaf" VALUE="IN">
131 <INPUT TYPE="hidden" NAME="rectype" VALUE="_mstr">
132 <INPUT TYPE="text" NAME="recdata"> <INPUT TYPE="submit" VALUE="Slave domain" onClick="return slave_areyousure()">
134 <BR><BR><% joblisting({'svcnum'=>$svcnum}, 1) %>