Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- include "header.php";
- include "mysql.php";
- include "side.php";
- include "config.php";
- //Variables
- $ip = $_SERVER['REMOTE_ADDR'];
- $sel = 'SELECT * FROM users WHERE username ="' . $username . '"';
- $sel2 = 'SELECT * FROM users where email="' . $email . '"';
- $ipcheck = 'SELECT * from users where userIP="' . $ip . '"';
- $username = mysql_real_escape_string(trim($_POST['username']));
- $password = mysql_real_escape_string(trim($_POST['password']));
- $email = mysql_real_escape_string(trim($_POST['email']));
- $emailcheck = md5(rand(100000, 999999));
- $pass = md5($_POST['password']);
- $country = $_POST['country'];
- $time = time();
- $ref = $_COOKIE["prizegrand"];
- $paypal = $_POST['paypal'];
- ?><center>
- <table width=50%>
- <td>
- <form action="register.php" method="POST">
- Username:<br><input type=text name=username maxlength="30" value=<?echo $_POST['username'];?>>
- <input type=hidden name=ref value=<?php echo $_COOKIE["prizegrand"];?>><br>
- Password:<br><input type=password name=password maxlength="30"><br>
- Email:<br><input type=text name=email maxlength="40" value=<? echo $_POST['email'];?>><br>
- Paypal : <br><input type=text name=paypal maxlength="25"><br>
- <input type=hidden name=country value='<? echo getCountryFromIP($ip);?>'>Country: <?echo getCountryFromIP($ip);?><br>
- Referred by : <? echo $_COOKIE["prizegrand"];?><br>
- <input type=submit name=submit value='Register'><input type=hidden name=subm value=1>
- </form>
- </td>
- </table></center>
- <?
- if(isset($_POST['subm'])){
- $checkref = 'SELECT * from users where username ="' . $ref . '"';
- if($ref == ""){
- echo "<h2>You don't have a referrer, so another user can buy you as referral later</h2>";
- }else{
- if(mysql_num_rows(mysql_query($checkref,$c)) < 1)
- echo '<h2>Sorry that is not a valid referral</h2>';
- exit();
- }
- //Makes sure all info is correct
- if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
- echo '<h2>Sorry - ' . $email . ' is not a valid E-mail</h2>';
- exit();
- }
- if (mysql_num_rows(mysql_query($sel2,$c)) >= 1) {
- echo '<h2>Were Sorry ' . $email . ' is already in use</h2>';
- exit();
- }
- if (mysql_num_rows(mysql_query($sel,$c)) >= 1) {
- echo '<h2>Were Sorry ' . $username . ' is already in use</h2>';
- exit();
- }
- if ($username == $ref){
- echo '<h2>Were Sorry ' . $username . ' you cannot refer yourself!</h2>';
- exit();
- }
- if (mysql_num_rows(mysql_query($ipcheck,$c)) >= 1){
- echo '<h2>Your IP address is already registered with a another account</h2>';
- exit();
- }
- if($username == "") {
- echo '<h2>No Username inserted</h2>';
- exit();
- }
- if ($password == "") {
- echo '<cernter>No Password inserted</h2>';
- exit();
- }
- if ($email == "") {
- echo '<h2>No E-mail inserted</h2>';
- exit();
- }
- if ($paypal == "") {
- echo '<h2>No PayPal E-Mail inserted</h2>';
- exit();
- }
- $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)
- VALUES ("' . $username . '", "' . $pass . '", "0", "' . $email . '", "' . $emailcheck . '", "'.$paypal.'", "0", "'. $country . '", "' . $ip . '", "' . $ip . '", "' . $time . '", "' . $signupbonus . '", "' . $signupbonus . '", "", "", "' . $ref . '", "", "images.jpg")';
- mysql_query($d,$c) OR die(mysql_error());
- $updateref = mysql_query("UPDATE users SET referrals=referrals+1 WHERE username='" . $ref . "'",$c);
- line 103 - mail($email, "Account Registered on $sitename", "Hi {$username},
- Your email has just been used to register an account on $sitename
- We hope that you will take the time to visit us in the future.
- By simply completing a few offers you could earn a nice amount of cash!
- You have been given a $$signupbonus signup bonus!
- Also, if you refer your friends you will be given a $$refbonus bonus per friend!
- Your referal link is $siteurl/signup.php?ref=$username
- Simply get people to go there, and if they sign up, you earn extra!
- Username: $username
- Password: {$_POST['password']
- Please remember your security word at sign up, this is required if your account is compromised. We must verify this to reset your account.
- You will need to verify your email address before you can cash out.
- Go to $siteurl/verify.php?email=$email&code=$emailcheck to verify your account.
- Login Here: $siteurl/login.php
- Thanks for signing up,
- The $sitename Staff", "From: $adminemail");
- echo "<h2>Your account has been registered, you also have been registered on our forums, with your account information. Please be active!</h2>";
- }
- include "footer.php";
- die();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement