<% exit(0); } $buf = rtrim(fgets($pp, 100), "\r\n"); pclose($pp); if ($buf != "") { %>
Fatal Program Error:
Sorry! Something's is wrong with the registration process.
Duplicate Account:
Sorry, but a user is already registered with that username.
Please click here to try again
Click here if you have forgotten your password
<% exit(0); } if ($password1 != $password2) { %>
Password Entry Error:
Sorry: but these two passwords don't match!
Please click here to try again
<% exit(0); } if (!preg_match('/[^@]+\@[^@]+\.[^@][^@]+/', $emailaddr)) { %>
Email Address Error:
Please check your email address. It needs to be valid in order for me to send you a validation message. You will use that message to authenticate.
Please click here to try again
<% exit(0); } return 1; } $submit = $_POST['submit']; $username = $_POST['username']; $password1 = $_POST['password1']; $password2 = $_POST['password2']; $emailaddr = $_POST['emailaddr']; if (! $username || ! $password1 || ! $password2 || ! $emailaddr) { %>Fantasy3D.com Registration Page <% } else { %>Fantasy3D.com Registration Results <% # clean up password1 if (valid_data($username, $password1, $password2, $emailaddr)) { $validation_code = rand(1, 100000000); $link = "http://www.fantasy3d.com/pfiles/uload_validate.php?id=". $validation_code; $myaddr = "pythonfiles@fantasy3d.com"; $message = implode('', file("template.dat")); $message = preg_replace("/#USERNAME#/", $username, $message); $message = preg_replace("/#LINK#/", $link, $message); mail( $emailaddr, "Welcome to Fantasy3D", $message, "From: $myaddr", "-f$myaddr" ); $password1 = preg_replace('/[^-:<>?@\w!#\$%&()*+,.\/]/', '', $password1); if ($password1 != $password2) { %>
Password Entry Error:
Illegal characters were found in the password - please choose a different password.
Thank You.
<% exit(0); } $password = `./uload_crypt.pl $password1 2>&1`; if (!$fp = fopen("/www/fantasy3d/.uload_validate", "a+")) { %>
Fatal Program Error:
Sorry, but I can't save data to the validation file!!!
<% exit(0); } fwrite($fp, "$username:$password:$emailaddr:$validation_code\n"); fclose($fp); %>
<% } } %>
Registration Process "Step One" Complete...
An email message has been sent to <%=$emailaddr%>
Please check your email for the message.
Click on the link in your email message in order to activate your Fantasy3D.com account. See you soon!