list($Page, $Limit) = Format::page_limit(IPS_PER_PAGE); if ($UsersOnly) { $DB->query(" SELECT DISTINCT IP FROM users_history_ips WHERE UserID = '$UserID' $SearchIPQuery"); if ($DB->has_results()) { $UserIPs = db_array($DB->collect('IP'), array(), true); $DB->query(" SELECT DISTINCT IP FROM users_history_ips WHERE UserID != '$UserID' AND IP IN (" . implode(',', $UserIPs) . ")"); unset($UserIPs); if ($DB->has_results()) { $OtherIPs = db_array($DB->collect('IP'), array(), true); $QueryID = $DB->query(" SELECT SQL_CALC_FOUND_ROWS IP, StartTime, EndTime FROM users_history_ips WHERE UserID = '$UserID' AND IP IN (" . implode(',', $OtherIPs) . ") ORDER BY StartTime DESC LIMIT $Limit"); unset($OtherIPs); } } } else { $QueryID = $DB->query(" SELECT SQL_CALC_FOUND_ROWS IP, StartTime, EndTime FROM users_history_ips WHERE UserID = '$UserID' $SearchIPQuery ORDER BY StartTime DESC LIMIT $Limit"); } if (isset($QueryID)) { $DB->query('SELECT FOUND_ROWS()'); list($NumResults) = $DB->next_record(); $DB->set_query_id($QueryID); $Results = $DB->to_array(false, MYSQLI_ASSOC); $IPMatches = $IPMatchesUser = $IPMatchesIgnored = array(); } else { $NumResults = 0; $Results = array(); } if (!empty($Results)) { $IPs = db_array($DB->collect('IP'), array(), true); $DB->query(" SELECT UserID, IP, StartTime, EndTime FROM users_history_ips WHERE IP IN (" . implode(',', $IPs) . ") AND UserID != '$UserID' AND UserID != 0 ORDER BY StartTime DESC"); unset($IPs); while ($Match = $DB->next_record(MYSQLI_ASSOC)) { $OtherIP = $Match['IP']; $OtherUserID = $Match['UserID']; if (!isset($IPMatchesUser[$OtherIP][$OtherUserID])) { $IPMatchesUser[$OtherIP][$OtherUserID] = 0; } if ($IPMatchesUser[$OtherIP][$OtherUserID] < 500) { $IPMatches[$OtherIP][] = $Match; } else { if (!isset($IPMatchesIgnored[$OtherIP][$OtherUserID])) { $IPMatchesIgnored[$OtherIP][$OtherUserID] = 0; } $IPMatchesIgnored[$OtherIP][$OtherUserID]++; } $IPMatchesUser[$OtherIP][$OtherUserID]++; } } $Pages = Format::get_pages($Page, $NumResults, IPS_PER_PAGE, 9); ?>
IP address search |
IP address | Started Toggle | Ended | Ended | Elapsed |
=$IP?> (=Tools::get_country_code_by_ajax($IP)?>)
if ($CanManageIPBans) {
if (!isset($IPBanChecks[$IP])) {
if (Tools::site_ban_ip($IP)) {
$IPBanChecks[$IP] = true;
?>
[Banned]
} else {
$IPBanChecks[$IP] = false;
?>
Ban
}
$Counter++;
}
}
?>
=Tools::get_host_by_ajax($IP)?> if (!empty($OtherUsers)) { if ($FirstOccurrence || count($OtherUsers) <= 100) { ?> (=count($OtherUsers)?>) } else { ?> (=count($OtherUsers)?>) } } else { ?> (0) } ?> |
=time_diff($StartTime)?> | =time_diff($EndTime)?> | //time_diff(strtotime($StartTime), strtotime($EndTime)); ?> |