This is hard to believe, but some people are desperate as to keep registering accounts to level up their adoptables. Let's make this method of leveling up not worth it.
Step 1:
Run this query
Step 2:
Open register2.php
Find
Above this line, put
Step 3:
Still in register2.php, find this code:
Below all of that, put
Step 4:
Find this line
Insert below it:
Note: if you have installed my currency mod, you'll want to insert this instead:
Step 1:
Run this query
PHP:
ALTER TABLE users ADD (ip VARCHAR(30) NOT NULL DEFAULT "0")
Step 2:
Open register2.php
Find
PHP:
// Connect to our database
Above this line, put
PHP:
$ip = $_SERVER['REMOTE_ADDR'];
$ip = preg_replace("/[^a-zA-Z0-9@._-]/", "", $ip);
Step 3:
Still in register2.php, find this code:
PHP:
//Check that username does not already exist
$query = "SELECT * FROM users WHERE username = '$username'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$luser=@mysql_result($result,$i,"username");
$i++;
}
$luser = strtolower($luser);
$u2 = $str = strtolower($username);
if($luser == $u2){
$template = replace(':ARTICLETITLE:','Error',$template);
$template = replace(':ARTICLECONTENT:','Your username has been taken. Please <a href="register.php">go back</a> and select a different username.',$template);
echo $template;
die();
}
Below all of that, put
PHP:
// Check that user is not making multiple accounts
$query = "SELECT * FROM users WHERE ip = '$ip'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$ip2=@mysql_result($result,$i,"ip");
$i++;
}
if($ip == $ip2){
$template = replace(':ARTICLETITLE:','Error',$template);
$template = replace(':ARTICLECONTENT:','You are not allowed to make multiple accounts.',$template);
echo $template;
die();
}
Step 4:
Find this line
PHP:
//All checks pass, create the user
Insert below it:
PHP:
$pass1 = md5($pass1); //MD5 the password
mysql_query("INSERT INTO users VALUES ('', '$username', '$pass1','$email','free', '$ip')");
Note: if you have installed my currency mod, you'll want to insert this instead:
PHP:
$pass1 = md5($pass1); //MD5 the password
mysql_query("INSERT INTO users VALUES ('', '$username', '$pass1','$email','free', '0', '$ip')");