if(!check_perms('users_view_ips')) { error(403); } View::show_header('Dupe IPs'); define('USERS_PER_PAGE', 50); define('IP_OVERLAPS', 5); list($Page,$Limit) = Format::page_limit(USERS_PER_PAGE); $RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS m.ID, m.IP, m.Username, m.PermissionID, m.Enabled, i.Donor, i.Warned, i.JoinDate, (SELECT COUNT(DISTINCT h.UserID) FROM users_history_ips AS h WHERE h.IP=m.IP) AS Uses FROM users_main AS m LEFT JOIN users_info AS i ON i.UserID=m.ID WHERE (SELECT COUNT(DISTINCT h.UserID) FROM users_history_ips AS h WHERE h.IP=m.IP) >= ".IP_OVERLAPS." AND m.Enabled = '1' AND m.IP != '127.0.0.1' ORDER BY Uses DESC LIMIT $Limit"); $DB->query("SELECT FOUND_ROWS()"); list($Results) = $DB->next_record(); $DB->set_query_id($RS); if($DB->record_count()) { ?>
User | IP | Dupes | Registered |
=Users::format_username($UserID, true, true, true, true)?> | =Tools::get_host_by_ajax($IP)." ($IP)"?>[H|S] | =display_str($Uses)?> | =time_diff($Joined)?> |