Advertisement
Guest User

Untitled

a guest
May 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. <?
  2. session_start();
  3. include "header.php";
  4. include "mysql.php";
  5. include "side.php";
  6. include "config.php";
  7. //Variables
  8. $ip = $_SERVER['REMOTE_ADDR'];
  9. $sel = 'SELECT * FROM users WHERE username ="' . $username . '"';
  10. $sel2 = 'SELECT * FROM users where email="' . $email . '"';
  11. $ipcheck = 'SELECT * from users where userIP="' . $ip . '"';
  12. $username = mysql_real_escape_string(trim($_POST['username']));
  13. $password = mysql_real_escape_string(trim($_POST['password']));
  14. $email = mysql_real_escape_string(trim($_POST['email']));
  15. $emailcheck = md5(rand(100000, 999999));
  16. $pass = md5($_POST['password']);
  17. $country = $_POST['country'];
  18. $time = time();
  19. $ref = $_COOKIE["prizegrand"];
  20. $paypal = $_POST['paypal'];
  21. ?><center>
  22. <table width=50%>
  23. <td>
  24. <form action="register.php" method="POST">
  25. Username:<br><input type=text name=username maxlength="30" value=<?echo $_POST['username'];?>>
  26. <input type=hidden name=ref value=<?php echo $_COOKIE["prizegrand"];?>><br>
  27. Password:<br><input type=password name=password maxlength="30"><br>
  28. Email:<br><input type=text name=email maxlength="40" value=<? echo $_POST['email'];?>><br>
  29. Paypal : <br><input type=text name=paypal maxlength="25"><br>
  30. <input type=hidden name=country value='<? echo getCountryFromIP($ip);?>'>Country: <?echo getCountryFromIP($ip);?><br>
  31. Referred by : <? echo $_COOKIE["prizegrand"];?><br>
  32. <input type=submit name=submit value='Register'><input type=hidden name=subm value=1>
  33. </form>
  34. </td>
  35. </table></center>
  36. <?
  37. if(isset($_POST['subm'])){
  38. $checkref = 'SELECT * from users where username ="' . $ref . '"';
  39. if($ref == ""){
  40. echo "<h2>You don't have a referrer, so another user can buy you as referral later</h2>";
  41. }else{
  42. if(mysql_num_rows(mysql_query($checkref,$c)) < 1)
  43. echo '<h2>Sorry that is not a valid referral</h2>';
  44. exit();
  45. }
  46. //Makes sure all info is correct
  47. if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
  48. echo '<h2>Sorry - ' . $email . ' is not a valid E-mail</h2>';
  49. exit();
  50. }
  51. if (mysql_num_rows(mysql_query($sel2,$c)) >= 1) {
  52. echo '<h2>Were Sorry ' . $email . ' is already in use</h2>';
  53. exit();
  54. }
  55. if (mysql_num_rows(mysql_query($sel,$c)) >= 1) {
  56. echo '<h2>Were Sorry ' . $username . ' is already in use</h2>';
  57. exit();
  58. }
  59. if ($username == $ref){
  60. echo '<h2>Were Sorry ' . $username . ' you cannot refer yourself!</h2>';
  61. exit();
  62. }
  63. if (mysql_num_rows(mysql_query($ipcheck,$c)) >= 1){
  64. echo '<h2>Your IP address is already registered with a another account</h2>';
  65. exit();
  66. }
  67. if($username == "") {
  68. echo '<h2>No Username inserted</h2>';
  69. exit();
  70. }
  71. if ($password == "") {
  72. echo '<cernter>No Password inserted</h2>';
  73. exit();
  74. }
  75. if ($email == "") {
  76. echo '<h2>No E-mail inserted</h2>';
  77. exit();
  78. }
  79. if ($paypal == "") {
  80. echo '<h2>No PayPal E-Mail inserted</h2>';
  81. exit();
  82. }
  83. $d = 'INSERT INTO users (username, userpass, admin, email, email_check, email_verified, paypal, country, userIP, signupIP, signedup, total_earned, current_balance, lastcashout, referrals, referrer, banned, profileimage)
  84. VALUES ("' . $username . '", "' . $pass . '", "0", "' . $email . '", "' . $emailcheck . '", "'.$paypal.'", "0", "'. $country . '", "' . $ip . '", "' . $ip . '", "' . $time . '", "' . $signupbonus . '", "' . $signupbonus . '", "", "", "' . $ref . '", "", "images.jpg")';
  85. mysql_query($d,$c) OR die(mysql_error());
  86. $updateref = mysql_query("UPDATE users SET referrals=referrals+1 WHERE username='" . $ref . "'",$c);
  87. line 103 - mail($email, "Account Registered on $sitename", "Hi {$username},
  88.  
  89. Your email has just been used to register an account on $sitename
  90.  
  91. We hope that you will take the time to visit us in the future.
  92. By simply completing a few offers you could earn a nice amount of cash!
  93.  
  94. You have been given a $$signupbonus signup bonus!
  95. Also, if you refer your friends you will be given a $$refbonus bonus per friend!
  96.  
  97. Your referal link is $siteurl/signup.php?ref=$username
  98. Simply get people to go there, and if they sign up, you earn extra!
  99.  
  100. Username: $username
  101. Password: {$_POST['password']
  102.  
  103. Please remember your security word at sign up, this is required if your account is compromised. We must verify this to reset your account.
  104. You will need to verify your email address before you can cash out.
  105.  
  106. Go to $siteurl/verify.php?email=$email&code=$emailcheck to verify your account.
  107. Login Here: $siteurl/login.php
  108.  
  109. Thanks for signing up,
  110. The $sitename Staff", "From: $adminemail");
  111. echo "<h2>Your account has been registered, you also have been registered on our forums, with your account information. Please be active!</h2>";
  112. }
  113. include "footer.php";
  114. die();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement