Join our community of neighbors!
Forgot password?
require 'library/config.php'?> require 'library/neighbors_functions.php'?> $message = ''; $arrErrors = array(); $strError = ''; $params = ''; if (isset ($_POST['txtEmailAddress'] ) && !isset($_POST['action_signup'])) loginUser("neighbors"); else { if ( isset($_POST['action_signup']) && isset($_GET['action']) && $_GET['action'] == 'signup' ) { $_POST = array_map('trim',$_POST); $email = $_POST['txtEmailAddress']; $username = $_POST['txtUsername']; $password = $_POST['txtPassword']; $repeat_password = $_POST['txtConfirmPassword']; $city = $_POST['txtCity']; $state = $_POST['selState']; $zipCode = $_POST['txtZipCode']; $gender = isset($_POST['gender']) && ($_POST['gender']=='m' || $_POST['gender'] == 'f')?$_POST['gender']:''; $birthday_mon = isset($_POST['birthday_mon']) && ($_POST['birthday_mon'] != '') ? $_POST['birthday_mon']: ''; $birthday_day = isset($_POST['birthday_day']) && ($_POST['birthday_day'] != '') ? $_POST['birthday_day']: ''; $birthday_yr = isset($_POST['birthday_yr']) && ($_POST['birthday_yr'] != '') ? $_POST['birthday_yr']: ''; $verification_code = $_POST['response']; $terms = isset($_POST['checkbox']) && $_POST['checkbox'] == 'checkbox' ? $_POST['checkbox']:''; if ($email=='') $arrErrors['email'] = 'Please enter an email address'; else if ( !preg_match("/^[\d\w\/+!=#|$?%{^&}*`'~-][\d\w\/\.+!=#|$?%{^&}*`'~-]*@[A-Z0-9][A-Z0-9.-]{1,61}[A-Z0-9]\.[A-Z]{2,6}$/i",$email)) $arrErrors['email'] = 'The email address is not valid'; else { $sqlVerificaEmail = "SELECT neighbor_email from tbl_neighbors WHERE neighbor_email='".$email."'"; $resultVerificaEmail = dbQuery($sqlVerificaEmail); if (mysql_num_rows($resultVerificaEmail) > 0 ) $arrErrors['email'] = 'This email address has already been used by someone. Please enter a different email address'; } if ($username == '') $arrErrors['username'] = 'Please enter a desired username. Username can only contain letters (a-z) and numbers (0-9)'; else if (!preg_match('/^[a-zA-Z0-9][\w]+[a-zA-Z0-9]$/',$username)) $arrErrors['username'] = 'The username must contain only letters and numbers'; if ($password == '') $arrErrors['password'] = 'Please enter a password!'; else if ( $password != '' && strlen($password)<3 ) $arrErrors['password'] = 'The password has less than 4 characters. Please enter a longer password!'; if ($password != '' && $repeat_password == '') $arrErrors['repeat_password'] = 'Please type the password again!'; else if ( $password != $repeat_password ) $arrErrors['repeat_password'] = 'The password aren\'t the same'; if ($city == '') $arrErrors['city'] = 'Please enter a city!'; if ($zipCode == '') $arrErrors['zipCode'] = 'Please enter a Postal code.'; else if (!preg_match("/^[0-9]+$/",$zipCode)) $arrErrors['zipCode'] = 'The zip code must contain only digits'; if ($gender == '') $arrErrors['gender'] = 'Please select male or female!'; if ($birthday_mon == '') $arrErrors['birthday_mon'] = 'Please select your birthday month!'; if ($birthday_day == '') $arrErrors['birthday_day'] = 'Please select your birthday day!'; if ($birthday_yr == '') $arrErrors['birthday_yr'] = 'Please select your birthday year!'; if ($verification_code == '' ) $arrErrors['verification_code'] = 'Please enter the code shown in the black rectangle!'; else if ($_SESSION['new_string'] != $verification_code) $arrErrors['verification_code'] = 'The security code doesn\'t match!'; if ($terms == '') $arrErrors['checkbox'] = 'You cannot create an account unless you agree to terms and services'; if (count($arrErrors) == 0) { $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: do-not-reply@yardsaway.com \r\nReply-to: do-not-reply@yardsaway.com\r\n"; // $headers .= "BCC: do-not-reply@yardsaway.com\r\n"; $subject = "YardsAway.com! - You just joined your community, online! "; $message = "
"; $message .= "\n \n"; $message .= "\n"; $message .= "Congratulations and welcome to yardsaway.com! We are excited to have you as our neighbor.
At yardsaway.com there are numerous benefits for you to enjoy. We offer you an exciting new venue to connect with the neighbors and businesses right in your community.
Now, you can go to one online source for networking, shopping and saving. Additionally, enjoy learning new recipes and save more with our online coupons from you favorite local stores.
"; $message .= "Your login details are:."; $message .= "
Username: $username"; $birthday_date = $birthday_yr."/".$birthday_mon."/".$birthday_day; $q = ("INSERT INTO `tbl_neighbors` (`neighbor_email`, `neighbor_username`, `neighbor_password`, `neighbor_streetaddress`, `neighbor_city`, `neighbor_state`, `neighbor_zipcode`, `neighbor_gender`, `neighbor_dateofbirth`, `neighbor_signupdate`) VALUES ( '$email', '$username', '$password', '', '$city', '$state', '$zipCode', '$gender', '". date("Y-m-d",strtotime($birthday_date))."', current_date())"); // echo $q; mysql_query($q) or die(mysql_error()); // $message .= "
Password: $password
Please ensure that you read our Service Providers Terms and Conditions.
"; $message .= "We look forward in working with you.
"; $message .= "Please contact us if you have any questions and again thanks for joining our community
"; $message .= "Yours Truly
Neighbor Suppor TeamThere are errors! Please correct them
Incorrect username or password!
"; if (isset($_POST['btnForgotPassword'])) { if (!preg_match("/^[\d\w\/+!=#|$?%{^&}*`'~-][\d\w\/\.+!=#|$?%{^&}*`'~-]*@[A-Z0-9][A-Z0-9.-]{1,61}[A-Z0-9]\.[A-Z]{2,6}$/i",$_POST['txtForgotEmailAddress'])) $message = "The email address is not valid
"; else { $sql = "select neighbor_password from tbl_neighbors where neighbor_email='".$_POST['txtForgotEmailAddress']."'"; $result = dbQuery($sql); if (mysql_num_rows($result) > 0 ) { $row = mysql_fetch_assoc($result); mailForgottenPassword($_POST['txtForgotEmailAddress'],$row['neighbor_password']); $message = "The password has been sent to
".$_POST['txtForgotEmailAddress']."
The e-mail address doesn't exists in our database
"; } } } ?>