";
echo "Search Results in Wants for \"".str_replace("Ñ","ñ",rtrim(ltrim($propersearchstring)))."\" | | ";
while ($row = mysql_fetch_assoc($result)) {
$name = rtrim($row['Player']);
$card = rtrim($row['Card']);
$year = rtrim($row['Year']);
$name=str_replace(" ^","",$name);
$name=str_replace("^ ","",$name);
$card=str_replace("^ ","",$card);
$card=str_replace(" ^","",$card);
$sort=str_replace("^ ","",$sort);
$sort=str_replace(" ^","",$sort);
$aname=strtolower($aname);
$aname=str_replace(" ","",$aname);
$aname=str_replace(".","",$aname);
$aname=str_replace("&","",$aname);
//$aname=str_replace("/","",$aname);
$aname=str_replace("'","",$aname);
$aname=str_replace("-","",$aname);
$aname=str_replace("(","",$aname);
$aname=str_replace(")","",$aname);
$aname=str_replace("#","",$aname);
$name = str_replace("\\","",$name);
$name = str_replace(" ^","",$name);
$name = str_replace("[ Auto ]","",$name);
$name = preg_replace ("/\[[^\].]*\]/","",$name);
$i++;
$firstletter = array();
$cardarray = array();
$card =strtolower($card);
if (strpos($card,"/") != false)
{$slashpos=strpos($card,"/")+1;
$slashflag=1;}
else {$slashflag=0;}
$cardarray = preg_split("/[\s\/]/ ",$card);
$card="";
for ($n=0;$n";
if ($i < 10) {echo " ";} elseif ($i<100) {echo " ";}
if ($i%2 ==1) {$backgroundstyle="style=\"color:black;background-color:darkgray\" ";$fontcolor=black;} else {$backgroundstyle="";$fontcolor="white";}
echo $i.".";
$card=str_replace("/ ","/",$card);
if (strpos($name,"Mc")>0) {
$mcpos=strpos($name,"Mc");
$lettertoupper = substr($name,$mcpos+2,1);
$name = substr_replace($name,strtoupper($lettertoupper),$mcpos+2,1);}
if (strpos($name,"(")==1 ) {
$parenthpos=strpos($name,"(");
$lettertoupper = substr($name,$parenthpos+1,1);
$name = substr_replace($name,strtoupper($lettertoupper),$parenthpos+1,1);}
$numbersignstrpos=strpos($card,"#");
$descandcardnumber = substr($card,$numbersignstrpos+2);
$originaldescandcardnumber=$descandcardnumber;
$firstspaceafter=strpos($descandcardnumber," ");
if ($firstspaceafter=="") {$cardnumber=strtoupper($descandcardnumber);
$card=str_replace($descandcardnumber,$cardnumber,$card);
} else {
$cardnumber = substr($descandcardnumber,0,$firstspaceafter);
$originalcardnumber=$cardnumber;
$cardnumber=strtoupper($cardnumber);
$descandcardnumber=str_replace($originalcardnumber,$cardnumber,$descandcardnumber);}
$card = str_replace($originaldescandcardnumber,$descandcardnumber,$card);
$card=str_replace("AUTO","Auto",$card);
$card=str_replace("Spx","SPx",$card);
$card=str_replace("Sspc","SSPC",$card);
$card=str_replace("O-pee-chee","O-Pee-Chee",$card);
$card=str_replace("^ ","",$card);
$card=str_replace(" ^","",$card);
if (strpos($name,"'")>0 ) {$apospos=strpos($name,"'");
$lettertoupper = substr($name,$apospos+5,1);
$name = substr_replace($name,strtoupper($lettertoupper),$apospos+5,1);}
$name = str_replace("?n","án;",$name);
$name = str_replace("?","ñ",$name);
$name = str_replace("Ño","ño",$name);
$card = str_replace("Non-astros","Non-Astros",$card);
$card = str_replace("'S","'s",$card);
$card = str_replace("Sp Authentic","SP Authentic",$card);
$card = str_replace("Focus Je ","Focus JE ",$card);
$card = str_replace(" Ud "," UD ",$card);
$card = str_replace(" Lb "," LB ",$card);
if (substr($name,0,9) !="1977 TCMA" && substr($name,0,9) !="1978 TCMA") {
if (substr($name,5,6) !="Choice") {
$card = preg_replace("/# 0(?=[1-9])/", "# ", $card);} else
{
$card = preg_replace("/# 000(?=[1-9])/", "# 0", $card);
$card = preg_replace("/# 00(?=[1-9])/", "# ", $card);
}
$card = preg_replace("/# 000(?=[1-9])/", "# ", $card);
$card = preg_replace("/# 00(?=[1-9])/", "# ", $card);
}
$card = preg_replace("/ - 000(?=[1-9])/", "- ", $card);
$card = preg_replace("/ - 00(?=[1-9])/", "- ", $card);
$card = preg_replace("/ - 0(?=[1-9])/", "- ", $card);
$card = preg_replace("/P000(?=[1-9])/", "P", $card);
$card = preg_replace("/P00(?=[1-9])/", "P", $card);
$card = preg_replace("/P0(?=[1-9])/", "P", $card);
$card = preg_replace("/C000(?=[1-9])/", "C", $card);
$card = preg_replace("/C00(?=[1-9])/", "C", $card);
$card = preg_replace("/C0(?=[1-9])/", "C", $card);
$card = preg_replace("/UH000(?=[1-9])/", "UH", $card);
$card = preg_replace("/UH00(?=[1-9])/", "UH", $card);
$card = preg_replace("/UH0(?=[1-9])/", "UH", $card);
$card = preg_replace("/US-000(?=[1-9])/", "US-", $card);
$card = preg_replace("/US-00(?=[1-9])/", "US-", $card);
$card = preg_replace("/US-0(?=[1-9])/", "US-", $card);
$card = preg_replace("/T000(?=[1-9])/", "T", $card);
$card = preg_replace("/T00(?=[1-9])/", "T", $card);
$card = preg_replace("/T0(?=[1-9])/", "T", $card);
if (rtrim(ltrim($name))=="Jb Shuck") {$name="JB Shuck";}
if (rtrim(ltrim($name))=="Jd Martinez") {$name="JD Martinez";}
if (rtrim(ltrim($name))=="Jr Towles") {$name="JR Towles";}
if (rtrim(ltrim($name))=="Aj") {$name="AJ";}
if (rtrim(ltrim($name))=="Dj") {$name="DJ";}
if (rtrim(ltrim($name))=="Bj") {$name="BJ";}
if (rtrim(ltrim($name))=="Cj") {$name="CJ";}
if (rtrim(ltrim($name))=="Jj") {$name="JJ";}
if (rtrim(ltrim($name))=="Tj Steele") {$name="TJ Steele";}
if (rtrim(ltrim($name))=="Ja Happ") {$name="JA Happ";}
echo " ".$year." ".$card." ".$name." | \r\n"; }
if ($i=="") {$i=0;
echo "Sorry, but feel free to try again! | "; }
} else
{ $i=0;
echo "Please enter a search.";}
if ($i ==1) {$cardtense="Card";} else {$cardtense = "Cards";}
echo " |
| ".$i." Different ".$cardtense;
if ($i>0) {echo " ";
echo " | ";
if ($searchstring) {mysql_close ($connid);}
}
|