diff --git a/web/app/controllers/contest_members.php b/web/app/controllers/contest_members.php index 285e0d9..1508c0c 100644 --- a/web/app/controllers/contest_members.php +++ b/web/app/controllers/contest_members.php @@ -187,13 +187,15 @@ #'.UOJLocale::get('username').'remote_addr是否参赛'; + $header_row = '#'.UOJLocale::get('username').'remote_addrhttp_x_forwarded_for是否参赛'; $ip_owner = array(); + $forwarded_ip_owner = array(); $has_participated = array(); foreach (DB::selectAll("select * from contests_registrants where contest_id = {$contest['id']} order by username desc") as $reg) { $user = queryUser($reg['username']); $ip_owner[$user['remote_addr']] = $reg['username']; + $forwarded_ip_owner[$user['http_x_forwarded_for']] = $reg['username']; $has_participated[$reg['username']] = $reg['has_participated']; } } else { @@ -211,7 +213,7 @@ if (!$show_ip) { echo ''; } else { - if ($ip_owner[$user['remote_addr']] != $user['username']) { + if ($ip_owner[$user['remote_addr']] != $user['username'] || $forwarded_ip_owner[$user['http_x_forwarded_for']] != $user['username']) { echo ''; } else { echo ''; @@ -221,6 +223,7 @@ echo ''.$user_link.''; if ($show_ip) { echo ''.$user['remote_addr'].''; + echo ''.$user['http_x_forwarded_for'].''; echo ''.($has_participated[$user['username']] ? 'Yes' : 'No').''; } echo '';