session_start(); unset($_SESSION['MM_MemberID']); if (isset($_GET["login"]) && $_GET["login"] == "logout") unset($_SESSION["MM_EplannerID"]); if (isset($_SESSION["MM_EplannerID"])){ // we're already logged in header("Location: eplanner.php"); exit(); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) { if (strlen($_POST["firstname"]) < 2) $errormsg[] = "Please provide us with your first name."; if (strlen($_POST["lastname"]) < 2) $errormsg[] = "Please provide us with your last name."; if (strlen($_POST["email"]) < 8) $errormsg[] = "Please provide us with your email address."; if ($_POST["arrival"] != "" && !IsDateValid($_POST["arrival"])) $errormsg[] = "The arrival date you entered is not a valid date."; if ($_POST["departure"] != "" && !IsDateValid($_POST["departure"])) $errormsg[] = "The departure date you entered is not a valid date."; if (isset($errormsg)){ $_POST["MM_insert"] = ""; unset($_POST["MM_insert"]); } else{ $email = $_POST["email"]; $_POST["password"] = "V".genpassword(); } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) { $insertSQL = sprintf("INSERT INTO eplanner (firstname, lastname, email, password, dayphone, arrival, departure, numinparty, comments, datecreated, status) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['firstname'], "text"), GetSQLValueString($_POST['lastname'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['password'], "text"), GetSQLValueString($_POST['dayphone'], "text"), GetSQLValueString($_POST['arrival'], "userdate"), GetSQLValueString($_POST['departure'], "userdate"), GetSQLValueString($_POST['numinparty'], "int"), GetSQLValueString($_POST['comments'], "text"), GetSQLValueString($_POST['datecreated'], "date"), GetSQLValueString($_POST['status'], "text")); mysqli_select_db($database_Vacation, $Vacation); $Result1 = mysqli_query( $Vacation, $insertSQL) or die(mysqli_error()); $insertGoTo = "sign-up-e-planner-thankyou.php?email=$email"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: " . $insertGoTo)); } // *** Validate request to login to this site. $loginFormAction = $_SERVER['PHP_SELF']; if (isset($accesscheck)) { $GLOBALS['PrevUrl'] = $accesscheck; session_register('PrevUrl'); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $loginUsername=$_POST['email']; $password=$_POST['password']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "eplanner.php?login=y"; $MM_redirectLoginFailed = "form-sign-up-e-planner.php?login=f"; $MM_redirecttoReferrer = false; mysqli_select_db($database_Vacation, $Vacation); $LoginRS__query=sprintf("SELECT eplannerid, email, password FROM eplanner WHERE email='%s' AND password='%s'", get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); $LoginRS = mysqli_query( $Vacation, $LoginRS__query) or die(mysqli_error()); $loginFoundUser = mysqli_num_rows($LoginRS); if ($loginFoundUser) { $row_User = mysqli_fetch_assoc($LoginRS); $loginStrGroup = ""; //declare session variable $GLOBALS['MM_EplannerID'] = $row_User["eplannerid"]; $GLOBALS['MM_UserGroup'] = $loginStrGroup; //register the session variables session_register("MM_EplannerID"); session_register("MM_UserGroup"); if (isset($_SESSION['PrevUrl']) && false) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); } } $page_title = "Vacation Rentals Sign Up for E-Planner"; include('includes/topchoice-header.php'); ?>
if (isset($_REQUEST["login"]) && $_REQUEST["login"] == "f") echo "Login Failed - Please try again!"; ?>VACATION RENTALS E-PLANNERif (isset($errormsg)){ echo "";
foreach($errormsg as $msg){
echo "$msg Welcome to Top Choice Vacation Rentals E-PLANNER! The Top Choice E-PLANNER is a great little tool that provides you with the convenience of saving the properties that interest you to one place for easy reference. Our E-PLANNER allows you to:
E-PLANNER LOG ON: Welcome!
|
Printer-Friendly Page | Bookmark This Vacation Rental Site | if (isset($_GET['rentalid'])) { ?> " STYLE="font-size: 8 pt">Email This Page to a Friend } else { ?> " STYLE="font-size: 8 pt">Email This Page to a Friend } ?>
Home |
Vacation Rental FAQ's |
About Top Choice Vacation Rentals |
Contact Us |
Vacation Rental Press Room
TCVR Members Log In |
List Your Rental |
Properties For Sale |
Vacation Rentals Specials |
Featured Rentals
Calendar of Events |
Renters Testimonials |
Join Our Frequent User E-Club |
E Vacation Planner
New Vacation Rental Listings |
Link with Us |
Our Friends
Copyright © 2005 by Top Choice Vacation Rentals All Rights Reserved |
Copyright © 2005 by Top Choice Vacation Rentals All Rights Reserved | Privacy & Legal Statement | Site Map