Advertisement
Guest User

Untitled

a guest
Jul 17th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php define('DarkCoreCMS',TRUE);
  2. include 'config.php';
  3. include 'functions/global_functions.php';
  4. $_error= '';
  5. if (!isset($_POST['username']) || !isset($_POST['email']) || !isset($_POST['Password']) || !isset($_POST['RepeatPassword']) || !isset($_POST['Expansion'])){
  6. $_error = $_error . 'regerror=1&errtype=';
  7. header('Location: ../register?'.$_error);
  8. }
  9. else {
  10. if (check_user_exist($_POST['username']) > 0)
  11. $_error = $_error . 'A';
  12. if (strlen($_POST['username']) < 3)
  13. $_error = $_error . 'B';
  14. if (strlen($_POST['Password']) < 8)
  15. $_error = $_error . 'C';
  16. if (check_email_exist($_POST['email']) > 0)
  17. $_error = $_error . 'D';
  18. if (strlen($_POST['email']) < 10)
  19. $_error = $_error . 'E';
  20. if ($_POST['Password'] != $_POST['RepeatPassword'])
  21. $_error = $_error . 'F';
  22. if (strlen($_error) > 0)
  23. header('Location: ../register?regerror=1'.$_error);
  24. else {
  25. $username = $_POST['username'];
  26. $password = $_POST['Password'];
  27. $email = strtoupper($_POST['email']);
  28. $bnetPassword = bnet_encrypt($email, $password);
  29. register_bnet_user($email,$bnetPassword);
  30. $accPassword = encrypt($username, $password);
  31. $bnet_accID = req_bnetAccountID($email);
  32. register_user($username,$accPassword,$email,$_POST['Expansion'],$bnet_accID);
  33. header('Location: ../create_success.php?user='.$username);
  34. }
  35. }
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement