//if there is not a zipcode yet do not lookup the data
if($ZipCode){
//if we have a zipcode then look up the information
$RepData = mysql_fetch_array(mysql_db_query("eskylight","SELECT * FROM RepList WHERE Zipcode = '$ZipCode'",$DBid));
//if rep does not exist then use esky
if(!$RepData[UserName]){
$UserName = "esky";
}else{
$UserName = $RepData[UserName];
$UserName2 = $RepData[UserName2];
$UserName3 = $RepData[UserName3];
}
//Get the user information
$UserData = mysql_fetch_array(mysql_db_query("eskylight","SELECT * FROM Users WHERE SearchName = '$UserName'",$DBid));
//if there is more than one rep for the area get that info
if($UserName2){
$UserData2 = mysql_fetch_array(mysql_db_query("eskylight","SELECT * FROM Users WHERE SearchName = '$UserName2'",$DBid));
}
if($UserName3){
$UserData3 = mysql_fetch_array(mysql_db_query("eskylight","SELECT * FROM Users WHERE SearchName = '$UserName3'",$DBid));
}
?>
| For questions and contract pricing in the print($RepData[City]); ?>, print($RepData[State]); ?> area, please contact: |
if($UserName=="esky"){ ?>
Customer Service |
| 1-207-608-8349 |
| c-service@e-skylight.com |
}else{ ?>
print($UserData[FirstName]); ?> print($UserData[LastName]); ?> |
| print($UserData[Phone]); ?> |
| print($UserData[email]); ?> |
} ?>
//2nd rep
if($UserName2){ ?>
| or |
| print($UserData2[FirstName]); ?> print($UserData2[LastName]); ?> |
| print($UserData2[Phone]); ?> |
| print($UserData2[email]); ?> |
} ?>
//3rd rep
if($UserName3){ ?>
| or |
| print($UserData3[FirstName]); ?> print($UserData3[LastName]); ?> |
| print($UserData3[Phone]); ?> |
| print($UserData3[email]); ?> |
} ?>