From: ivan Date: Mon, 5 Apr 2004 09:08:39 +0000 (+0000) Subject: add whois functionality internally instead of linking to geektools X-Git-Tag: NET_WHOIS_RAW_0_31~7 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a5651d5945c790b0d3fee0cd5082269a21adc6ee add whois functionality internally instead of linking to geektools --- diff --git a/htetc/global.asa b/htetc/global.asa index a773bb92f..dace29527 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -14,6 +14,7 @@ use Tie::IxHash; use HTML::Entities; use IO::Handle; use IO::File; +use Net::Whois::Raw qw(whois); use Business::CreditCard; use String::Approx qw(amatch); use Chart::LinesPoints; diff --git a/htetc/handler.pl b/htetc/handler.pl index f970df842..b81606a0a 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -71,6 +71,7 @@ sub handler use HTML::Entities; use IO::Handle; use IO::File; + use Net::Whois::Raw qw(whois); use Business::CreditCard; use String::Approx qw(amatch); use Chart::LinesPoints; diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 5f2ca4ca6..41aacc51b 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -30,7 +30,7 @@ Before installing, you need:
  • HTML-Parser
  • libnet
  • Locale-Codes -
  • Net-Whois +
  • Net-Whois-Raw
  • libwww-perl
  • Business-CreditCard diff --git a/httemplate/docs/upgrade-1.4.2.html b/httemplate/docs/upgrade-1.4.2.html index b8c5fcf7e..eb40df8b3 100644 --- a/httemplate/docs/upgrade-1.4.2.html +++ b/httemplate/docs/upgrade-1.4.2.html @@ -14,6 +14,7 @@
  • Install Cache::Cache.
  • Install Net::SSH 0.08.
  • Install Crypt::PasswdMD5 +
  • Install Net::Whois::Raw
  • CGI.pm minimum version 2.47 is required. You will probably need to install a current CGI.pm from CPAN if you are using Perl 5.005 or earlier.
  • If using Apache::ASP, add PerlSetVar RequestBinaryRead Off to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55.
  • Run make aspdocs or make masondocs. diff --git a/httemplate/misc/whois.cgi b/httemplate/misc/whois.cgi new file mode 100644 index 000000000..dd7851dc2 --- /dev/null +++ b/httemplate/misc/whois.cgi @@ -0,0 +1,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+//; + } +%> +
    <%= $whois %>
    + + diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi index e4b16d998..1dbe16d23 100755 --- a/httemplate/view/svc_domain.cgi +++ b/httemplate/view/svc_domain.cgi @@ -47,7 +47,7 @@ Service #<%= $svcnum %>
    Domain name: <%= $domain %>
    Catch all email (change): <%= $email ? "$email" : "(none)" %> -

    View whois information. +

    View whois information.