$header_ad"; $links = get_links(10); $error = ""; if($member) { $a = redirect("$root_path/index.php"); die($a); } else { $temp = template("left_login"); eval("\$user_info = \"$temp\";"); } if(!isset($_GET['action'])) { $temp = template("register"); eval("\$templateVar = \"$temp\";"); } else { if($_GET['action'] == 1) { $uni_id = md5(uniqid(time())); $temp = template("register"); eval("\$templateVar = \"$temp\";"); check_magic_quotes(); $_POST['user_name'] = strip_tags(addslashes(trim($_POST['user_name']))); $_POST['user_full_name'] = strip_tags(addslashes(trim($_POST['user_full_name']))); $_POST['user_location'] = strip_tags(addslashes(trim($_POST['user_location']))); $_POST['user_email'] = strip_tags(addslashes(trim($_POST['user_email']))); $_POST['user_password'] = strip_tags(addslashes(trim($_POST['user_password']))); $_POST['user_password2'] = strip_tags(addslashes(trim($_POST['user_password2']))); if(strlen($_POST['user_password']) < 5) $error = "
Password too short : Password must be atleast 5 characters long !
"; else if($_POST['user_password'] != $_POST['user_password2']) $error = "
Password Mismatch :
Please enter the same password in both password and confirm password fields.. !
"; else if(!valid_email($_POST['user_email'])) $error = "
Invalid Email Address :
The email address $_POST[user_email] is invalid, please use a valid email address.
"; if(strlen($_POST['user_name']) > 8) $error = "
Username too long : Your username cannot be more than 8 characters !

"; else { unset($_POST['user_password2']); $_POST['user_email'] = addslashes(trim($_POST['user_email'])); $res = mysql_query("SELECT * FROM {$prefix}users WHERE user_email='$_POST[user_email]' OR user_name='$_POST[user_name]'") or report(); if(mysql_num_rows($res) == 0) { check_magic_quotes(); $pass = $_POST['user_password']; $_POST['user_password'] = md5($_POST['user_password']); $t = time(); $validation_code = md5($t); $_POST['user_status'] = "N"; $arr = $_POST; $arr['user_join_date'] = time(); $arr['user_validate_code'] = $validation_code; /* -------------------------------------------------- | REGISTERATION TYPE CHECK | -------------------------------------------------- */ $query = insert_query('users',$arr); mysql_query($query) or cdie("user_register:".mysql_error()); $subject = "Por favor activa tu cuenta"; $body = " Dear $_POST[user_full_name], Thank you for your registeration. Please use the following link in order to validate your account, $root_path/validate.php?code=$validation_code Validation code : $validation_code Once you validate your account, you will be able to use all the features of the website. Please use the following information in order to login to your account Email : $_POST[user_email] Password : $pass If you have not registered at this website, please ignore this message. best regards, Staff Team."; $from = "noreply@arcadewy.com"; $to = $_POST['user_email']; if(!@mail($to,$subject,$body,"From: \"$settings[set_site_name]\" <$from>")) cdie("CRITICAL ERROR : Validation email could not be sent, please report to $from"); redirect("./index.php"); } else $error = "
Username / Email already registered :
A user is already registered with this username/email address, please use another email/username address.
"; } } } $temp = template("header"); eval("\$header = \"$temp\";"); $temp = template("left"); eval("\$left = \"$temp\";"); $temp = template("right"); eval("\$right = \"$temp\";"); $temp = template("footer"); eval("\$footer = \"$temp\";"); $center = "$error".$templateVar; include "./header.php"; mysql_close(); ?>