summaryrefslogtreecommitdiff
path: root/httemplate/misc/whois.cgi
blob: dd7851dc22e7268186cd789003f306f8cc5b254d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<%
  my $svcnum = $cgi->param('svcnum');
  my $custnum = $cgi->param('custnum');
  my $domain = $cgi->param('domain');

%>
<%= header("Whois $domain", menubar(
  ( $custnum
    ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
      )
    : ()
  ),
  "View this domain (#$svcnum)" => "${p}view/svc_domain.cgi?$svcnum",
  "Main menu" => $p,
)) %>
<% my $whois = eval { whois($domain) };
   if ( $@ ) {
     ( $whois = $@ ) =~ s/ at \/.*Net\/Whois\/Raw\.pm line \d+.*$//s;
   } else {
     $whois =~ s/^\n+//;
   }
%>
<PRE><%= $whois %></PRE>
</BODY>
</HTML>