Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.29 KB | None | 0 0
  1. <?php
  2. require_once('config/config.php');
  3. require_once('config/logincon.php');
  4.  
  5. $user = $_POST['user'];
  6. $pass = $_POST['pass'];
  7. $pass2 = $_POST['pass2'];
  8. $email = $_POST['email'];
  9.  
  10. if($pass != $pass2){
  11.     echo "0";
  12. }
  13. else if($user == '') {
  14.     echo "0";
  15. }
  16. else if($pass == '' || $pass2 == ''){
  17.     echo "0";
  18. }
  19. else if($email == ''){
  20.     echo "0";
  21. }
  22. else{
  23.     $usercheck = "SELECT bane FROM account_data WHERE name = '".$user."'";
  24.     $querycheck = mysql_query($usercheck);
  25.    
  26.     if(mysql_numrows($querycheck) > 0){
  27.         echo "1";
  28.     }
  29.     else if(mysql_numrows($querycheck) == 0){
  30.         if((!preg_match( '/^[_A-z0-9-]+((\.|\+)[_A-z0-9-]+)*@[A-z0-9-]+(\.[A-z0-9-]+)*(\.[A-z]{2,4})$/',$email)){
  31.             echo "2";
  32.         }
  33.         else{
  34.             $pass = base64_encode(pack('H*',sha1($pass)))
  35.             $verify = md5(rand(0,1000000));
  36.             mysql_query("INSERT INTO account_data (name, password, activated, access_level, membership, email, verify) VALUES ($user, $pass, 0, 0, 0, $email, $verify)") or die(mysql_error());
  37.            
  38.             echo "3";
  39.            
  40.            
  41.             $headers  = 'MIME-Version: 1.0' . "\r\n";
  42.             $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  43.             $headers .= 'From: Aion Rebirth <noreply@aionrebirth.com>';
  44.             mail($email,
  45.             "Validate your Aion Reibrth account!",
  46.             "<div style=\"height:40px;background:#09F;padding-top:10px;padding-left:20px;font-family:Arial, Helvetica, sans-serif;font-size:24px;color:#FFF;\"><b>vlog</b>City</div><div style=\"width:80%;min-height:100px;border:#999 1px solid;margin-left:auto;margin-right:auto;margin-top:15px;-webkit-border-top-left-radius: 5px;-webkit-border-bottom-right-radius: 5px;-moz-border-radius-topleft: 5px;-moz-border-radius-bottomright: 5px;border-top-left-radius: 5px;border-bottom-right-radius: 5px;font-family:Arial, Helvetica, sans-serif;padding:10px;\">Thank you for taking the time to register at Aion Rebirth, we are determined to grow and <br />expand. Your registration very valuable to us, so we ask <br />that you take the time to click the link below to verify that you're not a robot!<br /><br /><a href=\"" .SITE_URL. "/verify.php?email=" .$email. "&string=" .$verify. "\">Click Here To Validate</a><br /><br />"."By validating your account, you have saved at least one of our robot monkeys from blowing up!<br /><br /> Regards, Aion Reibrth team</div>", $headers);
  47.         }
  48.     }
  49. }
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement