Username:
Password:
Confirm Password:
Email:
Secret Question:
Secret Answer (Not case sensitive):
Type the code you see in the image in the box below. (case sensitive) Reload
I agree to the terms of use of Beyond Gaming
= 1){ print "Error: That username already exists, Please register another!"; } else { if ($_SESSION['image_verify_string'] == $random){ if(preg_match("/^([a-zA-Z0-9_]+)$/",$username) && strlen($username) >= 3 && strlen($username) <= 25){ if(checkdnsrr($domain)){ $checksum = md5("$regdate|$username"); mysql_query("INSERT INTO `users` (username, password, email, level, committee, question, answer, regdate, lastlogin, verified, ipaddr, dnsaddr) VALUES ('$username', '$password', '$email', '$level', '$comm', '$question', '$answer', '$regdate', '$lastlogin', '0', '".GetIP()."', '".gethostbyaddr(GetIP())."')"); mysql_query("INSERT INTO `verify` VALUES('$username', '$regdate')"); mysql_query("INSERT INTO `buddies_chat` values ('', '$username', '0')"); print "Please check your e-mail and follow the directions therein"; mail("$email","Beyond Gaming - Register","Welcome to Beyond Gaming!\n\nEnclosed is your username and password for Beyond Gaming. Along with an account verify link.\nPlease click the link to activate your account!\n\nUsername: $username\nPassword: $mailpassword\n\nLink: http://beyondgaming.org/index.php?page=register&function=verify&checksum=$checksum\n\nThank you,\nBeyond Gaming","From: accounts@beyondgaming.org"); //forum registration $userid = mysql_insert_id(); mysql_query("INSERT INTO phpbb_groups (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', 1, 0)"); $group_id = mysql_insert_id(); mysql_query("INSERT INTO phpbb_user_group (user_id, group_id, user_pending) VALUES ($userid, $group_id, 0)"); } else { print "Invalid domain email, please try again"; } } else { print "Invalid Username. Please try again"; } } else { print "The image did not match"; } } } } } else { print "Registration is currently disabled."; } break; case "verify"; $checksum = $_GET["checksum"]; $check = mysql_query("SELECT * from `verify`"); $done = false; if(mysql_num_rows($check) > 0) { while($row = mysql_fetch_array($check)) { if($checksum == md5($row["time"]."|".$row["username"])) { $user = $row["username"]; $time1 = $row["time"]; mysql_query("DELETE from `verify` where username = '$user' AND time = '$time1'"); mysql_query("UPDATE `users` set level = '0' where username = '$user'"); mysql_query("UPDATE `users` set verified = '1' where username = '$user'"); mysql_query("UPDATE `users` set user_active = 1 where username = '$user'"); print "Your account is now verified $user, feel free to login!"; $done = true; } } if($done == false) { print "There was an error verifiying your account, please email
accounts@beyondgaming.org and give your username. We will e-mail you back."; } } break; case "resend"; $user = base64_decode($_GET["code"]); $user = addslashes($user); $time1 = mysql_query("SELECT time from `verify` where username='$user'"); $email = mysql_query("SELECT email from `users` where username='$user'"); $num = mysql_num_rows($time1); if($num == 0){ print "There is a problem with your account, please contact an admin. Or it may already be verified."; } elseif($num == 1){ $email = mysql_fetch_array($email); $time1 = mysql_fetch_array($time1); $code = md5($time1["time"]."|".$user); mail($email["email"],"Beyond Gaming - Verification Resend","Hello $user,\nYou have requested to be resent your verification code. Please click the link below to verifiy your account.\n\nhttp://beyondgaming.org/index.php?page=register&function=verify&checksum=$code\n\nThank you,\nBeyond Gaming","From: accounts@beyondgaming.org"); print "Please check your e-mail that you registered with for your new verification code"; } break; } ?>