Welcome To Your Solitude
if ($getDisplay == "problem") { echo "
Property Was Not Deleted. Error
"; } ?> if ($totalRows_rsSaved > '0') { ?> } else { echo "
You Have No Saved Listings
"; } ?>
require_once('../../connection/mlsMain.php'); session_start(); $findUser = $_SESSION['MM_Username']; $getShow = $_GET['show']; $getDisplay = $_GET['display']; $MM_authorizedUsers = ""; $MM_donotCheckaccess = "true"; // *** Restrict Access To Page: Grant or deny access to this page function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && true) { $isValid = true; } } return $isValid; } $MM_restrictGoTo = "../features.php"; if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&"; if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) $MM_referrer .= "?" . $_SERVER['QUERY_STRING']; $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer); header("Location: ". $MM_restrictGoTo); exit; } $query_rsUser = "SELECT user_id, user_email FROM user_data WHERE user_email = '".$findUser."'"; $r_User = mysqli_query($mlsMain, $query_rsUser); $row_rsUser = mysqli_fetch_array($r_User, MYSQLI_ASSOC); $totalRows_rsUser = mysqli_num_rows($r_User); $getUserId = $row_rsUser['user_id']; $query_rsSaved = "SELECT user_id, save_list.mls_id, area_short, area_code, area_name, search_price, street_num, street_name, street_suffix, city_name, bed_num, bath_num, gar_type, gar_spaces, square_foot, square_source, year_built, lot_size, status, marketing_remark FROM resi_data, save_list, staor_areas WHERE save_list.mls_id = resi_data.mls_id AND resi_data.area_short = staor_areas.area_code AND user_id = '".$getUserId."'"; $r_Saved = mysqli_query($mlsMain, $query_rsSaved); $row_rsSaved = mysqli_fetch_array($r_Saved, MYSQLI_ASSOC); $totalRows_rsSaved = mysqli_num_rows($r_Saved); if ((isset($_POST["MM_delete"])) && ($_POST["MM_delete"] == "deleteMls")) { $grabMlsId = $_POST['mls_id']; $redirectTo = "welcome?&show=propList&display=deletedMls"; $redirectFailed = "welcome?&display=problem"; $deleteSQL = "DELETE FROM save_list WHERE mls_id='".$grabMlsId."' AND user_id = '".$getUserId."'"; if (mysqli_query($mlsMain, $deleteSQL)) { header("Location: " . $redirectTo ); } else { header("Location: " . $redirectFailed ); } } ?>
Property Was Not Deleted. Error
You Have No Saved Listings