when we have 1 case only.
print "
";
} else {
&print_headers();
print "
\n";
print "Case not found. \n";
}
if(-e "/home/httpd/html/content/caselaw/data2/meta/partners/".$partner."_footer.html") {
open(FOOTER, '<', "/home/httpd/html/content/caselaw/data2/meta/partners/".$partner."_footer.html") || (print "Could not find footer file for $partner\n");
print ;
close(FOOTER);
} else {
print "
\n";
&print_file("right.html");
&print_file("bottom.html");
}
exit;
} elsif ($#casematches > 0) {
&print_headers();
print "
\n";
&print_file("right.html");
&print_file("bottom.html");
}
exit;
} else {
$error = "Error: Case not found $page $num\n";
}
} else {
$error = "Error: Index file not found\n";
}
}
}
}
if (! $error) {
if ($navby eq "vol") {
&print_headers;
print "
\n";
if (! $vol) {
print "
U.S. $uc_courtname Opinions ";
&print_vols($court, $selfref, 1);
} else {
print "
U.S. $uc_courtname Opinions<\/H2>";
print "Cases in Volume $vol: ";
if (open(DDIR, '<', $file.$vol."/index")) {
while() {
if ($_ =~ /Other Volumes: ";
&print_vols($court, $selfref, 0);
} else {
print "Sorry, there are no cases in this volume. Index file not found.";
}
}
print "";
} elsif ($navby eq "year") {
&print_headers;
print "
\n";
if ($court eq "CA") {
print "
California State Court Opinions ";
} elsif(!(exists($statenames{lc($court)}))) {
print "
U.S. $uc_courtname Opinions ";
}
$year = $INFO{'YEAR'};
$year=lc($year); #added 05/04/2000
$year2 = $INFO{'YEAR2'};
$year2 = lc($year2);
$month = $INFO{'MONTH'};
$month = lc($month);
if ((!$year) and (lc($court) ne "us")) {
$year = $year2;
$year .= "\-";
$year .= $month;
}
if (!$year) {
print "
Cases by Year: \n";
&print_years;
print "
\n";
print " Opinion Summaries Archive : September 2000 - Present\n";
print " \n";
} else {
if ($year eq "recent" && $navby eq "year" && $court eq "us")
{
&getcase_ad;
}
if ($year eq "recent") {
print "Recent Cases:
";
$party = "";
} else {
$party = $INFO{'PARTY'};
if ($party) {
$party = "2.";
$partysort = " Second v. first party [Revert ]";
} else {
$partysort = " First v. second party [Revert ]";
}
$yearname = $year;
$mname = $year;
$mname =~ s/\d\d\d\d\-(\d+)/$1/;
$yname = $year;
$yname =~ s/(\d\d\d\d)\-(\d+)/$1/;
$yearname = ("", "January", "February", "March", "April", "May", "June", "July", "Aug", "September", "October", "November", "December")[$mname]." ".$yname if ($mname ne $year);
if (!(exists($statenames{lc($court)}))) {
print "Cases of $yearname: $partysort
";
}
}
$meta=lc($meta); #added 04/05/2000
if (open(F, '<', $meta."year"."/".$party.$year.".html")) {
while() {
if ($_ =~ /";
print " Opinion Summaries Archive : September 2000 - Present\n";
}
print "";
if (!(exists($statenames{lc($court)}))) {
print "Cases of Other Years:
\n";
&print_years;
}
print " \n";
} else {
print "Sorry, there are no cases for $yearname
\n";
}
}
# displays sem advantage links for state monthly case index page (navby=year court=state year=yearmonth)
my $searchKey = ($court=~/^US\b|^\dTH\b|^\dST\b|^\dND\b|^\dRD\b|^DC\b|^FED\b/i) ? $court."-".$year : $year; # federal court key is composed of court-year
includeSema("sem.advantage.linkmodules", $searchKey);
} elsif ($navby eq "title" || $navby eq "docket") {
&print_headers;
print "
"; ## closing
for pages like this: getcase.pl?court=11th&navby=title&v1=smith
close(F);
} else {
$error = "Error: Index file not found\n";
}
}
&print_error() if ! $found;
} elsif ($navby eq "search") {
$case = $INFO{'CASE'};
$vol = $case;
$page = $case;
$page =~ s/.*\/([\dA-Za-z\-]+)\.html/$1/;
$vol =~ s/.*\/(\d+)\/[\dA-Za-z\-]+\.html/$1/;
$case =~ s/\/data\/[0-9FeDCthrdnus]+\///i;
$case =~ s/\/data2\/circs\/[0-9FeDCFedclaimthrdnus]+\///i;
$case =~ s/\/us\///i;
$case =~ s/\/uscircs\/[0-9FeDCthrdnus]+\///i;
#$case =~ s/\//\\/g;
$filename = $file.$case;
$filename=lc($filename);
if (open(CASE, '<', $filename)) {
&print_case();
close(CASE);
} else {
$error = "$filename not found";
}
} else {
$error = "Error: Unknown navigation method: $navby";
}
}
if ($error) {
&print_headers;
print "\n";
&print_error;
print "";
}
if ($partner eq "ccc"){
print "
\n";
&parse_includes("right");
&parse_includes("bottom");
}elsif(-e "/home/httpd/html/content/caselaw/data2/meta/partners/".$partner."_footer.html") {
open(FOOTER, '<', "/home/httpd/html/content/caselaw/data2/meta/partners/".$partner."_footer.html");
print ;
close(FOOTER);
} else {
if ($navby eq "year"){
print "\n";
}
print "\n" if $court =~/us/i; ####061909
#### getcase.pl?navby=search&court=US&case=/us/53/299.html
&print_file("right.html");
&print_file("bottom.html");
}
exit;
sub print_headers {
if ($partner) {
if($partner eq "ccc") {
&parse_includes("top");
print "FindLaw | Cases & Codes \n";
&parse_includes("breadcrumb");
=header
#TODO 20080619 - this breaks the new page design. Needs a fix.
print qq{
};
=cut
}
else {
if ($partner =~/oyez/){
&print_file("top.html");
print "FindLaw | Cases and Codes \n";
&print_file("breadcrumb.html");
}else{
open(TOP, '<', $metatop."partners/".$partner.".html") || (print "Could not find header file for $partner\n");
print ;
close(TOP);
}
}
} else {
&print_file("top.html");
print "FindLaw | Cases and Codes \n";
&print_file("breadcrumb.html");
}
print "
" if $page;
local(%SEL);
$SEL{$court}="SELECTED";
if ($court eq "CA") {
print <FindLaw FindLaw California Judicial Opinions and Case Law California Case Law
$addlnkshtml
EOM
} elsif (exists($statenames{lc($court)})) {
$temp_court=lc($court);
print <FindLaw State Resources $statenames{$temp_court} Primary Materials $statenames{$temp_court} Court Opinions
$addlnkshtml
EOM
} else {
#Breadcrumb for cases was removed in the new design. #Note 20080619: the "new design" must be the "new design a long time ago". This line exists in Feb 2008 getcase.pl.
}
if ($graphurl && $linkurl) {
$graphurl=~s/%3A/:/gi;
$graphurl=~s/%2F/\//gi;
$linkurl=~s/%3A/:/gi;
$linkurl=~s/%2F/\//gi;
print <
EOM
}
if (exists($statenames{lc($court)})) {
print "";
}
}
sub getcase_ad {
print qq{
Sponsored Links
}
}
sub numerically { $a <=> $b; }
sub escape {
local($key)= @_;
$key =~ s/\&/\%26/g;
$key =~ s/\?/\%3f/g;
$key =~ s/\:/\%3a/g;
$key =~ s/\~/\%7e/g;
return $key;
}
sub format {
local($form, *data) = @_;
local($key);
$form =~ s/\r\n$//;
$form =~ s/\r$//;
$form =~ s/\n$//;
foreach(split(/&/, $form)) {
($key, $_) = split(/=/, $_, 2);
$key =~ s/\+/ /g;
$_ =~ s/\<\%FRIEND\%\>/FRIEND/ig; # for stuff from htx files
$_ =~ s/\+/ /g;
$_ =~ s/\%26/\&/g;
$_ =~ s/\%3a/\:/g;
$_ =~ s/\%3f/\?/g;
$_ =~ s/\%7e/\~/g;
$key =~ s/%([0-9A-Fa-f]{1,2})/pack(C,hex($1))/eig;
$_ =~ s/%([0-9A-Fa-f]{1,2})/pack(C,hex($1))/eig;
$key =~ tr/a-z/A-Z/;
$_ =~ s/\|//g; # remove pipe in parameter
$_ =~ s/\,//g; # remove comma in parameter
$_ =~ s/\.\.//g; # remove dot dot in parameter
$data{$key} = $_;
}
}
sub print_vols {
local($court, $selfref, $top) = @_;
if (lc($court) eq "us") {
$selfref=~s/US/us/;#added 04/19/2000
print "Volumes: " if $top;
$f = 150;
while ($f <= 544) {
print " $f ";
$fo = 0;
while (($fo<19) && ($f<544)) {
$fo = $fo + 1;
$f = $f + 1;
print " $f ";
}
print " ";
$f = $f + 1;
}
print " 000 (recent)
";
} else {
print "Method unavailable.";
}
print "\n";
}
sub print_years {
if (lc($court) eq "us") {
$f = 1893;
#2000 is better to be changed to current year...
while ($f <= 2009) {
print " \;$f ";
$f = $f + 1;
}
} else {
if ($court =~ /9th/i) {
} elsif ($court =~ /claim/i) {
print <1997 Jul
Aug
Sep
Oct
Nov
Dec
EOM
} elsif ($court =~ /dc/i) {
print <1995 Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
EOM
} elsif ($court =~ /7th/i) {
print <1995 Jun
Jul
Aug
Sep
Oct
Nov
Dec
EOM
} elsif ($court =~ /10th/i || $court =~ /Fed/i) {
print <1997 Oct
Nov
Dec
EOM
} elsif ($court =~ /3rd/i) {
print <1994 May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
1995 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
EOM
} elsif ($court =~ /1st/i || $court =~ /8th/i) {
print <1995 Nov
Dec
EOM
} elsif ($court =~ /2nd/i || $court =~ /4th/i || $court =~ /6th/i || $court =~ /11th/i) {
print <1995 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
EOM
}
if (!($court =~ /10th/i || $court =~ /Fed/i)) {
print <1996 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
1997 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
EOM
}
$thisyear=(localtime())[5]+1900;
$thismonth=(localtime())[4]+1;
$curyear=1998;
while ($curyear <= $thisyear) {
if ($curyear<$thisyear) {
print <$curyear Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
EOM
} else { # curyear is THIS year
print "$curyear ";
for ($curmonth=1; $curmonth<=$thismonth; $curmonth++) {
$monthname=("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")[$curmonth-1];
print "$monthname \n"
}
print " ";
}
$curyear++;
}
}
}
# Add backlink info to internal urls
sub print_case {
local(@case)=@_;
&print_headers;
$urlref=$filename;
$urlref=~s/.*data2?\///i;
$urlref=~s/circs\///;
## open the case with sending article to friends function...
## for us supreme court, and circuit court with exact... ## added 01212001...
if ((lc($court) eq "us") or ($INFO{'EXACT'}) or (-e $file.$get_year.$casematches[0].".html")) {
&get_court_url;
print <
 \;
\n";
print <
HTML
}
# generate Westlaw link for credit-card case searches
west_link(@case);
if (lc($court) eq "us") {
print "Jump to cited page $pageno within this case " if $pageno;
if ($vol ne "000") {
print "Cases citing this case: Supreme Court ";
print "Cases citing this case: Circuit Courts ";
}
}
# Figure out whether there are annotations
# Go into add new annot routine if there should be one but isn't
$filename =~ s/data2\/9th\/(\d)\/(\d+)\//data2\/meta\/9th\/anns\/$1\-$2\-/i;
$filename =~ s/data2\/([0-9a-z]+)/data2\/meta\/$1\/anns/i;
$filename =~ s/data\/us\/(\d+)\//data2\/meta\/us\/anns\/$1\-/i;
#The following code is commented to avoid printing some old partner gifs
if (!(exists($statenames{lc($court)}))) {
# if (open(ANNOTS, '<', $filename)) {
# @annot = ;
# close(ANNOTS);
# $annot = join("", @annot);
# if ($fromext && $gapartner && !($annot =~ /$gapartner/)) {
# &addannot(">>", $filename, $gapartner);
# } else {
# print $annot;
# print "";
# }
# } else {
close(ANNOTS);
&addannot(">", $filename, $gapartner) if ($fromext && $gapartner);
# }
}
# Print the case
$case=join("", @case);
$case=~s//research/;
if($_ =~ /include virtual=\"\/includes\/corporate\/corporate\.findlaw\.com\/includes\/(.*?)\.html/) {
&parse_includes($1);
}elsif($_=~/include virtual=\"\/news/){
$_ =~/.*?virtual=\"(.*?)\".*/;
my $new_path = $v_path.$1;
open (IN, $new_path) || die "could not open $new_path";
while (my $line = ){
print $line;
}
close (IN);
}
if($_ !~ /<\!--\#/) {
print $_;
}
}
close($include_name);
}
sub print_error {
print <we do not carry court orders, such as denials of certiorari. We regret if you came to this error page by
following a link in one of our cases.
When searching by title, please note that title search is a
case-insensitive search for cases with a title containing the word(s)
provided in your query. For example, searching for "Roe Wade" will
return the corresponding case.
If you are having trouble finding
a case by title, try using only one key word in the title of the case,
e.g. Miranda, as it is sometimes difficult to match the official
abbreviations for the full title in a case name query. You might be
able to find the case you are looking for by using a full-text search.
If you believe a case is missing, please
contact the Findlaw staff , and we will look into it.
EOM
}
use URI;
sub west_link {
return if $INFO{'FRIEND'};
my $uri=new URI('http://caselaw.findlaw.com/*http://creditcard.westlaw.com/search/default.wl');
my %query=();
$query{'RS'}='CCFL1.0';
$query{'VR'}='2.0';
if ($court eq "US") {
# my $uri=new URI('http://creditcard.westlaw.com/search/default.wl');
$query{'docketnumber'}=$INFO{'INVOL'};
$query{'DB'}='SCT';
$query{'SCT'}='SCT';
} elsif ($court =~ /1st|Fed/) {
my $docket=$INFO{'NO'};
$docket=~s/^../$&-/;
$docket=~s/[a-z].*//;
$query{'docketnumber'}=$docket;
$query{'DB'}='CTA';
$query{'CTA'}='CTA' . substr($court,0,1);
} elsif ($court =~ /4th|6th|10th|DC/) {
@dk=grep(/Nos?\.\s*\d\d-\d\d\d\d/,@_);
my ($docket)=($dk[0]=~/(\d\d-\d\d\d\d)/);
$query{'docketnumber'}=$docket;
$query{'DB'}='CTA';
$query{'CTA'}='CTA' . ($court=~/(.*)(th)?/)[0];
}
}
sub set_cookie {
my ($ck_name, $value, $flag) = @_;
my $expire ='Thu, 01-Jan-1970 00:00:00 GMT' unless $flag;
if ($ck_name =~/flpass/){
$expire = "+24h";
}
my $ck = new CGI->cookie(-name=>$ck_name,
-domain=>'.findlaw.com',
-path=>'/',
-value =>$value,
-expires=> $expire,
);
print "Set-Cookie:$ck\n";
}
sub get_court_url {
%court_url = (
"us"=>"http://www.findlaw.com/casecode/supreme.html",
"1st"=>"http://www.findlaw.com/casecode/courts/1st.html",
"2nd"=>"http://www.findlaw.com/casecode/courts/2nd.html",
"3rd"=>"http://www.findlaw.com/casecode/courts/3rd.html",
"4th"=>"http://www.findlaw.com/casecode/courts/4th.html",
"5th"=>"http://www.findlaw.com/casecode/courts/5th.html",
"6th"=>"http://www.findlaw.com/casecode/courts/6th.html",
"7th"=>"http://www.findlaw.com/casecode/courts/7th.html",
"8th"=>"http://www.findlaw.com/casecode/courts/8th.html",
"9th"=>"http://www.findlaw.com/casecode/courts/9th.html",
"10th"=>"http://www.findlaw.com/casecode/courts/10th.html",
"11th"=>"http://www.findlaw.com/casecode/courts/11th.html",
"dc"=>"http://www.findlaw.com/casecode/courts/dc.html",
"fed"=>"http://www.findlaw.com/casecode/courts/fed.html",
"al"=>"http://www.findlaw.com/11stategov/al/alca.html",
"ak"=>"http://www.findlaw.com/11stategov/ak/akca.html",
"az"=>"http://www.findlaw.com/11stategov/az/azca.html",
"ar"=>"http://www.findlaw.com/11stategov/ar/arca.html",
"ca"=>"http://www.findlaw.com/cacases/index.html",
"co"=>"http://www.findlaw.com/11stategov/co/coca.html",
"ct"=>"http://www.findlaw.com/11stategov/ct/ctca.html",
"de"=>"http://www.findlaw.com/11stategov/de/deca.html",
"fl"=>"http://www.findlaw.com/11stategov/fl/flca.html",
"ga"=>"http://www.findlaw.com/11stategov/ga/gaca.html",
"hi"=>"http://www.findlaw.com/11stategov/hi/hica.html",
"id"=>"http://www.findlaw.com/11stategov/id/idca.html",
"il"=>"http://www.findlaw.com/11stategov/il/ilca.html",
"in"=>"http://www.findlaw.com/11stategov/in/inca.html",
"ia"=>"http://www.findlaw.com/11stategov/ia/iaca.html",
"ks"=>"http://www.findlaw.com/11stategov/ks/ksca.html",
"ky"=>"http://www.findlaw.com/11stategov/ky/kyca.html",
"la"=>"http://www.findlaw.com/11stategov/la/laca.html",
"me"=>"http://www.findlaw.com/11stategov/me/meca.html",
"md"=>"http://www.findlaw.com/11stategov/md/mdca.html",
"ma"=>"http://www.findlaw.com/11stategov/ma/maca.html",
"mi"=>"http://www.findlaw.com/11stategov/mi/mica.html",
"mn"=>"http://www.findlaw.com/11stategov/mn/mnca.html",
"ms"=>"http://www.findlaw.com/11stategov/ms/msca.html",
"mo"=>"http://www.findlaw.com/11stategov/mo/moca.html",
"mt"=>"http://www.findlaw.com/11stategov/mt/mtca.html",
"ne"=>"http://www.findlaw.com/11stategov/ne/neca.html",
"nv"=>"http://www.findlaw.com/11stategov/nv/nvca.html",
"nh"=>"http://www.findlaw.com/11stategov/nh/nhca.html",
"nj"=>"http://www.findlaw.com/11stategov/nj/njca.html",
"nm"=>"http://www.findlaw.com/11stategov/nm/nmca.html",
"ny"=>"http://www.findlaw.com/11stategov/ny/nyca.html",
"nc"=>"http://www.findlaw.com/11stategov/nc/ncca.html",
"nd"=>"http://www.findlaw.com/11stategov/nd/ndca.html",
"oh"=>"http://www.findlaw.com/11stategov/oh/ohca.html",
"ok"=>"http://www.findlaw.com/11stategov/ok/okca.html",
"or"=>"http://www.findlaw.com/11stategov/or/orca.html",
"pa"=>"http://www.findlaw.com/11stategov/pa/paca.html",
"ri"=>"http://www.findlaw.com/11stategov/ri/rica.html",
"sc"=>"http://www.findlaw.com/11stategov/sc/scca.html",
"sd"=>"http://www.findlaw.com/11stategov/sd/sdca.html",
"tn"=>"http://www.findlaw.com/11stategov/tn/tnca.html",
"tx"=>"http://www.findlaw.com/11stategov/tx/txca.html",
"ut"=>"http://www.findlaw.com/11stategov/ut/utca.html",
"vt"=>"http://www.findlaw.com/11stategov/vt/vtca.html",
"va"=>"http://www.findlaw.com/11stategov/va/vaca.html",
"wa"=>"http://www.findlaw.com/11stategov/wa/waca.html",
"wv"=>"http://www.findlaw.com/11stategov/wv/wvca.html",
"wi"=>"http://www.findlaw.com/11stategov/wi/wica.html",
"wy"=>"http://www.findlaw.com/11stategov/wy/wyca.html",
);
}