"); print("
Quick lookup - enter Tag # here: "); print("
"); print("



Note: If a pet has been found without a Cordillera Tag just put in your account and password above and in the next screen you can search by breed of dog."); } else { // they entered something if ($_POST['passwdx'] == "validatex") { $userpassx = $_POST['userpass']; $passpassx = $_POST['passpass']; $Query = "SELECT * from RanchPass where acctx = '$userpassx' AND passx = '$passpassx'"; $Result=mysql_db_query($DBName,$Query,$Link); if ($Row=mysql_fetch_array($Result)) { $allowin = $Row[privx]; // ***************************** end of hits table ************************* } else { print("

                                      
"); print("
Quick lookup - enter Tag # here: "); print("
"); print("



"); } // ??? added // ***************************** end of hits table ************************* // if got through then need to display menu if ($allowin == "S" ) { $TagNumber = $_POST['TagNumber']; $TagPic = "pics/T" . $TagNumber . ".jpg"; if ($TagNumber<1000) $TagNumber=9999; $Query = "SELECT * from RanchPets where TagNumber = '$TagNumber'"; $Result=mysql_db_query($DBName,$Query,$Link); if ($Row=mysql_fetch_array($Result)) { print("

FOUND
Owner: $Row[OwnerLastName] $Row[TagNumber]

$Row[PetName]"); print("
"); if ($Row[PetType]=="D") print("Dog "); if ($Row[PetType]=="C") print("Cat "); if ($Row[PetType]=="H") print("Horse "); print(" $Row[Breed] "); if ($Row[MaleorFemale]=="M") print(" Male "); if ($Row[MaleorFemale]=="F") print(" Female "); if ($Row[PureMixed]=="P") print(" Pure Bred "); if ($Row[PureMixed]=="M") print(" Mixed Breed "); if ($Row[AdultSeniorYoung]=="A") print(" Adult "); if ($Row[AdultSeniorYoung]=="S") print(" Senior "); if ($Row[AdultSeniorYoung]=="Y") print(" Young "); if ($Row[PetSize]=="S") print(" Small Size "); if ($Row[PetSize]=="M") print(" Medium Size "); if ($Row[PetSize]=="L") print(" Large Size "); print("
"); print(trim($Row[PrimaryMarkings]) . " " . trim($Row[DistingMarkings]) . " " . trim($Row[SpecificPetComment]) ); if (strlen(trim($Row[CollarColor]))>1) print(" CollarColor: $Row[CollarColor] "); if (strlen(trim($Row[TagInfo]))>1) print(" TagInfo: $Row[TagInfo] "); print("

Note: The owner may have swapped tags with another one of their pets - please contact them even if this is not a match."); $Query = "SELECT * from RanchPetsOwner where seq = '$Row[Ownerseq]'"; $Result=mysql_db_query($DBName,$Query,$Link); if ($Row=mysql_fetch_array($Result)) { print("

$Row[FirstName] $Row[LastName]
$Row[AddressNum] $Row[AddressStreet]
$Row[Email] $Row[HomePhone] office/cell:$Row[OfficePhone] $Row[CellPhone]
$Row[GeneralComment]"); } if (file_exists($TagPic)) { print("

"); } } else { print("

That tag number is not in the system."); } // scroll here..... print("

"); print("
This is the same scroll box but has more of the description of the pet while the above box has the owner/contact info. It may be easier to search in the second box - then find the matching record in the first box to get the owner info. After this second scroll box is a display of all pictures submitted - with the same sort Animal Type / by breed For the photo part it will take a moment to download the whole list.
"); print(""); $Result=mysql_db_query($DBName,$Query,$Link); while($Row=mysql_fetch_array($Result) ) { $s = ""; if ($Row[PetType]=="C") $s .= "CAT: "; if ($Row[PetType]=="D") $s .= "DOG: "; if ($Row[PetType]=="H") $s .= "HORSE: "; if (trim($Row[Breed])!="Cat Breeds" and trim($Row[Breed])!="Dog Breeds") $s .= trim($Row[Breed]); $s .= "    " . trim($Row[PrimaryMarkings]); $s .= "    " . trim($Row[DistingMarkings]); if (strlen(trim($Row[PetName]))>1) $s .= "     Name: " . trim($Row[PetName]); if (strlen(trim($Row[TagNumber]))>1) $s .= " Tag#: $Row[TagNumber] "; if ($Row[MaleorFemale]=="M") $s .= " Male "; if ($Row[MaleorFemale]=="F") $s .= " Female "; if ($Row[PureMixed]=="P") $s .= " Pure Bred "; if ($Row[PureMixed]=="M") $s .= " Mixed Breed "; if ($Row[AdultSeniorYoung]=="A") $s .= " Adult "; if ($Row[AdultSeniorYoung]=="S") $s .= " Senior "; if ($Row[AdultSeniorYoung]=="Y") $s .= " Young "; if ($Row[PetSize]=="S") $s .= "Small Size "; if ($Row[PetSize]=="M") $s .= " Medium Size "; if ($Row[PetSize]=="L") $s .= " Large Size "; $s .= " " . trim($Row[SpecificPetComment]) . " " ; if (strlen(trim($Row[CollarColor]))>1) $s .= " CollarColor: $Row[CollarColor] "; /* if (strlen($s)>300) { $s1 = substr($s,0,170); $s2 = "  " . substr($s,170,170); $s3 = "    " . substr($s,340); print("
$s1 $s2 $s3"); } else { if (strlen($s)>170) { $s1 = substr($s,0,170); $s2 = "    " . substr($s,170); print("
$s1 $s2"); } else print("
$s"); } */ print("
$s"); if (strlen(trim($Row[TagNumber]))>1) { $pic = "pics/T" . trim($Row[TagNumber]) . ".jpg"; if (file_exists($pic)) { print("



"); } } } // while } // for allow in } // if validate } // if at the top of program print("
"); ?>