Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Register($login, $email, $secret_code, $raspuns1, $raspuns2, $raspuns3, $raspuns4)
- {
- global $db;
- $password = ($this->generateCode(8));
- $password_hash = explode($login, $password);
- $password_hash = strtoupper(hash('whirlpool', $password_hash[0].''.$password_hash[1]));
- $reg = $db->sql("INSERT INTO `accounts` (`Username`, `Password`, `Email`, `secret_code`, `IP`, `RegisterDate`, `Raspuns1`, `Raspuns2`, `Raspuns3`, `Raspuns4`) VALUES ('$login', '$password_hash', '$email', '$secret_code', '".$this->getIP()."', '".time()."', '$raspuns1', '$raspuns2', '$raspuns3', '$raspuns4')");
- $id = mysql_insert_id();
- $mailbox = $db->sql("INSERT INTO `accounts_mail` (`id`,`from`,`item`,`message`,`date`) VALUES ('".$id."', 'National Roleplay', 'Welcome to National Roleplay!', 'Welcome to Natural Roleplay, <b>".$login."</b>. We are happy that you choosed our server! We congrat you for passing the preliminatory questions, but there a few more steps for you! This account can not be used to connect in-game, and because of that you have to create a character. Once you will create it, you will have further information.', '".time()."')");
- $title = ''.$login.' - Login informations';
- $headers = 'From: National Roleplay <no-reply@na-rp.ro>' . "\r\n" .
- 'Reply-To: National Roleplay <no-reply@na-rp.ro>' . "\r\n" .
- $headers = "Content-type: text/plain; charset=utf-8\r\n";
- $headers .= "Bine ai venit National Roleplay!";
- $letter = "Account ".$login." has been registered succesfully on ".$_SERVER["HTTP_HOST"].".\nThese are your login informations:\n\nUsername: ".$login."\nPassword: ".$password."\nSecret word: ".$secret_code."\n\nIf you did not registered the account ".$login.", you can ignore this mail or contact the National Roleplay Management..\n\nRegards,\nNational Roleplay.";
- if($reg == TRUE)
- {
- if(mail($email, $title, $letter, $headers))
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
- }
- else
- {
- return FALSE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement