All credits to the original Authors
admincp.php
Add
And this
/backend/config.php
Here you can determine how many IPs the same user can use.
insert:
account-signup.php
before:
Add
english.php
Add
[ATTACH]32._xfImport[/ATTACH]
admincp.php
Add
<td align="center"><a href="admincp.php?action=duplicateips"><img src="images/admin/double-ip.png" border="0" width="32" height="32" alt="" /><br />Double IP<br /></a></td>And this
#======================================================================#
# Duplicate IP's
#======================================================================#
if ($action == "duplicateips")
{
$res = SQL_Query_exec("SELECT ip FROM users GROUP BY ip HAVING count(*) > 1");
$num = mysql_num_rows($res);
list($pagertop, $pagerbottom, $limit) = pager(25, $num, 'admincp.php?action=duplicateips&');
$res = SQL_Query_exec("SELECT id, username, class, email, ip, added, last_access, COUNT(*) as count FROM users GROUP BY ip HAVING count(*) > 1 ORDER BY id ASC $limit");
stdhead(T_("DUPLICATEIP"));
navmenu();
if ($CURUSER["class"] < "7") {
show_msg("Erreur", "Vous ne pouvez pas visualiser cette page!", 1);
}
begin_frame(T_("DUPLICATEIP"));
?>
<center><?php echo T_("DUPLIATEIPINFO"); ?></center>
<br />
<?php if ($num > 0): ?>
<br />
<table border="0" cellpadding="3" cellspacing="0" width="100%" align="center" class="table_table">
<tr>
<th class="table_head"><?php echo T_("USERNAME"); ?></th>
<th class="table_head"><?php echo T_("USERCLASS"); ?></th>
<th class="table_head"><?php echo T_("EMAIL"); ?></th>
<th class="table_head"><?php echo T_("IP"); ?></th>
<th class="table_head"><?php echo T_("ADDED"); ?></th>
<th class="table_head"><?php echo T_("COUNT"); ?></th>
</tr>
<?php while ($row = mysql_fetch_assoc($res)): ?>
<tr>
<td class="table_col1" align="center"><a href="account-details.php?id=<?php echo $row["id"]; ?>"><?php echo $row["username"]; ?></a></td>
<td class="table_col2" align="center"><?php echo get_user_class_name($row["class"]); ?></td>
<td class="table_col1" align="center"><?php echo $row["email"]; ?></td>
<td class="table_col2" align="center"><?php echo $row["ip"]; ?></td>
<td class="table_col1" align="center"><?php echo utc_to_tz($row["added"]); ?></td>
<td class="table_col1" align="center"><a href="admincp.php?action=usersearch&ip=<?php echo $row['ip']; ?>"><?php echo number_format($row['count']); ?></a></td>
</tr>
<?php endwhile; ?>
</table>
<?php else: ?>
<center><b><?php echo T_("NOTHING_FOUND"); ?></b></center>
<?php
endif;
if ($num > 25) echo $pagerbottom;
end_frame();
stdfoot();
}
#======================================================================#
# End Duplicate IP's
#======================================================================#/backend/config.php
Here you can determine how many IPs the same user can use.
insert:
// Max IP
$site_config["ipcheck"] = true; // Enable/disable
$site_config["accountmax"] = 1; // max number of accountsaccount-signup.php
before:
if ($message == "") {Add
//check if IP is already a peer
if ($site_config["ipcheck"] && $site_config["accountmax"] >= "1") {
$ip = $_SERVER['REMOTE_ADDR'];
$ipq = get_row_count("users", "WHERE ip = '$ip'");
if ($ipq >= $site_config["accountmax"])
$message = $site_config["SITENAME"]." only allows " . $site_config["accountmax"] . " user account per IP address. <br> If you want to create a new account, please contact an administrator.<br /><br /><font color=red> The limit for ip : $ip has been reached.</font><br /><br />Registration failed. <br /><a style='cursor: pointer;cursor:hand;' href='account-login.php'><font color=red>Click here to return to the login page.</font></a>";
}
$secret = mksecret(); //generate secret field
$wantpassword = passhash($wantpassword);// hash the password
if ($message != "")
show_error_msg(T_("SIGNUP_FAILED"), $message, 1);english.php
Add
// Double ip
$LANG['COUNT'] = "Count";
$LANG['DUPLICATEIP'] = 'Duplicate IP\'s';
$LANG['DUPLICATEIPINFO'] = "This page displays all users which the database shows them having more than one account associated by there ip.";[ATTACH]32._xfImport[/ATTACH]
