//error_reporting(E_ALL ^ E_NOTICE);
//**** GET SESSION INFO & IF THERE, GET SOME VARS FOR FORMS ****
if (isset($_COOKIE["UrentsUID"])) {
include('../include/sideNavManager.html');
$c_uid = $_COOKIE["UrentsUID"];
} else {
include('../include/sideNav.html');
}
?>
|
. |
//**** GET SESSION INFO & IF THERE, GET SOME VARS FOR FORMS ****
if ($c_uid) {
include('../ssi/php/z_connect.php');
$c_uid = $_COOKIE["UrentsUID"];
$sql = mysql_query("SELECT * from ListingUsers WHERE ListingUID = '$c_uid'") or exit (mysql_error());
if ($row = mysql_fetch_array($sql)) {
do {
$cname = $row["Name"];
$email = $row["Email"];
$phone = $row["Phone"];
$p0 = substr($phone,0,3); $p1 = substr($phone,3,3); $p2 = substr($phone,6,4); $p3 = substr ($phone,10,4);
$emailAllow = $row["Allow_Email"];
} while ($row = mysql_fetch_array($sql));
mysql_free_result($sql);
}
$sql2 = mysql_query("SELECT Password from ListingUsers WHERE ListingUID = '$c_uid' LIMIT 1") or exit (mysql_error());
if ($row2 = mysql_fetch_array($sql2)) {
do {
$pwd = $row2["Password"];
} while ($row2 = mysql_fetch_array($sql2));
mysql_free_result($sql2);
}
mysql_close($connection);
}
//**** START IF ADVANCED SEARCH STEP 1 ****
if (!isset($_POST['lCat'])) {
?>
} else { //**** END IF LIST NEW STEP 1, BEGIN STEP 2 ****
$lCat = $_POST['lCat'];
//**** BEGIN CHECK & STRIP FOR ROGUE CHARACTERS ****
$phone0 = preg_replace("/[^0-9]/i", "", $_POST['phone0']);
$phone1 = preg_replace("/[^0-9]/i", "", $_POST['phone1']);
$phone2 = preg_replace("/[^0-9]/i", "", $_POST['phone2']);
$phone = $phone0 . $phone1 . $phone2;
$phoneInt0 = preg_replace("/[^0-9]/i", "", $_POST['$
phoneInt0']);
$phoneInt1 = preg_replace("/[^0-9]/i", "", $_POST['phoneInt1']);
$phoneInt2 = preg_replace("/[^0-9]/i", "", $_POST['phoneInt2']);
$phoneInt = $phoneInt0.",".$phoneInt1.",".$_POST['phoneInt2'];
if (strlen($phone) < 10) {
echo "Error ";
echo " The Contact Phone number must be 10 digits long, including area code. Please press your browers 'Back' button, or click here to go back and fill in the complete phone number.";
exit;
}
if (!eregi("[@]",$email) || strlen($email) < 5) {
echo " Error ";
echo " The Contact Email Address must contain the @ symbol. Please press your browers 'Back' button, or click here to go back and fill a valid email address.";
exit;
}
//**** END CHECK FOR ROGUE CHARACTERS ****
switch($lCat) {
case 1: $showCat = "House"; $bgColor="#f7f7f7"; break;
case 2: $showCat = "Condo/TownHouse"; $bgColor="#f7f7f7"; break;
case 3: $showCat = "Apartment"; $bgColor="#f7f7f7"; break;
default: $showCat = "Error, please click your browsers back button and try again."; break;
}
?>
} //**** END IF ADVANCED SEARCH STEP 2 ****
?>
|
|
. |
. |
include('../ContentBottom.php'); ?>
| |