Sign up for

'6LdNLe4UAAAAAIV4ri-js6wV6JooDPvL2V_GrglK', 'response' => $_POST['g-recaptcha-response'], 'remoteip' => $_SERVER['REMOTE_ADDR']); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); return json_decode($result)->success; } catch (Exception $e) { return null; } } if (reCaptcha_isValid()) { //continue on! } else { //$main->error("Wrong verification code! Try Again..."); print "Error: Wrong verification code! Try Again...
"; $error_count = 1; } if ($error_count == 0) { $result = mysql_query ("SELECT id FROM users WHERE email = '".addslashes($email)."' "); $row = mysql_fetch_array($result); if ($row["id"] != "") { print "Error: E-mail address already registered
"; $error_count = 1; } $result = mysql_query ("SELECT id FROM users WHERE username = '".addslashes($username)."' "); $row = mysql_fetch_array($result); if ($row["id"] != "") { print "Error: User Name already registered
"; $error_count = 1; } } if ($error_count == 0) { if (!(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email))) { print "Error: Invalid E-mail Address
"; } elseif (strlen($username) < 3) { print "Error: Your user name must be at least 3 characters
"; } else { $userpass = trim($userpass);//createpass() is for setting it for them and making them verify email and change pass when they come back $cryptpass = cryptpass($userpass); //email user $phpmailto = $email; $phpmailfrom = "noreturn@".$site_domain; $phpmailfromname = $site_name; $phpmailsubject = $site_name." Confirmation"; $phpmailbody = "Thank you for registering for ".$site_domain.".\n\nYour login is your username: $username\nYour password is: $userpass\n\nClick to login: http://www.".$site_domain."/\n\n-".$site_domain." Staff";//login-done.php?username=$username&userpass=$userpass not when change isnt forced $phpmailsend = "$site_name Registration Successful

You may start now."; $phpmailerror = "Error: There was an error sending the e-mail message to $phpmailto , account not created"; if (mail($phpmailto, $phpmailsubject, $phpmailbody, "From: \"$phpmailfromname\" <$phpmailfrom>")) { print $phpmailsend; } else { print $phpmailerror; exit; } //add user - putting lastlogin in here to bypass forced password change in login-done.php page mysql_query("INSERT INTO users (username, email, cryptpass, acctstatus, createDate, lastlogin) VALUES ('".addslashes($username)."','".addslashes($email)."','".addslashes($cryptpass)."','emailed', '". date("Y-m-d H:i:s") ."', '". date("Y-m-d H:i:s") ."')"); $id = mysql_insert_id(); // SET SESSION VARIABLES TOO $_SESSION["userlogin"] = $email; $_SESSION["usercrypt"] = $cryptpass; $_SESSION["name"] = $username; $_SESSION["password"] = $email; $_SESSION["id"] = $id; if ($remember == "yes") { setcookie("userinfo1",$userlogin,time()+31536000); setcookie("userinfo2",$usercrypt,time()+31536000); setcookie("name",$name,time()+31536000); setcookie("password",$password,time()+31536000); setcookie("id",$id,time()+31536000); } //die;// TAKE THIS OUT, ENABLE THE FOOTER TO SHOW } }//end err = 0 } // end add new if ($error_count != 0) { ?>
User Name:
E-Mail:
Password: 
(CaSe SeNSitiVe)
Remember: 
 
97 && $num < 122)) { $userpass.=chr($num); } else if(($num > 65 && $num < 90)) { $userpass.=chr($num); } else if(($num >48 && $num < 57)) { $userpass.=chr($num); } else { $i--; } } return trim($userpass); } // end createpass function cryptpass($userpass) { $salt = substr(crypt($userpass,""),16,2); $cryptpass = crypt($userpass,$salt); return $cryptpass; } //end cryptpass ?>