diff options
author | ivan <ivan> | 2004-04-05 09:08:39 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-04-05 09:08:39 +0000 |
commit | a5651d5945c790b0d3fee0cd5082269a21adc6ee (patch) | |
tree | a1d38ee8ebed3458f9df12d66f5073e106c84822 | |
parent | cbbc7e215fb2f235c05abdb8c9434bdb2385ce3f (diff) |
add whois functionality internally instead of linking to geektools
-rw-r--r-- | htetc/global.asa | 1 | ||||
-rw-r--r-- | htetc/handler.pl | 1 | ||||
-rw-r--r-- | httemplate/docs/install.html | 2 | ||||
-rw-r--r-- | httemplate/docs/upgrade-1.4.2.html | 1 | ||||
-rw-r--r-- | httemplate/misc/whois.cgi | 25 | ||||
-rwxr-xr-x | httemplate/view/svc_domain.cgi | 2 |
6 files changed, 30 insertions, 2 deletions
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: <li><a href="http://search.cpan.org/search?dist=HTML-Parser">HTML-Parser</a> <li><a href="http://search.cpan.org/search?dist=libnet">libnet</a> <li><a href="http://search.cpan.org/search?dist=Locale-Codes">Locale-Codes</a> - <li><a href="http://search.cpan.org/search?dist=Net-Whois">Net-Whois</a> + <li><a href="http://search.cpan.org/search?dist=Net-Whois-Raw">Net-Whois-Raw</a> <li><a href="http://search.cpan.org/search?dist=libwww-perl">libwww-perl</a> <li><a href="http://search.cpan.org/search?dist=Business-CreditCard">Business-CreditCard</a> <!-- <li><a href="http://search.cpan.org/search?dist=Data-ShowTable">Data-ShowTable</a> --> 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 @@ <li>Install <a href="http://search.cpan.org/search?dist=Cache-Cache">Cache::Cache</a>. <li>Install <a href="http://search.cpan.org/search?dist=Net-SSH">Net::SSH</a> 0.08. <li>Install <a href="http://search.cpan.org/search?dist=Crypt-PasswdMD5">Crypt::PasswdMD5</a> + <li>Install <a href="http://search.cpan.org/search?dist=Net-Whois-Raw">Net::Whois::Raw</a> <li>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. <li>If using Apache::ASP, add <code>PerlSetVar RequestBinaryRead Off</code> to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55. <li>Run <code>make aspdocs</code> or <code>make masondocs</code>. 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+//; + } +%> +<PRE><%= $whois %></PRE> +</BODY> +</HTML> 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 %> <BR>Domain name: <B><%= $domain %></B> <BR>Catch all email <A HREF="<%= ${p} %>misc/catchall.cgi?<%= $svcnum %>">(change)</A>: <%= $email ? "<B>$email</B>" : "<I>(none)<I>" %> -<BR><BR><A HREF="http://www.geektools.com/cgi-bin/proxy.cgi?query=<%=$domain%>;targetnic=auto">View whois information.</A> +<BR><BR><A HREF="<%= ${p} %>misc/whois.cgi?custnum=<%=$custnum%>;svcnum=<%=$svcnum%>;domain=<%=$domain%>">View whois information.</A> <BR><BR> <SCRIPT> function areyousure(href) { |