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;
35 <%= header('Domain View', menubar(
36 ( ( $pkgnum || $custnum )
37 ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
38 "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
40 : ( "Cancel this (unaudited) domain" =>
41 "${p}misc/cancel-unaudited.cgi?$svcnum" )
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="http://www.geektools.com/cgi-bin/proxy.cgi?query=<%=$domain%>;targetnic=auto">View whois information.</A>
54 function areyousure(href) {
55 if ( confirm("Remove this record?") == true )
56 window.location.href = href;
60 <% my @records; if ( @records = $svc_domain->domain_record ) { %>
62 <tr><th>Zone</th><th>Type</th><th>Data</th></tr>
64 <% foreach my $domain_record ( @records ) {
65 my $type = $domain_record->rectype eq '_mstr'
67 : $domain_record->recaf. ' '. $domain_record->rectype;
70 <tr><td><%= $domain_record->reczone %></td>
72 <td><%= $domain_record->recdata %>
74 <% unless ( $domain_record->rectype eq 'SOA' ) { %>
75 (<A HREF="javascript:areyousure('<%=$p%>misc/delete-domain_record.cgi?<%=$domain_record->recnum%>')">delete</A>)
83 <FORM METHOD="POST" ACTION="<%=$p%>edit/process/domain_record.cgi">
84 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
85 <INPUT TYPE="text" NAME="reczone">
86 <INPUT TYPE="hidden" NAME="recaf" VALUE="IN"> IN
87 <SELECT NAME="rectype">
88 <% foreach (qw( A NS CNAME MX) ) { %>
89 <OPTION VALUE="<%=$_%>"><%=$_%></OPTION>
92 <INPUT TYPE="text" NAME="recdata"> <INPUT TYPE="submit" VALUE="Add record">
93 </FORM><BR><BR>or<BR><BR>
94 <FORM METHOD="POST" ACTION="<%=$p%>edit/process/domain_record.cgi">
95 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
97 <% if ( @records ) { %> Delete all records and <% } %>
98 Slave from nameserver IP
99 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
100 <INPUT TYPE="hidden" NAME="reczone" VALUE="@">
101 <INPUT TYPE="hidden" NAME="recaf" VALUE="IN">
102 <INPUT TYPE="hidden" NAME="rectype" VALUE="_mstr">
103 <INPUT TYPE="text" NAME="recdata"> <INPUT TYPE="submit" VALUE="Slave domain">
105 <BR><BR><%= joblisting({'svcnum'=>$svcnum}, 1) %>