Intellectual Property Commercial Zone
The Intellectual Property Commercial Zone
#!/usr/bin/perl
require "/home/users/wowk/lawserver/intelproplaw.com/CZ/cgi/variables.cgi";
require "/home/users/wowk/lawserver/intelproplaw.com/CZ/cgi/subs.cgi";
require "/home/users/wowk/lawserver/intelproplaw.com/CZ/cgi/geoip-lookup";
#&parse_form();
#if ($FORM{'ad_type'}) {
# $ad_type = "$FORM{'ad_type'}";
#}
print "Content-type: text/html\n\n";
$addr = $ENV{'REMOTE_ADDR'};
#$addr = "66.18.211.200"; # CA
#$addr = "192.18.128.11"; # US
$code = &get_country_code($addr);
if ($code =~ /CA/ ) {
$FORM{'terms'} = "Canada";
} elsif ($code =~ /US/ ) {
$FORM{'terms'} = "United States";
} elsif ($code =~ /AR/ ) {
$FORM{'terms'} = "ARGENTINA";
} elsif ($code =~ /AU/ ) {
$FORM{'terms'} = "AUSTRALIA";
} elsif ($code =~ /AT/ ) {
$FORM{'terms'} = "AUSTRIA";
} elsif ($code =~ /BE/ ) {
$FORM{'terms'} = "BELGIUM";
} elsif ($code =~ /BR/ ) {
$FORM{'terms'} = "BRAZIL";
} elsif ($code =~ /CL/ ) {
$FORM{'terms'} = "CHILE";
} elsif ($code =~ /CN/ ) {
$FORM{'terms'} = "CHINA";
} elsif ($code =~ /DK/ ) {
$FORM{'terms'} = "DENMARK";
} elsif ($code =~ /FI/ ) {
$FORM{'terms'} = "FINLAND";
} elsif ($code =~ /FR/ ) {
$FORM{'terms'} = "FRANCE";
} elsif ($code =~ /DK/ ) {
$FORM{'terms'} = "GERMANY";
} elsif ($code =~ /GR/ ) {
$FORM{'terms'} = "GREECE";
} elsif ($code =~ /HK/ ) {
$FORM{'terms'} = "HONG KONG";
} elsif ($code =~ /IN/ ) {
$FORM{'terms'} = "INDIA";
} elsif ($code =~ /ID/ ) {
$FORM{'terms'} = "INDONESIA";
} elsif ($code =~ /IE/ ) {
$FORM{'terms'} = "IRELAND";
} elsif ($code =~ /IL/ ) {
$FORM{'terms'} = "ISRAEL";
} elsif ($code =~ /IT/ ) {
$FORM{'terms'} = "ITALY";
} elsif ($code =~ /JP/ ) {
$FORM{'terms'} = "JAPAN";
} elsif ($code =~ /JO/ ) {
$FORM{'terms'} = "JORDAN";
} elsif ($code =~ /KR/ ) {
$FORM{'terms'} = "KOREA";
} elsif ($code =~ /MY/ ) {
$FORM{'terms'} = "MALAYSIA";
} elsif ($code =~ /MX/ ) {
$FORM{'terms'} = "MEXICO";
} elsif ($code =~ /NL/ ) {
$FORM{'terms'} = "NETHERLANDS";
} elsif ($code =~ /NZ/ ) {
$FORM{'terms'} = "NEW ZEALAND";
} elsif ($code =~ /NO/ ) {
$FORM{'terms'} = "NORWAY";
} elsif ($code =~ /PK/ ) {
$FORM{'terms'} = "PAKISTAN";
} elsif ($code =~ /PE/ ) {
$FORM{'terms'} = "PERU";
} elsif ($code =~ /PH/ ) {
$FORM{'terms'} = "PHILIPPINES";
} elsif ($code =~ /PT/ ) {
$FORM{'terms'} = "PORTUGAL";
} elsif ($code =~ /RU/ ) {
$FORM{'terms'} = "RUSSIA";
} elsif ($code =~ /ES/ ) {
$FORM{'terms'} = "SPAIN";
} elsif ($code =~ /SE/ ) {
$FORM{'terms'} = "SWEDEN";
} elsif ($code =~ /CH/ ) {
$FORM{'terms'} = "SWITZERLAND";
} elsif ($code =~ /TW/ ) {
$FORM{'terms'} = "TAIWAN";
} elsif ($code =~ /TH/ ) {
$FORM{'terms'} = "THAILAND";
} elsif ($code =~ /TR/ ) {
$FORM{'terms'} = "TURKEY";
} elsif ($code =~ /GB/ ) {
$FORM{'terms'} = "UNITED KINGDOM";
#} elsif ($code =~ /US/ ) {
} else {
$FORM{'terms'} = "UNITED STATES";
}
$FORM{'boolean'} = 'AND';
$FORM{'case'} = 'Insensitive';
# Get Files To Search Through
&get_files;
# Search the files
&search;
# Print Results of Search
print "
$search_num commercial organisations were found referencing $FORM{'terms'}.\n";
print "
(The search results are in no particular order.)\n";
print "
\n";
print "
\n";
print "\n";
&print_output;
print " \n";
print " | \n";
# require "/home/users/wowk/lawserver/intelproplaw.com/Include/google_tall_vertical.cgi";
print " |
\n";
print "
\n";
#print ("!$code!");
if ($code !~ /US/) {
}
print "\n";
sub parse_form {
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
}
else {
$buffer = $ENV{'QUERY_STRING'};
if (!$buffer) {
($buffer = $ENV{'PATH_INFO'}) =~ s/^\///;
}
}
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$FORM{$name} = $value;
}
}